7 void Run2006DataTriggerMaker(
const char *dir =
"",
8 const char *file=
"/star/u/balewski/2007-EEtrig-simu/R7098001.lis",
9 const char *filter =
"")
13 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
14 loadSharedLibraries();
15 gSystem->Load(
"StTpcDb");
16 gSystem->Load(
"StDetectorDbMaker");
17 gSystem->Load(
"StDbUtilities");
18 gSystem->Load(
"StMcEvent");
19 gSystem->Load(
"StMcEventMaker");
20 gSystem->Load(
"StDaqLib");
21 gSystem->Load(
"StEmcRawMaker");
22 gSystem->Load(
"StEmcADCtoEMaker");
23 gSystem->Load(
"StPreEclMaker");
24 gSystem->Load(
"StEpcMaker");
25 gSystem->Load(
"StEmcUtil");
26 gSystem->Load(
"StDbBroker");
27 gSystem->Load(
"St_db_Maker");
28 gSystem->Load(
"StEEmcUtil");
29 gSystem->Load(
"StEEmcDbMaker");
30 gSystem->Load(
"StEmcTriggerMaker");
32 double pi = atan(1.0)*4.0;
33 cout <<
" loading done " << endl;
37 gMessMgr->SwitchOff(
"D");
38 gMessMgr->SwitchOff(
"I");
62 TChain* fileChain = muDstMaker->
chain();
67 for (Int_t iev=0;iev<nevents; iev++) {
68 cout <<
"****************************************** " << endl;
69 cout <<
"Working on eventNumber:\t" << iev <<
"\tof:\t"<<nevents<<endl;
70 cout <<
"*************************1***************** " << endl;
72 int iret = chain->
Make(iev);
75 cout <<
"Bad return code!" << endl;
80 map<int,int>::iterator iter;
85 cout<<
" 127212 ht2 (matrix0)="<<emcTrig->
isTrigger(127212)<<endl;
87 cout<<
"Total #'s of towers="<<tower.size()<<endl;
88 for ( iter=tower.begin();iter !=tower.end(); iter++){
89 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
94 cout<<
" 127213 ht2 (matrix1)="<<emcTrig->
isTrigger(127213)<<endl;
96 cout<<
"Total #'s of towers="<<tower.size()<<endl;
97 for ( iter=tower.begin();iter !=tower.end(); iter++){
98 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
103 cout<<
" 137213 ht2 (matrix3) ="<<emcTrig->
isTrigger(127213)<<endl;
105 cout<<
"Total #'s of towers="<<tower.size()<<endl;
106 for ( iter=tower.begin();iter !=tower.end(); iter++){
107 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
112 cout<<
" 127501 jp0 (matrix1)="<<emcTrig->
isTrigger(127501)<<endl;
114 cout<<
"Total #'s of jpatches="<<jpatch.size()<<endl;
115 for ( iter=jpatch.begin();iter !=jpatch.end(); iter++){
116 cout<<
"jpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
121 cout<<
" 137501 jp0 (matrix3) ="<<emcTrig->
isTrigger(137501)<<endl;
123 cout<<
"Total #'s of jpatches="<<jpatch.size()<<endl;
124 for ( iter=jpatch.begin();iter !=jpatch.end(); iter++){
125 cout<<
"jpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
130 cout<<
" 127221 jp1 (matrix1)="<<emcTrig->
isTrigger(127221)<<endl;
132 cout<<
"Total #'s of jpatches="<<jpatch.size()<<endl;
133 for ( iter=jpatch.begin();iter !=jpatch.end(); iter++){
134 cout<<
"jpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
139 cout<<
" 137221 jp1 (matrix2)="<<emcTrig->
isTrigger(137221)<<endl;
141 cout<<
"Total #'s of jpatches="<<jpatch.size()<<endl;
142 for ( iter=jpatch.begin();iter !=jpatch.end(); iter++){
143 cout<<
"jpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
148 cout<<
" 137222 jp1 (matrix3)="<<emcTrig->
isTrigger(137222)<<endl;
150 cout<<
"Total #'s of jpatches="<<jpatch.size()<<endl;
151 for ( iter=jpatch.begin();iter !=jpatch.end(); iter++){
152 cout<<
"jpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
157 cout<<
" 127821 http (matrix1)="<<emcTrig->
isTrigger(127821)<<endl;
159 cout<<
"Total #'s of tpatches="<<tpatch.size()<<endl;
160 for ( iter=tpatch.begin();iter !=tpatch.end(); iter++){
161 cout<<
"tpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
164 cout<<
"Total #'s of towers="<<tower.size()<<endl;
165 for ( iter=tower.begin();iter !=tower.end(); iter++){
166 int triggerPatch = emcTrig->barrelTriggerPatchForTower(iter->first);
167 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<
" tp (id,adc)=("<< triggerPatch <<
"," << tpatch[triggerPatch] <<
")" <<endl;
172 cout<<
" 137821 http (matrix3) ="<<emcTrig->
isTrigger(137821)<<endl;
174 cout<<
"Total #'s of tpatches="<<tpatch.size()<<endl;
175 for ( iter=tpatch.begin();iter !=tpatch.end(); iter++){
176 cout<<
"tpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
179 cout<<
"Total #'s of towers="<<tower.size()<<endl;
180 for ( iter=tower.begin();iter !=tower.end(); iter++){
181 int triggerPatch = emcTrig->barrelTriggerPatchForTower(iter->first);
182 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<
" tp (id,adc)=("<< triggerPatch <<
"," << tpatch[triggerPatch] <<
")" <<endl;
187 cout<<
" 137822 http (matrix4)="<<emcTrig->
isTrigger(137822)<<endl;
189 cout<<
"Total #'s of tpatches="<<tpatch.size()<<endl;
190 for ( iter=tpatch.begin();iter !=tpatch.end(); iter++){
191 cout<<
"tpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
194 cout<<
"Total #'s of towers="<<tower.size()<<endl;
195 for ( iter=tower.begin();iter !=tower.end(); iter++){
196 int triggerPatch = emcTrig->barrelTriggerPatchForTower(iter->first);
197 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<
" tp (id,adc)=("<< triggerPatch <<
"," << tpatch[triggerPatch] <<
")" <<endl;
202 cout<<
" 117705 jpsi (matrix1)="<<emcTrig->
isTrigger(117705)<<endl;
204 cout<<
"Total #'s of towers="<<tower.size()<<endl;
205 for ( iter=tower.begin();iter !=tower.end(); iter++){
206 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
211 cout<<
" 117602 upsilon (matrix1)="<<emcTrig->
isTrigger(117602)<<endl;
213 cout<<
"Total #'s of towers="<<tower.size()<<endl;
214 for ( iter=tower.begin();iter !=tower.end(); iter++){
215 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
220 cout<<
" 137602 upsilon (matrix3)="<<emcTrig->
isTrigger(137602)<<endl;
222 cout<<
"Total #'s of towers="<<tower.size()<<endl;
223 for ( iter=tower.begin();iter !=tower.end(); iter++){
224 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
230 cout<<
" 127611 http-L2="<<emcTrig->
isTrigger(127611)<<endl;
234 cout<<
" 127622 jp0-etot-L2="<<emcTrig->
isTrigger(127622)<<endl;
238 cout<<
" 137622 jp0-etot-L2="<<emcTrig->
isTrigger(137622)<<endl;
240 for (
int j=0;j<6;j++){
242 emcTrig->get2006BL1_ADC(j,&hold);
244 cout<<
" 2x1 Patch "<<j<<
" = "<<BL1_ADC[j]<<endl;
251 cout <<
"****************************************** " << endl;
252 cout <<
"total number of events " << total << endl;
253 cout <<
"****************************************** " << endl;
virtual void Clear(Option_t *option="")
User defined functions.
static void setLevel(unsigned int level)
sets the debug level
map< int, int > barrelTriggerPatchesAboveThreshold(int trigId)
map contains (key,value) = (patchId,ADC) of all TP above DSM threshold. map is empty if threshold = 0...
virtual void ls(Option_t *option="") const
map< int, int > barrelJetPatchesAboveThreshold(int trigId)
map contains (key,value) = (patchId,ADC) of all JP above DSM threshold. map is empty if threshold = 0...
TChain * chain()
In read mode, returns pointer to the chain of .MuDst.root files that where selected.
map< int, int > barrelTowersAboveThreshold(int trigId)
map contains (key,value) = (softId,ADC) of all towers above DSM threshold. map is empty if threshold ...
int isTrigger(int trigId)
1==Yes,0==No,-1==Don't Know. Same convention holds for other methods where appropriate.