3 Bool_t doProfile =
false;
11 class StEventDisplayMaker;
12 StEventDisplayMaker *dsMaker = 0;
15 const char *dstFile = 0;
16 const char *xdfFile = 0;
17 const char *mdcFile = 0;
18 const char *fileList[] = {dstFile,xdfFile,mdcFile,0};
22 cout <<
"Usage: doEvents.C(nevents,\"-\",\"some_directory/some_dst_file.xdf\")" << endl;
23 cout <<
" doEvents.C(nevents,\"-\",\"some_directory/some_dst_file.root\")" << endl;
24 cout <<
" doEvents.C(nevents,\"some_directory\",\"*.dst.root\")" << endl;
28 void RunStiMaker2(Int_t,
const Char_t **,
const Char_t *qaflag =
"");
31 void RunStiMaker2(Int_t nevents=1,
33 const Char_t *path =
"/star/data22/ITTF/data/simple_geant/DEV_10_8_01/",
37 const Char_t *file=
"muon_10_neg.event.root",
39 const Char_t *qaflag =
"off",
40 const Int_t wrStEOut = 0);
43 void RunStiMaker2(Int_t nevents,
const Char_t **fileList,
const Char_t *qaflag,
const Int_t wrStEOut)
46 bool simulated =
true;
48 bool optimized =
false;
49 char* outfile =
"Evaluation.root";
51 cout << endl << endl <<
" doEvents - input # events = " << nevents << endl;
53 while(fileList[ilist]){
54 cout <<
" doEvents - input fileList = " << fileList[ilist] << endl;
57 cout <<
" doEvents - input qaflag = " << qaflag << endl;
58 cout <<
" doEvents - input wrStEOut = " << wrStEOut << endl << endl << endl;
64 gSystem->Load(
"St_base");
65 gSystem->Load(
"StUtilities");
66 gSystem->Load(
"StChain");
67 gSystem->Load(
"StBFChain");
68 gSystem->Load(
"St_Tables");
70 gSystem->Load(
"libgen_Tables");
71 gSystem->Load(
"libsim_Tables");
72 gSystem->Load(
"libglobal_Tables");
73 gSystem->Load(
"geometry");
75 gSystem->Load(
"St_g2t");
76 gSystem->Load(
"St_geant_Maker");
78 gSystem->Load(
"StIOMaker");
79 gSystem->Load(
"StTreeMaker");
80 gSystem->Load(
"StarClassLibrary");
82 gSystem->Load(
"St_db_Maker");
83 gSystem->Load(
"StDbLib");
84 gSystem->Load(
"StDbBroker");
85 gSystem->Load(
"StSvtDbMaker");
86 gSystem->Load(
"StDbUtilities");
87 gSystem->Load(
"StTpcDb");
88 gSystem->Load(
"StEvent");
89 gSystem->Load(
"StEventMaker");
90 gSystem->Load(
"StEmcUtil");
91 gSystem->Load(
"StMcEvent");
92 gSystem->Load(
"StMcEventMaker");
93 gSystem->Load(
"StAssociationMaker");
94 gSystem->Load(
"StDaqLib");
95 gSystem->Load(
"StDAQMaker");
97 gSystem->Load(
"StDetectorDbMaker");
99 gSystem->Load(
"StSvtClassLibrary");
100 gSystem->Load(
"StSvtDaqMaker");
101 gSystem->Load(
"StSvtSimulationMaker");
102 gSystem->Load(
"StSvtCalibMaker");
103 gSystem->Load(
"StSvtSeqAdjMaker");
105 gSystem->Load(
"StSvtClusterMaker");
113 cout <<
"Loading Sti"<<endl;
114 gSystem->Load(
"Sti");
116 cout <<
"Loading StiGui"<<endl;
117 gSystem->Load(
"StiGui");
119 cout <<
"Loading StiEvaluator"<<endl;
120 gSystem->Load(
"StiEvaluator");
123 cout <<
"Loading libGui"<<endl;
124 gSystem->Load(
"libGui");
126 cout <<
"Loading StiMaker"<<endl;
127 gSystem->Load(
"StiMaker");
130 cout <<
"Loading Jprof"<<endl;
131 gSystem->Setenv(
"JPROF_FLAGS",
"JP_START JP_PERIOD=0.001");
132 gSystem->Load(
"libJprof");
138 chain =
new StChain(
"StChain");
142 setFiles=
new StFile(fileList);
144 gSystem->Load(
"StChallenger");
145 setFiles = StChallenger::Challenge();
146 setFiles->SetDebug();
147 const char *Argv[]= {
149 "-q",
"mRunNumber=1228023",
150 "-c",
"/afs/rhic.bnl.gov/star/incoming/GCA/daq/stacs.rc"
152 Int_t Argc=
sizeof(Argv)/4;
153 setFiles->Init(Argc,Argv);
160 IOMk->SetBranch(
"eventBranch",0,
"r");
162 IOMk->SetBranch(
"geantBranch",0,
"r");
179 dbaseMk =
new St_db_Maker(
"db",
"MySQL:StarDb",
"$STAR/StarDb");
182 dbaseMk-> SetDateTime(20010801,000000);
211 StiMaker* anaMk = StiMaker::instance();
213 cout <<
"\n --- Setup StiIOBroker ---\n"<<endl;
216 StiRootIOBroker* stiIO = anaMk->getIOBroker();
218 stiIO->setTPHFMinPadrow(1);
219 stiIO->setTPHFMaxPadrow(45);
220 stiIO->setETSFLowerBound(5);
221 stiIO->setETSFMaxHits(6);
223 stiIO->setDoTrackFit(doFit);
226 stiIO->setKTFMcsCalculated(
false);
227 stiIO->setKTFElossCalculated(
false);
228 stiIO->setKTFMaxChi2ForSelection(50);
229 stiIO->setKTFBField(.5);
230 stiIO->setKTFMassHypothesis(.1395);
231 stiIO->setKTFMinContiguousHitCount(2);
232 stiIO->setKTFMaxNullCount(40);
233 stiIO->setKTFMaxContiguousNullCount(25);
234 stiIO->setKTFMinSearchRadius(.5);
235 stiIO->setKTFMaxSearchRadius(4.);
236 stiIO->setKTFSearchWindowScale(5.);
239 stiIO->setLTSFZWindow(5.);
240 stiIO->setLTSFYWindow(2.);
241 stiIO->setLTSFSeedLength(2);
243 stiIO->setLTSFDoHelixFit(
true);
244 stiIO->setLTSFExtrapYWindow(1.);
245 stiIO->setLTSFExtrapZWindow(2.);
246 stiIO->setLTSFExtrapMaxSkipped(2);
247 stiIO->setLTSFExtrapMinLength(4);
248 stiIO->setLTSFExtrapMaxLength(5);
249 stiIO->setLTSFUseVertex(
true);
251 stiIO->setLTMDeltaR(1.);
254 for (
unsigned int sector=1; sector<=12; ++sector) {
255 stiIO->addLTSFSector(sector);
259 for (
unsigned int padrow=6; padrow<=45; padrow+=1) {
260 stiIO->addLTSFPadrow(padrow);
264 enum SeedFinderType {kUndefined=0, kComposite=1, kEvaluable=2};
266 stiIO->setSeedFinderType(kComposite);
269 enum FilterType {kPtFilter=0, kEtaFilter=1, kChi2Filter=2, kNptsFilter=3, kNFitPtsFilter=4,
270 kNGapsFilter=5, kFitPointRatioFilter=6, kPrimaryDcaFilter=7};
272 stiIO->addFilterType(kPtFilter);
273 stiIO->setFilterPtMin(.1);
274 stiIO->setFilterPtMax(50.);
276 stiIO->addFilterType(kEtaFilter);
277 stiIO->setFilterEtaMin(-2.);
278 stiIO->setFilterEtaMax(2.);
280 stiIO->addFilterType(kChi2Filter);
281 stiIO->setFilterChi2Max(10.);
283 stiIO->addFilterType(kNptsFilter);
284 stiIO->setFilterNptsMin(8);
286 stiIO->addFilterType(kNFitPtsFilter);
287 stiIO->setFilterNFitPtsMin(5);
289 stiIO->addFilterType(kNGapsFilter);
290 stiIO->setFilterNGapsMax(20);
295 stiIO->addFilterType(kPrimaryDcaFilter);
296 stiIO->setFilterPrimaryDcaMax(100.);
298 stiIO->setSimulated(simulated);
299 anaMk->setEvaluationFileName(outfile);
302 anaMk->setMcEventMaker(mcEventReader);
303 anaMk->setAssociationMaker(assocMaker);
308 StiGuiIOBroker* guiIO=0;
310 if (gROOT->IsBatch()==
false) {
312 cout <<
"No batch option detected. Run Integrated Tracker in Gui Mode."<<endl;
314 sti =
new MainFrame(gClient->GetRoot(), 400, 220);
316 sti->setStChain(chain);
317 sti->setIoMaker(IOMk);
320 stiIO->setUseGui(
true);
323 guiIO = StiGuiIOBroker::instance();
326 guiIO->setUnMarkedHitSize(.3);
327 guiIO->setUnMarkedHitColor(4);
328 guiIO->setUnMarkedHitStyle(8);
329 guiIO->setUpdateEachTrack(
false);
332 guiIO->setMarkedHitSize(.3);
333 guiIO->setMarkedHitColor(2);
334 guiIO->setMarkedHitStyle(3);
337 cout <<
"Batch option detector. Run Integrated Tracker in non-Gui Mode."<<endl;
338 stiIO->setUseGui(
false);
341 cout <<
"\n --- Done setting up StiIOBroker --- \n"<<endl;
345 cout <<
"!!!! doEvents: will write out .event.root file !!" << endl << endl;
348 outMk->SetBranch(
"eventBranch",
"test.event.root",
"w");
349 outMk->IntoBranch(
"eventBranch",
"StEvent");
365 Int_t iInit = chain->Init();
366 if (iInit) chain->Fatal(iInit,
"on init");
368 chain->InitRun(theRunNumber);
374 EventLoop:
if (i <= nevents && istat!=2) {
376 cout << endl <<
"============================ Event " << i
377 <<
" start ============================" << endl;
380 istat = chain->
Make(i);
383 {cout <<
"Last event processed. Status = " << istat << endl;}
385 {cout <<
"Error event processed. Status = " << istat << endl;}
394 cout << endl <<
"============================ Event " << i
395 <<
" finish ============================" << endl;
401 void RunStiMaker2(
const Int_t nevents,
const Char_t *path,
const Char_t *file,
402 const Char_t *qaflag,
const Int_t wrStEOut)
404 if (nevents==-1) { Help();
return;}
406 const char *fileListQQ[]={0,0};
407 if (strncmp(path,
"GC",2)==0) {
409 }
else if (path[0]==
'-') {
411 }
else if (!file[0]) {
414 fileListQQ[0] = gSystem->ConcatFileName(path,file);
424 RunStiMaker2(nevents,fileListQQ,qaflag,wrStEOut);
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
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.