00001
00002
00003
00004 class StChain;
00005 class StMuDstMaker;
00006
00007 StChain *chain;
00008
00009
00010 void MuDstChain(const char *dir ="/star/data35/reco/productionPP/ReversedFullField/DEV/2004/117/",
00011 const char *file = "st_physics_5117072_raw_2010005.MuDst.root",
00012
00013
00014 const char *filter = "",
00015 const char *Eout="test")
00016 {
00017 int nevents =5;
00018 int total=0;
00019
00020 if (gClassTable->GetID("TTable") < 0) {
00021 gSystem->Load("libStar");
00022 gSystem->Load("libPhysics");
00023 }
00024 gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
00025 loadSharedLibraries();
00026 assert(gSystem->Load("StRFEmcTrigMaker")==0);
00027
00028 chain= new StChain("StChain");
00029 chain->SetDebug(1);
00030 StMuDebug::setLevel(1);
00031 StMuDstMaker *muDstMaker = new StMuDstMaker(0,0,dir,file,filter,10,"MuDst");
00032
00033 StRFEmcTrigMaker *trig = new StRFEmcTrigMaker("RFTrig");
00034 trig->setDataMode(0);
00035
00036 Int_t EHT;
00037 Int_t EJP;
00038 Int_t ETOT;
00039 Int_t BHT;
00040 Int_t BJP;
00041 Int_t BTOT;
00042 Int_t BBCtrig;
00043 int EHTtrig;
00044 int thres=5;
00045
00046 chain->Init();
00047 for (Int_t iev=0;iev<nevents; iev++) {
00048 cout << "****************************************** " << endl;
00049 cout << "Working on eventNumber " << iev << endl;
00050 cout << "*************************1***************** " << endl;
00051 chain->Clear();
00052 int iret = chain->Make(iev);
00053 total++;
00054 EHT= trig->getEEMC_HT_ADC();
00055 EJP= trig->getEEMC_JP_ADC();
00056 ETOT= trig->getEEMC_TOT_ADC();
00057 BHT= trig->getBEMC_HT_ADC();
00058 BJP= trig->getBEMC_JP_ADC();
00059 BTOT= trig->getBEMC_TOT_ADC();
00060 cout <<"In the script now!"<<endl;
00061 printf("ETOT=%d,EHT =%d,EJP=%d\n",ETOT,EHT,EJP);
00062 printf("BTOT=%d,BHT=%d,BJP=%d\n",BTOT,BHT,BJP);
00063
00064 BBCtrig= trig->getBBCtrig();
00065 EHTtrig= trig->getEEMCtrigHT(thres);
00066 cout <<"Thres = "<< thres << " EHTtrig = " << EHTtrig<<endl;
00067 cout << "BBCtrig = " << BBCtrig<<endl;
00068
00069 if (iret) {
00070 cout << "Bad return code!" << endl;
00071 break;
00072 }
00073 }
00074 chain->Finish();
00075 cout << "****************************************** " << endl;
00076 cout << "total number of events " << total << endl;
00077 cout << "****************************************** " << endl;
00078 }
00079
00080
00081
00082
00083
00084
00085