16 void bfcMixer_TpxAuAu200(
const Int_t Nevents=100,
17 const Char_t *daqfile=
"/star/rcf/test/daq/2010/embed/auau200_prod/st_physics_adc_11035021_raw_4420002.daq",
18 const Char_t *tagfile=
"/star/rcf/test/daq/2010/embed/auau200_prod/st_physics_adc_11035021_raw_4420002.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 =
"P10ihAuAu200",
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");
43 TString prodP10ihAuAu200(
"DbV20101106 P2010a,btof,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE TpxClu -VFMinuit -hitfilt");
45 TString geomP08ic(
"ry2008");
46 TString geomP10ih(
"ry2010");
47 TString chain1Opt(
"in,magF,tpcDb,NoDefault,TpxRaw,-ittf,NoOutput");
48 TString chain2Opt(
"NoInput,PrepEmbed,gen_T,geomT,sim_T,TpcRS,-ittf,-tpc_daq,nodefault");
52 TString chain3Opt(
"");
53 if (prodName ==
"P08icpp") { chain3Opt = prodP08icpp; chain2Opt += geomP08ic; }
54 else if (prodName ==
"P08iepp") { chain3Opt = prodP08iepp; chain2Opt += geomP08ic; }
55 else if (prodName ==
"P08icAuAu9") { chain3Opt = prodP08icAuAu9; chain2Opt += geomP08ic; }
56 else if (prodName ==
"P08icdAu") { chain3Opt = prodP08icdAu; chain2Opt += geomP08ic; }
57 else if (prodName ==
"P08iedAu") { chain3Opt = prodP08iedAu; chain2Opt += geomP08ic; }
58 else if (prodName ==
"P08icAuAu200") { chain3Opt = prodP08icAuAu200; chain2Opt += geomP08ic; }
59 else if (prodName ==
"P10iapp") { chain3Opt = prodP10iapp; chain2Opt += geomP10ih; }
60 else if (prodName ==
"P10ihAuAu39") { chain3Opt = prodP10ihAuAu39; chain2Opt += geomP10ih; }
61 else if (prodName ==
"P10ihAuAu11") { chain3Opt = prodP10ihAuAu11; chain2Opt += geomP10ih; }
62 else if (prodName ==
"P10ihAuAu7") { chain3Opt = prodP10ihAuAu7; chain2Opt += geomP10ih; }
63 else if (prodName ==
"P10ihAuAu200") { chain3Opt = prodP10ihAuAu200; chain2Opt += geomP10ih; }
65 cout <<
"Choice prodName " << prodName <<
" does not correspond to known chain. Processing impossible. " << endl;
68 chain3Opt +=
",Embedding,TpcMixer,GeantOut,MiniMcMk,McAna,-in,NoInput,useInTracker";
71 if (prodName ==
"P08icpp") { chain3Opt += geomP08ic; }
72 else if (prodName ==
"P08iepp") { chain3Opt += geomP08ic; }
73 else if (prodName ==
"P08icAuAu9") { chain3Opt += geomP08ic; }
74 else if (prodName ==
"P08icdAu") { chain3Opt += geomP08ic; }
75 else if (prodName ==
"P08iedAu") { chain3Opt += geomP08ic; }
76 else if (prodName ==
"P08icAuAu200") { chain3Opt += geomP08ic; }
77 else if (prodName ==
"P10iapp") { chain3Opt += geomP10ih; }
78 else if (prodName ==
"P10ihAuAu39") { chain3Opt += geomP10ih; }
79 else if (prodName ==
"P10ihAuAu11") { chain3Opt += geomP10ih; }
80 else if (prodName ==
"P10ihAuAu7") { chain3Opt += geomP10ih; }
81 else if (prodName ==
"P10ihAuAu200") { chain3Opt += geomP10ih; }
83 cout <<
"Choice prodName " << prodName <<
" does not correspond to known chain. Processing impossible. " << endl;
88 gROOT->LoadMacro(
"bfc.C");
89 if (gClassTable->GetID(
"StBFChain") < 0)
Load();
91 Chain =
new StChain(
"Embedding");
93 bfc(-1,chain1Opt,daqfile);
95 chain1->SetName(
"One");
100 chain2->SetName(
"Two");
103 if (chain2->GetOption(
"TRS")){
106 cout <<
"Cannot find Trs in chain2" << endl;
109 trsMk->setNormalFactor(1.32);
117 TString OutputFileName(gSystem->BaseName(daqfile));
118 OutputFileName.ReplaceAll(
"*",
"");
119 OutputFileName.ReplaceAll(
".daq",
"");
121 OutputFileName.Append(
".root");
122 bfc(-1,chain3Opt,0,OutputFileName);
124 chain3->SetName(
"Three");
128 if( prodName ==
"P08icAuAu200")
130 mixer->SetInput(
"Input1",
"MixerEvent");
134 mixer->SetInput(
"Input1",
"TpxRaw/.data/Event");
138 if (chain2Opt.Contains(
"TpcRS",TString::kIgnoreCase)) {
139 mixer->SetInput(
"Input2",
"TpcRS/Event");
141 mixer->SetInput(
"Input2",
"Trs/.const/Event");
149 gSystem->Load(
"StEmcSimulatorMaker");
150 gSystem->Load(
"StEmcMixerMaker");
151 gSystem->Load(
"StEEmcSimulatorMaker");
156 chain3->AddAfter(
"emcRaw",bemcMixer);
157 chain3->AddAfter(
"emcRaw",bemcSim);
158 chain3->AddAfter(
"emcRaw",mcEventMaker);
159 bemcMixer->SetDebug(0);
169 chain3->AddAfter(
"emcRaw",eemcMixer);
170 chain3->AddAfter(
"emcRaw",eemcFastSim);
172 eemcFastSim->SetEmbeddingMode();
176 bool useEndcapSlowSim =
true;
177 if(useEndcapSlowSim) {
179 chain3->AddAfter(
"EEmcFastSim",slowSim);
188 gMessMgr->QAInfo() << Form(
"Run is started at Date/Time %i/%i",t.GetDate(),t.GetTime()) << endm;
190 gMessMgr->QAInfo() << Form(
"Run on %s in %s",gSystem->HostName(),gSystem->WorkingDirectory()) << endm;
191 gMessMgr->QAInfo() << Form(
"with %s", Chain->GetCVS()) << endm;
195 cout <<
"bfcMixer: Setting PID: "<<pid<<endl;
196 embMk->SetTagFile(tagfile);
198 embMk->SetOpt( pt_low, pt_high, eta_low, eta_high, 0., 6.283185, type);
200 embMk->SetPartOpt( pid,mult);
203 embMk->SetSkipMode(kFALSE);
208 if ( !triggers.empty() ){
209 for(std::vector<Int_t>::iterator iter = triggers.begin(); iter != triggers.end(); iter++){
210 embMk->SetTrgOpt((*iter)) ;
215 embMk->SetZVertexCut(vzlow, vzhigh) ;
218 Chain->SetAttr(
".Privilege",0,
"*" );
219 Chain->SetAttr(
".Privilege",1,
"StBFChain::*" );
220 Chain->SetAttr(
".Privilege",1,
"StIOInterFace::*" );
221 Chain->SetAttr(
".Privilege",1,
"St_geant_Maker::*");
222 Chain->SetAttr(
".Privilege",1,
"StPrepEmbedMaker::*");
224 if (Nevents < 0)
return;
225 Int_t iInit = Chain->Init();
226 if (iInit >=
kStEOF) {Chain->FatalErr(iInit,
"on init");
return;}
227 StMaker *treeMk = Chain->GetMaker(
"outputStream");
228 Chain->EventLoop(Nevents,treeMk);
229 gMessMgr->QAInfo() <<
"Run completed " << endm;
230 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.