CMS 3D CMS Logo

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