7 void Run2006SimuTriggerMaker(
const char *dir =
"",
8 const char* file=
"/star/data32/reco/pp200/pythia6_205/above_35gev/cdf_a/y2004y/gheisha_on/p05ih/rcf1230_10_4000evts.MuDst.root",
9 const char *fname=
"/star/data32/reco/pp200/pythia6_205/above_35gev/cdf_a/y2004y/gheisha_on/p05ih/rcf1230_10_4000evts.event.root",
10 const char *filter =
"")
14 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
15 loadSharedLibraries();
16 gSystem->Load(
"StTpcDb");
17 gSystem->Load(
"StDetectorDbMaker");
18 gSystem->Load(
"StDbUtilities");
19 gSystem->Load(
"StMcEvent");
20 gSystem->Load(
"StMcEventMaker");
21 gSystem->Load(
"StDaqLib");
22 gSystem->Load(
"StEmcRawMaker");
23 gSystem->Load(
"StEmcADCtoEMaker");
24 gSystem->Load(
"StPreEclMaker");
25 gSystem->Load(
"StEpcMaker");
26 gSystem->Load(
"StEmcSimulatorMaker");
27 gSystem->Load(
"StEmcUtil");
28 gSystem->Load(
"StDbBroker");
29 gSystem->Load(
"St_db_Maker");
30 gSystem->Load(
"StEEmcUtil");
31 gSystem->Load(
"StEEmcDbMaker");
32 gSystem->Load(
"StEmcTriggerMaker");
34 double pi = atan(1.0)*4.0;
35 cout <<
" loading done " << endl;
39 gMessMgr->SwitchOff(
"D");
40 gMessMgr->SwitchOff(
"I");
43 ioMaker->SetFile(fname);
45 ioMaker->SetBranch(
"*",0,
"0");
46 ioMaker->SetBranch(
"geantBranch",0,
"r");
49 mcEventMaker->doPrintEventInfo =
false;
57 dbMk->SetDateTime(20060506,214129 );
86 TChain* fileChain = muDstMaker->
chain();
91 for (Int_t iev=0;iev<nevents; iev++) {
92 cout <<
"****************************************** " << endl;
93 cout <<
"Working on eventNumber:\t" << iev <<
"\tof:\t"<<nevents<<endl;
94 cout <<
"*************************1***************** " << endl;
96 int iret = chain->
Make(iev);
99 cout <<
"Bad return code!" << endl;
104 map<int,int>::iterator iter;
111 cout<<
" 1101 ht1 = "<<emcTrig->
isTrigger(1101)<<
" = "<<emcTrig->is2003HT1()<<endl;
113 cout<<
"Total #'s of towers="<<tower.size()<<endl;
114 for ( iter=tower.begin();iter !=tower.end(); iter++){
115 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
116 cout<<
"old tower id="<<emcTrig->get2003HT1_ID()<<
" adc="<<emcTrig->get2003HT1_ADC()<<endl;
121 cout<<
" 2101 ht1 = "<<emcTrig->
isTrigger(2201)<<
" = "<<emcTrig->is2003HT1()<<endl;
123 cout<<
"Total #'s of towers="<<tower.size()<<endl;
124 for ( iter=tower.begin();iter !=tower.end(); iter++){
125 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
126 cout<<
"old tower id="<<emcTrig->get2003HT1_ID()<<
" adc="<<emcTrig->get2003HT1_ADC()<<endl;
131 cout<<
" 2202 ht2 = "<<emcTrig->
isTrigger(2202)<<
" = "<<emcTrig->is2003HT2()<<endl;
133 cout<<
"Total #'s of towers="<<tower.size()<<endl;
134 for ( iter=tower.begin();iter !=tower.end(); iter++){
135 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
136 cout<<
"old tower id="<<emcTrig->get2003HT2_ID()<<
" adc="<<emcTrig->get2003HT2_ADC()<<endl;
141 cout<<
" 45201 ht1 = "<<emcTrig->
isTrigger(45201)<<
" = "<<emcTrig->is2004HT1()<<endl;
143 cout<<
"Total #'s of towers="<<tower.size()<<endl;
144 for ( iter=tower.begin();iter !=tower.end(); iter++){
145 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
146 cout<<
"old tower id="<<emcTrig->get2004HT1_ID()<<
" adc="<<emcTrig->get2004HT1_ADC()<<endl;
151 cout<<
" 45202 ht1 = "<<emcTrig->
isTrigger(45202)<<
" = "<<emcTrig->is2004HT2()<<endl;
153 cout<<
"Total #'s of towers="<<tower.size()<<endl;
154 for ( iter=tower.begin();iter !=tower.end(); iter++){
155 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
156 cout<<
"old tower id="<<emcTrig->get2004HT2_ID()<<
" adc="<<emcTrig->get2004HT2_ADC()<<endl;
161 cout<<
" 45206 jp1 = "<<emcTrig->
isTrigger(45206)<<
" = "<<emcTrig->is2004JP1()<<endl;
163 cout<<
"Total #'s of jpatches="<<jpatch.size()<<endl;
164 for ( iter=jpatch.begin();iter !=jpatch.end(); iter++){
165 cout<<
"jpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
166 cout<<
"old patch id="<<emcTrig->get2004JP1_ID()<<
" adc="<<emcTrig->get2004JP1_ADC()<<endl;
171 cout<<
" 45207 jp2 = "<<emcTrig->
isTrigger(45207)<<
" = "<<emcTrig->is2004JP2()<<endl;
173 cout<<
"Total #'s of jpatches="<<jpatch.size()<<endl;
174 for ( iter=jpatch.begin();iter !=jpatch.end(); iter++){
175 cout<<
"jpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
176 cout<<
"old patch id="<<emcTrig->get2004JP2_ID()<<
" adc="<<emcTrig->get2004JP2_ADC()<<endl;
181 cout<<
" 127212 ht2 (matrix0)="<<emcTrig->
isTrigger(127212)<<endl;
183 cout<<
"Total #'s of towers="<<tower.size()<<endl;
184 for ( iter=tower.begin();iter !=tower.end(); iter++){
185 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
190 cout<<
" 127213 ht2 (matrix1)="<<emcTrig->
isTrigger(127213)<<endl;
192 cout<<
"Total #'s of towers="<<tower.size()<<endl;
193 for ( iter=tower.begin();iter !=tower.end(); iter++){
194 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
199 cout<<
" 137213 ht2 (matrix3) ="<<emcTrig->
isTrigger(127213)<<endl;
201 cout<<
"Total #'s of towers="<<tower.size()<<endl;
202 for ( iter=tower.begin();iter !=tower.end(); iter++){
203 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
208 cout<<
" 127501 jp0 (matrix1)="<<emcTrig->
isTrigger(127501)<<endl;
210 cout<<
"Total #'s of jpatches="<<jpatch.size()<<endl;
211 for ( iter=jpatch.begin();iter !=jpatch.end(); iter++){
212 cout<<
"jpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
217 cout<<
" 137501 jp0 (matrix3) ="<<emcTrig->
isTrigger(137501)<<endl;
219 cout<<
"Total #'s of jpatches="<<jpatch.size()<<endl;
220 for ( iter=jpatch.begin();iter !=jpatch.end(); iter++){
221 cout<<
"jpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
226 cout<<
" 127221 jp1 (matrix1)="<<emcTrig->
isTrigger(127221)<<endl;
228 cout<<
"Total #'s of jpatches="<<jpatch.size()<<endl;
229 for ( iter=jpatch.begin();iter !=jpatch.end(); iter++){
230 cout<<
"jpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
235 cout<<
" 137221 jp1 (matrix2)="<<emcTrig->
isTrigger(137221)<<endl;
237 cout<<
"Total #'s of jpatches="<<jpatch.size()<<endl;
238 for ( iter=jpatch.begin();iter !=jpatch.end(); iter++){
239 cout<<
"jpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
244 cout<<
" 137222 jp1 (matrix3)="<<emcTrig->
isTrigger(137222)<<endl;
246 cout<<
"Total #'s of jpatches="<<jpatch.size()<<endl;
247 for ( iter=jpatch.begin();iter !=jpatch.end(); iter++){
248 cout<<
"jpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
253 cout<<
" 127821 http (matrix1)="<<emcTrig->
isTrigger(127821)<<endl;
255 cout<<
"Total #'s of tpatches="<<tpatch.size()<<endl;
256 for ( iter=tpatch.begin();iter !=tpatch.end(); iter++){
257 cout<<
"tpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
260 cout<<
"Total #'s of towers="<<tower.size()<<endl;
261 for ( iter=tower.begin();iter !=tower.end(); iter++){
262 int triggerPatch = emcTrig->barrelTriggerPatchForTower(iter->first);
263 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<
" tp (id,adc)=("<< triggerPatch <<
"," << tpatch[triggerPatch] <<
")" <<endl;
268 cout<<
" 137821 http (matrix3) ="<<emcTrig->
isTrigger(137821)<<endl;
270 cout<<
"Total #'s of tpatches="<<tpatch.size()<<endl;
271 for ( iter=tpatch.begin();iter !=tpatch.end(); iter++){
272 cout<<
"tpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
275 cout<<
"Total #'s of towers="<<tower.size()<<endl;
276 for ( iter=tower.begin();iter !=tower.end(); iter++){
277 int triggerPatch = emcTrig->barrelTriggerPatchForTower(iter->first);
278 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<
" tp (id,adc)=("<< triggerPatch <<
"," << tpatch[triggerPatch] <<
")" <<endl;
283 cout<<
" 137822 http (matrix4)="<<emcTrig->
isTrigger(137822)<<endl;
285 cout<<
"Total #'s of tpatches="<<tpatch.size()<<endl;
286 for ( iter=tpatch.begin();iter !=tpatch.end(); iter++){
287 cout<<
"tpatch id="<<iter->first<<
" adc="<<iter->second<<endl;
290 cout<<
"Total #'s of towers="<<tower.size()<<endl;
291 for ( iter=tower.begin();iter !=tower.end(); iter++){
292 int triggerPatch = emcTrig->barrelTriggerPatchForTower(iter->first);
293 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<
" tp (id,adc)=("<< triggerPatch <<
"," << tpatch[triggerPatch] <<
")" <<endl;
298 cout<<
" 117705 jpsi (matrix1)="<<emcTrig->
isTrigger(117705)<<endl;
300 cout<<
"Total #'s of towers="<<tower.size()<<endl;
301 for ( iter=tower.begin();iter !=tower.end(); iter++){
302 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
307 cout<<
" 117602 upsilon (matrix1)="<<emcTrig->
isTrigger(117602)<<endl;
309 cout<<
"Total #'s of towers="<<tower.size()<<endl;
310 for ( iter=tower.begin();iter !=tower.end(); iter++){
311 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
316 cout<<
" 137602 upsilon (matrix3)="<<emcTrig->
isTrigger(137602)<<endl;
318 cout<<
"Total #'s of towers="<<tower.size()<<endl;
319 for ( iter=tower.begin();iter !=tower.end(); iter++){
320 cout<<
"tower id="<<iter->first<<
" adc="<<iter->second<<endl;
326 cout<<
" 127611 http-L2="<<emcTrig->
isTrigger(127611)<<endl;
330 cout<<
" 127622 jp0-etot-L2="<<emcTrig->
isTrigger(127622)<<endl;
334 cout<<
" 137622 jp0-etot-L2="<<emcTrig->
isTrigger(137622)<<endl;
336 for (
int j=0;j<6;j++){
338 emcTrig->get2006BL1_ADC(j,&hold);
340 cout<<
" 2x1 Patch "<<j<<
" = "<<BL1_ADC[j]<<endl;
347 cout <<
"****************************************** " << endl;
348 cout <<
"total number of events " << total << endl;
349 cout <<
"****************************************** " << endl;
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
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...
Filling of all StMcEvent classes from g2t tables Transform all the data in the g2t tables into the co...
virtual void ls(Option_t *option="") const
Bool_t doPrintMemoryInfo
lots of screen output
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.
void setCalibSpread(StDetectorId det, float spread)
smear simulator calibration coefficients using Gaussian with this RMS.