CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GlobalDigisHistogrammer.cc
Go to the documentation of this file.
1 
12 
14  fName(""), verbosity(0), frequency(0), label(""), getAllProvenances(false),
15  printProvenanceInfo(false), theCSCStripPedestalSum(0),
16  theCSCStripPedestalCount(0), count(0)
17 {
18  std::string MsgLoggerCat = "GlobalDigisHistogrammer_GlobalDigisHistogrammer";
19 
20  // get information from parameter set
21  fName = iPSet.getUntrackedParameter<std::string>("Name");
22  verbosity = iPSet.getUntrackedParameter<int>("Verbosity");
23  frequency = iPSet.getUntrackedParameter<int>("Frequency");
24  outputfile = iPSet.getParameter<std::string>("outputFile");
25  doOutput = iPSet.getParameter<bool>("DoOutput");
26  edm::ParameterSet m_Prov =
27  iPSet.getParameter<edm::ParameterSet>("ProvenanceLookup");
29  m_Prov.getUntrackedParameter<bool>("GetAllProvenances");
31  m_Prov.getUntrackedParameter<bool>("PrintProvenanceInfo");
32 
33  //get Labels to use to extract information
34  GlobalDigisSrc_ = iPSet.getParameter<edm::InputTag>("GlobalDigisSrc");
35  //ECalEBSrc_ = iPSet.getParameter<edm::InputTag>("ECalEBSrc");
36  //ECalEESrc_ = iPSet.getParameter<edm::InputTag>("ECalEESrc");
37  //ECalESSrc_ = iPSet.getParameter<edm::InputTag>("ECalESSrc");
38  //HCalSrc_ = iPSet.getParameter<edm::InputTag>("HCalSrc");
39  //SiStripSrc_ = iPSet.getParameter<edm::InputTag>("SiStripSrc");
40  //SiPxlSrc_ = iPSet.getParameter<edm::InputTag>("SiPxlSrc");
41  //MuDTSrc_ = iPSet.getParameter<edm::InputTag>("MuDTSrc");
42  //MuCSCStripSrc_ = iPSet.getParameter<edm::InputTag>("MuCSCStripSrc");
43  //MuCSCWireSrc_ = iPSet.getParameter<edm::InputTag>("MuCSCWireSrc");
44 
45  // use value of first digit to determine default output level (inclusive)
46  // 0 is none, 1 is basic, 2 is fill output, 3 is gather output
47  verbosity %= 10;
48 
49  // create persistent object
50  //produces<PGlobalDigi>(label);
51 
52  // print out Parameter Set information being used
53  if (verbosity >= 0) {
54  edm::LogInfo(MsgLoggerCat)
55  << "\n===============================\n"
56  << "Initialized as EDHistogrammer with parameter values:\n"
57  << " Name = " << fName << "\n"
58  << " Verbosity = " << verbosity << "\n"
59  << " Frequency = " << frequency << "\n"
60  << " OutputFile = " << outputfile << "\n"
61  << " DoOutput = " << doOutput << "\n"
62  << " GetProv = " << getAllProvenances << "\n"
63  << " PrintProv = " << printProvenanceInfo << "\n"
64  << " Global Src = " << GlobalDigisSrc_ << "\n"
65 
66  << "===============================\n";
67  }
68 
69  //Put in analyzer stuff here.... Pasted from Rec Hits...
70 
71  dbe = 0;
73 if (dbe) {
74  if (verbosity > 0 ) {
75  dbe->setVerbose(1);
76  } else {
77  dbe->setVerbose(0);
78  }
79 }
80 if (dbe) {
81  if (verbosity > 0 ) dbe->showDirStructure();
82  }
83 
84  Char_t hname[100];
85  Char_t htitle[100];
86 
87 //monitor elements
88 
89 //Si Strip ***Done***
90  if(dbe)
91  {
92 std::string SiStripString[19] = {"TECW1", "TECW2", "TECW3", "TECW4", "TECW5", "TECW6", "TECW7", "TECW8", "TIBL1", "TIBL2", "TIBL3", "TIBL4", "TIDW1", "TIDW2", "TIDW3", "TOBL1", "TOBL2", "TOBL3", "TOBL4"};
93 for(int i = 0; i<19; ++i)
94 {
95  mehSiStripn[i]=0;
96  mehSiStripADC[i]=0;
97  mehSiStripStrip[i]=0;
98 }
99  std::string hcharname, hchartitle;
100 dbe->setCurrentFolder("GlobalDigisV/SiStrips");
101 for(int amend = 0; amend < 19; ++amend)
102 {
103  hcharname = "hSiStripn_"+SiStripString[amend];
104  hchartitle= SiStripString[amend]+" Digis";
105  sprintf(hname, hcharname.c_str());
106  sprintf(htitle, hchartitle.c_str());
107  mehSiStripn[amend] = dbe->book1D(hname,htitle,500,0.,1000.);
108  mehSiStripn[amend]->setAxisTitle("Number of Digis",1);
109  mehSiStripn[amend]->setAxisTitle("Count",2);
110  hcharname = "hSiStripADC_"+SiStripString[amend];
111  hchartitle= SiStripString[amend]+" ADC";
112  sprintf(hname, hcharname.c_str());
113  sprintf(htitle, hchartitle.c_str());
114  mehSiStripADC[amend] = dbe->book1D(hname,htitle,150,0.0,300.);
115  mehSiStripADC[amend]->setAxisTitle("ADC",1);
116  mehSiStripADC[amend]->setAxisTitle("Count",2);
117  hcharname = "hSiStripStripADC_"+SiStripString[amend];
118  hchartitle= SiStripString[amend]+" Strip";
119  sprintf(hname, hcharname.c_str());
120  sprintf(htitle, hchartitle.c_str());
121  mehSiStripStrip[amend] = dbe->book1D(hname,htitle,200,0.0,800.);
122  mehSiStripStrip[amend]->setAxisTitle("Strip Number",1);
123  mehSiStripStrip[amend]->setAxisTitle("Count",2);
124 }
125 
126 
127 //HCal **DONE**
128 std::string HCalString[4] = {"HB", "HE", "HO","HF"};
129 float calnUpper[4] = {3000.,3000.,3000.,2000.}; float calnLower[4]={2000.,2000.,2000.,1000.};
130 float SHEUpper[4]={0.05,.05,0.05,20};
131 float SHEvAEEUpper[4] = {5000, 5000, 5000, 20}; float SHEvAEELower[4] = {-5000, -5000, -5000, -20};
132 int SHEvAEEnBins[4] = {200,200,200,40};
133 double ProfileUpper[4] = {1.,1.,1.,20.};
134 
135 for(int i =0; i<4; ++i)
136 {
137  mehHcaln[i]=0;
138  mehHcalAEE[i]=0;
139  mehHcalSHE[i]=0;
140  mehHcalAEESHE[i]=0;
141  mehHcalSHEvAEE[i]=0;
142 }
143 dbe->setCurrentFolder("GlobalDigisV/HCals");
144 
145 for(int amend = 0; amend < 4; ++amend)
146 {
147  hcharname = "hHcaln_"+HCalString[amend];
148  hchartitle= HCalString[amend]+" digis";
149  sprintf(hname, hcharname.c_str());
150  sprintf(htitle, hchartitle.c_str());
151  mehHcaln[amend] = dbe->book1D(hname,htitle, 1000, calnLower[amend], calnUpper[amend]);
152  mehHcaln[amend]->setAxisTitle("Number of Digis",1);
153  mehHcaln[amend]->setAxisTitle("Count",2);
154  hcharname = "hHcalAEE_"+HCalString[amend];
155  hchartitle= HCalString[amend]+"Cal AEE";
156  sprintf(hname, hcharname.c_str());
157  sprintf(htitle, hchartitle.c_str());
158  mehHcalAEE[amend] = dbe->book1D(hname,htitle, 60, -10., 50.);
159  mehHcalAEE[amend]->setAxisTitle("Analog Equivalent Energy",1);
160  mehHcalAEE[amend]->setAxisTitle("Count",2);
161  hcharname = "hHcalSHE_"+HCalString[amend];
162  hchartitle= HCalString[amend]+"Cal SHE";
163  sprintf(hname, hcharname.c_str());
164  sprintf(htitle, hchartitle.c_str());
165  mehHcalSHE[amend] = dbe->book1D(hname,htitle, 100, 0.0, SHEUpper[amend]);
166  mehHcalSHE[amend]->setAxisTitle("Simulated Hit Energy",1);
167  mehHcalSHE[amend]->setAxisTitle("Count",2);
168  hcharname = "hHcalAEESHE_"+HCalString[amend];
169  hchartitle= HCalString[amend]+"Cal AEE/SHE";
170  sprintf(hname, hcharname.c_str());
171  sprintf(htitle, hchartitle.c_str());
172  mehHcalAEESHE[amend] = dbe->book1D(hname, htitle, SHEvAEEnBins[amend], SHEvAEELower[amend], SHEvAEEUpper[amend]);
173  mehHcalAEESHE[amend]->setAxisTitle("ADC / SHE",1);
174  mehHcalAEESHE[amend]->setAxisTitle("Count",2);
175 
176  //************ Not sure how to do Profile ME **************
177 
178  hcharname = "hHcalSHEvAEE_"+HCalString[amend];
179  hchartitle= HCalString[amend]+"Cal SHE vs. AEE";
180  sprintf(hname, hcharname.c_str());
181  sprintf(htitle, hchartitle.c_str());
182  mehHcalSHEvAEE[amend] = dbe->bookProfile(hname,htitle, 60, (float)-10., (float)50., 100, (float)0., (float)ProfileUpper[amend],"");
183  mehHcalSHEvAEE[amend]->setAxisTitle("AEE / SHE",1);
184  mehHcalSHEvAEE[amend]->setAxisTitle("SHE",2);
185 
186 }
187 
188 
189 
190 
191 //Ecal **Done **
192 std::string ECalString[2] = {"EB","EE"};
193 
194 for(int i =0; i<2; ++i)
195 {
196  mehEcaln[i]=0;
197  mehEcalAEE[i]=0;
198  mehEcalSHE[i]=0;
199  mehEcalMaxPos[i]=0;
200  mehEcalMultvAEE[i]=0;
201  mehEcalSHEvAEESHE[i]=0;
202 }
203 dbe->setCurrentFolder("GlobalDigisV/ECals");
204 
205 for(int amend = 0; amend < 2; ++amend)
206 {
207  hcharname = "hEcaln_"+ECalString[amend];
208  hchartitle= ECalString[amend]+" digis";
209  sprintf(hname, hcharname.c_str());
210  sprintf(htitle, hchartitle.c_str());
211  mehEcaln[amend] = dbe->book1D(hname,htitle, 300, 1000., 4000.);
212  mehEcaln[amend]->setAxisTitle("Number of Digis",1);
213  mehEcaln[amend]->setAxisTitle("Count",2);
214  hcharname = "hEcalAEE_"+ECalString[amend];
215  hchartitle= ECalString[amend]+"Cal AEE";
216  sprintf(hname, hcharname.c_str());
217  sprintf(htitle, hchartitle.c_str());
218  mehEcalAEE[amend] = dbe->book1D(hname,htitle, 100, 0., 1.);
219  mehEcalAEE[amend]->setAxisTitle("Analog Equivalent Energy",1);
220  mehEcalAEE[amend]->setAxisTitle("Count",2);
221  hcharname = "hEcalSHE_"+ECalString[amend];
222  hchartitle= ECalString[amend]+"Cal SHE";
223  sprintf(hname, hcharname.c_str());
224  sprintf(htitle, hchartitle.c_str());
225  mehEcalSHE[amend] = dbe->book1D(hname,htitle, 50, 0., 5.);
226  mehEcalSHE[amend]->setAxisTitle("Simulated Hit Energy",1);
227  mehEcalSHE[amend]->setAxisTitle("Count",2);
228  hcharname = "hEcalMaxPos_"+ECalString[amend];
229  hchartitle= ECalString[amend]+"Cal MaxPos";
230  sprintf(hname, hcharname.c_str());
231  sprintf(htitle, hchartitle.c_str());
232  mehEcalMaxPos[amend] = dbe->book1D(hname,htitle,10, 0., 10.);
233  mehEcalMaxPos[amend]->setAxisTitle("Maximum Position",1);
234  mehEcalMaxPos[amend]->setAxisTitle("Count",2);
235 
236  //************ Not sure how to do Profile ME **************
237  hcharname = "hEcalSHEvAEESHE_"+ECalString[amend];
238  hchartitle= ECalString[amend]+"Cal SHE vs. AEE/SHE";
239  sprintf(hname, hcharname.c_str());
240  sprintf(htitle, hchartitle.c_str());
241  mehEcalSHEvAEESHE[amend] = dbe->bookProfile(hname,htitle,100, (float)0., (float)10., 50, (float)0., (float)5.,"");
242  mehEcalSHEvAEESHE[amend]->setAxisTitle("AEE / SHE",1);
243  mehEcalSHEvAEESHE[amend]->setAxisTitle("SHE",2);
244  hcharname = "hEcalMultvAEE_"+ECalString[amend];
245  hchartitle= ECalString[amend]+"Cal Multi vs. AEE";
246  sprintf(hname, hcharname.c_str());
247  sprintf(htitle, hchartitle.c_str());
248  mehEcalMultvAEE[amend] = dbe->bookProfile(hname,htitle, 100, (float)0., (float)10., 400, (float)0., (float)4000.,"");
249  mehEcalMultvAEE[amend]->setAxisTitle("Analog Equivalent Energy",1);
250  mehEcalMultvAEE[amend]->setAxisTitle("Number of Digis",2);
251 
252 
253 
254 }
255  mehEcaln[2] = 0;
256  hcharname = "hEcaln_ES";
257  hchartitle= "ESCAL digis";
258  sprintf(hname, hcharname.c_str());
259  sprintf(htitle, hchartitle.c_str());
260  mehEcaln[2] = dbe->book1D(hname,htitle, 100, 0., 500.);
261  mehEcaln[2]->setAxisTitle("Number of Digis",1);
262  mehEcaln[2]->setAxisTitle("Count",2);
263  std::string ADCNumber[3] = {"0", "1", "2"};
264  for(int i =0; i<3; ++i)
265  {
266  mehEScalADC[i] = 0;
267  hcharname = "hEcalADC"+ADCNumber[i]+"_ES";
268  hchartitle= "ESCAL ADC"+ADCNumber[i];
269  sprintf(hname, hcharname.c_str());
270  sprintf(htitle, hchartitle.c_str());
271  mehEScalADC[i] = dbe->book1D(hname,htitle, 150, 950., 1500.);
272  mehEScalADC[i]->setAxisTitle("ADC"+ADCNumber[i],1);
273  mehEScalADC[i]->setAxisTitle("Count",2);
274 
275  }
276 
277 //Si Pixels ***DONE***
278 std::string SiPixelString[7] = {"BRL1", "BRL2", "BRL3", "FWD1n", "FWD1p", "FWD2n", "FWD2p"};
279 for(int j =0; j<7; ++j)
280 {
281  mehSiPixeln[j]=0;
282  mehSiPixelADC[j]=0;
283  mehSiPixelRow[j]=0;
284  mehSiPixelCol[j]=0;
285 }
286 
287 dbe->setCurrentFolder("GlobalDigisV/SiPixels");
288 for(int amend = 0; amend < 7; ++amend)
289 {
290  hcharname = "hSiPixeln_"+SiPixelString[amend];
291  hchartitle= SiPixelString[amend]+" Digis";
292  sprintf(hname, hcharname.c_str());
293  sprintf(htitle, hchartitle.c_str());
294  if(amend<3) mehSiPixeln[amend] = dbe->book1D(hname,htitle,50,0.,100.);
295  else mehSiPixeln[amend] = dbe->book1D(hname,htitle,25,0.,50.);
296  mehSiPixeln[amend]->setAxisTitle("Number of Digis",1);
297  mehSiPixeln[amend]->setAxisTitle("Count",2);
298  hcharname = "hSiPixelADC_"+SiPixelString[amend];
299  hchartitle= SiPixelString[amend]+" ADC";
300  sprintf(hname, hcharname.c_str());
301  sprintf(htitle, hchartitle.c_str());
302  mehSiPixelADC[amend] = dbe->book1D(hname,htitle,150,0.0,300.);
303  mehSiPixelADC[amend]->setAxisTitle("ADC",1);
304  mehSiPixelADC[amend]->setAxisTitle("Count",2);
305  hcharname = "hSiPixelRow_"+SiPixelString[amend];
306  hchartitle= SiPixelString[amend]+" Row";
307  sprintf(hname, hcharname.c_str());
308  sprintf(htitle, hchartitle.c_str());
309  mehSiPixelRow[amend] = dbe->book1D(hname,htitle,100,0.0,100.);
310  mehSiPixelRow[amend]->setAxisTitle("Row Number",1);
311  mehSiPixelRow[amend]->setAxisTitle("Count",2);
312  hcharname = "hSiPixelColumn_"+SiPixelString[amend];
313  hchartitle= SiPixelString[amend]+" Column";
314  sprintf(hname, hcharname.c_str());
315  sprintf(htitle, hchartitle.c_str());
316  mehSiPixelCol[amend] = dbe->book1D(hname,htitle,200,0.0,500.);
317  mehSiPixelCol[amend]->setAxisTitle("Column Number",1);
318  mehSiPixelCol[amend]->setAxisTitle("Count",2);
319 }
320 //Muons ***DONE****
321 dbe->setCurrentFolder("GlobalDigisV/Muons");
322 std::string MuonString[4] = {"MB1", "MB2", "MB3", "MB4"};
323 
324 for(int i =0; i < 4; ++i)
325 {
326  mehDtMuonn[i] = 0;
327  mehDtMuonLayer[i] = 0;
328  mehDtMuonTime[i] = 0;
329  mehDtMuonTimevLayer[i] = 0;
330 }
331 
332 for(int j = 0; j < 4; ++j)
333 {
334  hcharname = "hDtMuonn_"+MuonString[j];
335  hchartitle= MuonString[j]+" digis";
336  sprintf(hname,hcharname.c_str());
337  sprintf(htitle,hchartitle.c_str());
338  mehDtMuonn[j] = dbe->book1D(hname,htitle,25, 0., 50.);
339  mehDtMuonn[j]->setAxisTitle("Number of Digis",1);
340  mehDtMuonn[j]->setAxisTitle("Count",2);
341  hcharname = "hDtLayer_"+MuonString[j];
342  hchartitle= MuonString[j]+" Layer";
343  sprintf(hname,hcharname.c_str());
344  sprintf(htitle,hchartitle.c_str());
345  mehDtMuonLayer[j] = dbe->book1D(hname,htitle,12, 1., 13.);
346  mehDtMuonLayer[j]->setAxisTitle("4 * (SuperLayer - 1) + Layer",1);
347  mehDtMuonLayer[j]->setAxisTitle("Count",2);
348  hcharname = "hDtMuonTime_"+MuonString[j];
349  hchartitle= MuonString[j]+" Time";
350  sprintf(hname,hcharname.c_str());
351  sprintf(htitle,hchartitle.c_str());
352  mehDtMuonTime[j] = dbe->book1D(hname,htitle,300, 400., 1000.);
353  mehDtMuonTime[j]->setAxisTitle("Time",1);
354  mehDtMuonTime[j]->setAxisTitle("Count",2);
355  hcharname = "hDtMuonTimevLayer_"+MuonString[j];
356  hchartitle= MuonString[j]+" Time vs. Layer";
357  sprintf(hname,hcharname.c_str());
358  sprintf(htitle,hchartitle.c_str());
359  mehDtMuonTimevLayer[j] = dbe->bookProfile(hname,htitle,12, 1., 13., 300, 400., 1000.,"");
360  mehDtMuonTimevLayer[j]->setAxisTitle("4 * (SuperLayer - 1) + Layer",1);
361  mehDtMuonTimevLayer[j]->setAxisTitle("Time",2);
362 }
363 
364 // **** Have to do CSC and RPC now *****
365 //CSC
366 mehCSCStripn = 0;
367 hcharname = "hCSCStripn";
368 hchartitle = "CSC Strip digis";
369 sprintf(hname,hcharname.c_str());
370 sprintf(htitle,hchartitle.c_str());
371 mehCSCStripn = dbe->book1D(hname,htitle,25, 0., 50.);
372 mehCSCStripn->setAxisTitle("Number of Digis",1);
373 mehCSCStripn->setAxisTitle("Count",2);
374 
375 mehCSCStripADC = 0;
376 hcharname = "hCSCStripADC";
377 hchartitle = "CSC Strip ADC";
378 sprintf(hname,hcharname.c_str());
379 sprintf(htitle,hchartitle.c_str());
380 mehCSCStripADC = dbe->book1D(hname,htitle, 110, 0., 1100.);
381 mehCSCStripADC->setAxisTitle("ADC",1);
382 mehCSCStripADC->setAxisTitle("Count",2);
383 
384 mehCSCWiren = 0;
385 hcharname = "hCSCWiren";
386 hchartitle = "CSC Wire digis";
387 sprintf(hname,hcharname.c_str());
388 sprintf(htitle,hchartitle.c_str());
389 mehCSCWiren = dbe->book1D(hname,htitle,25, 0., 50.);
390 mehCSCWiren->setAxisTitle("Number of Digis",1);
391 mehCSCWiren->setAxisTitle("Count",2);
392 
393 
394 
395 mehCSCWireTime = 0;
396 hcharname = "hCSCWireTime";
397 hchartitle = "CSC Wire Time";
398 sprintf(hname,hcharname.c_str());
399 sprintf(htitle,hchartitle.c_str());
400 mehCSCWiren = dbe->book1D(hname,htitle,10, 0., 10.);
401 mehCSCWiren->setAxisTitle("Time",1);
402 mehCSCWiren->setAxisTitle("Count",2);
403 
404 
405 }
406 
407 }
408 
409  // set default constants
410  // ECal
411 
412  //ECalgainConv_[0] = 0.;
413  //ECalgainConv_[1] = 1.;
414  //ECalgainConv_[2] = 2.;
415  //ECalgainConv_[3] = 12.;
416  //ECalbarrelADCtoGeV_ = 0.035;
417  //ECalendcapADCtoGeV_ = 0.06;
418 
419 
420 
422 {
423  if (doOutput)
424  if (outputfile.size() != 0 && dbe) dbe->save(outputfile);
425 }
426 
428 {
429  std::string MsgLoggerCat = "GlobalDigisHistogrammer_beginJob";
430 
431  // setup calorimeter constants from service
432  //edm::ESHandle<EcalADCToGeVConstant> pAgc;
433  //iSetup.get<EcalADCToGeVConstantRcd>().get(pAgc);
434  //const EcalADCToGeVConstant* agc = pAgc.product();
435 
436  //EcalMGPAGainRatio * defaultRatios = new EcalMGPAGainRatio();
437 
438  // ECalgainConv_[0] = 0.;
439  // ECalgainConv_[1] = 1.;
440  // // ECalgainConv_[2] = defaultRatios->gain12Over6() ;
441  //ECalgainConv_[3] = ECalgainConv_[2]*(defaultRatios->gain6Over1()) ;
442 
443  //delete defaultRatios;
444 
445  //ECalbarrelADCtoGeV_ = agc->getEBValue();
446  //ECalendcapADCtoGeV_ = agc->getEEValue();
447 
448  //if (verbosity >= 0) {
449  // edm::LogInfo(MsgLoggerCat)
450  // << "Modified Calorimeter gain constants: g0 = " << ECalgainConv_[0]
451  //<< ", g1 = " << ECalgainConv_[1] << ", g2 = " << ECalgainConv_[2]
452  // << ", g3 = " << ECalgainConv_[3];
453  // edm::LogInfo(MsgLoggerCat)
454  // << "Modified Calorimeter ADCtoGeV constants: barrel = "
455  // << ECalbarrelADCtoGeV_ << ", endcap = " << ECalendcapADCtoGeV_;
456  //}
457 
458  // clear storage vectors
459  //clear();
460  return;
461 }
462 
464 {
465  std::string MsgLoggerCat = "GlobalDigisHistogrammer_endJob";
466  if (verbosity >= 0)
467  edm::LogInfo(MsgLoggerCat)
468  << "Terminating having processed " << count << " events.";
469  return;
470 }
471 
473  const edm::EventSetup& iSetup)
474 {
475  std::string MsgLoggerCat = "GlobalDigisHistogrammer_analyze";
476 
477  // keep track of number of events processed
478  ++count;
479 
480  // get event id information
481  int nrun = iEvent.id().run();
482  int nevt = iEvent.id().event();
483 
484  if (verbosity > 0) {
485  edm::LogInfo(MsgLoggerCat)
486  << "Processing run " << nrun << ", event " << nevt
487  << " (" << count << " events total)";
488  } else if (verbosity == 0) {
489  if (nevt%frequency == 0 || nevt == 1) {
490  edm::LogInfo(MsgLoggerCat)
491  << "Processing run " << nrun << ", event " << nevt
492  << " (" << count << " events total)";
493  }
494  }
495 
496  // clear event holders
497  //clear();
498 
499  // look at information available in the event
500  if (getAllProvenances) {
501 
502  std::vector<const edm::Provenance*> AllProv;
503  iEvent.getAllProvenance(AllProv);
504 
505  if (verbosity >= 0)
506  edm::LogInfo(MsgLoggerCat)
507  << "Number of Provenances = " << AllProv.size();
508 
509  if (printProvenanceInfo && (verbosity >= 0)) {
510  TString eventout("\nProvenance info:\n");
511 
512  for (unsigned int i = 0; i < AllProv.size(); ++i) {
513  eventout += "\n ******************************";
514  eventout += "\n Module : ";
515  //eventout += (AllProv[i]->product).moduleLabel();
516  eventout += AllProv[i]->moduleLabel();
517  eventout += "\n ProductID : ";
518  //eventout += (AllProv[i]->product).productID_.id_;
519  eventout += AllProv[i]->productID().id();
520  eventout += "\n ClassName : ";
521  //eventout += (AllProv[i]->product).fullClassName_;
522  eventout += AllProv[i]->className();
523  eventout += "\n InstanceName : ";
524  //eventout += (AllProv[i]->product).productInstanceName_;
525  eventout += AllProv[i]->productInstanceName();
526  eventout += "\n BranchName : ";
527  //eventout += (AllProv[i]->product).branchName_;
528  eventout += AllProv[i]->branchName();
529  }
530  eventout += "\n ******************************\n";
531  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
532  printProvenanceInfo = false;
533  getAllProvenances = false;
534  }
535 edm::Handle<PGlobalDigi> srcGlobalDigis;
536  iEvent.getByLabel(GlobalDigisSrc_,srcGlobalDigis);
537  if (!srcGlobalDigis.isValid()) {
538  edm::LogWarning(MsgLoggerCat)
539  << "Unable to find PGlobalDigis in event!";
540  return;
541 
542  }
543 
544 
545 
546  int nEBCalDigis = srcGlobalDigis->getnEBCalDigis();
547  int nEECalDigis = srcGlobalDigis->getnEECalDigis();
548  int nESCalDigis = srcGlobalDigis->getnESCalDigis();
549 
550  int nHBCalDigis = srcGlobalDigis->getnHBCalDigis();
551  int nHECalDigis = srcGlobalDigis->getnHECalDigis();
552  int nHOCalDigis = srcGlobalDigis->getnHOCalDigis();
553  int nHFCalDigis = srcGlobalDigis->getnHFCalDigis();
554 
555  int nTIBL1Digis = srcGlobalDigis->getnTIBL1Digis();
556  int nTIBL2Digis = srcGlobalDigis->getnTIBL2Digis();
557  int nTIBL3Digis = srcGlobalDigis->getnTIBL3Digis();
558  int nTIBL4Digis = srcGlobalDigis->getnTIBL4Digis();
559  int nTOBL1Digis = srcGlobalDigis->getnTOBL1Digis();
560  int nTOBL2Digis = srcGlobalDigis->getnTOBL2Digis();
561  int nTOBL3Digis = srcGlobalDigis->getnTOBL3Digis();
562  int nTOBL4Digis = srcGlobalDigis->getnTOBL4Digis();
563  int nTIDW1Digis = srcGlobalDigis->getnTIDW1Digis();
564  int nTIDW2Digis = srcGlobalDigis->getnTIDW2Digis();
565  int nTIDW3Digis = srcGlobalDigis->getnTIDW3Digis();
566  int nTECW1Digis = srcGlobalDigis->getnTECW1Digis();
567  int nTECW2Digis = srcGlobalDigis->getnTECW2Digis();
568  int nTECW3Digis = srcGlobalDigis->getnTECW3Digis();
569  int nTECW4Digis = srcGlobalDigis->getnTECW4Digis();
570  int nTECW5Digis = srcGlobalDigis->getnTECW5Digis();
571  int nTECW6Digis = srcGlobalDigis->getnTECW6Digis();
572  int nTECW7Digis = srcGlobalDigis->getnTECW7Digis();
573  int nTECW8Digis = srcGlobalDigis->getnTECW8Digis();
574 
575  int nBRL1Digis = srcGlobalDigis->getnBRL1Digis();
576  int nBRL2Digis = srcGlobalDigis->getnBRL2Digis();
577  int nBRL3Digis = srcGlobalDigis->getnBRL3Digis();
578  int nFWD1nDigis = srcGlobalDigis->getnFWD1nDigis();
579  int nFWD1pDigis = srcGlobalDigis->getnFWD1pDigis();
580  int nFWD2nDigis = srcGlobalDigis->getnFWD2nDigis();
581  int nFWD2pDigis = srcGlobalDigis->getnFWD2pDigis();
582 
583  int nMB1Digis = srcGlobalDigis->getnMB1Digis();
584  int nMB2Digis = srcGlobalDigis->getnMB2Digis();
585  int nMB3Digis = srcGlobalDigis->getnMB3Digis();
586  int nMB4Digis = srcGlobalDigis->getnMB4Digis();
587 
588  int nCSCstripDigis = srcGlobalDigis->getnCSCstripDigis();
589 
590  int nCSCwireDigis = srcGlobalDigis->getnCSCwireDigis();
591 
592  // get Ecal info
593  std::vector<PGlobalDigi::ECalDigi> EECalDigis =
594  srcGlobalDigis->getEECalDigis();
595  mehEcaln[0]->Fill((float)nEECalDigis);
596  for (unsigned int i = 0; i < EECalDigis.size(); ++i) {
597  mehEcalAEE[0]->Fill(EECalDigis[i].AEE);
598  mehEcalMaxPos[0]->Fill(EECalDigis[i].maxPos);
599  mehEcalMultvAEE[0]->Fill(EECalDigis[i].AEE,(float)nEECalDigis,1);
600  if (EECalDigis[i].SHE != 0.) {
601  mehEcalSHE[0]->Fill(EECalDigis[i].SHE);
602  mehEcalSHEvAEESHE[0]->
603  Fill(EECalDigis[i].AEE/EECalDigis[i].SHE,EECalDigis[i].SHE,1);
604  }
605  }
606 
607  std::vector<PGlobalDigi::ECalDigi> EBCalDigis =
608  srcGlobalDigis->getEBCalDigis();
609  mehEcaln[1]->Fill((float)nEBCalDigis);
610  for (unsigned int i = 0; i < EBCalDigis.size(); ++i) {
611  mehEcalAEE[1]->Fill(EBCalDigis[i].AEE);
612  mehEcalMaxPos[1]->Fill(EBCalDigis[i].maxPos);
613  mehEcalMultvAEE[1]->Fill(EBCalDigis[i].AEE,(float)nEBCalDigis,1);
614  if (EBCalDigis[i].SHE != 0.) {
615  mehEcalSHE[1]->Fill(EBCalDigis[i].SHE);
616  mehEcalSHEvAEESHE[1]->
617  Fill(EBCalDigis[i].AEE/EBCalDigis[i].SHE,EBCalDigis[i].SHE,1);
618  }
619  }
620 
621  std::vector<PGlobalDigi::ESCalDigi> ESCalDigis =
622  srcGlobalDigis->getESCalDigis();
623  mehEcaln[2]->Fill((float)nESCalDigis);
624  for (unsigned int i = 0; i < ESCalDigis.size(); ++i) {
625  mehEScalADC[0]->Fill(ESCalDigis[i].ADC0);
626  mehEScalADC[1]->Fill(ESCalDigis[i].ADC1);
627  mehEScalADC[2]->Fill(ESCalDigis[i].ADC2);
628  }
629 
630  // Get HCal info
631  std::vector<PGlobalDigi::HCalDigi> HBCalDigis =
632  srcGlobalDigis->getHBCalDigis();
633  mehHcaln[0]->Fill((float)nHBCalDigis);
634  for (unsigned int i = 0; i < HBCalDigis.size(); ++i) {
635  mehHcalAEE[0]->Fill(HBCalDigis[i].AEE);
636  if (HBCalDigis[i].SHE != 0.) {
637  mehHcalSHE[0]->Fill(HBCalDigis[i].SHE);
638  mehHcalAEESHE[0]->Fill(HBCalDigis[i].AEE/HBCalDigis[i].SHE);
639  mehHcalSHEvAEE[0]->
640  Fill(HBCalDigis[i].AEE,HBCalDigis[i].SHE,1);
641  }
642  }
643  std::vector<PGlobalDigi::HCalDigi> HECalDigis =
644  srcGlobalDigis->getHECalDigis();
645  mehHcaln[1]->Fill((float)nHECalDigis);
646  for (unsigned int i = 0; i < HECalDigis.size(); ++i) {
647  mehHcalAEE[1]->Fill(HECalDigis[i].AEE);
648  if (HECalDigis[i].SHE != 0.) {
649  mehHcalSHE[1]->Fill(HECalDigis[i].SHE);
650  mehHcalAEESHE[1]->Fill(HECalDigis[i].AEE/HECalDigis[i].SHE);
651  mehHcalSHEvAEE[1]->
652  Fill(HECalDigis[i].AEE,HECalDigis[i].SHE,1);
653  }
654  }
655 
656  std::vector<PGlobalDigi::HCalDigi> HOCalDigis =
657  srcGlobalDigis->getHOCalDigis();
658  mehHcaln[2]->Fill((float)nHOCalDigis);
659  for (unsigned int i = 0; i < HOCalDigis.size(); ++i) {
660  mehHcalAEE[2]->Fill(HOCalDigis[i].AEE);
661  if (HOCalDigis[i].SHE != 0.) {
662  mehHcalSHE[2]->Fill(HOCalDigis[i].SHE);
663  mehHcalAEESHE[2]->Fill(HOCalDigis[i].AEE/HOCalDigis[i].SHE);
664  mehHcalSHEvAEE[2]->
665  Fill(HOCalDigis[i].AEE,HOCalDigis[i].SHE,1);
666  }
667  }
668 
669  std::vector<PGlobalDigi::HCalDigi> HFCalDigis =
670  srcGlobalDigis->getHFCalDigis();
671  mehHcaln[3]->Fill((float)nHFCalDigis);
672  for (unsigned int i = 0; i < HFCalDigis.size(); ++i) {
673  mehHcalAEE[3]->Fill(HFCalDigis[i].AEE);
674  if (HFCalDigis[i].SHE != 0.) {
675  mehHcalSHE[3]->Fill(HFCalDigis[i].SHE);
676  mehHcalAEESHE[3]->Fill(HFCalDigis[i].AEE/HFCalDigis[i].SHE);
677  mehHcalSHEvAEE[3]->
678  Fill(HFCalDigis[i].AEE,HFCalDigis[i].SHE,1);
679  }
680  }
681 
682  // get SiStrip info
683  std::vector<PGlobalDigi::SiStripDigi> TIBL1Digis =
684  srcGlobalDigis->getTIBL1Digis();
685  mehSiStripn[0]->Fill((float)nTIBL1Digis);
686  for (unsigned int i = 0; i < TIBL1Digis.size(); ++i) {
687  mehSiStripADC[0]->Fill(TIBL1Digis[i].ADC);
688  mehSiStripStrip[0]->Fill(TIBL1Digis[i].STRIP);
689  }
690 
691  std::vector<PGlobalDigi::SiStripDigi> TIBL2Digis =
692  srcGlobalDigis->getTIBL2Digis();
693  mehSiStripn[1]->Fill((float)nTIBL2Digis);
694  for (unsigned int i = 0; i < TIBL2Digis.size(); ++i) {
695  mehSiStripADC[1]->Fill(TIBL2Digis[i].ADC);
696  mehSiStripStrip[1]->Fill(TIBL2Digis[i].STRIP);
697  }
698 
699  std::vector<PGlobalDigi::SiStripDigi> TIBL3Digis =
700  srcGlobalDigis->getTIBL3Digis();
701  mehSiStripn[2]->Fill((float)nTIBL3Digis);
702  for (unsigned int i = 0; i < TIBL3Digis.size(); ++i) {
703  mehSiStripADC[2]->Fill(TIBL3Digis[i].ADC);
704  mehSiStripStrip[2]->Fill(TIBL3Digis[i].STRIP);
705  }
706 
707  std::vector<PGlobalDigi::SiStripDigi> TIBL4Digis =
708  srcGlobalDigis->getTIBL4Digis();
709  mehSiStripn[3]->Fill((float)nTIBL4Digis);
710  for (unsigned int i = 0; i < TIBL4Digis.size(); ++i) {
711  mehSiStripADC[3]->Fill(TIBL4Digis[i].ADC);
712  mehSiStripStrip[3]->Fill(TIBL4Digis[i].STRIP);
713  }
714 
715  std::vector<PGlobalDigi::SiStripDigi> TOBL1Digis =
716  srcGlobalDigis->getTOBL1Digis();
717  mehSiStripn[4]->Fill((float)nTOBL1Digis);
718  for (unsigned int i = 0; i < TOBL1Digis.size(); ++i) {
719  mehSiStripADC[4]->Fill(TOBL1Digis[i].ADC);
720  mehSiStripStrip[4]->Fill(TOBL1Digis[i].STRIP);
721  }
722 
723  std::vector<PGlobalDigi::SiStripDigi> TOBL2Digis =
724  srcGlobalDigis->getTOBL2Digis();
725  mehSiStripn[5]->Fill((float)nTOBL2Digis);
726  for (unsigned int i = 0; i < TOBL2Digis.size(); ++i) {
727  mehSiStripADC[5]->Fill(TOBL2Digis[i].ADC);
728  mehSiStripStrip[5]->Fill(TOBL2Digis[i].STRIP);
729  }
730 
731  std::vector<PGlobalDigi::SiStripDigi> TOBL3Digis =
732  srcGlobalDigis->getTOBL3Digis();
733  mehSiStripn[6]->Fill((float)nTOBL3Digis);
734  for (unsigned int i = 0; i < TOBL3Digis.size(); ++i) {
735  mehSiStripADC[6]->Fill(TOBL3Digis[i].ADC);
736  mehSiStripStrip[6]->Fill(TOBL3Digis[i].STRIP);
737  }
738 
739  std::vector<PGlobalDigi::SiStripDigi> TOBL4Digis =
740  srcGlobalDigis->getTOBL4Digis();
741  mehSiStripn[7]->Fill((float)nTOBL4Digis);
742  for (unsigned int i = 0; i < TOBL4Digis.size(); ++i) {
743  mehSiStripADC[7]->Fill(TOBL4Digis[i].ADC);
744  mehSiStripStrip[7]->Fill(TOBL4Digis[i].STRIP);
745  }
746 
747  std::vector<PGlobalDigi::SiStripDigi> TIDW1Digis =
748  srcGlobalDigis->getTIDW1Digis();
749  mehSiStripn[8]->Fill((float)nTIDW1Digis);
750  for (unsigned int i = 0; i < TIDW1Digis.size(); ++i) {
751  mehSiStripADC[8]->Fill(TIDW1Digis[i].ADC);
752  mehSiStripStrip[8]->Fill(TIDW1Digis[i].STRIP);
753  }
754 
755  std::vector<PGlobalDigi::SiStripDigi> TIDW2Digis =
756  srcGlobalDigis->getTIDW2Digis();
757  mehSiStripn[9]->Fill((float)nTIDW2Digis);
758  for (unsigned int i = 0; i < TIDW2Digis.size(); ++i) {
759  mehSiStripADC[9]->Fill(TIDW2Digis[i].ADC);
760  mehSiStripStrip[9]->Fill(TIDW2Digis[i].STRIP);
761  }
762 
763  std::vector<PGlobalDigi::SiStripDigi> TIDW3Digis =
764  srcGlobalDigis->getTIDW3Digis();
765  mehSiStripn[10]->Fill((float)nTIDW3Digis);
766  for (unsigned int i = 0; i < TIDW3Digis.size(); ++i) {
767  mehSiStripADC[10]->Fill(TIDW3Digis[i].ADC);
768  mehSiStripStrip[10]->Fill(TIDW3Digis[i].STRIP);
769  }
770 
771  std::vector<PGlobalDigi::SiStripDigi> TECW1Digis =
772  srcGlobalDigis->getTECW1Digis();
773  mehSiStripn[11]->Fill((float)nTECW1Digis);
774  for (unsigned int i = 0; i < TECW1Digis.size(); ++i) {
775  mehSiStripADC[11]->Fill(TECW1Digis[i].ADC);
776  mehSiStripStrip[11]->Fill(TECW1Digis[i].STRIP);
777  }
778 
779  std::vector<PGlobalDigi::SiStripDigi> TECW2Digis =
780  srcGlobalDigis->getTECW2Digis();
781  mehSiStripn[12]->Fill((float)nTECW2Digis);
782  for (unsigned int i = 0; i < TECW2Digis.size(); ++i) {
783  mehSiStripADC[12]->Fill(TECW2Digis[i].ADC);
784  mehSiStripStrip[12]->Fill(TECW2Digis[i].STRIP);
785  }
786 
787  std::vector<PGlobalDigi::SiStripDigi> TECW3Digis =
788  srcGlobalDigis->getTECW3Digis();
789  mehSiStripn[13]->Fill((float)nTECW3Digis);
790  for (unsigned int i = 0; i < TECW3Digis.size(); ++i) {
791  mehSiStripADC[13]->Fill(TECW3Digis[i].ADC);
792  mehSiStripStrip[13]->Fill(TECW3Digis[i].STRIP);
793  }
794 
795  std::vector<PGlobalDigi::SiStripDigi> TECW4Digis =
796  srcGlobalDigis->getTECW4Digis();
797  mehSiStripn[14]->Fill((float)nTECW4Digis);
798  for (unsigned int i = 0; i < TECW4Digis.size(); ++i) {
799  mehSiStripADC[14]->Fill(TECW4Digis[i].ADC);
800  mehSiStripStrip[14]->Fill(TECW4Digis[i].STRIP);
801  }
802 
803  std::vector<PGlobalDigi::SiStripDigi> TECW5Digis =
804  srcGlobalDigis->getTECW5Digis();
805  mehSiStripn[15]->Fill((float)nTECW5Digis);
806  for (unsigned int i = 0; i < TECW5Digis.size(); ++i) {
807  mehSiStripADC[15]->Fill(TECW5Digis[i].ADC);
808  mehSiStripStrip[15]->Fill(TECW5Digis[i].STRIP);
809  }
810 
811  std::vector<PGlobalDigi::SiStripDigi> TECW6Digis =
812  srcGlobalDigis->getTECW6Digis();
813  mehSiStripn[16]->Fill((float)nTECW6Digis);
814  for (unsigned int i = 0; i < TECW6Digis.size(); ++i) {
815  mehSiStripADC[16]->Fill(TECW6Digis[i].ADC);
816  mehSiStripStrip[16]->Fill(TECW6Digis[i].STRIP);
817  }
818 
819  std::vector<PGlobalDigi::SiStripDigi> TECW7Digis =
820  srcGlobalDigis->getTECW7Digis();
821  mehSiStripn[17]->Fill((float)nTECW7Digis);
822  for (unsigned int i = 0; i < TECW7Digis.size(); ++i) {
823  mehSiStripADC[17]->Fill(TECW7Digis[i].ADC);
824  mehSiStripStrip[17]->Fill(TECW7Digis[i].STRIP);
825  }
826 
827  std::vector<PGlobalDigi::SiStripDigi> TECW8Digis =
828  srcGlobalDigis->getTECW8Digis();
829  mehSiStripn[18]->Fill((float)nTECW8Digis);
830  for (unsigned int i = 0; i < TECW8Digis.size(); ++i) {
831  mehSiStripADC[18]->Fill(TECW8Digis[i].ADC);
832  mehSiStripStrip[18]->Fill(TECW8Digis[i].STRIP);
833  }
834 
835  // get SiPixel info
836  std::vector<PGlobalDigi::SiPixelDigi> BRL1Digis =
837  srcGlobalDigis->getBRL1Digis();
838  mehSiPixeln[0]->Fill((float)nBRL1Digis);
839  for (unsigned int i = 0; i < BRL1Digis.size(); ++i) {
840  mehSiPixelADC[0]->Fill(BRL1Digis[i].ADC);
841  mehSiPixelRow[0]->Fill(BRL1Digis[i].ROW);
842  mehSiPixelCol[0]->Fill(BRL1Digis[i].COLUMN);
843  }
844 
845  std::vector<PGlobalDigi::SiPixelDigi> BRL2Digis =
846  srcGlobalDigis->getBRL2Digis();
847  mehSiPixeln[1]->Fill((float)nBRL2Digis);
848  for (unsigned int i = 0; i < BRL2Digis.size(); ++i) {
849  mehSiPixelADC[1]->Fill(BRL2Digis[i].ADC);
850  mehSiPixelRow[1]->Fill(BRL2Digis[i].ROW);
851  mehSiPixelCol[1]->Fill(BRL2Digis[i].COLUMN);
852  }
853 
854  std::vector<PGlobalDigi::SiPixelDigi> BRL3Digis =
855  srcGlobalDigis->getBRL3Digis();
856  mehSiPixeln[2]->Fill((float)nBRL3Digis);
857  for (unsigned int i = 0; i < BRL3Digis.size(); ++i) {
858  mehSiPixelADC[2]->Fill(BRL3Digis[i].ADC);
859  mehSiPixelRow[2]->Fill(BRL3Digis[i].ROW);
860  mehSiPixelCol[2]->Fill(BRL3Digis[i].COLUMN);
861  }
862 
863  std::vector<PGlobalDigi::SiPixelDigi> FWD1pDigis =
864  srcGlobalDigis->getFWD1pDigis();
865  mehSiPixeln[3]->Fill((float)nFWD1pDigis);
866  for (unsigned int i = 0; i < FWD1pDigis.size(); ++i) {
867  mehSiPixelADC[3]->Fill(FWD1pDigis[i].ADC);
868  mehSiPixelRow[3]->Fill(FWD1pDigis[i].ROW);
869  mehSiPixelCol[3]->Fill(FWD1pDigis[i].COLUMN);
870  }
871 
872  std::vector<PGlobalDigi::SiPixelDigi> FWD1nDigis =
873  srcGlobalDigis->getFWD1nDigis();
874  mehSiPixeln[4]->Fill((float)nFWD1nDigis);
875  for (unsigned int i = 0; i < FWD1nDigis.size(); ++i) {
876  mehSiPixelADC[4]->Fill(FWD1nDigis[i].ADC);
877  mehSiPixelRow[4]->Fill(FWD1nDigis[i].ROW);
878  mehSiPixelCol[4]->Fill(FWD1nDigis[i].COLUMN);
879  }
880 
881  std::vector<PGlobalDigi::SiPixelDigi> FWD2pDigis =
882  srcGlobalDigis->getFWD2pDigis();
883  mehSiPixeln[5]->Fill((float)nFWD2pDigis);
884  for (unsigned int i = 0; i < FWD2pDigis.size(); ++i) {
885  mehSiPixelADC[5]->Fill(FWD2pDigis[i].ADC);
886  mehSiPixelRow[5]->Fill(FWD2pDigis[i].ROW);
887  mehSiPixelCol[5]->Fill(FWD2pDigis[i].COLUMN);
888  }
889 
890  std::vector<PGlobalDigi::SiPixelDigi> FWD2nDigis =
891  srcGlobalDigis->getFWD2nDigis();
892  mehSiPixeln[6]->Fill((float)nFWD2nDigis);
893  for (unsigned int i = 0; i < FWD2nDigis.size(); ++i) {
894  mehSiPixelADC[6]->Fill(FWD2nDigis[i].ADC);
895  mehSiPixelRow[6]->Fill(FWD2nDigis[i].ROW);
896  mehSiPixelCol[6]->Fill(FWD2nDigis[i].COLUMN);
897  }
898 
899  // get DtMuon info
900  std::vector<PGlobalDigi::DTDigi> MB1Digis =
901  srcGlobalDigis->getMB1Digis();
902  mehDtMuonn[0]->Fill((float)nMB1Digis);
903  for (unsigned int i = 0; i < MB1Digis.size(); ++i) {
904  float layer = 4.0 * (MB1Digis[i].SLAYER - 1.0) + MB1Digis[i].LAYER;
905  mehDtMuonLayer[0]->Fill(layer);
906  mehDtMuonTime[0]->Fill(MB1Digis[i].TIME);
907  mehDtMuonTimevLayer[0]->Fill(layer,MB1Digis[i].TIME,1);
908  }
909 
910  std::vector<PGlobalDigi::DTDigi> MB2Digis =
911  srcGlobalDigis->getMB2Digis();
912  mehDtMuonn[1]->Fill((float)nMB2Digis);
913  for (unsigned int i = 0; i < MB2Digis.size(); ++i) {
914  float layer = 4.0 * (MB2Digis[i].SLAYER - 1.0) + MB2Digis[i].LAYER;
915  mehDtMuonLayer[1]->Fill(layer);
916  mehDtMuonTime[1]->Fill(MB2Digis[i].TIME);
917  mehDtMuonTimevLayer[1]->Fill(layer,MB2Digis[i].TIME,1);
918  }
919 
920  std::vector<PGlobalDigi::DTDigi> MB3Digis =
921  srcGlobalDigis->getMB3Digis();
922  mehDtMuonn[2]->Fill((float)nMB3Digis);
923  for (unsigned int i = 0; i < MB3Digis.size(); ++i) {
924  float layer = 4.0 * (MB3Digis[i].SLAYER - 1.0) + MB3Digis[i].LAYER;
925  mehDtMuonLayer[2]->Fill(layer);
926  mehDtMuonTime[2]->Fill(MB3Digis[i].TIME);
927  mehDtMuonTimevLayer[2]->Fill(layer,MB3Digis[i].TIME,1);
928  }
929 
930  std::vector<PGlobalDigi::DTDigi> MB4Digis =
931  srcGlobalDigis->getMB4Digis();
932  mehDtMuonn[3]->Fill((float)nMB4Digis);
933  for (unsigned int i = 0; i < MB4Digis.size(); ++i) {
934  float layer = 4.0 * (MB4Digis[i].SLAYER - 1.0) + MB4Digis[i].LAYER;
935  mehDtMuonLayer[3]->Fill(layer);
936  mehDtMuonTime[3]->Fill(MB4Digis[i].TIME);
937  mehDtMuonTimevLayer[3]->Fill(layer,MB4Digis[i].TIME,1);
938  }
939 
940  // get CSC Strip info
941  std::vector<PGlobalDigi::CSCstripDigi> CSCstripDigis =
942  srcGlobalDigis->getCSCstripDigis();
943  mehCSCStripn->Fill((float)nCSCstripDigis);
944  for (unsigned int i = 0; i < CSCstripDigis.size(); ++i) {
945  mehCSCStripADC->Fill(CSCstripDigis[i].ADC);
946  }
947 
948  // get CSC Wire info
949  std::vector<PGlobalDigi::CSCwireDigi> CSCwireDigis =
950  srcGlobalDigis->getCSCwireDigis();
951  mehCSCWiren->Fill((float)nCSCwireDigis);
952  for (unsigned int i = 0; i < CSCwireDigis.size(); ++i) {
953  mehCSCWireTime->Fill(CSCwireDigis[i].TIME);
954  }
955  if (verbosity > 0)
956  edm::LogInfo (MsgLoggerCat)
957  << "Done gathering data from event.";
958 
959  } // end loop through events
960 }
961 
962 //define this as a plug-in
963 //DEFINE_FWK_MODULE(GlobalDigisHistogrammer);
RunNumber_t run() const
Definition: EventID.h:42
T getParameter(std::string const &) const
EventNumber_t event() const
Definition: EventID.h:44
T getUntrackedParameter(std::string const &, T const &) const
void getAllProvenance(std::vector< Provenance const * > &provenances) const
Definition: Event.cc:71
int i
Definition: DBlmapReader.cc:9
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * mehDtMuonLayer[4]
const std::string & label
Definition: MVAComputer.cc:186
MonitorElement * mehEcalMultvAEE[2]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:1898
MonitorElement * mehHcalAEESHE[4]
MonitorElement * mehSiPixelCol[7]
MonitorElement * mehHcalSHEvAEE[4]
MonitorElement * mehDtMuonTimevLayer[4]
GlobalDigisHistogrammer(const edm::ParameterSet &)
void Fill(long long x)
MonitorElement * mehSiStripADC[19]
int iEvent
Definition: GenABIO.cc:243
MonitorElement * mehEcalSHEvAEESHE[2]
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * mehEcalSHE[2]
MonitorElement * mehSiPixelRow[7]
int j
Definition: DBlmapReader.cc:9
MonitorElement * mehSiPixelADC[7]
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:828
void setVerbose(unsigned level)
Definition: DQMStore.cc:196
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
const int verbosity
MonitorElement * mehDtMuonTime[4]
MonitorElement * mehSiStripStrip[19]
edm::EventID id() const
Definition: EventBase.h:56
MonitorElement * mehEScalADC[3]
MonitorElement * mehEcalAEE[2]
MonitorElement * mehEcalMaxPos[2]
void showDirStructure(void) const
Definition: DQMStore.cc:2554
MonitorElement * mehSiStripn[19]
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232