21 class StEventDisplayMaker; StEventDisplayMaker *dsMk = 0;
27 gSystem->Load(
"St_base");
28 gSystem->Load(
"StChain");
29 gSystem->Load(
"StUtilities");
30 gSystem->Load(
"StBFChain");
33 gSystem->Load(
"StAnalysisUtilities");
36 if (chain)
delete chain;
39 void bfcMixer_v4_noFTPC(
const Int_t Nevents=10,
41 const Char_t *file1=
"/star/data03/daq/2004/090/st_physics_adc_5090009_raw_2060002.daq",
43 const Char_t *file2=
"./gtest.fz",
46 const Char_t *file3=
"./st_physics_adc_5090009_raw_2060002.vertices.dat",
47 const Float_t zvertex_low=-175.0,
48 const Float_t zvertex_high=175.0,
49 const Char_t *mode=
"strange",
50 const Char_t *acc_mode=
"off" )
53 if (gClassTable->GetID(
"StBFChain") < 0) Load();
63 saveMk = chain1->cd();
67 chain1->
SetFlags(
"in Physics DbV20060421 NoDefault -ittf");
68 chain1->Set_IO_Files(file1);
76 saveMk = chain2->cd();
78 chain2->
SetFlags(
"fzin DbV20060421 gen_T geomT sim_T tpc trs -tcl -tpt -PreVtx -tpc_daq -ittf");
79 chain2->Set_IO_Files(file2);
83 if (geantMk) geantMk->SetMode(1);
85 if (chain2->GetOption(
"TRS")){
87 trsMk->setNormalFactor(1.25);
91 if (!strcmp(mode,
"strange")){
92 if (!strcmp(acc_mode,
"on")){
94 Char_t *extraMaker =
"StV0AccMaker";
95 if (gClassTable->GetID(extraMaker) < 0) gSystem->Load(extraMaker);
97 if(extraMk)
delete extraMk;
98 extraMk = chain->New(extraMaker,
"before");
100 Char_t *before =
"Trs";
101 StMaker *trsmk = chain1->GetMaker(before);
102 if (trsmk) chain1->AddBefore(before,extraMk);
103 StV0AccCuts *cuts = ((StV0AccMaker *)extraMk)->GetCutsPtr();
105 cuts->SetV0MinDecayLen(0.);
106 cuts->SetV0DaughterMinImpact(0);
107 cuts->SetV0DaughterMinHit(10.);
108 cuts->SetXiV0MaxImpact(5);
109 cuts->SetXiMinDecayLen(2.);
110 cuts->SetXiV0PiMinImpact(0.);
111 cuts->SetXiDaughterMinHit(10.);
112 cuts->SetKinkMinDecayRad(128.);
113 cuts->SetKinkMaxDecayRad(184.);
125 saveMk = chain3->cd();
132 chain3->
SetFlags(
"TpcMixer Simu NoDefault NoInput onlraw -onlcl DbV20050515 ry2005b tpc_daq tpc emcDY2 global dst Kalman event evout QA Tree GeantOut fcf ctf -Prevtx -nohits CMuDST ZDCvtx tofDat Xi2 Kink2 EST ToF svt_daq SvtD svtdEdx xiSvt l3onl fpd eemcD pmdRaw EmbeddingShortCut");
136 chain3->
SetFlags(
"Simu NoDefault NoInput onlraw -onlcl ry2005b,tpc_daq,tpcI,svt_daq,SvtD,Physics,Idst,l0,Tree,evout l3onl fcf emcDY2 fpd trgd ZDCvtx DbV20060421 useCDV ITTF tofDat -SvtIT MuDST -trg VFMinuit GeantOut EmbeddingShortCut");
144 TString OutputFileName(gSystem->BaseName(file1));
145 OutputFileName.ReplaceAll(
"*",
"");
146 OutputFileName.ReplaceAll(
".daq",
"");
147 OutputFileName.Append(
".root");
148 cout <<
"AAR - Setting file output to: " <<OutputFileName.Data()<<endl;
150 chain3->Set_IO_Files(0,OutputFileName.Data());
157 cout <<
"AAR - going to file"<<endl;
162 printf (
"QAInfo:Run is started at Date/Time%i/%i\n",t.GetDate(),t.GetTime());
164 printf (
"QAInfo:Run on %s in %s\n",
166 gSystem->WorkingDirectory());
167 printf (
"QAInfo: with %s\n", chain->GetCVS());
170 cout <<
"AAR - initializing the chain"<<endl;
174 Int_t iInit = chain->Init();
178 treeMk = chain->GetMaker(
"tree");
180 Int_t iMake = 0, i = 1, iBad = 0;
184 FILE *fp = fopen(file3,
"r");
186 Int_t ncols, eventnumber, mult, skip=0, oldskip = 0, skiptest=0;
187 printf(
"zvertex_low = %f zvertex_high = %f\n",zvertex_low, zvertex_high);
192 cout <<
"AAR - Entering Event Loop"<<endl;
193 EventLoop:
if (i <= Nevents && iMake !=
kStEOF && iMake !=
kStFatal) {
195 evnt.Start(
"QAInfo:");
200 ncols = fscanf(fp,
"%d %d %d %f %f %f",&eventnumber,&skip,&mult,&x,&y,&z);
203 printf(
"\nEvent number: %d Multiplicity = %d\n",eventnumber,mult);
204 printf(
"vertex in bfcMixer: %16f %16f %16f\n",x,y,z);
211 printf (
"bfcMixer: i = %i\n",i);
212 printf (
"bfcMixer: skip = %i\n",skip);
213 printf (
"bfcMixer: oldskip = %i\n",oldskip);
214 if (inpMk && skip>0) {
216 skiptest = inpMk->Skip(skip-oldskip-1);
217 printf(
"bfcMixer: skiptest1 = %i\n",skiptest);
218 skiptest = inpMk->Skip();
219 printf(
"bfcMixer: skiptest2 = %i\n",skiptest);
224 use
this to force the
vertex position to match:
227 iMake = chain->Make(i);
228 if (treeMk && iMake ==
kStErr) {treeMk->
Make(i); iBad++;}
231 *fEvtHddr = *fEvtHddrDaq;
233 evnt.Stop(
"QAInfo:");
235 printf (
"QAInfo: Done with Event [no. %d/run %d/evt. %d/Date.Time%d.%d/sta %d] Real Time = %10.2f seconds Cpu Time = %10.2f seconds \n", i,chain->
GetRunNumber(),chain->GetEventNumber(),chain->GetDate(), chain->GetTime(),
236 iMake,evnt.GetRealTime(
"QAInfo:"),evnt.GetCpuTime(
"QAInfo:"));
240 if(eventnumber == chain->GetEventNumber()){
241 printf(
"bfcMixer: Event number %d found in both .fz file and .daq file\n",eventnumber);
243 printf(
"bfcMixer: Error! Event number from .fz file: %d\n",eventnumber);
244 printf(
"bfcMixer: Error! Event number from .daq file: %d\n",chain->GetEventNumber());
245 printf(
"bfcMixer: Error! Events are out-of-sync, exiting!\n");
253 printf (
"QAInfo:Run completed ");
254 gSystem->Exec(
"date");
255 if (evMk) Event = (
StEvent *) chain->GetInputDS(
"StEvent");
258 printf (
"\nQAInfo:Run is finished at Date/Time%i/%i\n",t.GetDate(),t.GetTime());
virtual Int_t Instantiate()
Maker-instantiation handler.
virtual void Clear(Option_t *option="")
User defined functions.
void SetFlags(const Char_t *Chain="gstar tfs")
Scan all flags, check if they are correct, manipulate the comment if necessary.
virtual Int_t GetRunNumber() const
Returns the current RunNumber.
virtual Int_t Load()
Routine handling library loading depending on chain options.
virtual void SetActive(Bool_t k=kTRUE)
Setters for flags and switches.