6 #include "StMcOutputMaker.h"
8 #include "St_DataSetIter.h"
9 #include "StMcEventMaker/StMcEventMaker.h"
10 #include "StMcEvent/StMcEvent.hh"
11 #include "StMcEvent/StMcVertex.hh"
12 #include "StMcEvent/StMcTrack.hh"
13 #include "StEEmcUtil/EEmcGeom/EEmcGeomSimple.h"
15 #include "StMuDSTMaker/COMMON/StMuDstMaker.h"
16 #include "StMuDSTMaker/COMMON/StMuDst.h"
17 #include "StMuDSTMaker/COMMON/StMuTrack.h"
19 #include "StarClassLibrary/StParticleDefinition.hh"
27 memset(hA,0,
sizeof(hA));
34 StMcOutputMaker::~StMcOutputMaker(){
42 StMcOutputMaker::Init(){
45 memset(hA,0,
sizeof(hA));
46 hA[0]=
new TH2F(
"gEEmcEtaPhi",
"Generated pi0 track; phi / deg;EEmc Eta",360,-180.,180,20,1.,2.);
48 hA[1]=
new TH1F(
"gPt",
"Generated pi0 Pt ",50,0.,25.);
49 hA[2]=
new TH1F(
"gEta",
"Generated pi0 eta ",50,0.,2.5);
50 hA[3]=
new TH1F(
"gEnergy",
"generated Mc pi0 energy",80,0.,80.);
51 hA[4]=
new TH1F(
"gZgg",
"generated Mc pi0 energy sharing",100,0.,1.);
52 hA[5]=
new TH1F(
"gZgg01",
"generated Mc pi0 energy sharing[5,10]",100,0.,1.);
53 hA[6]=
new TH1F(
"gZgg02",
"generated Mc pi0 energy sharing[10,15]",100,0.,1.);
54 hA[7]=
new TH1F(
"gZgg03",
"generated Mc pi0 energy sharing[15,20]",100,0.,1.);
55 hA[8]=
new TH1F(
"gZgg04",
"generated Mc pi0 energy sharing[20,30]",100,0.,1.);
56 hA[9]=
new TH1F(
"gZgg05",
"generated Mc pi0 energy sharing[30,60]",100,0.,1.);
57 hA[10]=
new TH1F(
"gPhi",
"Generated pi0 Phi ",360,-180.,180.);
58 hA[11]=
new TH1F(
"gEEmcEta",
"Generated pi0 eta in EEMC ",50,0.,2.5);
59 hA[12]=
new TH1F(
"DeltaEta",
"genEta - EEmcEta ",40,-2.,2.);
60 hA[13]=
new TH1F(
"gZvert",
"generated Z vertex ",300,-150.,150.);
67 for(i=0;i<mxHa;i++)
if(hA[i]) HList->Add(hA[i]);
69 return StMaker::Init();
75 StMcOutputMaker::Clear(
const Option_t*){
91 float hlow=270.0*tan(15.0*3.14159265/180.0);
92 float hhigh=270.0*tan(40.0*3.14159265/180.0);
102 mMcEvent = (
StMcEvent*) StMaker::GetChain()->GetDataSet(
"StMcEvent");
113 const StSPtrVecMcVertex &VL=mMcEvent->vertices();
118 for( i=0;i<VL.size();i++) {
122 float x=V->position().x();
123 float y=V->position().y();
124 float zz=V->position().z();
125 float Rxy=TMath::Sqrt(x*x+y*y);
129 int nD=V-> numberOfDaughters();
131 for(
int it=0; it<nD;it++ ) {
133 int gid=tr->geantId();
138 float psRap=tr->pseudoRapidity();
139 if( psRap<0 || psRap>3.)
continue;
143 if(ppt<=3.0)
continue;
145 hHeight=ppt*(270.0-zz)/ppz+Rxy;
147 if(hHeight<=hlow || hHeight >=hhigh)
continue;
149 float etatheta=TMath::ATan(hHeight/270.0);
151 float mideta=tan(etatheta/2.0);
152 float eemceta=-log(mideta);
155 hA[0]->Fill(p4.phi()/3.1416*180,eemceta);
156 hA[2]->Fill(tr->pseudoRapidity());
157 hA[10]->Fill(p4.phi()/3.1416*180);
158 hA[1]->Fill(p4.perp());
160 hA[11]->Fill(eemceta);
161 hA[12]->Fill(tr->pseudoRapidity()-eemceta);
169 genEta=tr->pseudoRapidity();
171 genPhi=p4.phi()/3.1416*180;
174 geemcEta.push_back(eemceta);
183 int geid1=tr1->geantId();
185 int geid2=tr2->geantId();
187 if((geid1==1)&&(geid2==1))
189 for(
int it=0; it<nD;it++ ) {
195 float ener=tr->fourMomentum().e();
203 if(Etot>=5.0 && Etot<=10.0)
207 if(Etot>=10.0 && Etot<=15.0)
211 if(Etot>=15.0 && Etot<=20.0)
215 if(Etot>=20.0 && Etot<=30.0)
219 if(Etot>=30.0 && Etot<=60.0)
Monte Carlo Track class All information on a simulated track is stored in this class: kinematics...
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...