16 void bfcMixer_TpxAuAu11(
const Int_t Nevents=100,
17 const Char_t *daqfile=
"/star/rcf/test/daq/2010/embed/auau11_prod/st_physics_adc_11148048_raw_1520001.daq",
18 const Char_t *tagfile=
"/star/rcf/test/daq/2010/embed/auau11_prod/st_physics_adc_11148048_raw_1520001.tags.root",
19 const Double_t pt_low=0.1,
20 const Double_t pt_high=5.0,
21 const Double_t eta_low=-1.5,
22 const Double_t eta_high=1.5,
23 const Double_t vzlow = -150.0,
24 const Double_t vzhigh = 150.0,
26 const Double_t mult=100,
27 const std::vector<Int_t> triggers = 0,
28 const Char_t *prodName =
"P10ihAuAu11",
29 const Char_t* type =
"FlatPt"){
31 TString prodP08iepp(
"DbV20081117 B2008a ITTF IAna ppOpt l3onl emcDY2 fpd ftpc trgd ZDCvtx NosvtIT NossdIT Corr4 OSpaceZ2 OGridLeak3D VFMCE -hitfilt");
36 TString prodP08iedAu(
"DbV20090213 P2008 ITTF OSpaceZ2 OGridLeak3D beamLine VFMCE TpxClu -VFMinuit -hitfilt");
37 TString prodP10iapp(
"DbV20091001 pp2009c TpcRS ITTF OSpaceZ2 OGridLeak3D beamLine, VFMCE TpcRS -VFMinuit -hitfilt");
40 TString prodP10ihAuAu39(
"DbV20100909 P2010a,btof,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE TpxClu -VFMinuit -hitfilt");
41 TString prodP10ihAuAu11(
"DbV20100821 P2010a,btof,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE TpxClu -VFMinuit -hitfilt");
42 TString prodP10ihAuAu7(
"DbV20100821 P2010a,btof,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE TpxClu -VFMinuit -hitfilt");
44 TString geomP08ic(
"ry2008");
45 TString geomP10ih(
"ry2010");
46 TString chain1Opt(
"in,magF,tpcDb,NoDefault,TpxRaw,-ittf,NoOutput");
47 TString chain2Opt(
"NoInput,PrepEmbed,gen_T,geomT,sim_T,TpcRS,-ittf,-tpc_daq,nodefault");
51 TString chain3Opt(
"");
52 if (prodName ==
"P08icpp") { chain3Opt = prodP08icpp; chain2Opt += geomP08ic; }
53 else if (prodName ==
"P08iepp") { chain3Opt = prodP08iepp; chain2Opt += geomP08ic; }
54 else if (prodName ==
"P08icAuAu9") { chain3Opt = prodP08icAuAu9; chain2Opt += geomP08ic; }
55 else if (prodName ==
"P08icdAu") { chain3Opt = prodP08icdAu; chain2Opt += geomP08ic; }
56 else if (prodName ==
"P08iedAu") { chain3Opt = prodP08iedAu; chain2Opt += geomP08ic; }
57 else if (prodName ==
"P08icAuAu200") { chain3Opt = prodP08icAuAu200; chain2Opt += geomP08ic; }
58 else if (prodName ==
"P10iapp") { chain3Opt = prodP10iapp; chain2Opt += geomP10ih; }
59 else if (prodName ==
"P10ihAuAu39") { chain3Opt = prodP10ihAuAu39; chain2Opt += geomP10ih; }
60 else if (prodName ==
"P10ihAuAu11") { chain3Opt = prodP10ihAuAu11; chain2Opt += geomP10ih; }
61 else if (prodName ==
"P10ihAuAu7") { chain3Opt = prodP10ihAuAu7; chain2Opt += geomP10ih; }
63 cout <<
"Choice prodName " << prodName <<
" does not correspond to known chain. Processing impossible. " << endl;
66 chain3Opt +=
",Embedding,TpcMixer,GeantOut,MiniMcMk,McAna,-in,NoInput,useInTracker";
69 if (prodName ==
"P08icpp") { chain3Opt += geomP08ic; }
70 else if (prodName ==
"P08iepp") { chain3Opt += geomP08ic; }
71 else if (prodName ==
"P08icAuAu9") { chain3Opt += geomP08ic; }
72 else if (prodName ==
"P08icdAu") { chain3Opt += geomP08ic; }
73 else if (prodName ==
"P08iedAu") { chain3Opt += geomP08ic; }
74 else if (prodName ==
"P08icAuAu200") { chain3Opt += geomP08ic; }
75 else if (prodName ==
"P10iapp") { chain3Opt += geomP10ih; }
76 else if (prodName ==
"P10ihAuAu39") { chain3Opt += geomP10ih; }
77 else if (prodName ==
"P10ihAuAu11") { chain3Opt += geomP10ih; }
78 else if (prodName ==
"P10ihAuAu7") { chain3Opt += geomP10ih; }
80 cout <<
"Choice prodName " << prodName <<
" does not correspond to known chain. Processing impossible. " << endl;
85 gROOT->LoadMacro(
"bfc.C");
86 if (gClassTable->GetID(
"StBFChain") < 0)
Load();
88 Chain =
new StChain(
"Embedding");
90 bfc(-1,chain1Opt,daqfile);
92 chain1->SetName(
"One");
97 chain2->SetName(
"Two");
100 if (chain2->GetOption(
"TRS")){
103 cout <<
"Cannot find Trs in chain2" << endl;
106 trsMk->setNormalFactor(1.32);
114 TString OutputFileName(gSystem->BaseName(daqfile));
115 OutputFileName.ReplaceAll(
"*",
"");
116 OutputFileName.ReplaceAll(
".daq",
"");
118 OutputFileName.Append(
".root");
119 bfc(-1,chain3Opt,0,OutputFileName);
121 chain3->SetName(
"Three");
125 if( prodName ==
"P08icAuAu200")
127 mixer->SetInput(
"Input1",
"MixerEvent");
131 mixer->SetInput(
"Input1",
"TpxRaw/.data/Event");
135 if (chain2Opt.Contains(
"TpcRS",TString::kIgnoreCase)) {
136 mixer->SetInput(
"Input2",
"TpcRS/Event");
138 mixer->SetInput(
"Input2",
"Trs/.const/Event");
146 gSystem->Load(
"StEmcSimulatorMaker");
147 gSystem->Load(
"StEmcMixerMaker");
148 gSystem->Load(
"StEEmcSimulatorMaker");
153 chain3->AddAfter(
"emcRaw",bemcMixer);
154 chain3->AddAfter(
"emcRaw",bemcSim);
155 chain3->AddAfter(
"emcRaw",mcEventMaker);
156 bemcMixer->SetDebug(0);
166 chain3->AddAfter(
"emcRaw",eemcMixer);
167 chain3->AddAfter(
"emcRaw",eemcFastSim);
169 eemcFastSim->SetEmbeddingMode();
173 bool useEndcapSlowSim =
true;
174 if(useEndcapSlowSim) {
176 chain3->AddAfter(
"EEmcFastSim",slowSim);
185 gMessMgr->QAInfo() << Form(
"Run is started at Date/Time %i/%i",t.GetDate(),t.GetTime()) << endm;
187 gMessMgr->QAInfo() << Form(
"Run on %s in %s",gSystem->HostName(),gSystem->WorkingDirectory()) << endm;
188 gMessMgr->QAInfo() << Form(
"with %s", Chain->GetCVS()) << endm;
192 cout <<
"bfcMixer: Setting PID: "<<pid<<endl;
193 embMk->SetTagFile(tagfile);
195 embMk->SetOpt( pt_low, pt_high, eta_low, eta_high, 0., 6.283185, type);
197 embMk->SetPartOpt( pid,mult);
200 embMk->SetSkipMode(kFALSE);
205 if ( !triggers.empty() ){
206 for(std::vector<Int_t>::iterator iter = triggers.begin(); iter != triggers.end(); iter++){
207 embMk->SetTrgOpt((*iter)) ;
212 embMk->SetZVertexCut(vzlow, vzhigh) ;
215 Chain->SetAttr(
".Privilege",0,
"*" );
216 Chain->SetAttr(
".Privilege",1,
"StBFChain::*" );
217 Chain->SetAttr(
".Privilege",1,
"StIOInterFace::*" );
218 Chain->SetAttr(
".Privilege",1,
"St_geant_Maker::*");
219 Chain->SetAttr(
".Privilege",1,
"StPrepEmbedMaker::*");
221 if (Nevents < 0)
return;
222 Int_t iInit = Chain->Init();
223 if (iInit >=
kStEOF) {Chain->FatalErr(iInit,
"on init");
return;}
224 StMaker *treeMk = Chain->GetMaker(
"outputStream");
225 Chain->EventLoop(Nevents,treeMk);
226 gMessMgr->QAInfo() <<
"Run completed " << endm;
227 gSystem->Exec(
"date");
Prepare GEANT Maker with input from embedding settings and DAQ event.
Filling of all StMcEvent classes from g2t tables Transform all the data in the g2t tables into the co...
virtual Int_t Load()
Routine handling library loading depending on chain options.
void setEmbeddingMode(Bool_t e=true)
Sets all switches required to perform embedding.