16 void bfcMixer_TpcSvtSsd(
const Int_t Nevents=500,Int_t isSvtIn=1, Int_t isSsdIn=1,
17 const Char_t *daqfile=
"/star/rcf/test/daq/2007/113/8113044/st_physics_8113044_raw_1040042.daq",
18 const Char_t *tagfile=
"/star/rcf/test/embedding/2007ProductionMinBias/FullField/P08if/2007/113/8113044/st_physics_8113044_raw_1040042.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.1,
22 const Double_t eta_high=1.1,
23 const Double_t vzlow=-175.0,
24 const Double_t vzhigh=175.0,
26 const Double_t mult = 100.,
27 const std::vector<Int_t> triggers = 0,
28 const Char_t* prodName =
"P08icAuAu",
29 const Char_t* mode=
"flatpt"
32 TString DbVP06idpp(
"DbV20060729 ");
33 TString DbVP07icCuCu(
"DbV20070518 ");
34 TString DbVP08icAuAu(
"DbV20080418 ");
37 TString prodP06idpp(
"pp2006b ITTF OSpaceZ2 OGridLeak3D VFMCE -VFPPVnoCTB -hitfilt");
43 TString prodP07icCuCu(
"P2005b DbV20070518 MakeEvent ITTF ToF ssddat spt SsdIt SvtIt pmdRaw OGridLeak OShortR OSpaceZ2 KeepSvtHit skip1row VFMCE -VFMinuit -hitfilt");
49 TString prodP08icAuAu(
"B2007g ITTF adcOnly IAna KeepSvtHit VFMCE -hitfilt l3onl emcDY2 fpd ftpc trgd ZDCvtx svtIT ssdIT Corr5 -dstout");
51 TString geomP06id(
"ry2006");
52 TString geomP07ic(
"ry2005f");
53 TString geomP08ic(
"ry2007g");
55 TString chain1Opt(
"in magF tpcDb NoDefault -ittf NoOutput");
56 TString chain2Opt(
"NoInput PrepEmbed gen_T geomT sim_T trs -ittf -tpc_daq nodefault");
58 TString chain3Opt(
"");
59 if( prodName ==
"P06idpp") {
60 chain1Opt.Prepend(DbVP06idpp);
61 chain2Opt +=
" "; chain2Opt += geomP06id;
62 chain3Opt = prodP06idpp ;
64 else if( prodName ==
"P07ic" ){
65 chain1Opt.Prepend(DbVP07icCuCu);
66 chain2Opt +=
" "; chain2Opt += geomP07ic;
67 chain3Opt = prodP07icCuCu;
69 else if ( prodName ==
"P08icAuAu" ){
70 chain1Opt.Prepend(DbVP08icAuAu);
71 chain2Opt +=
" "; chain2Opt += geomP08ic;
72 chain3Opt = prodP08icAuAu ;
75 cout <<
"Choice prodName does not correspond to known chain. Processing impossible. " << endl;
80 chain3Opt +=
" TpcMixer Embedding onlraw McEvent McEvOut GeantOut MiniMcMk McAna IdTruth -in NoInput,useInTracker -hitfilt -TrsPileUp -TrsToF";
83 if (isSvtIn) chain3Opt +=
" SvtEmbed";
85 chain1Opt +=
",ssddat";
86 chain2Opt +=
",ssd,McEvent,-spt";
87 chain3Opt +=
",SsdEmbed";
90 if( prodName ==
"P06idpp") {
91 chain3Opt.Prepend(DbVP06idpp);
92 chain3Opt +=
" "; chain3Opt += geomP06id;
94 else if( prodName ==
"P07ic" ){
95 chain3Opt.Prepend(DbVP07icCuCu);
96 chain3Opt +=
" "; chain3Opt += geomP07ic;
98 else if ( prodName ==
"P08icAuAu" ){
99 chain3Opt.Prepend(DbVP08icAuAu);
100 chain3Opt +=
" "; chain3Opt += geomP08ic;
103 cout <<
"Choice prodName does not correspond to known chain. Processing impossible. " << endl;
108 gROOT->LoadMacro(
"bfc.C");
109 if (gClassTable->GetID(
"StBFChain") < 0)
Load();
111 Chain =
new StChain(
"Embedding");
113 bfc(-1,chain1Opt,daqfile);
115 chain1->SetName(
"One");
120 chain2->SetName(
"Two");
122 if (chain2->GetOption(
"TRS")){
125 cout <<
"Cannot find Trs in chain2" << endl;
128 trsMk->setNormalFactor(1.05);
135 TString OutputFileName(gSystem->BaseName(daqfile));
136 OutputFileName.ReplaceAll(
"*",
"");
137 OutputFileName.ReplaceAll(
".daq",
"");
139 OutputFileName.Append(
".root");
140 bfc(-1,chain3Opt,0,OutputFileName);
142 chain3->SetName(
"Three");
148 gMessMgr->QAInfo() << Form(
"Run is started at Date/Time %i/%i",t.GetDate(),t.GetTime()) << endm;
150 gMessMgr->QAInfo() << Form(
"Run on %s in %s",gSystem->HostName(),gSystem->WorkingDirectory()) << endm;
151 gMessMgr->QAInfo() << Form(
"with %s", Chain->GetCVS()) << endm;
155 embMk->SetTagFile(tagfile);
157 embMk->SetOpt( pt_low, pt_high, eta_low, eta_high, 0., 6.283185, mode);
159 embMk->SetPartOpt( pid,mult);
162 embMk->SetSkipMode(kFALSE) ;
167 if ( !triggers.empty() ){
168 for(std::vector<Int_t>::iterator iter = triggers.begin(); iter != triggers.end(); iter++){
169 embMk->SetTrgOpt((*iter)) ;
174 embMk->SetZVertexCut(vzlow, vzhigh) ;
177 Chain->SetAttr(
".Privilege",0,
"*" );
178 Chain->SetAttr(
".Privilege",1,
"StBFChain::*" );
179 Chain->SetAttr(
".Privilege",1,
"StIOInterFace::*" );
180 Chain->SetAttr(
".Privilege",1,
"St_geant_Maker::*");
181 Chain->SetAttr(
".Privilege",1,
"StPrepEmbedMaker::*");
182 StMaker *SsdEmbed = Chain->Maker(
"SsdEmbed");
184 cout <<
"SsdEmbed has been found ----------------------------------------" << endl;
185 SsdEmbed->SetInput(
"SsdRealData",
"One/.make/SpaStrip/.data/spa_strip");
186 SsdEmbed->SetInput(
"SsdSimuData",
"Two/.make/SpaStrip/.data/spa_strip");
187 StMaker *SsdPoint = Chain->Maker(
"SsdPoint");
189 cout <<
"SsdPoint has been found----------------------------------------" << endl;
190 SsdPoint->SetInput(
"SpaStrip",
"SsdEmbed");
194 if (Nevents < 0)
return;
195 Int_t iInit = Chain->Init();
196 if (iInit >=
kStEOF) {Chain->FatalErr(iInit,
"on init");
return;}
197 StMaker *treeMk = Chain->GetMaker(
"outputStream");
199 Chain->EventLoop(Nevents,treeMk);
200 gMessMgr->QAInfo() <<
"Run completed " << endm;
201 gSystem->Exec(
"date");
Prepare GEANT Maker with input from embedding settings and DAQ event.
virtual Int_t Load()
Routine handling library loading depending on chain options.