CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GlobalDigisAnalyzer.cc
Go to the documentation of this file.
1 
14 
16  fName(""), verbosity(0), frequency(0), label(""), getAllProvenances(false),
17  printProvenanceInfo(false), hitsProducer(""), theCSCStripPedestalSum(0),
18  theCSCStripPedestalCount(0), count(0)
19 {
20  std::string MsgLoggerCat = "GlobalDigisAnalyzer_GlobalDigisAnalyzer";
21 
22  // get information from parameter set
23  fName = iPSet.getUntrackedParameter<std::string>("Name");
24  verbosity = iPSet.getUntrackedParameter<int>("Verbosity");
25  frequency = iPSet.getUntrackedParameter<int>("Frequency");
26  edm::ParameterSet m_Prov =
27  iPSet.getParameter<edm::ParameterSet>("ProvenanceLookup");
29  m_Prov.getUntrackedParameter<bool>("GetAllProvenances");
31  m_Prov.getUntrackedParameter<bool>("PrintProvenanceInfo");
32  hitsProducer = iPSet.getParameter<std::string>("hitsProducer");
33 
34  //get Labels to use to extract information
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  HCalDigi_ = iPSet.getParameter<edm::InputTag>("HCalDigi");
40  SiStripSrc_ = iPSet.getParameter<edm::InputTag>("SiStripSrc");
41  SiPxlSrc_ = iPSet.getParameter<edm::InputTag>("SiPxlSrc");
42  MuDTSrc_ = iPSet.getParameter<edm::InputTag>("MuDTSrc");
43  MuCSCStripSrc_ = iPSet.getParameter<edm::InputTag>("MuCSCStripSrc");
44  MuCSCWireSrc_ = iPSet.getParameter<edm::InputTag>("MuCSCWireSrc");
45  MuRPCSrc_ = iPSet.getParameter<edm::InputTag>("MuRPCSrc");
46 
47  // use value of first digit to determine default output level (inclusive)
48  // 0 is none, 1 is basic, 2 is fill output, 3 is gather output
49  verbosity %= 10;
50 
51  // print out Parameter Set information being used
52  if (verbosity >= 0) {
53  edm::LogInfo(MsgLoggerCat)
54  << "\n===============================\n"
55  << "Initialized as EDAnalyzer with parameter values:\n"
56  << " Name = " << fName << "\n"
57  << " Verbosity = " << verbosity << "\n"
58  << " Frequency = " << frequency << "\n"
59  << " GetProv = " << getAllProvenances << "\n"
60  << " PrintProv = " << printProvenanceInfo << "\n"
61  << " ECalEBSrc = " << ECalEBSrc_.label()
62  << ":" << ECalEBSrc_.instance() << "\n"
63  << " ECalEESrc = " << ECalEESrc_.label()
64  << ":" << ECalEESrc_.instance() << "\n"
65  << " ECalESSrc = " << ECalESSrc_.label()
66  << ":" << ECalESSrc_.instance() << "\n"
67  << " HCalSrc = " << HCalSrc_.label()
68  << ":" << HCalSrc_.instance() << "\n"
69  << " HCalDigi = " << HCalDigi_.label()
70  << ":" << HCalDigi_.instance() << "\n"
71  << " SiStripSrc = " << SiStripSrc_.label()
72  << ":" << SiStripSrc_.instance() << "\n"
73  << " SiPixelSrc = " << SiPxlSrc_.label()
74  << ":" << SiPxlSrc_.instance() << "\n"
75  << " MuDTSrc = " << MuDTSrc_.label()
76  << ":" << MuDTSrc_.instance() << "\n"
77  << " MuCSCStripSrc = " << MuCSCStripSrc_.label()
78  << ":" << MuCSCStripSrc_.instance() << "\n"
79  << " MuCSCWireSrc = " << MuCSCWireSrc_.label()
80  << ":" << MuCSCWireSrc_.instance() << "\n"
81  << " MuRPCSrc = " << MuRPCSrc_.label()
82  << ":" << MuRPCSrc_.instance() << "\n"
83  << "===============================\n";
84  }
85 
86  //Put in analyzer stuff here.... Pasted from Rec Hits...
87 
88  dbe = 0;
90  if (dbe) {
91  if (verbosity > 0 ) {
92  dbe->setVerbose(1);
93  } else {
94  dbe->setVerbose(0);
95  }
96  }
97  if (dbe) {
98  if (verbosity > 0 ) dbe->showDirStructure();
99  }
100 
101  //monitor elements
102 
103  //Si Strip
104  if (dbe) {
105  std::string SiStripString[19] = {"TECW1", "TECW2", "TECW3", "TECW4",
106  "TECW5", "TECW6", "TECW7", "TECW8",
107  "TIBL1", "TIBL2", "TIBL3", "TIBL4",
108  "TIDW1", "TIDW2", "TIDW3", "TOBL1",
109  "TOBL2", "TOBL3", "TOBL4"};
110  for(int i = 0; i<19; ++i) {
111  mehSiStripn[i]=0;
112  mehSiStripADC[i]=0;
113  mehSiStripStrip[i]=0;
114  }
115  std::string hcharname, hchartitle;
116  dbe->setCurrentFolder("GlobalDigisV/SiStrips");
117  for(int amend = 0; amend < 19; ++amend) {
118  hcharname = "hSiStripn_"+SiStripString[amend];
119  hchartitle= SiStripString[amend]+" Digis";
120  mehSiStripn[amend] = dbe->book1D(hcharname,hchartitle,5000,0.,10000.);
121  mehSiStripn[amend]->setAxisTitle("Number of Digis",1);
122  mehSiStripn[amend]->setAxisTitle("Count",2);
123 
124  hcharname = "hSiStripADC_"+SiStripString[amend];
125  hchartitle= SiStripString[amend]+" ADC";
126  mehSiStripADC[amend] = dbe->book1D(hcharname,hchartitle,150,0.0,300.);
127  mehSiStripADC[amend]->setAxisTitle("ADC",1);
128  mehSiStripADC[amend]->setAxisTitle("Count",2);
129 
130  hcharname = "hSiStripStripADC_"+SiStripString[amend];
131  hchartitle= SiStripString[amend]+" Strip";
132  mehSiStripStrip[amend] = dbe->book1D(hcharname,hchartitle,200,0.0,800.);
133  mehSiStripStrip[amend]->setAxisTitle("Strip Number",1);
134  mehSiStripStrip[amend]->setAxisTitle("Count",2);
135  }
136 
137  //HCal
138  std::string HCalString[4] = {"HB", "HE", "HO","HF"};
139  float calnUpper[4] = {30000.,30000.,30000.,20000.};
140  float calnLower[4]={0.,0.,0.,0.};
141  float SHEUpper[4]={1.,1.,1.,1.};
142  float SHEvAEEUpper[4] = {5000, 5000, 5000, 5000};
143  float SHEvAEELower[4] = {-5000, -5000, -5000, -5000};
144  int SHEvAEEnBins[4] = {200,200,200,200};
145  double ProfileUpper[4] = {1.,1.,1.,1.};
146 
147  for(int i =0; i<4; ++i) {
148  mehHcaln[i]=0;
149  mehHcalAEE[i]=0;
150  mehHcalSHE[i]=0;
151  mehHcalAEESHE[i]=0;
152  mehHcalSHEvAEE[i]=0;
153  }
154  dbe->setCurrentFolder("GlobalDigisV/HCals");
155 
156  for(int amend = 0; amend < 4; ++amend) {
157  hcharname = "hHcaln_"+HCalString[amend];
158  hchartitle= HCalString[amend]+" digis";
159  mehHcaln[amend] = dbe->book1D(hcharname,hchartitle, 10000, calnLower[amend],
160  calnUpper[amend]);
161  mehHcaln[amend]->setAxisTitle("Number of Digis",1);
162  mehHcaln[amend]->setAxisTitle("Count",2);
163 
164  hcharname = "hHcalAEE_"+HCalString[amend];
165  hchartitle= HCalString[amend]+"Cal AEE";
166  mehHcalAEE[amend] = dbe->book1D(hcharname,hchartitle, 60, -10., 50.);
167  mehHcalAEE[amend]->setAxisTitle("Analog Equivalent Energy",1);
168  mehHcalAEE[amend]->setAxisTitle("Count",2);
169 
170  hcharname = "hHcalSHE_"+HCalString[amend];
171  hchartitle= HCalString[amend]+"Cal SHE";
172  mehHcalSHE[amend] = dbe->book1D(hcharname,hchartitle, 1000, 0.0,
173  SHEUpper[amend]);
174  mehHcalSHE[amend]->setAxisTitle("Simulated Hit Energy",1);
175  mehHcalSHE[amend]->setAxisTitle("Count",2);
176 
177  hcharname = "hHcalAEESHE_"+HCalString[amend];
178  hchartitle= HCalString[amend]+"Cal AEE/SHE";
179  mehHcalAEESHE[amend] = dbe->book1D(hcharname, hchartitle, SHEvAEEnBins[amend],
180  SHEvAEELower[amend],
181  SHEvAEEUpper[amend]);
182  mehHcalAEESHE[amend]->setAxisTitle("ADC / SHE",1);
183  mehHcalAEESHE[amend]->setAxisTitle("Count",2);
184 
185  hcharname = "hHcalSHEvAEE_"+HCalString[amend];
186  hchartitle= HCalString[amend]+"Cal SHE vs. AEE";
187  mehHcalSHEvAEE[amend] = dbe->bookProfile(hcharname,hchartitle, 60, -10.,
188  50., 100, 0.,
189  (float)ProfileUpper[amend],"");
190  mehHcalSHEvAEE[amend]->setAxisTitle("AEE / SHE",1);
191  mehHcalSHEvAEE[amend]->setAxisTitle("SHE",2);
192 
193  }
194 
195  //Ecal
196  std::string ECalString[2] = {"EB","EE"};
197 
198  for(int i =0; i<2; ++i) {
199  mehEcaln[i]=0;
200  mehEcalAEE[i]=0;
201  mehEcalSHE[i]=0;
202  mehEcalMaxPos[i]=0;
203  mehEcalMultvAEE[i]=0;
204  mehEcalSHEvAEESHE[i]=0;
205  }
206  dbe->setCurrentFolder("GlobalDigisV/ECals");
207 
208  for(int amend = 0; amend < 2; ++amend) {
209  hcharname = "hEcaln_"+ECalString[amend];
210  hchartitle= ECalString[amend]+" digis";
211  mehEcaln[amend] = dbe->book1D(hcharname,hchartitle, 3000, 0., 40000.);
212  mehEcaln[amend]->setAxisTitle("Number of Digis",1);
213  mehEcaln[amend]->setAxisTitle("Count",2);
214 
215  hcharname = "hEcalAEE_"+ECalString[amend];
216  hchartitle= ECalString[amend]+"Cal AEE";
217  mehEcalAEE[amend] = dbe->book1D(hcharname,hchartitle, 1000, 0., 100.);
218  mehEcalAEE[amend]->setAxisTitle("Analog Equivalent Energy",1);
219  mehEcalAEE[amend]->setAxisTitle("Count",2);
220 
221  hcharname = "hEcalSHE_"+ECalString[amend];
222  hchartitle= ECalString[amend]+"Cal SHE";
223  mehEcalSHE[amend] = dbe->book1D(hcharname,hchartitle, 500, 0., 50.);
224  mehEcalSHE[amend]->setAxisTitle("Simulated Hit Energy",1);
225  mehEcalSHE[amend]->setAxisTitle("Count",2);
226 
227  hcharname = "hEcalMaxPos_"+ECalString[amend];
228  hchartitle= ECalString[amend]+"Cal MaxPos";
229  mehEcalMaxPos[amend] = dbe->book1D(hcharname,hchartitle,10, 0., 10.);
230  mehEcalMaxPos[amend]->setAxisTitle("Maximum Position",1);
231  mehEcalMaxPos[amend]->setAxisTitle("Count",2);
232 
233  hcharname = "hEcalSHEvAEESHE_"+ECalString[amend];
234  hchartitle= ECalString[amend]+"Cal SHE vs. AEE/SHE";
235  mehEcalSHEvAEESHE[amend] = dbe->bookProfile(hcharname,hchartitle,1000, 0., 100.,
236  500, 0., 50.,"");
237  mehEcalSHEvAEESHE[amend]->setAxisTitle("AEE / SHE",1);
238  mehEcalSHEvAEESHE[amend]->setAxisTitle("SHE",2);
239 
240  hcharname = "hEcalMultvAEE_"+ECalString[amend];
241  hchartitle= ECalString[amend]+"Cal Multi vs. AEE";
242  mehEcalMultvAEE[amend] = dbe->bookProfile(hcharname,hchartitle, 1000, 0., 100.,
243  4000, 0., 40000.,"");
244  mehEcalMultvAEE[amend]->setAxisTitle("Analog Equivalent Energy",1);
245  mehEcalMultvAEE[amend]->setAxisTitle("Number of Digis",2);
246  }
247  mehEScaln = 0;
248 
249  hcharname = "hEcaln_ES";
250  hchartitle= "ESCAL digis";
251  mehEScaln = dbe->book1D(hcharname,hchartitle, 1000, 0., 5000.);
252  mehEScaln->setAxisTitle("Number of Digis",1);
253  mehEScaln->setAxisTitle("Count",2);
254 
255  std::string ADCNumber[3] = {"0", "1", "2"};
256  for(int i =0; i<3; ++i) {
257  mehEScalADC[i] = 0;
258  hcharname = "hEcalADC"+ADCNumber[i]+"_ES";
259  hchartitle= "ESCAL ADC"+ADCNumber[i];
260  mehEScalADC[i] = dbe->book1D(hcharname,hchartitle, 1500, 0., 1500.);
261  mehEScalADC[i]->setAxisTitle("ADC"+ADCNumber[i],1);
262  mehEScalADC[i]->setAxisTitle("Count",2);
263  }
264 
265  //Si Pixels ***DONE***
266  std::string SiPixelString[7] = {"BRL1", "BRL2", "BRL3", "FWD1n", "FWD1p",
267  "FWD2n", "FWD2p"};
268  for(int j =0; j<7; ++j) {
269  mehSiPixeln[j]=0;
270  mehSiPixelADC[j]=0;
271  mehSiPixelRow[j]=0;
272  mehSiPixelCol[j]=0;
273  }
274 
275  dbe->setCurrentFolder("GlobalDigisV/SiPixels");
276  for(int amend = 0; amend < 7; ++amend) {
277  hcharname = "hSiPixeln_"+SiPixelString[amend];
278  hchartitle= SiPixelString[amend]+" Digis";
279  if(amend<3) mehSiPixeln[amend] = dbe->book1D(hcharname,hchartitle,500,0.,1000.);
280  else mehSiPixeln[amend] = dbe->book1D(hcharname,hchartitle,500,0.,1000.);
281  mehSiPixeln[amend]->setAxisTitle("Number of Digis",1);
282  mehSiPixeln[amend]->setAxisTitle("Count",2);
283 
284  hcharname = "hSiPixelADC_"+SiPixelString[amend];
285  hchartitle= SiPixelString[amend]+" ADC";
286  mehSiPixelADC[amend] = dbe->book1D(hcharname,hchartitle,150,0.0,300.);
287  mehSiPixelADC[amend]->setAxisTitle("ADC",1);
288  mehSiPixelADC[amend]->setAxisTitle("Count",2);
289 
290  hcharname = "hSiPixelRow_"+SiPixelString[amend];
291  hchartitle= SiPixelString[amend]+" Row";
292  mehSiPixelRow[amend] = dbe->book1D(hcharname,hchartitle,100,0.0,100.);
293  mehSiPixelRow[amend]->setAxisTitle("Row Number",1);
294  mehSiPixelRow[amend]->setAxisTitle("Count",2);
295 
296  hcharname = "hSiPixelColumn_"+SiPixelString[amend];
297  hchartitle= SiPixelString[amend]+" Column";
298  mehSiPixelCol[amend] = dbe->book1D(hcharname,hchartitle,200,0.0,500.);
299  mehSiPixelCol[amend]->setAxisTitle("Column Number",1);
300  mehSiPixelCol[amend]->setAxisTitle("Count",2);
301  }
302 
303  //Muons
304  dbe->setCurrentFolder("GlobalDigisV/Muons");
305 
306  //DT
307  std::string MuonString[4] = {"MB1", "MB2", "MB3", "MB4"};
308 
309  for(int i =0; i < 4; ++i) {
310  mehDtMuonn[i] = 0;
311  mehDtMuonLayer[i] = 0;
312  mehDtMuonTime[i] = 0;
313  mehDtMuonTimevLayer[i] = 0;
314  }
315 
316  for(int j = 0; j < 4; ++j) {
317  hcharname = "hDtMuonn_"+MuonString[j];
318  hchartitle= MuonString[j]+" digis";
319  mehDtMuonn[j] = dbe->book1D(hcharname,hchartitle,250, 0., 500.);
320  mehDtMuonn[j]->setAxisTitle("Number of Digis",1);
321  mehDtMuonn[j]->setAxisTitle("Count",2);
322 
323  hcharname = "hDtLayer_"+MuonString[j];
324  hchartitle= MuonString[j]+" Layer";
325  mehDtMuonLayer[j] = dbe->book1D(hcharname,hchartitle,12, 1., 13.);
326  mehDtMuonLayer[j]->setAxisTitle("4 * (SuperLayer - 1) + Layer",1);
327  mehDtMuonLayer[j]->setAxisTitle("Count",2);
328 
329  hcharname = "hDtMuonTime_"+MuonString[j];
330  hchartitle= MuonString[j]+" Time";
331  mehDtMuonTime[j] = dbe->book1D(hcharname,hchartitle,300, 400., 1000.);
332  mehDtMuonTime[j]->setAxisTitle("Time",1);
333  mehDtMuonTime[j]->setAxisTitle("Count",2);
334 
335  hcharname = "hDtMuonTimevLayer_"+MuonString[j];
336  hchartitle= MuonString[j]+" Time vs. Layer";
337  mehDtMuonTimevLayer[j] = dbe->bookProfile(hcharname,hchartitle,12, 1., 13., 300,
338  400., 1000.,"");
339  mehDtMuonTimevLayer[j]->setAxisTitle("4 * (SuperLayer - 1) + Layer",1);
340  mehDtMuonTimevLayer[j]->setAxisTitle("Time",2);
341  }
342 
343  //CSC
344  mehCSCStripn = 0;
345  hcharname = "hCSCStripn";
346  hchartitle = "CSC Strip digis";
347  mehCSCStripn = dbe->book1D(hcharname,hchartitle,250, 0., 500.);
348  mehCSCStripn->setAxisTitle("Number of Digis",1);
349  mehCSCStripn->setAxisTitle("Count",2);
350 
351  mehCSCStripADC = 0;
352  hcharname = "hCSCStripADC";
353  hchartitle = "CSC Strip ADC";
354  mehCSCStripADC = dbe->book1D(hcharname,hchartitle, 110, 0., 1100.);
355  mehCSCStripADC->setAxisTitle("ADC",1);
356  mehCSCStripADC->setAxisTitle("Count",2);
357 
358  mehCSCWiren = 0;
359  hcharname = "hCSCWiren";
360  hchartitle = "CSC Wire digis";
361  mehCSCWiren = dbe->book1D(hcharname,hchartitle,250, 0., 500.);
362  mehCSCWiren->setAxisTitle("Number of Digis",1);
363  mehCSCWiren->setAxisTitle("Count",2);
364 
365  mehCSCWireTime = 0;
366  hcharname = "hCSCWireTime";
367  hchartitle = "CSC Wire Time";
368  mehCSCWireTime = dbe->book1D(hcharname,hchartitle,10, 0., 10.);
369  mehCSCWireTime->setAxisTitle("Time",1);
370  mehCSCWireTime->setAxisTitle("Count",2);
371 
372  // RPC
373  mehRPCMuonn = 0;
374  hcharname = "hRPCMuonn";
375  hchartitle = "RPC digis";
376  mehCSCStripn = dbe->book1D(hcharname,hchartitle,250, 0., 500.);
377  mehCSCStripn->setAxisTitle("Number of Digis",1);
378  mehCSCStripn->setAxisTitle("Count",2);
379 
380  std::string MuonRPCString[5] = {"Wmin2", "Wmin1", "W0", "Wpu1", "Wpu2"};
381  for(int i =0; i < 5; ++i) {
382  mehRPCRes[i] = 0;
383  }
384 
385  for(int j = 0; j < 5; ++j) {
386  hcharname = "hRPCRes_"+MuonRPCString[j];
387  hchartitle= MuonRPCString[j]+" Digi - Sim";
388  mehRPCRes[j] = dbe->book1D(hcharname,hchartitle,200, -8., 8.);
389  mehRPCRes[j]->setAxisTitle("Digi - Sim center of strip x",1);
390  mehRPCRes[j]->setAxisTitle("Count",2);
391  }
392  }
393 
394  // set default constants
395  // ECal
396 
397  ECalgainConv_[0] = 0.;
398  ECalgainConv_[1] = 1.;
399  ECalgainConv_[2] = 2.;
400  ECalgainConv_[3] = 12.;
401  ECalbarrelADCtoGeV_ = 0.035;
402  ECalendcapADCtoGeV_ = 0.06;
403 }
404 
406 
408 {
409  std::string MsgLoggerCat = "GlobalDigisAnalyzer_beginJob";
410 
411  EcalMGPAGainRatio * defaultRatios = new EcalMGPAGainRatio();
412 
413  ECalgainConv_[0] = 0.;
414  ECalgainConv_[1] = 1.;
415  ECalgainConv_[2] = defaultRatios->gain12Over6() ;
416  ECalgainConv_[3] = ECalgainConv_[2]*(defaultRatios->gain6Over1()) ;
417 
418  delete defaultRatios;
419 
420  if (verbosity >= 0) {
421  edm::LogInfo(MsgLoggerCat)
422  << "Modified Calorimeter gain constants: g0 = " << ECalgainConv_[0]
423  << ", g1 = " << ECalgainConv_[1] << ", g2 = " << ECalgainConv_[2]
424  << ", g3 = " << ECalgainConv_[3];
425  }
426 
427  return;
428 }
429 
430 
432 {
433  std::string MsgLoggerCat = "GlobalDigisAnalyzer_endJob";
434  if (verbosity >= 0)
435  edm::LogInfo(MsgLoggerCat)
436  << "Terminating having processed " << count << " events.";
437  return;
438 }
439 
441  const edm::EventSetup& iSetup)
442 {
443  std::string MsgLoggerCat = "GlobalDigisAnalyzer_analyze";
444 
445  // keep track of number of events processed
446  ++count;
447 
448 
449 
450  // THIS BLOCK MIGRATED HERE FROM beginJob:
451  // setup calorimeter constants from service
453  iSetup.get<EcalADCToGeVConstantRcd>().get(pAgc);
454  const EcalADCToGeVConstant* agc = pAgc.product();
457  if (verbosity >= 0) {
458  edm::LogInfo(MsgLoggerCat)
459  << "Modified Calorimeter ADCtoGeV constants: barrel = "
460  << ECalbarrelADCtoGeV_ << ", endcap = " << ECalendcapADCtoGeV_;
461  }
462 
463 
464 
465  // get event id information
466  int nrun = iEvent.id().run();
467  int nevt = iEvent.id().event();
468 
469  if (verbosity > 0) {
470  edm::LogInfo(MsgLoggerCat)
471  << "Processing run " << nrun << ", event " << nevt
472  << " (" << count << " events total)";
473  } else if (verbosity == 0) {
474  if (nevt%frequency == 0 || nevt == 1) {
475  edm::LogInfo(MsgLoggerCat)
476  << "Processing run " << nrun << ", event " << nevt
477  << " (" << count << " events total)";
478  }
479  }
480 
481  // look at information available in the event
482  if (getAllProvenances) {
483 
484  std::vector<const edm::Provenance*> AllProv;
485  iEvent.getAllProvenance(AllProv);
486 
487  if (verbosity >= 0)
488  edm::LogInfo(MsgLoggerCat)
489  << "Number of Provenances = " << AllProv.size();
490 
491  if (printProvenanceInfo && (verbosity >= 0)) {
492  TString eventout("\nProvenance info:\n");
493 
494  for (unsigned int i = 0; i < AllProv.size(); ++i) {
495  eventout += "\n ******************************";
496  eventout += "\n Module : ";
497  eventout += AllProv[i]->moduleLabel();
498  eventout += "\n ProductID : ";
499  eventout += AllProv[i]->productID().id();
500  eventout += "\n ClassName : ";
501  eventout += AllProv[i]->className();
502  eventout += "\n InstanceName : ";
503  eventout += AllProv[i]->productInstanceName();
504  eventout += "\n BranchName : ";
505  eventout += AllProv[i]->branchName();
506  }
507  eventout += "\n ******************************\n";
508  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
509  printProvenanceInfo = false;
510  }
511  getAllProvenances = false;
512  }
513 
514  // call fill functions
515  // gather Ecal information from event
516  fillECal(iEvent, iSetup);
517  // gather Hcal information from event
518  fillHCal(iEvent, iSetup);
519  // gather Track information from event
520  fillTrk(iEvent, iSetup);
521  // gather Muon information from event
522  fillMuon(iEvent, iSetup);
523 
524  if (verbosity > 0)
525  edm::LogInfo (MsgLoggerCat)
526  << "Done gathering data from event.";
527 
528  if (verbosity > 2)
529  edm::LogInfo (MsgLoggerCat)
530  << "Saving event contents:";
531 
532  return;
533 }
534 
536  const edm::EventSetup& iSetup)
537 {
538  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillECal";
539 
540  TString eventout;
541  if (verbosity > 0)
542  eventout = "\nGathering info:";
543 
544  // extract crossing frame from event
545  edm::Handle<CrossingFrame<PCaloHit> > crossingFrame;
546 
548  //extract EB information
550  bool isBarrel = true;
551  edm::Handle<EBDigiCollection> EcalDigiEB;
552  iEvent.getByLabel(ECalEBSrc_, EcalDigiEB);
553  bool validDigiEB = true;
554  if (!EcalDigiEB.isValid()) {
555  LogDebug(MsgLoggerCat)
556  << "Unable to find EcalDigiEB in event!";
557  validDigiEB = false;
558  }
559  if (validDigiEB) {
560  if ( EcalDigiEB->size() == 0) isBarrel = false;
561 
562  if (isBarrel) {
563 
564  // loop over simhits
565  MapType ebSimMap;
566  const std::string barrelHitsName(hitsProducer+"EcalHitsEB");
567  iEvent.getByLabel("mix",barrelHitsName,crossingFrame);
568  bool validXFrame = true;
569  if (!crossingFrame.isValid()) {
570  LogDebug(MsgLoggerCat)
571  << "Unable to find cal barrel crossingFrame in event!";
572  validXFrame = false;
573  }
574  if (validXFrame) {
575  std::auto_ptr<MixCollection<PCaloHit> >
576  barrelHits(new MixCollection<PCaloHit>(crossingFrame.product()));
577 
578  // keep track of sum of simhit energy in each crystal
580  = barrelHits->begin();
581  hitItr != barrelHits->end();
582  ++hitItr) {
583 
584  EBDetId ebid = EBDetId(hitItr->id());
585 
586  uint32_t crystid = ebid.rawId();
587  ebSimMap[crystid] += hitItr->energy();
588  }
589  }
590 
591  // loop over digis
592  const EBDigiCollection *barrelDigi = EcalDigiEB.product();
593 
594  std::vector<double> ebAnalogSignal;
595  std::vector<double> ebADCCounts;
596  std::vector<double> ebADCGains;
597  ebAnalogSignal.reserve(EBDataFrame::MAXSAMPLES);
598  ebADCCounts.reserve(EBDataFrame::MAXSAMPLES);
599  ebADCGains.reserve(EBDataFrame::MAXSAMPLES);
600 
601  int i = 0;
602  for (unsigned int digis=0; digis<EcalDigiEB->size(); ++digis) {
603 
604  ++i;
605 
606  EBDataFrame ebdf = (*barrelDigi)[digis];
607  int nrSamples = ebdf.size();
608 
609  EBDetId ebid = ebdf.id () ;
610 
611  double Emax = 0;
612  int Pmax = 0;
613  double pedestalPreSample = 0.;
614  double pedestalPreSampleAnalog = 0.;
615 
616  for (int sample = 0 ; sample < nrSamples; ++sample) {
617  ebAnalogSignal[sample] = 0.;
618  ebADCCounts[sample] = 0.;
619  ebADCGains[sample] = -1.;
620  }
621 
622  // calculate maximum energy and pedestal
623  for (int sample = 0 ; sample < nrSamples; ++sample) {
624 
625  EcalMGPASample thisSample = ebdf[sample];
626  ebADCCounts[sample] = (thisSample.adc());
627  ebADCGains[sample] = (thisSample.gainId());
628  ebAnalogSignal[sample] =
629  (ebADCCounts[sample] * ECalgainConv_[(int)ebADCGains[sample]]
631  if (Emax < ebAnalogSignal[sample]) {
632  Emax = ebAnalogSignal[sample];
633  Pmax = sample;
634  }
635  if ( sample < 3 ) {
636  pedestalPreSample += ebADCCounts[sample] ;
637  pedestalPreSampleAnalog +=
638  ebADCCounts[sample] * ECalgainConv_[(int)ebADCGains[sample]]
639  * ECalbarrelADCtoGeV_ ;
640  }
641 
642  }
643  pedestalPreSample /= 3. ;
644  pedestalPreSampleAnalog /= 3. ;
645 
646  // calculate pedestal subtracted digi energy in the crystal
647  double Erec = Emax - pedestalPreSampleAnalog
648  * ECalgainConv_[(int)ebADCGains[Pmax]];
649 
650  // gather necessary information
651  mehEcalMaxPos[0]->Fill(Pmax);
652  mehEcalSHE[0]->Fill(ebSimMap[ebid.rawId()]);
653  mehEcalAEE[0]->Fill(Erec);
654  //Adding protection against FPE
655  if (ebSimMap[ebid.rawId()]!=0) {
656  mehEcalSHEvAEESHE[0]->Fill(Erec/ebSimMap[ebid.rawId()],
657  ebSimMap[ebid.rawId()]);
658  }
659  //else {
660  // std::cout<<"Would have been an FPE! with ebSimMap[ebid.rawId()]==0\n";
661  //}
662 
663  mehEcalMultvAEE[0]->Fill(Pmax,(float)i);
664  }
665 
666  if (verbosity > 1) {
667  eventout += "\n Number of EBDigis collected:.............. ";
668  eventout += i;
669  }
670  mehEcaln[0]->Fill((float)i);
671  }
672  }
673 
675  //extract EE information
677  bool isEndCap = true;
678  edm::Handle<EEDigiCollection> EcalDigiEE;
679  iEvent.getByLabel(ECalEESrc_, EcalDigiEE);
680  bool validDigiEE = true;
681  if (!EcalDigiEE.isValid()) {
682  LogDebug(MsgLoggerCat)
683  << "Unable to find EcalDigiEE in event!";
684  validDigiEE = false;
685  }
686  if (validDigiEE) {
687  if (EcalDigiEE->size() == 0) isEndCap = false;
688 
689  if (isEndCap) {
690 
691  // loop over simhits
692  MapType eeSimMap;
693  const std::string endcapHitsName(hitsProducer+"EcalHitsEE");
694  iEvent.getByLabel("mix",endcapHitsName,crossingFrame);
695  bool validXFrame = true;
696  if (!crossingFrame.isValid()) {
697  LogDebug(MsgLoggerCat)
698  << "Unable to find cal endcap crossingFrame in event!";
699  validXFrame = false;
700  }
701  if (validXFrame) {
702  std::auto_ptr<MixCollection<PCaloHit> >
703  endcapHits(new MixCollection<PCaloHit>(crossingFrame.product()));
704 
705  // keep track of sum of simhit energy in each crystal
707  = endcapHits->begin();
708  hitItr != endcapHits->end();
709  ++hitItr) {
710 
711  EEDetId eeid = EEDetId(hitItr->id());
712 
713  uint32_t crystid = eeid.rawId();
714  eeSimMap[crystid] += hitItr->energy();
715  }
716  }
717 
718  // loop over digis
719  const EEDigiCollection *endcapDigi = EcalDigiEE.product();
720 
721  std::vector<double> eeAnalogSignal;
722  std::vector<double> eeADCCounts;
723  std::vector<double> eeADCGains;
724  eeAnalogSignal.reserve(EEDataFrame::MAXSAMPLES);
725  eeADCCounts.reserve(EEDataFrame::MAXSAMPLES);
726  eeADCGains.reserve(EEDataFrame::MAXSAMPLES);
727 
728  int inc = 0;
729  for (unsigned int digis=0; digis<EcalDigiEE->size(); ++digis){
730 
731  ++inc;
732 
733  EEDataFrame eedf = (*endcapDigi)[digis];
734  int nrSamples = eedf.size();
735 
736  EEDetId eeid = eedf.id () ;
737 
738  double Emax = 0;
739  int Pmax = 0;
740  double pedestalPreSample = 0.;
741  double pedestalPreSampleAnalog = 0.;
742 
743  for (int sample = 0 ; sample < nrSamples; ++sample) {
744  eeAnalogSignal[sample] = 0.;
745  eeADCCounts[sample] = 0.;
746  eeADCGains[sample] = -1.;
747  }
748 
749  // calculate maximum enery and pedestal
750  for (int sample = 0 ; sample < nrSamples; ++sample) {
751 
752  EcalMGPASample thisSample = eedf[sample];
753 
754  eeADCCounts[sample] = (thisSample.adc());
755  eeADCGains[sample] = (thisSample.gainId());
756  eeAnalogSignal[sample] =
757  (eeADCCounts[sample] * ECalgainConv_[(int)eeADCGains[sample]]
759  if (Emax < eeAnalogSignal[sample]) {
760  Emax = eeAnalogSignal[sample];
761  Pmax = sample;
762  }
763  if ( sample < 3 ) {
764  pedestalPreSample += eeADCCounts[sample] ;
765  pedestalPreSampleAnalog +=
766  eeADCCounts[sample] * ECalgainConv_[(int)eeADCGains[sample]]
767  * ECalbarrelADCtoGeV_ ;
768  }
769 
770  }
771  pedestalPreSample /= 3. ;
772  pedestalPreSampleAnalog /= 3. ;
773 
774  // calculate pedestal subtracted digi energy in the crystal
775  double Erec = Emax - pedestalPreSampleAnalog
776  * ECalgainConv_[(int)eeADCGains[Pmax]];
777 
778  // gather necessary information
779  mehEcalMaxPos[1]->Fill(Pmax);
780  mehEcalSHE[1]->Fill(eeSimMap[eeid.rawId()]);
781  mehEcalAEE[1]->Fill(Erec);
782  //Adding protection against FPE
783  if (eeSimMap[eeid.rawId()]!=0){
784  mehEcalSHEvAEESHE[1]->Fill(Erec/eeSimMap[eeid.rawId()],
785  eeSimMap[eeid.rawId()]);
786  }
787  //else{
788  // std::cout<<"Would have been an FPE! with eeSimMap[eeid.rawId()]==0\n";
789  //}
790  mehEcalMultvAEE[1]->Fill(Pmax,(float)inc);
791 
792  }
793 
794  if (verbosity > 1) {
795  eventout += "\n Number of EEDigis collected:.............. ";
796  eventout += inc;
797  }
798 
799  mehEcaln[1]->Fill((float)inc);
800  }
801  }
802 
804  //extract ES information
806  bool isPreshower = true;
807  edm::Handle<ESDigiCollection> EcalDigiES;
808  iEvent.getByLabel(ECalESSrc_, EcalDigiES);
809  bool validDigiES = true;
810  if (!EcalDigiES.isValid()) {
811  LogDebug(MsgLoggerCat)
812  << "Unable to find EcalDigiES in event!";
813  validDigiES = false;
814  }
815 
816  // ONLY WHILE GEOMETRY IS REMOVED
817  validDigiES = false;
818 
819  if (validDigiES) {
820  if (EcalDigiES->size() == 0) isPreshower = false;
821 
822  if (isPreshower) {
823 
824  // loop over simhits
825  const std::string preshowerHitsName(hitsProducer+"EcalHitsES");
826  iEvent.getByLabel("mix",preshowerHitsName,crossingFrame);
827  bool validXFrame = true;
828  if (!crossingFrame.isValid()) {
829  LogDebug(MsgLoggerCat)
830  << "Unable to find cal preshower crossingFrame in event!";
831  validXFrame = false;
832  }
833  if (validXFrame) {
834  std::auto_ptr<MixCollection<PCaloHit> >
835  preshowerHits(new MixCollection<PCaloHit>(crossingFrame.product()));
836 
837  // keep track of sum of simhit energy in each crystal
838  MapType esSimMap;
840  = preshowerHits->begin();
841  hitItr != preshowerHits->end();
842  ++hitItr) {
843 
844  ESDetId esid = ESDetId(hitItr->id());
845 
846  uint32_t crystid = esid.rawId();
847  esSimMap[crystid] += hitItr->energy();
848  }
849  }
850 
851  // loop over digis
852  const ESDigiCollection *preshowerDigi = EcalDigiES.product();
853 
854  std::vector<double> esADCCounts;
855  esADCCounts.reserve(ESDataFrame::MAXSAMPLES);
856 
857  int i = 0;
858  for (unsigned int digis=0; digis<EcalDigiES->size(); ++digis) {
859 
860  ++i;
861 
862 
863  ESDataFrame esdf = (*preshowerDigi)[digis];
864  int nrSamples = esdf.size();
865 
866  for (int sample = 0 ; sample < nrSamples; ++sample) {
867  esADCCounts[sample] = 0.;
868  }
869 
870  // gether ADC counts
871  for (int sample = 0 ; sample < nrSamples; ++sample) {
872 
873  ESSample thisSample = esdf[sample];
874  esADCCounts[sample] = (thisSample.adc());
875  }
876 
877  mehEScalADC[0]->Fill(esADCCounts[0]);
878  mehEScalADC[1]->Fill(esADCCounts[1]);
879  mehEScalADC[2]->Fill(esADCCounts[2]);
880 
881  }
882 
883  if (verbosity > 1) {
884  eventout += "\n Number of ESDigis collected:.............. ";
885  eventout += i;
886  }
887 
888  mehEScaln->Fill((float)i);
889  }
890  }
891  if (verbosity > 0)
892  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
893 
894  return;
895 }
896 
897 
899  const edm::EventSetup& iSetup)
900 {
901  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillHCal";
902 
903  TString eventout;
904  if (verbosity > 0)
905  eventout = "\nGathering info:";
906 
907  // get calibration info
908  edm::ESHandle<HcalDbService> HCalconditions;
909  iSetup.get<HcalDbRecord>().get(HCalconditions);
910  if (!HCalconditions.isValid()) {
911  edm::LogWarning(MsgLoggerCat)
912  << "Unable to find HCalconditions in event!";
913  return;
914  }
915  //HcalCalibrations calibrations;
916  CaloSamples tool;
917 
919  // extract simhit info
922  iEvent.getByLabel(HCalSrc_,hcalHits);
923  bool validhcalHits = true;
924  if (!hcalHits.isValid()) {
925  LogDebug(MsgLoggerCat)
926  << "Unable to find hcalHits in event!";
927  validhcalHits = false;
928  }
929  MapType fHBEnergySimHits;
930  MapType fHEEnergySimHits;
931  MapType fHOEnergySimHits;
932  MapType fHFEnergySimHits;
933  if (validhcalHits) {
934  const edm::PCaloHitContainer *simhitResult = hcalHits.product();
935 
936  for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin();
937  simhits != simhitResult->end();
938  ++simhits) {
939 
940  HcalDetId detId(simhits->id());
941  uint32_t cellid = detId.rawId();
942 
943  if (detId.subdet() == sdHcalBrl){
944  fHBEnergySimHits[cellid] += simhits->energy();
945  }
946  if (detId.subdet() == sdHcalEC){
947  fHEEnergySimHits[cellid] += simhits->energy();
948  }
949  if (detId.subdet() == sdHcalOut){
950  fHOEnergySimHits[cellid] += simhits->energy();
951  }
952  if (detId.subdet() == sdHcalFwd){
953  fHFEnergySimHits[cellid] += simhits->energy();
954  }
955  }
956  }
957 
959  // get HBHE information
962  iEvent.getByLabel(HCalDigi_,hbhe);
963  bool validHBHE = true;
964  if (!hbhe.isValid()) {
965  LogDebug(MsgLoggerCat)
966  << "Unable to find HBHEDataFrame in event!";
967  validHBHE = false;
968  }
969 
970  if (validHBHE) {
972 
973  int iHB = 0;
974  int iHE = 0;
975  for (ihbhe = hbhe->begin(); ihbhe != hbhe->end(); ++ihbhe) {
976  HcalDetId cell(ihbhe->id());
977 
978  if ((cell.subdet() == sdHcalBrl) || (cell.subdet() == sdHcalEC)) {
979 
980  //HCalconditions->makeHcalCalibration(cell, &calibrations);
981  const HcalCalibrations& calibrations =
982  HCalconditions->getHcalCalibrations(cell);
983  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
984  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
985  HcalCoderDb coder(*channelCoder, *shape);
986  coder.adc2fC(*ihbhe, tool);
987 
988  // get HB info
989  if (cell.subdet() == sdHcalBrl) {
990 
991  ++iHB;
992  float fDigiSum = 0.0;
993  for (int ii = 0; ii < tool.size(); ++ii) {
994  // default ped is 4.5
995  int capid = (*ihbhe)[ii].capid();
996  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
997  }
998 
999  mehHcalSHE[0]->Fill(fHFEnergySimHits[cell.rawId()]);
1000  mehHcalAEE[0]->Fill(fDigiSum);
1001  //Adding protection against FPE
1002  if (fHFEnergySimHits[cell.rawId()]!=0){
1003  mehHcalAEESHE[0]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
1004  }
1005  //else {
1006  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
1007  //}
1008  mehHcalSHEvAEE[0]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1009  }
1010 
1011  // get HE info
1012  if (cell.subdet() == sdHcalEC) {
1013 
1014  ++iHE;
1015  float fDigiSum = 0.0;
1016  for (int ii = 0; ii < tool.size(); ++ii) {
1017  int capid = (*ihbhe)[ii].capid();
1018  fDigiSum += (tool[ii]-calibrations.pedestal(capid));
1019  }
1020 
1021  mehHcalSHE[1]->Fill(fHFEnergySimHits[cell.rawId()]);
1022  mehHcalAEE[1]->Fill(fDigiSum);
1023  //Adding protection against FPE
1024  if (fHFEnergySimHits[cell.rawId()]!=0){
1025  mehHcalAEESHE[1]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
1026  }
1027  //else{
1028  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
1029  //}
1030  mehHcalSHEvAEE[1]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1031  }
1032  }
1033  }
1034 
1035  if (verbosity > 1) {
1036  eventout += "\n Number of HBDigis collected:.............. ";
1037  eventout += iHB;
1038  }
1039  mehHcaln[0]->Fill((float)iHB);
1040 
1041  if (verbosity > 1) {
1042  eventout += "\n Number of HEDigis collected:.............. ";
1043  eventout += iHE;
1044  }
1045  mehHcaln[1]->Fill((float)iHE);
1046  }
1047 
1049  // get HO information
1052  iEvent.getByLabel(HCalDigi_,ho);
1053  bool validHO = true;
1054  if (!ho.isValid()) {
1055  LogDebug(MsgLoggerCat)
1056  << "Unable to find HODataFrame in event!";
1057  validHO = false;
1058  }
1059  if (validHO) {
1061 
1062  int iHO = 0;
1063  for (iho = ho->begin(); iho != ho->end(); ++iho) {
1064  HcalDetId cell(iho->id());
1065 
1066  if (cell.subdet() == sdHcalOut) {
1067 
1068  //HCalconditions->makeHcalCalibration(cell, &calibrations);
1069  const HcalCalibrations& calibrations =
1070  HCalconditions->getHcalCalibrations(cell);
1071  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
1072  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
1073  HcalCoderDb coder (*channelCoder, *shape);
1074  coder.adc2fC(*iho, tool);
1075 
1076  ++iHO;
1077  float fDigiSum = 0.0;
1078  for (int ii = 0; ii < tool.size(); ++ii) {
1079  // default ped is 4.5
1080  int capid = (*iho)[ii].capid();
1081  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
1082  }
1083 
1084  mehHcalSHE[2]->Fill(fHFEnergySimHits[cell.rawId()]);
1085  mehHcalAEE[2]->Fill(fDigiSum);
1086  //Adding protection against FPE
1087  if (fHFEnergySimHits[cell.rawId()]!=0){
1088  mehHcalAEESHE[2]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
1089  }
1090  //else{
1091  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
1092  //}
1093  mehHcalSHEvAEE[2]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1094  }
1095  }
1096 
1097  if (verbosity > 1) {
1098  eventout += "\n Number of HODigis collected:.............. ";
1099  eventout += iHO;
1100  }
1101  mehHcaln[2]->Fill((float)iHO);
1102  }
1103 
1105  // get HF information
1108  iEvent.getByLabel(HCalDigi_,hf);
1109  bool validHF = true;
1110  if (!hf.isValid()) {
1111  LogDebug(MsgLoggerCat)
1112  << "Unable to find HFDataFrame in event!";
1113  validHF = false;
1114  }
1115  if (validHF) {
1117 
1118  int iHF = 0;
1119  for (ihf = hf->begin(); ihf != hf->end(); ++ihf) {
1120  HcalDetId cell(ihf->id());
1121 
1122  if (cell.subdet() == sdHcalFwd) {
1123 
1124  //HCalconditions->makeHcalCalibration(cell, &calibrations);
1125  const HcalCalibrations& calibrations =
1126  HCalconditions->getHcalCalibrations(cell);
1127  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
1128  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
1129  HcalCoderDb coder (*channelCoder, *shape);
1130  coder.adc2fC(*ihf, tool);
1131 
1132  ++iHF;
1133  float fDigiSum = 0.0;
1134  for (int ii = 0; ii < tool.size(); ++ii) {
1135  // default ped is 1.73077
1136  int capid = (*ihf)[ii].capid();
1137  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
1138  }
1139 
1140  mehHcalSHE[3]->Fill(fHFEnergySimHits[cell.rawId()]);
1141  mehHcalAEE[3]->Fill(fDigiSum);
1142  //Adding protection against FPE
1143  if (fHFEnergySimHits[cell.rawId()]!=0){
1144  mehHcalAEESHE[3]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
1145  }
1146  //else{
1147  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
1148  //}
1149  mehHcalSHEvAEE[3]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1150  }
1151  }
1152 
1153  if (verbosity > 1) {
1154  eventout += "\n Number of HFDigis collected:.............. ";
1155  eventout += iHF;
1156  }
1157  mehHcaln[3]->Fill((float)iHF);
1158  }
1159 
1160  if (verbosity > 0)
1161  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1162 
1163  return;
1164 }
1165 
1167  const edm::EventSetup& iSetup)
1168 {
1169  //Retrieve tracker topology from geometry
1170  edm::ESHandle<TrackerTopology> tTopoHandle;
1171  iSetup.get<IdealGeometryRecord>().get(tTopoHandle);
1172  const TrackerTopology* const tTopo = tTopoHandle.product();
1173 
1174 
1175  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillTrk";
1176 
1177  TString eventout;
1178  if (verbosity > 0)
1179  eventout = "\nGathering info:";
1180 
1181  // get strip information
1183  iEvent.getByLabel(SiStripSrc_, stripDigis);
1184  bool validstripDigis = true;
1185  if (!stripDigis.isValid()) {
1186  LogDebug(MsgLoggerCat)
1187  << "Unable to find stripDigis in event!";
1188  validstripDigis = false;
1189  }
1190 
1191  if (validstripDigis) {
1192  int nStripBrl = 0, nStripFwd = 0;
1194  for (DSViter = stripDigis->begin(); DSViter != stripDigis->end();
1195  ++DSViter) {
1196  unsigned int id = DSViter->id;
1197  DetId detId(id);
1201 
1202  // get TIB
1203  if (detId.subdetId() == sdSiTIB) {
1204 
1205  for (iter = begin; iter != end; ++iter) {
1206  ++nStripBrl;
1207  if (tTopo->tibLayer(id) == 1) {
1208  mehSiStripADC[0]->Fill((*iter).adc());
1209  mehSiStripStrip[0]->Fill((*iter).strip());
1210  }
1211  if (tTopo->tibLayer(id) == 2) {
1212  mehSiStripADC[1]->Fill((*iter).adc());
1213  mehSiStripStrip[1]->Fill((*iter).strip());
1214  }
1215  if (tTopo->tibLayer(id) == 3) {
1216  mehSiStripADC[2]->Fill((*iter).adc());
1217  mehSiStripStrip[2]->Fill((*iter).strip());
1218  }
1219  if (tTopo->tibLayer(id) == 4) {
1220  mehSiStripADC[3]->Fill((*iter).adc());
1221  mehSiStripStrip[3]->Fill((*iter).strip());
1222  }
1223  }
1224  }
1225 
1226  // get TOB
1227  if (detId.subdetId() == sdSiTOB) {
1228 
1229  for (iter = begin; iter != end; ++iter) {
1230  ++nStripBrl;
1231  if (tTopo->tobLayer(id) == 1) {
1232  mehSiStripADC[4]->Fill((*iter).adc());
1233  mehSiStripStrip[4]->Fill((*iter).strip());
1234  }
1235  if (tTopo->tobLayer(id) == 2) {
1236  mehSiStripADC[5]->Fill((*iter).adc());
1237  mehSiStripStrip[5]->Fill((*iter).strip());
1238  }
1239  if (tTopo->tobLayer(id) == 3) {
1240  mehSiStripADC[6]->Fill((*iter).adc());
1241  mehSiStripStrip[6]->Fill((*iter).strip());
1242  }
1243  if (tTopo->tobLayer(id) == 4) {
1244  mehSiStripADC[7]->Fill((*iter).adc());
1245  mehSiStripStrip[7]->Fill((*iter).strip());
1246  }
1247  }
1248  }
1249 
1250  // get TID
1251  if (detId.subdetId() == sdSiTID) {
1252 
1253  for (iter = begin; iter != end; ++iter) {
1254  ++nStripFwd;
1255  if (tTopo->tidWheel(id) == 1) {
1256  mehSiStripADC[8]->Fill((*iter).adc());
1257  mehSiStripStrip[8]->Fill((*iter).strip());
1258  }
1259  if (tTopo->tidWheel(id) == 2) {
1260  mehSiStripADC[9]->Fill((*iter).adc());
1261  mehSiStripStrip[9]->Fill((*iter).strip());
1262  }
1263  if (tTopo->tidWheel(id) == 3) {
1264  mehSiStripADC[10]->Fill((*iter).adc());
1265  mehSiStripStrip[10]->Fill((*iter).strip());
1266  }
1267  }
1268  }
1269 
1270  // get TEC
1271  if (detId.subdetId() == sdSiTEC) {
1272 
1273  for (iter = begin; iter != end; ++iter) {
1274  ++nStripFwd;
1275  if (tTopo->tecWheel(id) == 1) {
1276  mehSiStripADC[11]->Fill((*iter).adc());
1277  mehSiStripStrip[11]->Fill((*iter).strip());
1278  }
1279  if (tTopo->tecWheel(id) == 2) {
1280  mehSiStripADC[12]->Fill((*iter).adc());
1281  mehSiStripStrip[12]->Fill((*iter).strip());
1282  }
1283  if (tTopo->tecWheel(id) == 3) {
1284  mehSiStripADC[13]->Fill((*iter).adc());
1285  mehSiStripStrip[13]->Fill((*iter).strip());
1286  }
1287  if (tTopo->tecWheel(id) == 4) {
1288  mehSiStripADC[14]->Fill((*iter).adc());
1289  mehSiStripStrip[14]->Fill((*iter).strip());
1290  }
1291  if (tTopo->tecWheel(id) == 5) {
1292  mehSiStripADC[15]->Fill((*iter).adc());
1293  mehSiStripStrip[15]->Fill((*iter).strip());
1294  }
1295  if (tTopo->tecWheel(id) == 6) {
1296  mehSiStripADC[16]->Fill((*iter).adc());
1297  mehSiStripStrip[16]->Fill((*iter).strip());
1298  }
1299  if (tTopo->tecWheel(id) == 7) {
1300  mehSiStripADC[17]->Fill((*iter).adc());
1301  mehSiStripStrip[17]->Fill((*iter).strip());
1302  }
1303  if (tTopo->tecWheel(id) == 8) {
1304  mehSiStripADC[18]->Fill((*iter).adc());
1305  mehSiStripStrip[18]->Fill((*iter).strip());
1306  }
1307  }
1308  }
1309  } // end loop over DataSetVector
1310 
1311  if (verbosity > 1) {
1312  eventout += "\n Number of BrlStripDigis collected:........ ";
1313  eventout += nStripBrl;
1314  }
1315  for(int i = 0; i < 8; ++i) {
1316  mehSiStripn[i]->Fill((float)nStripBrl);
1317  }
1318 
1319  if (verbosity > 1) {
1320  eventout += "\n Number of FrwdStripDigis collected:....... ";
1321  eventout += nStripFwd;
1322  }
1323  for(int i = 8; i < 19; ++i) {
1324  mehSiStripn[i]->Fill((float)nStripFwd);
1325  }
1326  }
1327 
1328  // get pixel information
1330  iEvent.getByLabel(SiPxlSrc_, pixelDigis);
1331  bool validpixelDigis = true;
1332  if (!pixelDigis.isValid()) {
1333  LogDebug(MsgLoggerCat)
1334  << "Unable to find pixelDigis in event!";
1335  validpixelDigis = false;
1336  }
1337  if (validpixelDigis) {
1338  int nPxlBrl = 0, nPxlFwd = 0;
1340  for (DPViter = pixelDigis->begin(); DPViter != pixelDigis->end();
1341  ++DPViter) {
1342  unsigned int id = DPViter->id;
1343  DetId detId(id);
1347 
1348  // get Barrel pixels
1349  if (detId.subdetId() == sdPxlBrl) {
1350 
1351  for (iter = begin; iter != end; ++iter) {
1352  ++nPxlBrl;
1353  if (tTopo->pxbLayer(id) == 1) {
1354  mehSiPixelADC[0]->Fill((*iter).adc());
1355  mehSiPixelRow[0]->Fill((*iter).row());
1356  mehSiPixelCol[0]->Fill((*iter).column());
1357  }
1358  if (tTopo->pxbLayer(id) == 2) {
1359  mehSiPixelADC[1]->Fill((*iter).adc());
1360  mehSiPixelRow[1]->Fill((*iter).row());
1361  mehSiPixelCol[1]->Fill((*iter).column());
1362  }
1363  if (tTopo->pxbLayer(id) == 3) {
1364  mehSiPixelADC[2]->Fill((*iter).adc());
1365  mehSiPixelRow[2]->Fill((*iter).row());
1366  mehSiPixelCol[2]->Fill((*iter).column());
1367  }
1368  }
1369  }
1370 
1371  // get Forward pixels
1372  if (detId.subdetId() == sdPxlFwd) {
1373 
1374  for (iter = begin; iter != end; ++iter) {
1375  ++nPxlFwd;
1376  if (tTopo->pxfDisk(id) == 1) {
1377  if (tTopo->pxfSide(id) == 1) {
1378  mehSiPixelADC[4]->Fill((*iter).adc());
1379  mehSiPixelRow[4]->Fill((*iter).row());
1380  mehSiPixelCol[4]->Fill((*iter).column());
1381  }
1382  if (tTopo->pxfSide(id) == 2) {
1383  mehSiPixelADC[3]->Fill((*iter).adc());
1384  mehSiPixelRow[3]->Fill((*iter).row());
1385  mehSiPixelCol[3]->Fill((*iter).column());
1386  }
1387  }
1388  if (tTopo->pxfDisk(id) == 2) {
1389  if (tTopo->pxfSide(id) == 1) {
1390 
1391  mehSiPixelADC[6]->Fill((*iter).adc());
1392  mehSiPixelRow[6]->Fill((*iter).row());
1393  mehSiPixelCol[6]->Fill((*iter).column());
1394  }
1395  if (tTopo->pxfSide(id) == 2) {
1396  mehSiPixelADC[5]->Fill((*iter).adc());
1397  mehSiPixelRow[5]->Fill((*iter).row());
1398  mehSiPixelCol[5]->Fill((*iter).column());
1399  }
1400  }
1401  }
1402  }
1403  }
1404 
1405  if (verbosity > 1) {
1406  eventout += "\n Number of BrlPixelDigis collected:........ ";
1407  eventout += nPxlBrl;
1408  }
1409  for(int i = 0; i < 3; ++i) {
1410  mehSiPixeln[i]->Fill((float)nPxlBrl);
1411  }
1412 
1413  if (verbosity > 1) {
1414  eventout += "\n Number of FrwdPixelDigis collected:....... ";
1415  eventout += nPxlFwd;
1416  }
1417 
1418  for(int i = 3; i < 7; ++i) {
1419  mehSiPixeln[i]->Fill((float)nPxlFwd);
1420  }
1421  }
1422 
1423  if (verbosity > 0)
1424  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1425 
1426  return;
1427 }
1428 
1430  const edm::EventSetup& iSetup)
1431 {
1432  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillMuon";
1433 
1434  TString eventout;
1435  if (verbosity > 0)
1436  eventout = "\nGathering info:";
1437 
1438  // get DT information
1440  iEvent.getByLabel(MuDTSrc_, dtDigis);
1441  bool validdtDigis = true;
1442  if (!dtDigis.isValid()) {
1443  LogDebug(MsgLoggerCat)
1444  << "Unable to find dtDigis in event!";
1445  validdtDigis = false;
1446  }
1447  if (validdtDigis) {
1448  int nDt0 = 0; int nDt1 = 0; int nDt2 = 0; int nDt3 = 0;
1449  int nDt = 0;
1451  for (detUnitIt = dtDigis->begin(); detUnitIt != dtDigis->end();
1452  ++detUnitIt) {
1453 
1454  const DTLayerId& id = (*detUnitIt).first;
1455  const DTDigiCollection::Range& range = (*detUnitIt).second;
1456  for (DTDigiCollection::const_iterator digiIt = range.first;
1457  digiIt != range.second;
1458  ++digiIt) {
1459 
1460  ++nDt;
1461 
1462  DTWireId wireId(id,(*digiIt).wire());
1463  if (wireId.station() == 1) {
1464  mehDtMuonLayer[0]->Fill(id.layer());
1465  mehDtMuonTime[0]->Fill((*digiIt).time());
1466  mehDtMuonTimevLayer[0]->Fill(id.layer(),(*digiIt).time());
1467  ++nDt0;
1468  }
1469  if (wireId.station() == 2) {
1470  mehDtMuonLayer[1]->Fill(id.layer());
1471  mehDtMuonTime[1]->Fill((*digiIt).time());
1472  mehDtMuonTimevLayer[1]->Fill(id.layer(),(*digiIt).time());
1473  ++nDt1;
1474  }
1475  if (wireId.station() == 3) {
1476  mehDtMuonLayer[2]->Fill(id.layer());
1477  mehDtMuonTime[2]->Fill((*digiIt).time());
1478  mehDtMuonTimevLayer[2]->Fill(id.layer(),(*digiIt).time());
1479  ++nDt2;
1480  }
1481  if (wireId.station() == 4) {
1482  mehDtMuonLayer[3]->Fill(id.layer());
1483  mehDtMuonTime[3]->Fill((*digiIt).time());
1484  mehDtMuonTimevLayer[3]->Fill(id.layer(),(*digiIt).time());
1485  ++nDt3;
1486  }
1487  }
1488  }
1489  mehDtMuonn[0]->Fill((float)nDt0);
1490  mehDtMuonn[1]->Fill((float)nDt1);
1491  mehDtMuonn[2]->Fill((float)nDt2);
1492  mehDtMuonn[3]->Fill((float)nDt3);
1493 
1494 
1495  if (verbosity > 1) {
1496  eventout += "\n Number of DtMuonDigis collected:.......... ";
1497  eventout += nDt;
1498  }
1499  }
1500 
1501  // get CSC Strip information
1503  iEvent.getByLabel(MuCSCStripSrc_, strips);
1504  bool validstrips = true;
1505  if (!strips.isValid()) {
1506  LogDebug(MsgLoggerCat)
1507  << "Unable to find muon strips in event!";
1508  validstrips = false;
1509  }
1510 
1511  if (validstrips) {
1512  int nStrips = 0;
1513  for (CSCStripDigiCollection::DigiRangeIterator j = strips->begin();
1514  j != strips->end();
1515  ++j) {
1516 
1517  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
1518  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
1519 
1520  for ( ; digiItr != last; ++digiItr) {
1521  ++nStrips;
1522 
1523  // average pedestals
1524  std::vector<int> adcCounts = digiItr->getADCCounts();
1525  theCSCStripPedestalSum += adcCounts[0];
1526  theCSCStripPedestalSum += adcCounts[1];
1528 
1529  // if there are enough pedestal statistics
1530  if (theCSCStripPedestalCount > 100) {
1532  if (adcCounts[5] > (pedestal + 100))
1533  mehCSCStripADC->Fill(adcCounts[4] - pedestal);
1534  }
1535  }
1536  }
1537 
1538  if (verbosity > 1) {
1539  eventout += "\n Number of CSCStripDigis collected:........ ";
1540  eventout += nStrips;
1541  }
1542  mehCSCStripn->Fill((float)nStrips);
1543  }
1544 
1545  // get CSC Wire information
1547  iEvent.getByLabel(MuCSCWireSrc_, wires);
1548  bool validwires = true;
1549  if (!wires.isValid()) {
1550  LogDebug(MsgLoggerCat)
1551  << "Unable to find muon wires in event!";
1552  validwires = false;
1553  }
1554 
1555  if (validwires) {
1556  int nWires = 0;
1557  for (CSCWireDigiCollection::DigiRangeIterator j = wires->begin();
1558  j != wires->end();
1559  ++j) {
1560 
1561  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
1562  std::vector<CSCWireDigi>::const_iterator endDigi = (*j).second.second;
1563 
1564  for ( ; digiItr != endDigi; ++digiItr) {
1565  ++nWires;
1566  mehCSCWireTime->Fill(digiItr->getTimeBin());
1567  }
1568  }
1569 
1570  if (verbosity > 1) {
1571  eventout += "\n Number of CSCWireDigis collected:......... ";
1572  eventout += nWires;
1573  }
1574  mehCSCWiren->Fill((float)nWires);
1575  }
1576 
1577  // get RPC information
1578  // Get the RPC Geometry
1580  iSetup.get<MuonGeometryRecord>().get(rpcGeom);
1581  if (!rpcGeom.isValid()) {
1582  edm::LogWarning(MsgLoggerCat)
1583  << "Unable to find RPCGeometryRecord in event!";
1584  return;
1585  }
1586 
1588  iEvent.getByLabel("g4SimHits", "MuonRPCHits", rpcsimHit);
1589  bool validrpcsim = true;
1590  if (!rpcsimHit.isValid()) {
1591  LogDebug(MsgLoggerCat)
1592  << "Unable to find rpcsimHit in event!";
1593  validrpcsim = false;
1594  }
1595 
1597  iEvent.getByLabel(MuRPCSrc_, rpcDigis);
1598  bool validrpcdigi = true;
1599  if (!rpcDigis.isValid()) {
1600  LogDebug(MsgLoggerCat)
1601  << "Unable to find rpcDigis in event!";
1602  validrpcdigi = false;
1603  }
1604 
1605  // ONLY UNTIL PROBLEM WITH RPC DIGIS IS FIGURED OUT
1606  validrpcdigi = false;
1607 
1608  // Loop on simhits
1609  edm::PSimHitContainer::const_iterator rpcsimIt;
1610  std::map<RPCDetId, std::vector<double> > allsims;
1611 
1612  if (validrpcsim) {
1613  for (rpcsimIt = rpcsimHit->begin(); rpcsimIt != rpcsimHit->end();
1614  rpcsimIt++) {
1615  RPCDetId Rsid = (RPCDetId)(*rpcsimIt).detUnitId();
1616  int ptype = rpcsimIt->particleType();
1617 
1618  if (ptype == 13 || ptype == -13) {
1619  std::vector<double> buff;
1620  if (allsims.find(Rsid) != allsims.end() ){
1621  buff= allsims[Rsid];
1622  }
1623  buff.push_back(rpcsimIt->localPosition().x());
1624  allsims[Rsid]=buff;
1625  }
1626  }
1627  }
1628 
1629  // CRASH HAPPENS SOMEWHERE HERE IN FOR DECLARATION
1630  // WHAT IS WRONG WITH rpcDigis?????
1631  if (validrpcdigi) {
1632  int nRPC = 0;
1634  for (rpcdetUnitIt = rpcDigis->begin(); rpcdetUnitIt != rpcDigis->end();
1635  ++rpcdetUnitIt) {
1636 
1637  const RPCDetId Rsid = (*rpcdetUnitIt).first;
1638  const RPCRoll* roll =
1639  dynamic_cast<const RPCRoll* >( rpcGeom->roll(Rsid));
1640  const RPCDigiCollection::Range& range = (*rpcdetUnitIt).second;
1641 
1642  std::vector<double> sims;
1643  if (allsims.find(Rsid) != allsims.end() ){
1644  sims = allsims[Rsid];
1645  }
1646 
1647  int ndigi = 0;
1648  for (RPCDigiCollection::const_iterator rpcdigiIt = range.first;
1649  rpcdigiIt != range.second;
1650  ++rpcdigiIt) {
1651 
1652  ++ndigi;
1653  ++nRPC;
1654  }
1655 
1656  if (sims.size() == 1 && ndigi == 1){
1657  double dis = roll->centreOfStrip(range.first->strip()).x()-sims[0];
1658 
1659  if (Rsid.region() == 0 ){
1660  if (Rsid.ring() == -2)
1661  mehRPCRes[0]->Fill((float)dis);
1662  else if (Rsid.ring() == -1)
1663  mehRPCRes[1]->Fill((float)dis);
1664  else if (Rsid.ring() == 0)
1665  mehRPCRes[2]->Fill((float)dis);
1666  else if (Rsid.ring() == 1)
1667  mehRPCRes[3]->Fill((float)dis);
1668  else if (Rsid.ring() == 2)
1669  mehRPCRes[4]->Fill((float)dis);
1670  }
1671  }
1672  }
1673 
1674  if (verbosity > 1) {
1675  eventout += "\n Number of RPCDigis collected:.............. ";
1676  eventout += nRPC;
1677  }
1678  mehRPCMuonn->Fill(float(nRPC));
1679  }
1680 
1681  if (verbosity > 0)
1682  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1683 
1684  return;
1685 }
#define LogDebug(id)
GlobalDigisAnalyzer(const edm::ParameterSet &)
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:78
int i
Definition: DBlmapReader.cc:9
LocalPoint centreOfStrip(int strip) const
Definition: RPCRoll.cc:52
std::vector< PCaloHit > PCaloHitContainer
MonitorElement * mehEScalADC[3]
key_type id() const
Definition: EBDataFrame.h:32
int ihf
MonitorElement * mehDtMuonLayer[4]
unsigned int tibLayer(const DetId &id) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
static const int sdHcalOut
MonitorElement * mehEcaln[2]
unsigned int pxfDisk(const DetId &id) const
void fillECal(const edm::Event &, const edm::EventSetup &)
static const int sdSiTID
MonitorElement * mehEScaln
std::vector< T >::const_iterator const_iterator
MonitorElement * mehSiPixelRow[7]
MonitorElement * mehRPCRes[5]
unsigned int tidWheel(const DetId &id) const
double pedestal(int fCapId) const
get pedestal for capid=0..3
MonitorElement * mehSiStripADC[19]
int size() const
Definition: ESDataFrame.h:23
MonitorElement * mehDtMuonTimevLayer[4]
int ii
Definition: cuy.py:588
MonitorElement * mehSiStripn[19]
int gainId() const
get the gainId (2 bits)
MonitorElement * mehCSCWireTime
int size() const
Definition: EcalDataFrame.h:27
void Fill(long long x)
virtual void beginJob(void)
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
MonitorElement * mehEcalMaxPos[2]
MonitorElement * mehDtMuonTime[4]
int iEvent
Definition: GenABIO.cc:243
static const int sdSiTIB
static const int sdPxlBrl
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const
Definition: HcalCoderDb.cc:46
int ring() const
Definition: RPCDetId.h:75
edm::InputTag MuCSCStripSrc_
static const int MAXSAMPLES
Definition: ESDataFrame.h:32
MonitorElement * mehHcalAEE[4]
int j
Definition: DBlmapReader.cc:9
std::map< uint32_t, float, std::less< uint32_t > > MapType
static const int sdSiTOB
float gain6Over1() const
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:1036
#define end
Definition: vmac.h:38
void setVerbose(unsigned level)
Definition: DQMStore.cc:398
bool isValid() const
Definition: HandleBase.h:76
std::map< int, double, std::less< int > > ECalgainConv_
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:356
void fillHCal(const edm::Event &, const edm::EventSetup &)
key_type id() const
Definition: EEDataFrame.h:29
MonitorElement * mehRPCMuonn
MonitorElement * mehEcalSHE[2]
unsigned int pxbLayer(const DetId &id) const
Definition: DetId.h:20
void fillMuon(const edm::Event &, const edm::EventSetup &)
MonitorElement * mehEcalAEE[2]
MonitorElement * mehHcalSHEvAEE[4]
MonitorElement * mehCSCStripn
int size() const
get the size
Definition: CaloSamples.h:26
MonitorElement * mehCSCStripADC
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
static const int sdHcalFwd
float gain12Over6() const
std::vector< DigiType >::const_iterator const_iterator
T const * product() const
Definition: Handle.h:74
static const int sdHcalBrl
MonitorElement * mehSiPixelCol[7]
MonitorElement * mehHcaln[4]
std::string const & label() const
Definition: InputTag.h:42
MonitorElement * mehHcalAEESHE[4]
MonitorElement * mehEcalSHEvAEESHE[2]
edm::EventID id() const
Definition: EventBase.h:56
static const int sdSiTEC
#define begin
Definition: vmac.h:31
MonitorElement * mehHcalSHE[4]
unsigned int pxfSide(const DetId &id) const
MonitorElement * mehCSCWiren
std::pair< const_iterator, const_iterator > Range
int adc() const
get the ADC sample (singed 16 bits)
Definition: ESSample.h:18
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:341
static const int sdPxlFwd
void showDirStructure(void) const
Definition: DQMStore.cc:2766
Definition: DDAxes.h:10
MonitorElement * mehEcalMultvAEE[2]
MonitorElement * mehSiPixeln[7]
MonitorElement * mehSiStripStrip[19]
collection_type::const_iterator const_iterator
Definition: DetSet.h:34
bool isValid() const
Definition: ESHandle.h:37
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:106
unsigned int tecWheel(const DetId &id) const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void fillTrk(const edm::Event &, const edm::EventSetup &)
std::string const & instance() const
Definition: InputTag.h:43
static const int sdHcalEC
static const int MAXSAMPLES
Definition: EcalDataFrame.h:49
MonitorElement * mehSiPixelADC[7]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
unsigned int tobLayer(const DetId &id) const
int adc() const
get the ADC sample (12 bits)
MonitorElement * mehDtMuonn[4]
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:66
virtual void analyze(const edm::Event &, const edm::EventSetup &)