1 void RunTriggerSimu2015(
4 const char* indir =
"root://xrdstar.rcf.bnl.gov:1095//home/starlib/home/starreco/reco/production_pp200trans_2015/ReversedFullField/P16id/2015/085/16085026/st_physics_16085026_raw_1000019.MuDst.root"
12 gROOT->Macro(
"loadMuDst.C");
13 gROOT->Macro(
"LoadLogger.C");
15 gSystem->Load(
"StDetectorDbMaker");
16 gSystem->Load(
"StDaqLib");
17 gSystem->Load(
"StEmcRawMaker");
18 gSystem->Load(
"StEmcADCtoEMaker");
19 gSystem->Load(
"StDbBroker");
20 gSystem->Load(
"St_db_Maker");
21 gSystem->Load(
"StEEmcUtil");
22 gSystem->Load(
"StEEmcDbMaker");
23 gSystem->Load(
"StEmcTriggerMaker");
24 gSystem->Load(
"StTriggerUtilities");
25 gSystem->Load(
"StTriggerFilterMaker");
45 simuTrig->useOfflineDB();
53 simuTrig->bemc->setConfig(StBemcTriggerSimu::kOnline);
70 TFile *fout =
new TFile(
"out.simu.2015.root",
"recreate");
71 TH1F *hh =
new TH1F(
"hh",
"; fired", 2, 0, 2);
72 TH2F *h2d =
new TH2F(
"h2d",
"; data ;simu", 2, 0, 2, 2, 0, 2);
73 TH2F *hhtdiff =
new TH2F(
"hhtdiff",
"; patch; ht diff", 300, 0, 300, 253, -126, 127);
74 TH2F *hht =
new TH2F(
"hht",
"; patch; ht", 300,0,300, 64, 0, 64);
75 TH2F *hpadiff =
new TH2F(
"hpadiff",
"; patch; pa diff", 300, 0, 300, 253, -126, 127);
76 TH2F *hpa =
new TH2F(
"hpa",
"; patch; pa", 300,0,300, 64, 0, 64);
79 int nEvents = muDstMaker->
chain()->GetEntries();
80 int trigId_1 = 480411;
81 int trigId_2 = 480411;
82 cout <<
"number of events ~ " << nEvents << endl;
84 for(
int iEvent = 0; iEvent < nEvents; iEvent++)
87 int status = chain->
Make(iEvent);
91 bool did_1 =
StMuDst::event()->triggerIdCollection().nominal().isTrigger(trigId_1);
92 bool did_2 =
StMuDst::event()->triggerIdCollection().nominal().isTrigger(trigId_2);
94 bool did = did_1 || did_2;
96 bool fire = simuTrig->isTrigger(trigId_1);
100 Printf(
"iEvent=%d", iEvent);
103 int *stpht = simuTrig->bemc->getBEMC_FEE_HT_ADC();
104 int *stppa = simuTrig->bemc->getBEMC_FEE_TP_ADC();
105 for(
int ip = 0; ip < 300; ip++){
106 int ht = emc.highTower(ip);
108 int diffht = ht - sht;
110 hhtdiff->Fill(ip, diffht);
114 int pa = emc.patch(ip);
116 int diffpa = pa -spa;
118 hpadiff->Fill(ip, diffpa);
virtual void Clear(Option_t *option="")
User defined functions.
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
TChain * chain()
In read mode, returns pointer to the chain of .MuDst.root files that where selected.
void saveAllStEvent(Bool_t a)
Set to kTRUE if all hits are to be saved on StEvent.