CMS 3D CMS Logo

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