104 void bfcMixer_Tpx(Int_t Nevents=100,
105 const Char_t *daqfile=
"/star/rcf/test/daq/2009/embed/st_physics_adc_10128048_raw_1320001.daq",
106 const Char_t *tagfile=
"/star/rcf/test/daq/2009/embed/st_physics_adc_10128048_raw_1320001.tags.root",
108 Double_t pt_high=5.0,
109 Double_t eta_low=-1.5,
110 Double_t eta_high=1.5,
111 Double_t vzlow = -150.0,
112 Double_t vzhigh = 150.0,
116 std::vector<Int_t> triggers = 0,
117 const Char_t *prodName =
"P08iepp",
118 const Char_t* type =
"FlatPt",
119 const bool bPythia =
false,
120 const Char_t *fzdfile=
"test.fzd"
123 TString prodP08iepp(
"DbV20081117 B2008a ITTF IAna ppOpt l3onl emcDY2 fpd ftpc trgd ZDCvtx NosvtIT NossdIT Corr4 OSpaceZ2 OGridLeak3D VFMCE -hitfilt");
128 TString prodP08iedAu(
"DbV20090213 P2008 ITTF OSpaceZ2 OGridLeak3D beamLine VFMCE TpxClu -VFMinuit -hitfilt");
129 TString prodP10iapp(
"DbV20091001 pp2009c TpcRS ITTF OSpaceZ2 OGridLeak3D beamLine, VFMCE TpcRS -VFMinuit -hitfilt");
132 TString prodP10icpp200(
"DbV20100301 pp2009c ITTF BEmcChkStat btof Corr4 OSpaceZ2 OGridLeak3D VFMCE TpxClu -hitfilt");
134 TString prodP11idpp200(
"DbV20120908,pp2009d,ITTF,BEmcChkStat,btof,fmsdat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-hitfilt");
136 TString prodP09igpp500(
"DbV20091225 pp2009c ITTF BEmcChkStat btof Corr4 OSpaceZ2 OGridLeak3D VFMCE TpxClu -hitfilt");
138 TString prodP11ibpp500(
"DbV20110310 OGGVoltErr pp2009c ITTF VFPPVnoCTB BEmcChkStat beamLine Corr4 OSpaceZ2 OGridLeak3D");
139 prodP11ibpp500 +=
" VFPPVnoCTB beamLine TpxClu -VFMinuit -hitfilt";
142 TString prodP10ikAuAu62(
"DbV20110413 P2010a,btof,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE TpxClu -VFMinuit -hitfilt");
143 TString prodP10ihAuAu39(
"DbV20100909 P2010a,btof,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE TpxClu -VFMinuit -hitfilt");
144 TString prodP10ikAuAu39(
"DbV20100909 P2010a,btof,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE TpxClu -VFMinuit -hitfilt");
145 TString prodP10ihAuAu11(
"DbV20100821 P2010a,btof,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE TpxClu -VFMinuit -hitfilt");
146 TString prodP10ihAuAu7(
"DbV20100821 P2010a,btof,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE TpxClu -VFMinuit -hitfilt");
149 TString prodP10ikAuAu200(
"DbV20101213 P2010a pmdReco btof BEmcChkStat Corr4 OSpaceZ2 OGridLeak3D VFMCE TpxClu -VFMinuit -hitfilt");
152 TString prodP11idAuAu200(
"DbV20111124 P2011a pmdReco btof mtdDat BEmcChkStat Corr4 OSpaceZ2 OGridLeak3D VFMCE TpxClu -VFMinuit -hitfilt");
155 TString prodP11idAuAu27(
"DbV20110911 P2011a btof mtddat pmdReco BEmcChkStat Corr4 OSpaceZ2 OGridLeak3D VFMCE TpxClu -VFMinuit -hitfilt");
158 TString prodP11idAuAu19(
"DbV20110820 P2011a btof mtddat pmdReco BEmcChkStat Corr4 OSpaceZ2 OGridLeak3D VFMCE TpxClu -VFMinuit -hitfilt");
161 TString prodP11idpp500(
"DbV20110923 pp2011a btof mtddat fmsdat BEmcChkStat Corr4 OSpaceZ2 OGridLeak3D VFMCE TpxClu -hitfilt");
164 TString prodP12idUU193(
"DbV20120921,P2012b,AgML,mtdDat,btof,fmsDat,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu -VFMinuit -hitfilt");
167 TString prodP12idpp200(
"DbV20130212,pp2012b,AgML,mtdDat,btof,fmsDat,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-hitfilt");
170 TString prodP14igpp500(
"DbV20140905,pp2013b,StiHftP,mtd,btof,fmsDat,fgt,fgtPoint,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-hitfilt");
173 TString prodP14iiAuAu15(
"DbV20150110,P2014a,btof,mtd,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-VFMinuit,-hitfilt");
176 TString prodP15icAuAu200(
"DbV20150316,P2014a,btof,mtd,mtdCalib,BEmcChkStat,CorrX,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-VFMinuit,-hitfilt");
179 TString prodP15ieAuAu200(
"DbV20150504,P2014a,btof,mtd,mtdCalib,pxlHit,istHit,BEmcChkStat,CorrX,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-VFMinuit,-hitfilt");
182 TString prodP15ieCuAu200(
"DbV20150529,P2012b,AgML,mtd,btof,fmsDat,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-VFMinuit,-hitfilt");
185 TString prodP16idAuAu200(
"DbV20160418,P2014a,btof,mtd,mtdCalib,BEmcChkStat,CorrX,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-VFMinuit,-hitfilt");
188 TString prodP16iaAuAu5(
"DbV20160126,DbV20150920_tpc_Calibrations,P2015b,mtd,btof,BEmcChkStat,CorrX,VFMCE,TpxClu,-VFMinuit,-hitfilt");
191 TString prodP16idpp200(
"DbV20160418,DbV20161117_TPC_Calibrations,pp2015c,btof,mtd,mtdCalib,pp2pp,fmsDat,fmsPoint,fpsDat,BEmcChkStat,CorrX,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-VFPPVnoCTB,-VFPPV,-beamline,-hitfilt");
194 TString prodP16idpAu200(
"DbV20160710,DbV20161117_TPC_Calibrations,pp2015c,btof,mtd,mtdCalib,pp2pp,fmsDat,fmsPoint,fpsDat,BEmcChkStat,CorrX,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-VFPPVnoCTB,-VFPPV,-beamline,-hitfilt");
197 TString prodP16ibpp500(
"DbV20110311,OGGVoltErr,pp2009c,ITTF,BEmcChkStat,btof,Corr4,OSpaceZ2,OGridLeak3D,DbV20151021_TOF_Calibrations,DbV20161021_tpc_Calibrations,VFMCE,TpxClu,-hitfilt");
200 TString prodP16igAuAu200(
"DbV20160406,P2014a,StiCA,btof,mtd,mtdCalib,BEmcChkStat,CorrX,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-VFMinuit,-hitfilt");
203 TString prodP16ijAuAu200(
"DbV20161018,P2016a,StiCA,mtd,mtdCalib,btof,BEmcChkStat,CorrX,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-VFMinuit,-hitfilt");
206 TString prodP17idAuAu200(
"DbV20150316 DbV20170712_trg_Calibrations,FiltTrg_JetCorrTrgs,P2014a,btof,mtd,mtdCalib,BEmcChkStat,CorrX,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-VFMinuit,-hitfilt");
209 TString prodP17iddAu200(
"DbV20161216,P2016a,StiCA,mtd,mtdCalib,btof,BEmcChkStat,CorrX,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-VFMinuit,-hitfilt");
212 TString prodP17iddAu39(
"DbV20170426,P2016a,StiCA,mtd,mtdCalib,btof,BEmcChkStat,CorrX,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-VFMinuit,-hitfilt");
215 TString prodP17iddAu20(
"DbV20170426,P2016a,StiCA,mtd,mtdCalib,btof,BEmcChkStat,CorrX,OSpaceZ2,OGridLeak3D,VFMCE,TpxClu,-VFMinuit,-hitfilt");
217 TString geomP08ic(
"ry2008e");
218 TString geomP10ic(
"ry2009d");
219 TString geomP10ih(
"ry2010c");
220 TString geomP10ik(geomP10ih);
221 TString geomP11id(
"ry2011");
222 TString geomP12id(
"ry2012a");
223 TString geomP14ig(
"ry2013_1c");
224 TString geomP14ii(
"ry2014a");
225 TString geomP15ic(
"ry2014a");
226 TString geomP15ie(
"ry2014a");
227 TString geomP16id(
"ry2014a");
228 TString geomP16ia(
"ry2015b");
229 TString geomP16id_run15(
"ry2015c");
230 TString geomP16ig(
"ry2014a");
231 TString geomP16ij(
"ry2016a");
232 TString geomP17id(
"ry2014a");
233 TString geomP17id_run16(
"ry2016a");
235 TString xgeom(
" useXgeom");
236 TString chain1Opt(
"in,magF,tpcDb,NoDefault,TpxRaw,-ittf,NoOutput");
237 TString chain2Opt(
"gen_T,geomT,sim_T,TpcRS,-ittf,-tpc_daq,nodefault");
239 chain2Opt +=
",fzin";
242 chain2Opt +=
",NoInput,PrepEmbed";
246 TString chain3Opt(
"");
247 if (prodName ==
"P08icpp") { chain3Opt = prodP08icpp; chain2Opt += geomP08ic;}
248 else if (prodName ==
"P08iepp") { chain3Opt = prodP08iepp; chain2Opt += geomP08ic;}
249 else if (prodName ==
"P08icAuAu9") { chain3Opt = prodP08icAuAu9; chain2Opt += geomP08ic;}
250 else if (prodName ==
"P08icdAu") { chain3Opt = prodP08icdAu; chain2Opt += geomP08ic;}
251 else if (prodName ==
"P08iedAu") { chain3Opt = prodP08iedAu; chain2Opt += geomP08ic;}
252 else if (prodName ==
"P08icAuAu200") { chain3Opt = prodP08icAuAu200; chain2Opt += geomP08ic;}
253 else if (prodName ==
"P09igpp500") { chain3Opt = prodP09igpp500; chain2Opt += geomP10ic;}
254 else if (prodName ==
"P11ibpp500") { chain3Opt = prodP11ibpp500; chain2Opt += geomP10ic;}
255 else if (prodName ==
"P10iapp") { chain3Opt = prodP10iapp; chain2Opt += geomP10ih;}
256 else if (prodName ==
"P10icpp200") { chain3Opt = prodP10icpp200; chain2Opt += geomP10ic;}
257 else if (prodName ==
"P11idpp200") { chain3Opt = prodP11idpp200; chain2Opt += geomP10ic;}
258 else if (prodName ==
"P10ikAuAu62") { chain3Opt = prodP10ikAuAu62; chain2Opt += geomP10ik;}
259 else if (prodName ==
"P10ihAuAu39") { chain3Opt = prodP10ihAuAu39; chain2Opt += geomP10ih;}
260 else if (prodName ==
"P10ikAuAu39") { chain3Opt = prodP10ikAuAu39; chain2Opt += geomP10ik;}
261 else if (prodName ==
"P10ihAuAu11") { chain3Opt = prodP10ihAuAu11; chain2Opt += geomP10ih;}
262 else if (prodName ==
"P10ihAuAu7") { chain3Opt = prodP10ihAuAu7; chain2Opt += geomP10ih;}
263 else if (prodName ==
"P10ikAuAu200") { chain3Opt = prodP10ikAuAu200; chain2Opt += geomP10ik;}
264 else if (prodName ==
"P11idAuAu200") { chain3Opt = prodP11idAuAu200; chain2Opt += geomP11id;}
265 else if (prodName ==
"P11idAuAu27") { chain3Opt = prodP11idAuAu27; chain2Opt += geomP11id;}
266 else if (prodName ==
"P11idAuAu19") { chain3Opt = prodP11idAuAu19; chain2Opt += geomP11id;}
267 else if (prodName ==
"P11idpp500") { chain3Opt = prodP11idpp500; chain2Opt += geomP11id;}
268 else if (prodName ==
"P12idUU193") { chain3Opt = prodP12idUU193; chain2Opt += geomP12id;}
269 else if (prodName ==
"P12idpp200") { chain3Opt = prodP12idpp200; chain2Opt += geomP12id;}
270 else if (prodName ==
"P14igpp500") { chain1Opt += xgeom; chain3Opt = prodP14igpp500; chain3Opt +=
",mtdsim"; chain2Opt += geomP14ig;}
271 else if (prodName ==
"P14iiAuAu15") { chain1Opt += xgeom; chain3Opt = prodP14iiAuAu15; chain3Opt +=
",mtdsim"; chain2Opt += geomP14ii;}
272 else if (prodName ==
"P15icAuAu200") { chain1Opt += xgeom; chain3Opt = prodP15icAuAu200; chain3Opt +=
",mtdsim"; chain2Opt += geomP15ic;}
273 else if (prodName ==
"P15ieAuAu200") { chain1Opt += xgeom; chain3Opt = prodP15ieAuAu200; chain3Opt +=
",mtdsim"; chain2Opt += geomP15ie;}
274 else if (prodName ==
"P15ieCuAu200") { chain3Opt = prodP15ieCuAu200; chain2Opt += geomP12id;}
275 else if (prodName ==
"P16idAuAu200") { chain1Opt += xgeom; chain3Opt = prodP16idAuAu200; chain3Opt +=
",mtdsim"; chain2Opt += geomP16id;}
276 else if (prodName ==
"P16iaAuAu5") { chain1Opt += xgeom; chain3Opt = prodP16iaAuAu5; chain3Opt +=
",mtdsim"; chain2Opt += geomP16ia;}
277 else if (prodName ==
"P16idpp200") { chain1Opt += xgeom; chain3Opt = prodP16idpp200; chain3Opt +=
",mtdsim"; chain2Opt += geomP16id_run15;}
278 else if (prodName ==
"P16idpAu200") { chain1Opt += xgeom; chain3Opt = prodP16idpAu200; chain3Opt +=
",mtdsim"; chain2Opt += geomP16id_run15;}
279 else if (prodName ==
"P16ibpp500") { chain3Opt = prodP16ibpp500; chain2Opt += geomP10ic;}
280 else if (prodName ==
"P16igAuAu200") { chain1Opt += xgeom; chain3Opt = prodP16igAuAu200; chain3Opt +=
",mtdsim"; chain2Opt += geomP16ig;}
281 else if (prodName ==
"P16ijAuAu200") { chain1Opt += xgeom; chain3Opt = prodP16ijAuAu200; chain3Opt +=
",mtdsim"; chain2Opt += geomP16ij;}
282 else if (prodName ==
"P17idAuAu200") { chain1Opt += xgeom; chain3Opt = prodP17idAuAu200; chain3Opt +=
",mtdsim"; chain2Opt += geomP17id;}
283 else if (prodName ==
"P17iddAu200") { chain1Opt += xgeom; chain3Opt = prodP17iddAu200; chain3Opt +=
",mtdsim"; chain2Opt += geomP17id_run16;}
284 else if (prodName ==
"P17iddAu39") { chain1Opt += xgeom; chain3Opt = prodP17iddAu39; chain3Opt +=
",mtdsim"; chain2Opt += geomP17id_run16;}
285 else if (prodName ==
"P17iddAu20") { chain1Opt += xgeom; chain3Opt = prodP17iddAu20; chain3Opt +=
",mtdsim"; chain2Opt += geomP17id_run16;}
288 cout <<
"Choice prodName " << prodName <<
" does not correspond to known chain. Processing impossible. " << endl;
291 chain3Opt +=
",TpcMixer,GeantOut,MiniMcMk,McAna,-in,NoInput,useInTracker,emcSim,BEmcMixer,EEfs,EEmcMixer";
293 bool useEndcapSlowSim =
true;
294 if (useEndcapSlowSim) chain3Opt +=
",EEss";
298 gROOT->LoadMacro(
"bfc.C");
299 if (gClassTable->GetID(
"StBFChain") < 0)
Load();
301 Chain =
new StChain(
"Embedding");
303 bfc(-1,chain1Opt,daqfile);
305 chain1->SetName(
"One");
309 bfc(-1,chain2Opt,fzdfile);
311 chain2->SetName(
"Two");
313 if (chain2->GetOption(
"TRS")){
316 cout <<
"Cannot find Trs in chain2" << endl;
319 trsMk->setNormalFactor(1.32);
325 chain2->SetName(
"Two");
329 if (chain2->GetOption(
"TRS")){
332 cout <<
"Cannot find Trs in chain2" << endl;
335 trsMk->setNormalFactor(1.32);
343 TString OutputFileName(gSystem->BaseName(daqfile));
344 OutputFileName.ReplaceAll(
"*",
"");
345 OutputFileName.ReplaceAll(
".daq",
"");
347 OutputFileName.Append(
".root");
348 bfc(-1,chain3Opt,0,OutputFileName);
350 chain3->SetName(
"Three");
354 if( prodName ==
"P08icAuAu200")
356 mixer->SetInput(
"Input1",
"MixerEvent");
360 mixer->SetInput(
"Input1",
"TpxRaw/.data/Event");
363 if (chain2Opt.Contains(
"TpcRS",TString::kIgnoreCase)) {
364 mixer->SetInput(
"Input2",
"TpcRS/Event");
366 mixer->SetInput(
"Input2",
"Trs/.const/Event");
374 if (!eemcFastSim) eemcFastSim = (
StEEmcFastMaker*) chain3->Maker(
"EEmcFastSim");
376 eemcFastSim->SetEmbeddingMode();
380 if (!eemcMixer) cout <<
"ERROR in finding EEMC Mixer!" << endl;
382 chain3->AddBefore(eemcMixer->
GetName(),eemcFastSim);
384 if (useEndcapSlowSim) {
386 if (!eemcSlowSim) cout <<
"ERROR in finding EEMC Slow Simulator!" << endl;
388 chain3->AddBefore(eemcMixer->
GetName(),eemcSlowSim);
393 chain3->AddAfter(eemcMixer->
GetName(),mcEventMaker);
400 gMessMgr->QAInfo() << Form(
"Run is started at Date/Time %i/%i",t.GetDate(),t.GetTime()) << endm;
402 gMessMgr->QAInfo() << Form(
"Run on %s in %s",gSystem->HostName(),gSystem->WorkingDirectory()) << endm;
403 gMessMgr->QAInfo() << Form(
"with %s", Chain->GetCVS()) << endm;
408 cout <<
"bfcMixer: Setting PID: "<<pid<<endl;
409 embMk->SetTagFile(tagfile);
411 embMk->
SetOpt( pt_low, pt_high, eta_low, eta_high, 0., 6.283185, type);
413 embMk->SetPartOpt( pid,mult);
416 embMk->SetSkipMode(kTRUE);
418 embMk->SetTemp(0.35);
428 if ( !triggers.empty() ){
429 for(std::vector<Int_t>::iterator iter = triggers.begin(); iter != triggers.end(); iter++){
430 embMk->SetTrgOpt((*iter)) ;
434 embMk->SetZVertexCut(vzlow, vzhigh) ;
449 Chain->SetAttr(
".Privilege",0,
"*" );
450 Chain->SetAttr(
".Privilege",1,
"StBFChain::*" );
451 Chain->SetAttr(
".Privilege",1,
"StIOInterFace::*" );
452 Chain->SetAttr(
".Privilege",1,
"St_geant_Maker::*");
453 if(!bPythia)Chain->SetAttr(
".Privilege",1,
"StPrepEmbedMaker::*");
455 if (Nevents < 0)
return;
456 Int_t iInit = Chain->Init();
457 if (iInit >=
kStEOF) {Chain->FatalErr(iInit,
"on init");
return;}
458 StMaker *treeMk = Chain->GetMaker(
"outputStream");
459 Chain->EventLoop(Nevents,treeMk);
460 gMessMgr->QAInfo() <<
"Run completed " << endm;
461 gSystem->Exec(
"date");
464 void bfcMixer_Tpx(Int_t Nevents,
const Char_t *daqfile, Char_t *tagfile,
465 Double_t pt_low, Double_t pt_high, Double_t eta_low, Double_t eta_high,
466 Double_t vzlow, Double_t vzhigh, Double_t vr, Int_t pid, Double_t mult,
467 const Char_t *triggersC,
const Char_t *prodName,
const Char_t* type) {
468 std::vector<Int_t> triggers;
471 Int_t N = pm.Split(triggersC);
472 for (Int_t i = 0; i < N; i++) {
474 triggers.push_back(num.Atoi());
477 bfcMixer_Tpx(Nevents, daqfile, tagfile, pt_low, pt_high, eta_low, eta_high, vzlow, vzhigh, vr, pid, mult, triggers, prodName, type);
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 const char * GetName() const
special overload
void SetOpt(const Double_t ptlow, const Double_t pthigh, const Double_t etalow, const Double_t etahigh, const Double_t philow, const Double_t phihigh, const TString type="FlatPt")
Set geantid(pid) and multiplicity.
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.