8 void RunJetSimuReader(
int nevents=10,
10 const char* file =
"/star/data19/reco/pp200/pythia6_203/default/pt15/y2004x/gheisha_on/trs_ii/pds1214_02_5000evts.MuDst.root",
11 const char *filter =
"",
12 const char* jetInFile =
"Jets_out.root",
13 const char* simuInFile =
"Simu_out.root")
15 if (gClassTable->GetID(
"TTable") < 0) {
16 gSystem->Load(
"libStar");
17 gSystem->Load(
"libPhysics");
19 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
20 loadSharedLibraries();
21 gSystem->Load(
"StMagF");
22 gSystem->Load(
"StTpcDb");
23 gSystem->Load(
"StDbUtilities");
24 gSystem->Load(
"StDaqLib");
25 gSystem->Load(
"StEmcADCtoEMaker");
26 gSystem->Load(
"StEpcMaker");
27 gSystem->Load(
"StDbLib");
28 gSystem->Load(
"StDbBroker");
29 gSystem->Load(
"St_db_Maker");
30 gSystem->Load(
"StEEmcUtil");
31 gSystem->Load(
"StEEmcDbMaker");
32 gSystem->Load(
"StJetFinder");
33 gSystem->Load(
"StJetMaker");
35 double pi = atan(1.0)*4.0;
36 cout <<
" loading done " << endl;
48 dbMk->SetDateTime(20031120,0);
49 dbMk->SetFlavor(
"sim",
"bemcPed");
50 dbMk->SetFlavor(
"sim",
"bemcStatus");
51 dbMk->SetFlavor(
"sim",
"bemcCalib");
52 dbMk->SetFlavor(
"sim",
"bemcGain");
53 dbMk->SetFlavor(
"sim",
"eemcPMTcal");
54 dbMk->SetFlavor(
"sim",
"eemcPIXcal");
72 jetReader->
InitFile(jetInFile,simuInFile);
77 cout <<
"\nGet Chain --------"<<endl;
78 TChain* c = muDstMaker->
chain();
80 cout <<
"\nAdd Friend from file:\t"<<jetInFile<<endl;
81 c->AddFriend(
"jet",jetInFile);
83 cout <<
"\nInitTree()"<<endl;
89 for (Int_t iev=0;iev<nevents; iev++) {
90 cout <<
"****************************************** " << endl;
91 cout <<
"Working on eventNumber " << iev << endl;
92 cout <<
"*************************1***************** " << endl;
94 int iret = chain->
Make(iev);
97 cout <<
"Bad return code!" << endl;
101 jetReader->exampleEventAna();
105 cout <<
"****************************************** " << endl;
106 cout <<
"total number of events " << total << endl;
107 cout <<
"****************************************** " << endl;
virtual void Clear(Option_t *option="")
User defined functions.
static void setLevel(unsigned int level)
sets the debug level
void exampleSimuAna()
An example analysis method, look here for a demonstration of jet + event info.
virtual void InitTree(TTree *tree)
TChain * chain()
In read mode, returns pointer to the chain of .MuDst.root files that where selected.
virtual void InitFile(const char *file)
Recover the TTree from file and prepare for reading.