16 void bfcMixer_Unified(
const Int_t Nevents=1,
17 const Char_t *daqfile=
"/star/rcf/test/daq/2005/051/st_physics_adc_6051006_raw_1050001.daq",
18 const Char_t *tagfile=
"/star/rcf/test/embedding/cuProductionMinBias/FullField/P07ic/2005/051/st_physics_adc_6051006_raw_1050001.tags.root",
19 const Float_t pt_low=-0.1,
20 const Float_t pt_high=5.0,
22 const Double_t mult = 0.1,
23 const Char_t *mode=
"strange",
24 const Char_t *acc_mode=
"off" ) {
26 TString prodP07ib(
"P2005b DbV20070518 MakeEvent ITTF Iana ToF ssddat spt SsdIt SvtIt pmdRaw SCEbyE OGridLeak OShortR OSpaceZ2");
27 TString geomP07ib(
"ry2005f");
30 TString prodP07id20GeV(
"ry2001 in tpc_daq tpcI fcf ITTF noSsdIt ftpc IAna VFMinuit l3onl emcDY2 ZDCvtx Physics Idst l0 tags Tree evout hitfilt corr4 OSpaceZ2 OGridLeak3D");
31 TString geomP07id20GeV(
"ry2001");
34 TString prodP07idStGamma(
"DbV20071012 P2007 ITTF pmdReco -SsdIt -SvtIt -dstout");
35 TString geomP07idStGamma(
"ry2007");
38 TString prod = prodP07idStGamma;
39 TString geom = geomP07idStGamma;
41 TString chain1Opt(
"in magF tpcDb NoDefault -ittf NoOutput adcOnly");
42 TString chain2Opt(
"NoInput PrepEmbed gen_T geomT sim_T trs -ittf -tpc_daq nodefault");
43 chain2Opt +=
" "; chain2Opt += geom;
44 TString chain3Opt = prod;
45 chain3Opt +=
" TpcMixer Embedding onlraw GeantOut MiniMcMk -in NoInput,useInTracker EmbeddingShortCut";
46 chain3Opt +=
" "; chain3Opt += geom;
48 gROOT->LoadMacro(
"bfc.C");
49 if (gClassTable->GetID(
"StBFChain") < 0)
Load();
51 Chain =
new StChain(
"Embedding");
53 bfc(-1,chain1Opt,daqfile);
55 chain1->SetName(
"One");
60 chain2->SetName(
"Two");
62 if (chain2->GetOption(
"TRS")){
65 cout <<
"Cannot find Trs in chain2" << endl;
68 trsMk->setNormalFactor(2.67);
74 TString OutputFileName(gSystem->BaseName(daqfile));
75 OutputFileName.ReplaceAll(
"*",
"");
76 OutputFileName.ReplaceAll(
".daq",
"");
77 OutputFileName.Append(
"_emb.root");
78 bfc(-1,chain3Opt,0,OutputFileName);
80 chain3->SetName(
"Three");
86 gMessMgr->QAInfo() << Form(
"Run is started at Date/Time %i/%i",t.GetDate(),t.GetTime()) << endm;
88 gMessMgr->QAInfo() << Form(
"Run on %s in %s",gSystem->HostName(),gSystem->WorkingDirectory()) << endm;
89 gMessMgr->QAInfo() << Form(
"with %s", Chain->GetCVS()) << endm;
93 embMk->SetTagFile(tagfile);
95 embMk->SetOpt( pt_low, pt_high, -1.3, 1.3, 0., 6.28);
97 embMk->SetPartOpt( pid,mult);
99 Chain->SetAttr(
".Privilege",0,
"*" );
100 Chain->SetAttr(
".Privilege",1,
"StBFChain::*" );
101 Chain->SetAttr(
".Privilege",1,
"StIOInterFace::*" );
102 Chain->SetAttr(
".Privilege",1,
"St_geant_Maker::*");
103 Chain->SetAttr(
".Privilege",1,
"StPrepEmbedMaker::*");
105 if (Nevents < 0)
return;
106 Int_t iInit = Chain->Init();
107 if (iInit >=
kStEOF) {Chain->FatalErr(iInit,
"on init");
return;}
108 StMaker *treeMk = Chain->GetMaker(
"outputStream");
109 Chain->EventLoop(Nevents,treeMk);
110 gMessMgr->QAInfo() <<
"Run completed " << endm;
111 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.