10 class StEventDisplayMaker;
11 StEventDisplayMaker *dsMaker = 0;
14 const char *dstFile = 0;
15 const char *xdfFile = 0;
16 const char *mdcFile = 0;
17 const char *fileList[] = {dstFile,xdfFile,mdcFile,0};
21 cout <<
"Usage: doEvents.C(nevents,\"-\",\"some_directory/some_dst_file.xdf\")" << endl;
22 cout <<
" doEvents.C(nevents,\"-\",\"some_directory/some_dst_file.root\")" << endl;
23 cout <<
" doEvents.C(nevents,\"some_directory\",\"*.dst.root\")" << endl;
27 void RunStiMaker(Int_t,
const Char_t **,
const Char_t *qaflag =
"");
30 void RunStiMaker(Int_t nevents=1,
32 const Char_t *path =
"/star/data22/ITTF/data/simple_geant/DEV_10_8_01/",
35 const Char_t *file=
"muon_10_neg.event.root",
37 const Char_t *qaflag =
"off",
38 const Int_t wrStEOut = 0);
41 void RunStiMaker(Int_t nevents,
const Char_t **fileList,
const Char_t *qaflag,
const Int_t wrStEOut)
44 bool simulated =
true;
46 bool optimized =
false;
47 char* outfile =
"Evaluation.root";
49 cout << endl << endl <<
" doEvents - input # events = " << nevents << endl;
51 while(fileList[ilist]){
52 cout <<
" doEvents - input fileList = " << fileList[ilist] << endl;
55 cout <<
" doEvents - input qaflag = " << qaflag << endl;
56 cout <<
" doEvents - input wrStEOut = " << wrStEOut << endl << endl << endl;
62 gSystem->Load(
"St_base");
63 gSystem->Load(
"StUtilities");
64 gSystem->Load(
"StChain");
65 gSystem->Load(
"StBFChain");
66 gSystem->Load(
"St_Tables");
68 gSystem->Load(
"libgen_Tables");
69 gSystem->Load(
"libsim_Tables");
70 gSystem->Load(
"libglobal_Tables");
71 gSystem->Load(
"geometry");
73 gSystem->Load(
"St_g2t");
74 gSystem->Load(
"St_geant_Maker");
76 gSystem->Load(
"StIOMaker");
77 gSystem->Load(
"StTreeMaker");
78 gSystem->Load(
"StarClassLibrary");
80 gSystem->Load(
"St_db_Maker");
81 gSystem->Load(
"StDbLib");
82 gSystem->Load(
"StDbBroker");
83 gSystem->Load(
"StSvtDbMaker");
84 gSystem->Load(
"StDbUtilities");
85 gSystem->Load(
"StTpcDb");
86 gSystem->Load(
"StEvent");
87 gSystem->Load(
"StEventMaker");
88 gSystem->Load(
"StEmcUtil");
89 gSystem->Load(
"StMcEvent");
90 gSystem->Load(
"StMcEventMaker");
91 gSystem->Load(
"StAssociationMaker");
92 gSystem->Load(
"StDaqLib");
93 gSystem->Load(
"StDAQMaker");
95 gSystem->Load(
"StSvtClassLibrary");
96 gSystem->Load(
"StSvtDaqMaker");
97 gSystem->Load(
"StSvtSimulationMaker");
98 gSystem->Load(
"StSvtCalibMaker");
99 gSystem->Load(
"StSvtSeqAdjMaker");
101 gSystem->Load(
"StSvtClusterMaker");
109 cout <<
"Loading Sti"<<endl;
110 gSystem->Load(
"Sti");
112 cout <<
"Loading StiGui"<<endl;
113 gSystem->Load(
"StiGui");
115 cout <<
"Loading StiEvaluator"<<endl;
116 gSystem->Load(
"StiEvaluator");
118 cout <<
"Loading libGui"<<endl;
119 gSystem->Load(
"libGui");
121 cout <<
"Loading StiMaker"<<endl;
122 gSystem->Load(
"StiMaker");
124 cout <<
"Loading StItTestMaker"<<endl;
125 gSystem->Load(
"StItTestMaker");
129 chain =
new StChain(
"StChain");
133 setFiles=
new StFile(fileList);
135 gSystem->Load(
"StChallenger");
136 setFiles = StChallenger::Challenge();
137 setFiles->SetDebug();
138 const char *Argv[]= {
140 "-q",
"mRunNumber=1228023",
141 "-c",
"/afs/rhic.bnl.gov/star/incoming/GCA/daq/stacs.rc"
143 Int_t Argc=
sizeof(Argv)/4;
144 setFiles->Init(Argc,Argv);
151 IOMk->SetBranch(
"eventBranch",0,
"r");
153 IOMk->SetBranch(
"geantBranch",0,
"r");
170 dbaseMk =
new St_db_Maker(
"db",
"MySQL:StarDb",
"$STAR/StarDb");
173 dbaseMk-> SetDateTime(20010801,000000);
196 StiMaker* anaMk = StiMaker::instance();
198 cout <<
"\n --- Setup StiIOBroker ---\n"<<endl;
201 StiRootIOBroker* stiIO =
new StiRootIOBroker();
203 stiIO->setTPHFMinPadrow(1);
204 stiIO->setTPHFMaxPadrow(45);
205 stiIO->setETSFLowerBound(5);
206 stiIO->setETSFMaxHits(6);
208 stiIO->setDoTrackFit(doFit);
211 stiIO->setKTFMcsCalculated(
false);
212 stiIO->setKTFElossCalculated(
false);
213 stiIO->setKTFMaxChi2ForSelection(50);
214 stiIO->setKTFBField(.5);
215 stiIO->setKTFMassHypothesis(.1395);
216 stiIO->setKTFMinContiguousHitCount(2);
217 stiIO->setKTFMaxNullCount(40);
218 stiIO->setKTFMaxContiguousNullCount(25);
219 stiIO->setKTFMinSearchRadius(.5);
220 stiIO->setKTFMaxSearchRadius(4.);
221 stiIO->setKTFSearchWindowScale(5.);
224 stiIO->setLTSFZWindow(5.);
225 stiIO->setLTSFYWindow(2.);
226 stiIO->setLTSFSeedLength(2);
228 stiIO->setLTSFDoHelixFit(
true);
229 stiIO->setLTSFExtrapYWindow(1.);
230 stiIO->setLTSFExtrapZWindow(2.);
231 stiIO->setLTSFExtrapMaxSkipped(2);
232 stiIO->setLTSFExtrapMinLength(4);
233 stiIO->setLTSFExtrapMaxLength(5);
234 stiIO->setLTSFUseVertex(
true);
236 stiIO->setLTMDeltaR(1.);
239 for (
unsigned int sector=1; sector<=12; ++sector) {
240 stiIO->addLTSFSector(sector);
244 for (
unsigned int padrow=6; padrow<=45; padrow+=1) {
245 stiIO->addLTSFPadrow(padrow);
249 enum SeedFinderType {kUndefined=0, kComposite=1, kEvaluable=2};
251 stiIO->setSeedFinderType(kComposite);
254 enum FilterType {kPtFilter=0, kEtaFilter=1, kChi2Filter=2, kNptsFilter=3, kNFitPtsFilter=4,
255 kNGapsFilter=5, kFitPointRatioFilter=6, kPrimaryDcaFilter=7};
257 stiIO->addFilterType(kPtFilter);
258 stiIO->setFilterPtMin(.1);
259 stiIO->setFilterPtMax(50.);
261 stiIO->addFilterType(kEtaFilter);
262 stiIO->setFilterEtaMin(-2.);
263 stiIO->setFilterEtaMax(2.);
265 stiIO->addFilterType(kChi2Filter);
266 stiIO->setFilterChi2Max(10.);
268 stiIO->addFilterType(kNptsFilter);
269 stiIO->setFilterNptsMin(8);
271 stiIO->addFilterType(kNFitPtsFilter);
272 stiIO->setFilterNFitPtsMin(5);
274 stiIO->addFilterType(kNGapsFilter);
275 stiIO->setFilterNGapsMax(20);
280 stiIO->addFilterType(kPrimaryDcaFilter);
281 stiIO->setFilterPrimaryDcaMax(100.);
283 stiIO->setSimulated(simulated);
284 anaMk->setEvaluationFileName(outfile);
287 anaMk->setMcEventMaker(mcEventReader);
288 anaMk->setAssociationMaker(assocMaker);
293 StiGuiIOBroker* guiIO=0;
295 if (gROOT->IsBatch()==
false) {
297 cout <<
"No batch option detected. Run Integrated Tracker in Gui Mode."<<endl;
299 sti =
new MainFrame(gClient->GetRoot(), 400, 220);
301 sti->setStChain(chain);
302 sti->setIoMaker(IOMk);
305 stiIO->setUseGui(
true);
308 guiIO = StiGuiIOBroker::instance();
311 guiIO->setUnMarkedHitSize(.3);
312 guiIO->setUnMarkedHitColor(4);
313 guiIO->setUnMarkedHitStyle(8);
314 guiIO->setUpdateEachTrack(
false);
317 guiIO->setMarkedHitSize(.3);
318 guiIO->setMarkedHitColor(2);
319 guiIO->setMarkedHitStyle(3);
322 cout <<
"Batch option detector. Run Integrated Tracker in non-Gui Mode."<<endl;
323 stiIO->setUseGui(
false);
326 cout <<
"\n --- Done setting up StiIOBroker --- \n"<<endl;
330 cout <<
"!!!! doEvents: will write out .event.root file !!" << endl << endl;
333 outMk->IntoBranch(
"evtselBranch",
"StEvent");
334 IOMk->SetNotify(
"CloseFile",outMk);
335 IOMk->SetNotify(
"OpenFile" ,outMk);
342 StItTestMaker* itTest =
new StItTestMaker(
"StItTestMaker");
356 Int_t iInit = chain->Init();
357 if (iInit) chain->Fatal(iInit,
"on init");
359 chain->InitRun(theRunNumber);
365 EventLoop:
if (i <= nevents && istat!=2) {
367 cout << endl <<
"============================ Event " << i
368 <<
" start ============================" << endl;
371 istat = chain->
Make(i);
374 {cout <<
"Last event processed. Status = " << istat << endl;}
376 {cout <<
"Error event processed. Status = " << istat << endl;}
385 cout << endl <<
"============================ Event " << i
386 <<
" finish ============================" << endl;
392 void RunStiMaker(
const Int_t nevents,
const Char_t *path,
const Char_t *file,
393 const Char_t *qaflag,
const Int_t wrStEOut)
395 if (nevents==-1) { Help();
return;}
397 const char *fileListQQ[]={0,0};
398 if (strncmp(path,
"GC",2)==0) {
400 }
else if (path[0]==
'-') {
402 }
else if (!file[0]) {
405 fileListQQ[0] = gSystem->ConcatFileName(path,file);
415 RunStiMaker(nevents,fileListQQ,qaflag,wrStEOut);
virtual void Clear(Option_t *option="")
User defined functions.
Filling of all StMcEvent classes from g2t tables Transform all the data in the g2t tables into the co...
virtual void SetActive(Bool_t k=kTRUE)
Setters for flags and switches.