CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GlobalDigisAnalyzer.cc
Go to the documentation of this file.
1 
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]=0;
137  mehSiStripADC[i]=0;
138  mehSiStripStrip[i]=0;
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]=0;
174  mehHcalAEE[i]=0;
175  mehHcalSHE[i]=0;
176  mehHcalAEESHE[i]=0;
177  mehHcalSHEvAEE[i]=0;
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]=0;
225  mehEcalAEE[i]=0;
226  mehEcalSHE[i]=0;
227  mehEcalMaxPos[i]=0;
228  mehEcalMultvAEE[i]=0;
229  mehEcalSHEvAEESHE[i]=0;
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 = 0;
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] = 0;
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]=0;
295  mehSiPixelADC[j]=0;
296  mehSiPixelRow[j]=0;
297  mehSiPixelCol[j]=0;
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] = 0;
336  mehDtMuonLayer[i] = 0;
337  mehDtMuonTime[i] = 0;
338  mehDtMuonTimevLayer[i] = 0;
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 = 0;
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 = 0;
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 = 0;
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 = 0;
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 = 0;
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] = 0;
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::Provenance*> AllProv;
464  iEvent.getAllProvenance(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->size() == 0) 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  std::auto_ptr<MixCollection<PCaloHit> >
554  barrelHits(new MixCollection<PCaloHit>(crossingFrame.product()));
555 
556  // keep track of sum of simhit energy in each crystal
558  = barrelHits->begin();
559  hitItr != barrelHits->end();
560  ++hitItr) {
561 
562  EBDetId ebid = EBDetId(hitItr->id());
563 
564  uint32_t crystid = ebid.rawId();
565  ebSimMap[crystid] += hitItr->energy();
566  }
567  }
568 
569  // loop over digis
570  const EBDigiCollection *barrelDigi = EcalDigiEB.product();
571 
572  std::vector<double> ebAnalogSignal;
573  std::vector<double> ebADCCounts;
574  std::vector<double> ebADCGains;
575  ebAnalogSignal.reserve(EBDataFrame::MAXSAMPLES);
576  ebADCCounts.reserve(EBDataFrame::MAXSAMPLES);
577  ebADCGains.reserve(EBDataFrame::MAXSAMPLES);
578 
579  int i = 0;
580  for (unsigned int digis=0; digis<EcalDigiEB->size(); ++digis) {
581 
582  ++i;
583 
584  EBDataFrame ebdf = (*barrelDigi)[digis];
585  int nrSamples = ebdf.size();
586 
587  EBDetId ebid = ebdf.id () ;
588 
589  double Emax = 0;
590  int Pmax = 0;
591  double pedestalPreSample = 0.;
592  double pedestalPreSampleAnalog = 0.;
593 
594  for (int sample = 0 ; sample < nrSamples; ++sample) {
595  ebAnalogSignal[sample] = 0.;
596  ebADCCounts[sample] = 0.;
597  ebADCGains[sample] = -1.;
598  }
599 
600  // calculate maximum energy and pedestal
601  for (int sample = 0 ; sample < nrSamples; ++sample) {
602 
603  EcalMGPASample thisSample = ebdf[sample];
604  ebADCCounts[sample] = (thisSample.adc());
605  ebADCGains[sample] = (thisSample.gainId());
606  ebAnalogSignal[sample] =
607  (ebADCCounts[sample] * ECalgainConv_[(int)ebADCGains[sample]]
609  if (Emax < ebAnalogSignal[sample]) {
610  Emax = ebAnalogSignal[sample];
611  Pmax = sample;
612  }
613  if ( sample < 3 ) {
614  pedestalPreSample += ebADCCounts[sample] ;
615  pedestalPreSampleAnalog +=
616  ebADCCounts[sample] * ECalgainConv_[(int)ebADCGains[sample]]
617  * ECalbarrelADCtoGeV_ ;
618  }
619 
620  }
621  pedestalPreSample /= 3. ;
622  pedestalPreSampleAnalog /= 3. ;
623 
624  // calculate pedestal subtracted digi energy in the crystal
625  double Erec = Emax - pedestalPreSampleAnalog
626  * ECalgainConv_[(int)ebADCGains[Pmax]];
627 
628  // gather necessary information
629  mehEcalMaxPos[0]->Fill(Pmax);
630  mehEcalSHE[0]->Fill(ebSimMap[ebid.rawId()]);
631  mehEcalAEE[0]->Fill(Erec);
632  //Adding protection against FPE
633  if (ebSimMap[ebid.rawId()]!=0) {
634  mehEcalSHEvAEESHE[0]->Fill(Erec/ebSimMap[ebid.rawId()],
635  ebSimMap[ebid.rawId()]);
636  }
637  //else {
638  // std::cout<<"Would have been an FPE! with ebSimMap[ebid.rawId()]==0\n";
639  //}
640 
641  mehEcalMultvAEE[0]->Fill(Pmax,(float)i);
642  }
643 
644  if (verbosity > 1) {
645  eventout += "\n Number of EBDigis collected:.............. ";
646  eventout += i;
647  }
648  mehEcaln[0]->Fill((float)i);
649  }
650  }
651 
653  //extract EE information
655  bool isEndCap = true;
656  edm::Handle<EEDigiCollection> EcalDigiEE;
657  iEvent.getByToken(ECalEESrc_Token_, EcalDigiEE);
658  bool validDigiEE = true;
659  if (!EcalDigiEE.isValid()) {
660  LogDebug(MsgLoggerCat)
661  << "Unable to find EcalDigiEE in event!";
662  validDigiEE = false;
663  }
664  if (validDigiEE) {
665  if (EcalDigiEE->size() == 0) isEndCap = false;
666 
667  if (isEndCap) {
668 
669  // loop over simhits
670  MapType eeSimMap;
671  iEvent.getByToken(EEHits_Token_,crossingFrame);
672  bool validXFrame = true;
673  if (!crossingFrame.isValid()) {
674  LogDebug(MsgLoggerCat)
675  << "Unable to find cal endcap crossingFrame in event!";
676  validXFrame = false;
677  }
678  if (validXFrame) {
679  std::auto_ptr<MixCollection<PCaloHit> >
680  endcapHits(new MixCollection<PCaloHit>(crossingFrame.product()));
681 
682  // keep track of sum of simhit energy in each crystal
684  = endcapHits->begin();
685  hitItr != endcapHits->end();
686  ++hitItr) {
687 
688  EEDetId eeid = EEDetId(hitItr->id());
689 
690  uint32_t crystid = eeid.rawId();
691  eeSimMap[crystid] += hitItr->energy();
692  }
693  }
694 
695  // loop over digis
696  const EEDigiCollection *endcapDigi = EcalDigiEE.product();
697 
698  std::vector<double> eeAnalogSignal;
699  std::vector<double> eeADCCounts;
700  std::vector<double> eeADCGains;
701  eeAnalogSignal.reserve(EEDataFrame::MAXSAMPLES);
702  eeADCCounts.reserve(EEDataFrame::MAXSAMPLES);
703  eeADCGains.reserve(EEDataFrame::MAXSAMPLES);
704 
705  int inc = 0;
706  for (unsigned int digis=0; digis<EcalDigiEE->size(); ++digis){
707 
708  ++inc;
709 
710  EEDataFrame eedf = (*endcapDigi)[digis];
711  int nrSamples = eedf.size();
712 
713  EEDetId eeid = eedf.id () ;
714 
715  double Emax = 0;
716  int Pmax = 0;
717  double pedestalPreSample = 0.;
718  double pedestalPreSampleAnalog = 0.;
719 
720  for (int sample = 0 ; sample < nrSamples; ++sample) {
721  eeAnalogSignal[sample] = 0.;
722  eeADCCounts[sample] = 0.;
723  eeADCGains[sample] = -1.;
724  }
725 
726  // calculate maximum enery and pedestal
727  for (int sample = 0 ; sample < nrSamples; ++sample) {
728 
729  EcalMGPASample thisSample = eedf[sample];
730 
731  eeADCCounts[sample] = (thisSample.adc());
732  eeADCGains[sample] = (thisSample.gainId());
733  eeAnalogSignal[sample] =
734  (eeADCCounts[sample] * ECalgainConv_[(int)eeADCGains[sample]]
736  if (Emax < eeAnalogSignal[sample]) {
737  Emax = eeAnalogSignal[sample];
738  Pmax = sample;
739  }
740  if ( sample < 3 ) {
741  pedestalPreSample += eeADCCounts[sample] ;
742  pedestalPreSampleAnalog +=
743  eeADCCounts[sample] * ECalgainConv_[(int)eeADCGains[sample]]
744  * ECalbarrelADCtoGeV_ ;
745  }
746 
747  }
748  pedestalPreSample /= 3. ;
749  pedestalPreSampleAnalog /= 3. ;
750 
751  // calculate pedestal subtracted digi energy in the crystal
752  double Erec = Emax - pedestalPreSampleAnalog
753  * ECalgainConv_[(int)eeADCGains[Pmax]];
754 
755  // gather necessary information
756  mehEcalMaxPos[1]->Fill(Pmax);
757  mehEcalSHE[1]->Fill(eeSimMap[eeid.rawId()]);
758  mehEcalAEE[1]->Fill(Erec);
759  //Adding protection against FPE
760  if (eeSimMap[eeid.rawId()]!=0){
761  mehEcalSHEvAEESHE[1]->Fill(Erec/eeSimMap[eeid.rawId()],
762  eeSimMap[eeid.rawId()]);
763  }
764  //else{
765  // std::cout<<"Would have been an FPE! with eeSimMap[eeid.rawId()]==0\n";
766  //}
767  mehEcalMultvAEE[1]->Fill(Pmax,(float)inc);
768 
769  }
770 
771  if (verbosity > 1) {
772  eventout += "\n Number of EEDigis collected:.............. ";
773  eventout += inc;
774  }
775 
776  mehEcaln[1]->Fill((float)inc);
777  }
778  }
779 
781  //extract ES information
783  bool isPreshower = true;
784  edm::Handle<ESDigiCollection> EcalDigiES;
785  iEvent.getByToken(ECalESSrc_Token_, EcalDigiES);
786  bool validDigiES = true;
787  if (!EcalDigiES.isValid()) {
788  LogDebug(MsgLoggerCat)
789  << "Unable to find EcalDigiES in event!";
790  validDigiES = false;
791  }
792 
793  // ONLY WHILE GEOMETRY IS REMOVED
794  validDigiES = false;
795 
796  if (validDigiES) {
797  if (EcalDigiES->size() == 0) isPreshower = false;
798 
799  if (isPreshower) {
800 
801  // loop over simhits
802  iEvent.getByToken(ESHits_Token_,crossingFrame);
803  bool validXFrame = true;
804  if (!crossingFrame.isValid()) {
805  LogDebug(MsgLoggerCat)
806  << "Unable to find cal preshower crossingFrame in event!";
807  validXFrame = false;
808  }
809  if (validXFrame) {
810  std::auto_ptr<MixCollection<PCaloHit> >
811  preshowerHits(new MixCollection<PCaloHit>(crossingFrame.product()));
812 
813  // keep track of sum of simhit energy in each crystal
814  MapType esSimMap;
816  = preshowerHits->begin();
817  hitItr != preshowerHits->end();
818  ++hitItr) {
819 
820  ESDetId esid = ESDetId(hitItr->id());
821 
822  uint32_t crystid = esid.rawId();
823  esSimMap[crystid] += hitItr->energy();
824  }
825  }
826 
827  // loop over digis
828  const ESDigiCollection *preshowerDigi = EcalDigiES.product();
829 
830  std::vector<double> esADCCounts;
831  esADCCounts.reserve(ESDataFrame::MAXSAMPLES);
832 
833  int i = 0;
834  for (unsigned int digis=0; digis<EcalDigiES->size(); ++digis) {
835 
836  ++i;
837 
838 
839  ESDataFrame esdf = (*preshowerDigi)[digis];
840  int nrSamples = esdf.size();
841 
842  for (int sample = 0 ; sample < nrSamples; ++sample) {
843  esADCCounts[sample] = 0.;
844  }
845 
846  // gether ADC counts
847  for (int sample = 0 ; sample < nrSamples; ++sample) {
848 
849  ESSample thisSample = esdf[sample];
850  esADCCounts[sample] = (thisSample.adc());
851  }
852 
853  mehEScalADC[0]->Fill(esADCCounts[0]);
854  mehEScalADC[1]->Fill(esADCCounts[1]);
855  mehEScalADC[2]->Fill(esADCCounts[2]);
856 
857  }
858 
859  if (verbosity > 1) {
860  eventout += "\n Number of ESDigis collected:.............. ";
861  eventout += i;
862  }
863 
864  mehEScaln->Fill((float)i);
865  }
866  }
867  if (verbosity > 0)
868  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
869 
870  return;
871 }
872 
873 
875  const edm::EventSetup& iSetup)
876 {
877  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillHCal";
878 
879  TString eventout;
880  if (verbosity > 0)
881  eventout = "\nGathering info:";
882 
883  // get calibration info
884  edm::ESHandle<HcalDbService> HCalconditions;
885  iSetup.get<HcalDbRecord>().get(HCalconditions);
886  if (!HCalconditions.isValid()) {
887  edm::LogWarning(MsgLoggerCat)
888  << "Unable to find HCalconditions in event!";
889  return;
890  }
891  //HcalCalibrations calibrations;
892  CaloSamples tool;
893 
895  // extract simhit info
898  iEvent.getByToken(HCalSrc_Token_,hcalHits);
899  bool validhcalHits = true;
900  if (!hcalHits.isValid()) {
901  LogDebug(MsgLoggerCat)
902  << "Unable to find hcalHits in event!";
903  validhcalHits = false;
904  }
905  MapType fHBEnergySimHits;
906  MapType fHEEnergySimHits;
907  MapType fHOEnergySimHits;
908  MapType fHFEnergySimHits;
909  if (validhcalHits) {
910  const edm::PCaloHitContainer *simhitResult = hcalHits.product();
911 
912  for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin();
913  simhits != simhitResult->end();
914  ++simhits) {
915 
916  HcalDetId detId(simhits->id());
917  uint32_t cellid = detId.rawId();
918 
919  if (detId.subdet() == sdHcalBrl){
920  fHBEnergySimHits[cellid] += simhits->energy();
921  }
922  if (detId.subdet() == sdHcalEC){
923  fHEEnergySimHits[cellid] += simhits->energy();
924  }
925  if (detId.subdet() == sdHcalOut){
926  fHOEnergySimHits[cellid] += simhits->energy();
927  }
928  if (detId.subdet() == sdHcalFwd){
929  fHFEnergySimHits[cellid] += simhits->energy();
930  }
931  }
932  }
933 
935  // get HBHE information
938  iEvent.getByToken(HBHEDigi_Token_,hbhe);
939  bool validHBHE = true;
940  if (!hbhe.isValid()) {
941  LogDebug(MsgLoggerCat)
942  << "Unable to find HBHEDataFrame in event!";
943  validHBHE = false;
944  }
945 
946  if (validHBHE) {
948 
949  int iHB = 0;
950  int iHE = 0;
951  for (ihbhe = hbhe->begin(); ihbhe != hbhe->end(); ++ihbhe) {
952  HcalDetId cell(ihbhe->id());
953 
954  if ((cell.subdet() == sdHcalBrl) || (cell.subdet() == sdHcalEC)) {
955 
956  //HCalconditions->makeHcalCalibration(cell, &calibrations);
957  const HcalCalibrations& calibrations =
958  HCalconditions->getHcalCalibrations(cell);
959  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
960  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
961  HcalCoderDb coder(*channelCoder, *shape);
962  coder.adc2fC(*ihbhe, tool);
963 
964  // get HB info
965  if (cell.subdet() == sdHcalBrl) {
966 
967  ++iHB;
968  float fDigiSum = 0.0;
969  for (int ii = 0; ii < tool.size(); ++ii) {
970  // default ped is 4.5
971  int capid = (*ihbhe)[ii].capid();
972  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
973  }
974 
975  mehHcalSHE[0]->Fill(fHFEnergySimHits[cell.rawId()]);
976  mehHcalAEE[0]->Fill(fDigiSum);
977  //Adding protection against FPE
978  if (fHFEnergySimHits[cell.rawId()]!=0){
979  mehHcalAEESHE[0]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
980  }
981  //else {
982  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
983  //}
984  mehHcalSHEvAEE[0]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
985  }
986 
987  // get HE info
988  if (cell.subdet() == sdHcalEC) {
989 
990  ++iHE;
991  float fDigiSum = 0.0;
992  for (int ii = 0; ii < tool.size(); ++ii) {
993  int capid = (*ihbhe)[ii].capid();
994  fDigiSum += (tool[ii]-calibrations.pedestal(capid));
995  }
996 
997  mehHcalSHE[1]->Fill(fHFEnergySimHits[cell.rawId()]);
998  mehHcalAEE[1]->Fill(fDigiSum);
999  //Adding protection against FPE
1000  if (fHFEnergySimHits[cell.rawId()]!=0){
1001  mehHcalAEESHE[1]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
1002  }
1003  //else{
1004  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
1005  //}
1006  mehHcalSHEvAEE[1]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1007  }
1008  }
1009  }
1010 
1011  if (verbosity > 1) {
1012  eventout += "\n Number of HBDigis collected:.............. ";
1013  eventout += iHB;
1014  }
1015  mehHcaln[0]->Fill((float)iHB);
1016 
1017  if (verbosity > 1) {
1018  eventout += "\n Number of HEDigis collected:.............. ";
1019  eventout += iHE;
1020  }
1021  mehHcaln[1]->Fill((float)iHE);
1022  }
1023 
1025  // get HO information
1028  iEvent.getByToken(HODigi_Token_,ho);
1029  bool validHO = true;
1030  if (!ho.isValid()) {
1031  LogDebug(MsgLoggerCat)
1032  << "Unable to find HODataFrame in event!";
1033  validHO = false;
1034  }
1035  if (validHO) {
1037 
1038  int iHO = 0;
1039  for (iho = ho->begin(); iho != ho->end(); ++iho) {
1040  HcalDetId cell(iho->id());
1041 
1042  if (cell.subdet() == sdHcalOut) {
1043 
1044  //HCalconditions->makeHcalCalibration(cell, &calibrations);
1045  const HcalCalibrations& calibrations =
1046  HCalconditions->getHcalCalibrations(cell);
1047  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
1048  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
1049  HcalCoderDb coder (*channelCoder, *shape);
1050  coder.adc2fC(*iho, tool);
1051 
1052  ++iHO;
1053  float fDigiSum = 0.0;
1054  for (int ii = 0; ii < tool.size(); ++ii) {
1055  // default ped is 4.5
1056  int capid = (*iho)[ii].capid();
1057  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
1058  }
1059 
1060  mehHcalSHE[2]->Fill(fHFEnergySimHits[cell.rawId()]);
1061  mehHcalAEE[2]->Fill(fDigiSum);
1062  //Adding protection against FPE
1063  if (fHFEnergySimHits[cell.rawId()]!=0){
1064  mehHcalAEESHE[2]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
1065  }
1066  //else{
1067  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
1068  //}
1069  mehHcalSHEvAEE[2]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1070  }
1071  }
1072 
1073  if (verbosity > 1) {
1074  eventout += "\n Number of HODigis collected:.............. ";
1075  eventout += iHO;
1076  }
1077  mehHcaln[2]->Fill((float)iHO);
1078  }
1079 
1081  // get HF information
1084  iEvent.getByToken(HFDigi_Token_,hf);
1085  bool validHF = true;
1086  if (!hf.isValid()) {
1087  LogDebug(MsgLoggerCat)
1088  << "Unable to find HFDataFrame in event!";
1089  validHF = false;
1090  }
1091  if (validHF) {
1093 
1094  int iHF = 0;
1095  for (ihf = hf->begin(); ihf != hf->end(); ++ihf) {
1096  HcalDetId cell(ihf->id());
1097 
1098  if (cell.subdet() == sdHcalFwd) {
1099 
1100  //HCalconditions->makeHcalCalibration(cell, &calibrations);
1101  const HcalCalibrations& calibrations =
1102  HCalconditions->getHcalCalibrations(cell);
1103  const HcalQIECoder *channelCoder = HCalconditions->getHcalCoder(cell);
1104  const HcalQIEShape *shape = HCalconditions->getHcalShape(channelCoder);
1105  HcalCoderDb coder (*channelCoder, *shape);
1106  coder.adc2fC(*ihf, tool);
1107 
1108  ++iHF;
1109  float fDigiSum = 0.0;
1110  for (int ii = 0; ii < tool.size(); ++ii) {
1111  // default ped is 1.73077
1112  int capid = (*ihf)[ii].capid();
1113  fDigiSum += (tool[ii] - calibrations.pedestal(capid));
1114  }
1115 
1116  mehHcalSHE[3]->Fill(fHFEnergySimHits[cell.rawId()]);
1117  mehHcalAEE[3]->Fill(fDigiSum);
1118  //Adding protection against FPE
1119  if (fHFEnergySimHits[cell.rawId()]!=0){
1120  mehHcalAEESHE[3]->Fill(fDigiSum/fHFEnergySimHits[cell.rawId()]);
1121  }
1122  //else{
1123  // std::cout<<"It would have been an FPE! with fHFEnergySimHits[cell.rawId()]==0!\n";
1124  //}
1125  mehHcalSHEvAEE[3]->Fill(fDigiSum, fHFEnergySimHits[cell.rawId()]);
1126  }
1127  }
1128 
1129  if (verbosity > 1) {
1130  eventout += "\n Number of HFDigis collected:.............. ";
1131  eventout += iHF;
1132  }
1133  mehHcaln[3]->Fill((float)iHF);
1134  }
1135 
1136  if (verbosity > 0)
1137  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1138 
1139  return;
1140 }
1141 
1143  const edm::EventSetup& iSetup)
1144 {
1145  //Retrieve tracker topology from geometry
1146  edm::ESHandle<TrackerTopology> tTopoHandle;
1147  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
1148  const TrackerTopology* const tTopo = tTopoHandle.product();
1149 
1150 
1151  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillTrk";
1152 
1153  TString eventout;
1154  if (verbosity > 0)
1155  eventout = "\nGathering info:";
1156 
1157  // get strip information
1159  iEvent.getByToken(SiStripSrc_Token_, stripDigis);
1160  bool validstripDigis = true;
1161  if (!stripDigis.isValid()) {
1162  LogDebug(MsgLoggerCat)
1163  << "Unable to find stripDigis in event!";
1164  validstripDigis = false;
1165  }
1166 
1167  if (validstripDigis) {
1168  int nStripBrl = 0, nStripFwd = 0;
1170  for (DSViter = stripDigis->begin(); DSViter != stripDigis->end();
1171  ++DSViter) {
1172  unsigned int id = DSViter->id;
1173  DetId detId(id);
1177 
1178  // get TIB
1179  if (detId.subdetId() == sdSiTIB) {
1180 
1181  for (iter = begin; iter != end; ++iter) {
1182  ++nStripBrl;
1183  if (tTopo->tibLayer(id) == 1) {
1184  mehSiStripADC[0]->Fill((*iter).adc());
1185  mehSiStripStrip[0]->Fill((*iter).strip());
1186  }
1187  if (tTopo->tibLayer(id) == 2) {
1188  mehSiStripADC[1]->Fill((*iter).adc());
1189  mehSiStripStrip[1]->Fill((*iter).strip());
1190  }
1191  if (tTopo->tibLayer(id) == 3) {
1192  mehSiStripADC[2]->Fill((*iter).adc());
1193  mehSiStripStrip[2]->Fill((*iter).strip());
1194  }
1195  if (tTopo->tibLayer(id) == 4) {
1196  mehSiStripADC[3]->Fill((*iter).adc());
1197  mehSiStripStrip[3]->Fill((*iter).strip());
1198  }
1199  }
1200  }
1201 
1202  // get TOB
1203  if (detId.subdetId() == sdSiTOB) {
1204 
1205  for (iter = begin; iter != end; ++iter) {
1206  ++nStripBrl;
1207  if (tTopo->tobLayer(id) == 1) {
1208  mehSiStripADC[4]->Fill((*iter).adc());
1209  mehSiStripStrip[4]->Fill((*iter).strip());
1210  }
1211  if (tTopo->tobLayer(id) == 2) {
1212  mehSiStripADC[5]->Fill((*iter).adc());
1213  mehSiStripStrip[5]->Fill((*iter).strip());
1214  }
1215  if (tTopo->tobLayer(id) == 3) {
1216  mehSiStripADC[6]->Fill((*iter).adc());
1217  mehSiStripStrip[6]->Fill((*iter).strip());
1218  }
1219  if (tTopo->tobLayer(id) == 4) {
1220  mehSiStripADC[7]->Fill((*iter).adc());
1221  mehSiStripStrip[7]->Fill((*iter).strip());
1222  }
1223  }
1224  }
1225 
1226  // get TID
1227  if (detId.subdetId() == sdSiTID) {
1228 
1229  for (iter = begin; iter != end; ++iter) {
1230  ++nStripFwd;
1231  if (tTopo->tidWheel(id) == 1) {
1232  mehSiStripADC[8]->Fill((*iter).adc());
1233  mehSiStripStrip[8]->Fill((*iter).strip());
1234  }
1235  if (tTopo->tidWheel(id) == 2) {
1236  mehSiStripADC[9]->Fill((*iter).adc());
1237  mehSiStripStrip[9]->Fill((*iter).strip());
1238  }
1239  if (tTopo->tidWheel(id) == 3) {
1240  mehSiStripADC[10]->Fill((*iter).adc());
1241  mehSiStripStrip[10]->Fill((*iter).strip());
1242  }
1243  }
1244  }
1245 
1246  // get TEC
1247  if (detId.subdetId() == sdSiTEC) {
1248 
1249  for (iter = begin; iter != end; ++iter) {
1250  ++nStripFwd;
1251  if (tTopo->tecWheel(id) == 1) {
1252  mehSiStripADC[11]->Fill((*iter).adc());
1253  mehSiStripStrip[11]->Fill((*iter).strip());
1254  }
1255  if (tTopo->tecWheel(id) == 2) {
1256  mehSiStripADC[12]->Fill((*iter).adc());
1257  mehSiStripStrip[12]->Fill((*iter).strip());
1258  }
1259  if (tTopo->tecWheel(id) == 3) {
1260  mehSiStripADC[13]->Fill((*iter).adc());
1261  mehSiStripStrip[13]->Fill((*iter).strip());
1262  }
1263  if (tTopo->tecWheel(id) == 4) {
1264  mehSiStripADC[14]->Fill((*iter).adc());
1265  mehSiStripStrip[14]->Fill((*iter).strip());
1266  }
1267  if (tTopo->tecWheel(id) == 5) {
1268  mehSiStripADC[15]->Fill((*iter).adc());
1269  mehSiStripStrip[15]->Fill((*iter).strip());
1270  }
1271  if (tTopo->tecWheel(id) == 6) {
1272  mehSiStripADC[16]->Fill((*iter).adc());
1273  mehSiStripStrip[16]->Fill((*iter).strip());
1274  }
1275  if (tTopo->tecWheel(id) == 7) {
1276  mehSiStripADC[17]->Fill((*iter).adc());
1277  mehSiStripStrip[17]->Fill((*iter).strip());
1278  }
1279  if (tTopo->tecWheel(id) == 8) {
1280  mehSiStripADC[18]->Fill((*iter).adc());
1281  mehSiStripStrip[18]->Fill((*iter).strip());
1282  }
1283  }
1284  }
1285  } // end loop over DataSetVector
1286 
1287  if (verbosity > 1) {
1288  eventout += "\n Number of BrlStripDigis collected:........ ";
1289  eventout += nStripBrl;
1290  }
1291  for(int i = 0; i < 8; ++i) {
1292  mehSiStripn[i]->Fill((float)nStripBrl);
1293  }
1294 
1295  if (verbosity > 1) {
1296  eventout += "\n Number of FrwdStripDigis collected:....... ";
1297  eventout += nStripFwd;
1298  }
1299  for(int i = 8; i < 19; ++i) {
1300  mehSiStripn[i]->Fill((float)nStripFwd);
1301  }
1302  }
1303 
1304  // get pixel information
1306  iEvent.getByToken(SiPxlSrc_Token_, pixelDigis);
1307  bool validpixelDigis = true;
1308  if (!pixelDigis.isValid()) {
1309  LogDebug(MsgLoggerCat)
1310  << "Unable to find pixelDigis in event!";
1311  validpixelDigis = false;
1312  }
1313  if (validpixelDigis) {
1314  int nPxlBrl = 0, nPxlFwd = 0;
1316  for (DPViter = pixelDigis->begin(); DPViter != pixelDigis->end();
1317  ++DPViter) {
1318  unsigned int id = DPViter->id;
1319  DetId detId(id);
1323 
1324  // get Barrel pixels
1325  if (detId.subdetId() == sdPxlBrl) {
1326 
1327  for (iter = begin; iter != end; ++iter) {
1328  ++nPxlBrl;
1329  if (tTopo->pxbLayer(id) == 1) {
1330  mehSiPixelADC[0]->Fill((*iter).adc());
1331  mehSiPixelRow[0]->Fill((*iter).row());
1332  mehSiPixelCol[0]->Fill((*iter).column());
1333  }
1334  if (tTopo->pxbLayer(id) == 2) {
1335  mehSiPixelADC[1]->Fill((*iter).adc());
1336  mehSiPixelRow[1]->Fill((*iter).row());
1337  mehSiPixelCol[1]->Fill((*iter).column());
1338  }
1339  if (tTopo->pxbLayer(id) == 3) {
1340  mehSiPixelADC[2]->Fill((*iter).adc());
1341  mehSiPixelRow[2]->Fill((*iter).row());
1342  mehSiPixelCol[2]->Fill((*iter).column());
1343  }
1344  }
1345  }
1346 
1347  // get Forward pixels
1348  if (detId.subdetId() == sdPxlFwd) {
1349 
1350  for (iter = begin; iter != end; ++iter) {
1351  ++nPxlFwd;
1352  if (tTopo->pxfDisk(id) == 1) {
1353  if (tTopo->pxfSide(id) == 1) {
1354  mehSiPixelADC[4]->Fill((*iter).adc());
1355  mehSiPixelRow[4]->Fill((*iter).row());
1356  mehSiPixelCol[4]->Fill((*iter).column());
1357  }
1358  if (tTopo->pxfSide(id) == 2) {
1359  mehSiPixelADC[3]->Fill((*iter).adc());
1360  mehSiPixelRow[3]->Fill((*iter).row());
1361  mehSiPixelCol[3]->Fill((*iter).column());
1362  }
1363  }
1364  if (tTopo->pxfDisk(id) == 2) {
1365  if (tTopo->pxfSide(id) == 1) {
1366 
1367  mehSiPixelADC[6]->Fill((*iter).adc());
1368  mehSiPixelRow[6]->Fill((*iter).row());
1369  mehSiPixelCol[6]->Fill((*iter).column());
1370  }
1371  if (tTopo->pxfSide(id) == 2) {
1372  mehSiPixelADC[5]->Fill((*iter).adc());
1373  mehSiPixelRow[5]->Fill((*iter).row());
1374  mehSiPixelCol[5]->Fill((*iter).column());
1375  }
1376  }
1377  }
1378  }
1379  }
1380 
1381  if (verbosity > 1) {
1382  eventout += "\n Number of BrlPixelDigis collected:........ ";
1383  eventout += nPxlBrl;
1384  }
1385  for(int i = 0; i < 3; ++i) {
1386  mehSiPixeln[i]->Fill((float)nPxlBrl);
1387  }
1388 
1389  if (verbosity > 1) {
1390  eventout += "\n Number of FrwdPixelDigis collected:....... ";
1391  eventout += nPxlFwd;
1392  }
1393 
1394  for(int i = 3; i < 7; ++i) {
1395  mehSiPixeln[i]->Fill((float)nPxlFwd);
1396  }
1397  }
1398 
1399  if (verbosity > 0)
1400  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1401 
1402  return;
1403 }
1404 
1406  const edm::EventSetup& iSetup)
1407 {
1408  std::string MsgLoggerCat = "GlobalDigisAnalyzer_fillMuon";
1409 
1410  TString eventout;
1411  if (verbosity > 0)
1412  eventout = "\nGathering info:";
1413 
1414  // get DT information
1416  iEvent.getByToken(MuDTSrc_Token_, dtDigis);
1417  bool validdtDigis = true;
1418  if (!dtDigis.isValid()) {
1419  LogDebug(MsgLoggerCat)
1420  << "Unable to find dtDigis in event!";
1421  validdtDigis = false;
1422  }
1423  if (validdtDigis) {
1424  int nDt0 = 0; int nDt1 = 0; int nDt2 = 0; int nDt3 = 0;
1425  int nDt = 0;
1427  for (detUnitIt = dtDigis->begin(); detUnitIt != dtDigis->end();
1428  ++detUnitIt) {
1429 
1430  const DTLayerId& id = (*detUnitIt).first;
1431  const DTDigiCollection::Range& range = (*detUnitIt).second;
1432  for (DTDigiCollection::const_iterator digiIt = range.first;
1433  digiIt != range.second;
1434  ++digiIt) {
1435 
1436  ++nDt;
1437 
1438  DTWireId wireId(id,(*digiIt).wire());
1439  if (wireId.station() == 1) {
1440  mehDtMuonLayer[0]->Fill(id.layer());
1441  mehDtMuonTime[0]->Fill((*digiIt).time());
1442  mehDtMuonTimevLayer[0]->Fill(id.layer(),(*digiIt).time());
1443  ++nDt0;
1444  }
1445  if (wireId.station() == 2) {
1446  mehDtMuonLayer[1]->Fill(id.layer());
1447  mehDtMuonTime[1]->Fill((*digiIt).time());
1448  mehDtMuonTimevLayer[1]->Fill(id.layer(),(*digiIt).time());
1449  ++nDt1;
1450  }
1451  if (wireId.station() == 3) {
1452  mehDtMuonLayer[2]->Fill(id.layer());
1453  mehDtMuonTime[2]->Fill((*digiIt).time());
1454  mehDtMuonTimevLayer[2]->Fill(id.layer(),(*digiIt).time());
1455  ++nDt2;
1456  }
1457  if (wireId.station() == 4) {
1458  mehDtMuonLayer[3]->Fill(id.layer());
1459  mehDtMuonTime[3]->Fill((*digiIt).time());
1460  mehDtMuonTimevLayer[3]->Fill(id.layer(),(*digiIt).time());
1461  ++nDt3;
1462  }
1463  }
1464  }
1465  mehDtMuonn[0]->Fill((float)nDt0);
1466  mehDtMuonn[1]->Fill((float)nDt1);
1467  mehDtMuonn[2]->Fill((float)nDt2);
1468  mehDtMuonn[3]->Fill((float)nDt3);
1469 
1470 
1471  if (verbosity > 1) {
1472  eventout += "\n Number of DtMuonDigis collected:.......... ";
1473  eventout += nDt;
1474  }
1475  }
1476 
1477  // get CSC Strip information
1479  iEvent.getByToken(MuCSCStripSrc_Token_, strips);
1480  bool validstrips = true;
1481  if (!strips.isValid()) {
1482  LogDebug(MsgLoggerCat)
1483  << "Unable to find muon strips in event!";
1484  validstrips = false;
1485  }
1486 
1487  if (validstrips) {
1488  int nStrips = 0;
1489  for (CSCStripDigiCollection::DigiRangeIterator j = strips->begin();
1490  j != strips->end();
1491  ++j) {
1492 
1493  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
1494  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
1495 
1496  for ( ; digiItr != last; ++digiItr) {
1497  ++nStrips;
1498 
1499  // average pedestals
1500  std::vector<int> adcCounts = digiItr->getADCCounts();
1501  theCSCStripPedestalSum += adcCounts[0];
1502  theCSCStripPedestalSum += adcCounts[1];
1504 
1505  // if there are enough pedestal statistics
1506  if (theCSCStripPedestalCount > 100) {
1508  if (adcCounts[5] > (pedestal + 100))
1509  mehCSCStripADC->Fill(adcCounts[4] - pedestal);
1510  }
1511  }
1512  }
1513 
1514  if (verbosity > 1) {
1515  eventout += "\n Number of CSCStripDigis collected:........ ";
1516  eventout += nStrips;
1517  }
1518  mehCSCStripn->Fill((float)nStrips);
1519  }
1520 
1521  // get CSC Wire information
1523  iEvent.getByToken(MuCSCWireSrc_Token_, wires);
1524  bool validwires = true;
1525  if (!wires.isValid()) {
1526  LogDebug(MsgLoggerCat)
1527  << "Unable to find muon wires in event!";
1528  validwires = false;
1529  }
1530 
1531  if (validwires) {
1532  int nWires = 0;
1533  for (CSCWireDigiCollection::DigiRangeIterator j = wires->begin();
1534  j != wires->end();
1535  ++j) {
1536 
1537  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
1538  std::vector<CSCWireDigi>::const_iterator endDigi = (*j).second.second;
1539 
1540  for ( ; digiItr != endDigi; ++digiItr) {
1541  ++nWires;
1542  mehCSCWireTime->Fill(digiItr->getTimeBin());
1543  }
1544  }
1545 
1546  if (verbosity > 1) {
1547  eventout += "\n Number of CSCWireDigis collected:......... ";
1548  eventout += nWires;
1549  }
1550  mehCSCWiren->Fill((float)nWires);
1551  }
1552 
1553  // get RPC information
1554  // Get the RPC Geometry
1556  iSetup.get<MuonGeometryRecord>().get(rpcGeom);
1557  if (!rpcGeom.isValid()) {
1558  edm::LogWarning(MsgLoggerCat)
1559  << "Unable to find RPCGeometryRecord in event!";
1560  return;
1561  }
1562 
1564  iEvent.getByToken(RPCSimHit_Token_, rpcsimHit);
1565  bool validrpcsim = true;
1566  if (!rpcsimHit.isValid()) {
1567  LogDebug(MsgLoggerCat)
1568  << "Unable to find rpcsimHit in event!";
1569  validrpcsim = false;
1570  }
1571 
1573  iEvent.getByToken(MuRPCSrc_Token_, rpcDigis);
1574  bool validrpcdigi = true;
1575  if (!rpcDigis.isValid()) {
1576  LogDebug(MsgLoggerCat)
1577  << "Unable to find rpcDigis in event!";
1578  validrpcdigi = false;
1579  }
1580 
1581  // ONLY UNTIL PROBLEM WITH RPC DIGIS IS FIGURED OUT
1582  validrpcdigi = false;
1583 
1584  // Loop on simhits
1585  edm::PSimHitContainer::const_iterator rpcsimIt;
1586  std::map<RPCDetId, std::vector<double> > allsims;
1587 
1588  if (validrpcsim) {
1589  for (rpcsimIt = rpcsimHit->begin(); rpcsimIt != rpcsimHit->end();
1590  rpcsimIt++) {
1591  RPCDetId Rsid = (RPCDetId)(*rpcsimIt).detUnitId();
1592  int ptype = rpcsimIt->particleType();
1593 
1594  if (ptype == 13 || ptype == -13) {
1595  std::vector<double> buff;
1596  if (allsims.find(Rsid) != allsims.end() ){
1597  buff= allsims[Rsid];
1598  }
1599  buff.push_back(rpcsimIt->localPosition().x());
1600  allsims[Rsid]=buff;
1601  }
1602  }
1603  }
1604 
1605  // CRASH HAPPENS SOMEWHERE HERE IN FOR DECLARATION
1606  // WHAT IS WRONG WITH rpcDigis?????
1607  if (validrpcdigi) {
1608  int nRPC = 0;
1610  for (rpcdetUnitIt = rpcDigis->begin(); rpcdetUnitIt != rpcDigis->end();
1611  ++rpcdetUnitIt) {
1612 
1613  const RPCDetId Rsid = (*rpcdetUnitIt).first;
1614  const RPCRoll* roll =
1615  dynamic_cast<const RPCRoll* >( rpcGeom->roll(Rsid));
1616  const RPCDigiCollection::Range& range = (*rpcdetUnitIt).second;
1617 
1618  std::vector<double> sims;
1619  if (allsims.find(Rsid) != allsims.end() ){
1620  sims = allsims[Rsid];
1621  }
1622 
1623  int ndigi = 0;
1624  for (RPCDigiCollection::const_iterator rpcdigiIt = range.first;
1625  rpcdigiIt != range.second;
1626  ++rpcdigiIt) {
1627 
1628  ++ndigi;
1629  ++nRPC;
1630  }
1631 
1632  if (sims.size() == 1 && ndigi == 1){
1633  double dis = roll->centreOfStrip(range.first->strip()).x()-sims[0];
1634 
1635  if (Rsid.region() == 0 ){
1636  if (Rsid.ring() == -2)
1637  mehRPCRes[0]->Fill((float)dis);
1638  else if (Rsid.ring() == -1)
1639  mehRPCRes[1]->Fill((float)dis);
1640  else if (Rsid.ring() == 0)
1641  mehRPCRes[2]->Fill((float)dis);
1642  else if (Rsid.ring() == 1)
1643  mehRPCRes[3]->Fill((float)dis);
1644  else if (Rsid.ring() == 2)
1645  mehRPCRes[4]->Fill((float)dis);
1646  }
1647  }
1648  }
1649 
1650  if (verbosity > 1) {
1651  eventout += "\n Number of RPCDigis collected:.............. ";
1652  eventout += nRPC;
1653  }
1654  mehRPCMuonn->Fill(float(nRPC));
1655  }
1656 
1657  if (verbosity > 0)
1658  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1659 
1660  return;
1661 }
#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
void getAllProvenance(std::vector< Provenance const * > &provenances) const
Definition: Event.cc:88
int i
Definition: DBlmapReader.cc:9
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:157
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
MonitorElement * mehEcaln[2]
unsigned int pxfDisk(const DetId &id) const
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
void fillECal(const edm::Event &, const edm::EventSetup &)
bool isBarrel(GeomDetEnumerators::SubDetector m)
static const int sdSiTID
MonitorElement * mehEScaln
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_
double pedestal(int fCapId) const
get pedestal for capid=0..3
MonitorElement * mehSiStripADC[19]
int size() const
Definition: ESDataFrame.h:23
MonitorElement * mehDtMuonTimevLayer[4]
int ii
Definition: cuy.py:588
MonitorElement * mehSiStripn[19]
int gainId() const
get the gainId (2 bits)
MonitorElement * mehCSCWireTime
int size() const
Definition: EcalDataFrame.h:26
edm::EDGetTokenT< EEDigiCollection > ECalEESrc_Token_
void Fill(long long x)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
MonitorElement * mehEcalMaxPos[2]
edm::EDGetTokenT< CrossingFrame< PCaloHit > > ESHits_Token_
edm::EDGetTokenT< edm::PSimHitContainer > RPCSimHit_Token_
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)
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const
Definition: HcalCoderDb.cc:44
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
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
int j
Definition: DBlmapReader.cc:9
std::map< uint32_t, float, std::less< uint32_t > > MapType
static const int sdSiTOB
float gain6Over1() const
#define end
Definition: vmac.h:37
edm::EDGetTokenT< CSCWireDigiCollection > MuCSCWireSrc_Token_
bool isValid() const
Definition: HandleBase.h:75
std::map< int, double, std::less< int > > ECalgainConv_
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
edm::EDGetTokenT< edm::SortedCollection< HODataFrame > > HODigi_Token_
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:365
void fillHCal(const edm::Event &, const edm::EventSetup &)
key_type id() const
Definition: EEDataFrame.h:28
MonitorElement * mehRPCMuonn
MonitorElement * mehEcalSHE[2]
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > SiStripSrc_Token_
unsigned int pxbLayer(const DetId &id) const
Definition: DetId.h:18
void fillMuon(const edm::Event &, const edm::EventSetup &)
MonitorElement * mehEcalAEE[2]
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_
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
static const int sdHcalFwd
float gain12Over6() const
std::vector< DTDigi >::const_iterator const_iterator
static const int sdHcalBrl
MonitorElement * mehSiPixelCol[7]
MonitorElement * mehHcaln[4]
std::string const & label() const
Definition: InputTag.h:43
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:30
MonitorElement * mehHcalSHE[4]
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:350
unsigned int RunNumber_t
static const int sdPxlFwd
volatile std::atomic< bool > shutdown_flag false
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
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:108
unsigned int tecWheel(const DetId &id) const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void fillTrk(const edm::Event &, const edm::EventSetup &)
std::string const & instance() const
Definition: InputTag.h:44
edm::EDGetTokenT< DTDigiCollection > MuDTSrc_Token_
static const int sdHcalEC
static const int MAXSAMPLES
Definition: EcalDataFrame.h:48
MonitorElement * mehSiPixelADC[7]
unsigned int tobLayer(const DetId &id) const
Definition: Run.h:41
int adc() const
get the ADC sample (12 bits)
MonitorElement * mehDtMuonn[4]
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
virtual void analyze(const edm::Event &, const edm::EventSetup &)