15 void bfcMixer_Ftpc(
const Int_t Nevents=20,
16 const Char_t *daqfile=
"/star/rcf/test/daq/2008/emb/st_fmsslow_adc_9069059_raw_1520001.daq",
17 const Char_t *tagfile=
"/star/rcf/test/daq/2008/emb/daqtags/st_fmsslow_adc_9069059_raw_1520001.tags.root",
18 const Double_t pt_low=0.2,
19 const Double_t pt_high=0.5,
20 const Double_t eta_low=2.25,
21 const Double_t eta_high=4.45,
22 const Double_t vzlow = -50.0,
23 const Double_t vzhigh = 50.0,
25 const Double_t mult=1,
26 const std::vector<Int_t> triggers = 0,
27 const Char_t *prodName =
"P08iepp",
28 const Char_t* type =
"FlatPt"){
30 TString prodP08iepp(
"DbV20081117 B2008a ITTF IAna ppOpt l3onl emcDY2 fpd ftpc trgd ZDCvtx NosvtIT NossdIT Corr4 OSpaceZ2 OGridLeak3D VFMCE -hitfilt");
35 TString prodP08iedAu(
"DbV20090213 P2008 ITTF OSpaceZ2 OGridLeak3D beamLine VFMCE TpxClu -VFMinuit -hitfilt");
36 TString prodP10iapp(
"DbV20091001 pp2009c TpcRS ITTF OSpaceZ2 OGridLeak3D beamLine, VFMCE TpcRS -VFMinuit -hitfilt");
37 TString geomP08ic(
"ry2008");
38 TString chain1Opt(
"in,magF,tpcDb,NoDefault,TpxRaw,-ittf,NoOutput");
40 TString chain2Opt(
"NoInput,PrepEmbed,gen_T,geomT,sim_T,ftpcT,trs,fss,-ittf,-tpc_daq,nodefault");
41 chain2Opt +=
" "; chain2Opt += geomP08ic;
43 TString chain3Opt(
"");
44 if (prodName ==
"P08icpp") { chain3Opt = prodP08icpp; }
45 else if (prodName ==
"P08iepp") { chain3Opt = prodP08iepp; }
46 else if (prodName ==
"P08icAuAu9") { chain3Opt = prodP08icAuAu9; }
47 else if (prodName ==
"P08icdAu") { chain3Opt = prodP08icdAu; }
48 else if (prodName ==
"P08iedAu") { chain3Opt = prodP08iedAu; }
49 else if (prodName ==
"P08icAuAu200") { chain3Opt = prodP08icAuAu200;}
50 else if (prodName ==
"P10iapp") { chain3opt = prodP10iapp;}
52 cout <<
"Choice prodName does not correspond to known chain. Processing impossible. " << endl;
55 chain3Opt +=
",Embedding,TpcMixer,GeantOut,MiniMcMk,McAna,-in,NoInput,useInTracker";
56 chain3Opt +=
","; chain3Opt += geomP08ic;
58 gROOT->LoadMacro(
"bfc.C");
59 if (gClassTable->GetID(
"StBFChain") < 0)
Load();
61 Chain =
new StChain(
"Embedding");
63 bfc(-1,chain1Opt,daqfile);
65 chain1->SetName(
"One");
70 chain2->SetName(
"Two");
73 if (chain2->GetOption(
"TRS")){
76 cout <<
"Cannot find Trs in chain2" << endl;
79 trsMk->setNormalFactor(1.32);
84 gSystem->Load(
"StFtpcMixerMaker");
86 ftpcmixer->SetInput(
"Input1",
"StDAQReader");
87 ftpcmixer->SetInput(
"Input2",
"Event");
89 TString OutputFileName(gSystem->BaseName(daqfile));
90 OutputFileName.ReplaceAll(
"*",
"");
91 OutputFileName.ReplaceAll(
".daq",
"");
93 OutputFileName.Append(
".root");
94 bfc(-1,chain3Opt,0,OutputFileName);
96 chain3->SetName(
"Three");
100 if( prodName ==
"P08icAuAu200")
102 mixer->SetInput(
"Input1",
"MixerEvent");
106 mixer->SetInput(
"Input1",
"TpxRaw/.data/Event");
108 mixer->SetInput(
"Input2",
"Trs/.const/Event");
115 gSystem->Load(
"StEmcSimulatorMaker");
116 gSystem->Load(
"StEmcMixerMaker");
117 gSystem->Load(
"StEEmcSimulatorMaker");
122 chain3->AddAfter(
"emcRaw",bemcMixer);
123 chain3->AddAfter(
"emcRaw",bemcSim);
124 chain3->AddAfter(
"emcRaw",mcEventMaker);
125 bemcMixer->SetDebug(0);
135 chain3->AddAfter(
"emcRaw",eemcMixer);
136 chain3->AddAfter(
"emcRaw",eemcFastSim);
138 eemcFastSim->SetEmbeddingMode();
142 bool useEndcapSlowSim =
true;
143 if(useEndcapSlowSim) {
145 chain3->AddAfter(
"EEmcFastSim",slowSim);
154 gMessMgr->QAInfo() << Form(
"Run is started at Date/Time %i/%i",t.GetDate(),t.GetTime()) << endm;
156 gMessMgr->QAInfo() << Form(
"Run on %s in %s",gSystem->HostName(),gSystem->WorkingDirectory()) << endm;
157 gMessMgr->QAInfo() << Form(
"with %s", Chain->GetCVS()) << endm;
161 cout <<
"bfcMixer: Setting PID: "<<pid<<endl;
162 embMk->SetTagFile(tagfile);
164 embMk->SetOpt( pt_low, pt_high, eta_low, eta_high, 0., 6.283185, type);
166 embMk->SetPartOpt( pid,mult);
169 embMk->SetSkipMode(kTRUE);
174 if ( !triggers.empty() ){
175 for(std::vector<Int_t>::iterator iter = triggers.begin(); iter != triggers.end(); iter++){
176 embMk->SetTrgOpt((*iter)) ;
181 embMk->SetZVertexCut(vzlow, vzhigh) ;
184 Chain->SetAttr(
".Privilege",0,
"*" );
185 Chain->SetAttr(
".Privilege",1,
"StBFChain::*" );
186 Chain->SetAttr(
".Privilege",1,
"StIOInterFace::*" );
187 Chain->SetAttr(
".Privilege",1,
"St_geant_Maker::*");
188 Chain->SetAttr(
".Privilege",1,
"StPrepEmbedMaker::*");
190 if (Nevents < 0)
return;
191 Int_t iInit = Chain->Init();
192 if (iInit >=
kStEOF) {Chain->FatalErr(iInit,
"on init");
return;}
193 StMaker *treeMk = Chain->GetMaker(
"outputStream");
194 Chain->EventLoop(Nevents,treeMk);
195 gMessMgr->QAInfo() <<
"Run completed " << endm;
196 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...
FTPC Mixer Maker, main part of FTPC embedding Framework.
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.