20 void makeHistFromMuDst( Int_t nevents = -1,
24 Char_t *name=
"10097097.lis",
25 Char_t *ofile=
"temp.hist.root",
33 int triggerChoice=230531;
45 gROOT->Macro(
"loadMuDst.C");
46 gSystem->Load(
"StDaqLib");
47 gSystem->Load(
"StDetectorDbMaker");
48 gSystem->Load(
"St_db_Maker");
49 gSystem->Load(
"StDbUtilities");
50 gSystem->Load(
"StEmcRawMaker");
51 gSystem->Load(
"StEmcADCtoEMaker");
52 gSystem->Load(
"StDbBroker");
55 gMessMgr -> SwitchOff(
"D");
56 gMessMgr -> SwitchOff(
"I");
57 TString pathname = path;
63 mMuDstMaker =
new StMuDstMaker(0,0,path,name,
"MuDst",nfiles);
64 mDb =
new St_db_Maker(
"StarDb",
"MySQL:StarDb",
"$STAR/StarDb");
71 mMuDstMaker->
SetStatus(
"PrimaryTracks",1);
89 TH1F *hTime=
new TH1F(
"time",
"timing plot;t (s);hz",bins,0,seconds);
90 TH2F *hModuleTime=
new TH2F(
"moduleTime",
"module hits per second;t(s);module #",bins,0,seconds,120,0,120);
91 TH2F *hPatchTime=
new TH2F(
"patchTime",
"patch hits per second;t(s);module #",bins,0,seconds,300,0,300);
92 TH1F *hNoHotTowers=
new TH1F(
"noHotTowers",
"rate plot for good towers;t(s);hz",bins,0,seconds);
93 TH2F *hPatch=
new TH2F(
"patchADC",
"HT ADC spectrum per patch;ADC;Patch ID",80,-10,70,300,0,300);
94 TH3F *hPatchXing=
new TH3F(
"patchX",
"hits by time, patch, and bXing",bins,0,seconds,300,0,300,120,0,120);
95 TH2F *hXingTime=
new TH2F(
"timeX",
"hits by time and bXing",bins,0,seconds,120,0,120);
96 TH2F *hZTime=
new TH2F(
"zX",
"hits by time and BBC vertex z",bins,0,seconds,20,-100,100);
103 Int_t BHT3_trigger_id=230531;
104 while ( stat == 0 ) {
108 std::cout <<
"------------------------------------------------";
109 std::cout <<
"event=" << count << std::endl;
112 if ( count++ >= nevents )
if ( nevents > 0 )
break;
115 stat = mChain -> Make();
118 if (count == 1 ) baseTime=mudst->
event()->eventInfo().time();
120 if ( mMuDstMaker->
muDst()->
event()->triggerIdCollection().nominal()->isTrigger(triggerChoice)){
121 int eventTime=mudst->
event()->eventInfo().time()-baseTime;
122 hTime->Fill(eventTime,bins*1.0/(1.0*seconds));
123 hZTime->Fill(eventTime,mudst->
event()->bbcTriggerDetector().zVertex());
128 if (triggerChoice==230531){
129 for (
int m=0;m<300;m++)
131 hPatch->Fill(mudst->
event()->emcTriggerDetector().highTower(m),m);
132 if (mudst->
event()->emcTriggerDetector().highTower(m)>30)
135 hPatchXing->Fill(eventTime,m,mudst->
event()->l0Trigger().bunchCrossingId7bit(mRunNo));
136 hPatchTime->Fill(eventTime,m);
141 hPatchXing->Fill(eventTime,1,mudst->
event()->l0Trigger().bunchCrossingId7bit(mRunNo));
148 printf(
"Total events: %d\n",count);
165 TFile *out=
new TFile(ofile,
"recreate");
virtual void ls(Option_t *option="") const
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
void SetStatus(const char *arrType, int status)