CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GlobalRecHitsAnalyzer.cc
Go to the documentation of this file.
1 
10 using namespace std;
15 
17  fName(""), verbosity(0), frequency(0), label(""), getAllProvenances(false),
18  printProvenanceInfo(false), count(0)
19 {
20  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_GlobalRecHitsAnalyzer";
21 
22  // get information from parameter set
23  fName = iPSet.getUntrackedParameter<std::string>("Name");
24  verbosity = iPSet.getUntrackedParameter<int>("Verbosity");
25  frequency = iPSet.getUntrackedParameter<int>("Frequency");
26  edm::ParameterSet m_Prov =
27  iPSet.getParameter<edm::ParameterSet>("ProvenanceLookup");
29  m_Prov.getUntrackedParameter<bool>("GetAllProvenances");
31  m_Prov.getUntrackedParameter<bool>("PrintProvenanceInfo");
32  hitsProducer = iPSet.getParameter<std::string>("hitsProducer");
33 
34  //get Labels to use to extract information
35  ECalEBSrc_ = iPSet.getParameter<edm::InputTag>("ECalEBSrc");
36  ECalUncalEBSrc_ = iPSet.getParameter<edm::InputTag>("ECalUncalEBSrc");
37  ECalEESrc_ = iPSet.getParameter<edm::InputTag>("ECalEESrc");
38  ECalUncalEESrc_ = iPSet.getParameter<edm::InputTag>("ECalUncalEESrc");
39  ECalESSrc_ = iPSet.getParameter<edm::InputTag>("ECalESSrc");
40  HCalSrc_ = iPSet.getParameter<edm::InputTag>("HCalSrc");
41  SiStripSrc_ = iPSet.getParameter<edm::InputTag>("SiStripSrc");
42  SiPxlSrc_ = iPSet.getParameter<edm::InputTag>("SiPxlSrc");
43  MuDTSrc_ = iPSet.getParameter<edm::InputTag>("MuDTSrc");
44  MuDTSimSrc_ = iPSet.getParameter<edm::InputTag>("MuDTSimSrc");
45  MuCSCSrc_ = iPSet.getParameter<edm::InputTag>("MuCSCSrc");
46  MuRPCSrc_ = iPSet.getParameter<edm::InputTag>("MuRPCSrc");
47  MuRPCSimSrc_ = iPSet.getParameter<edm::InputTag>("MuRPCSimSrc");
48 
49  conf_ = iPSet;
50 
51  // use value of first digit to determine default output level (inclusive)
52  // 0 is none, 1 is basic, 2 is fill output, 3 is gather output
53  verbosity %= 10;
54 
55  // create persistent object
56  // produces<PGlobalRecHit>(label);
57 
58  // print out Parameter Set information being used
59  if (verbosity >= 0) {
60  edm::LogInfo(MsgLoggerCat)
61  << "\n===============================\n"
62  << "Initialized as EDProducer with parameter values:\n"
63  << " Name = " << fName << "\n"
64  << " Verbosity = " << verbosity << "\n"
65  << " Frequency = " << frequency << "\n"
66  << " GetProv = " << getAllProvenances << "\n"
67  << " PrintProv = " << printProvenanceInfo << "\n"
68  << " ECalEBSrc = " << ECalEBSrc_.label()
69  << ":" << ECalEBSrc_.instance() << "\n"
70  << " ECalUncalEBSrc = " << ECalUncalEBSrc_.label()
71  << ":" << ECalUncalEBSrc_.instance() << "\n"
72  << " ECalEESrc = " << ECalEESrc_.label()
73  << ":" << ECalUncalEESrc_.instance() << "\n"
74  << " ECalUncalEESrc = " << ECalUncalEESrc_.label()
75  << ":" << ECalEESrc_.instance() << "\n"
76  << " ECalESSrc = " << ECalESSrc_.label()
77  << ":" << ECalESSrc_.instance() << "\n"
78  << " HCalSrc = " << HCalSrc_.label()
79  << ":" << HCalSrc_.instance() << "\n"
80  << " SiStripSrc = " << SiStripSrc_.label()
81  << ":" << SiStripSrc_.instance() << "\n"
82  << " SiPixelSrc = " << SiPxlSrc_.label()
83  << ":" << SiPxlSrc_.instance() << "\n"
84  << " MuDTSrc = " << MuDTSrc_.label()
85  << ":" << MuDTSrc_.instance() << "\n"
86  << " MuDTSimSrc = " << MuDTSimSrc_.label()
87  << ":" << MuDTSimSrc_.instance() << "\n"
88  << " MuCSCSrc = " << MuCSCSrc_.label()
89  << ":" << MuCSCSrc_.instance() << "\n"
90  << " MuRPCSrc = " << MuRPCSrc_.label()
91  << ":" << MuRPCSrc_.instance() << "\n"
92  << " MuRPCSimSrc = " << MuRPCSimSrc_.label()
93  << ":" << MuRPCSimSrc_.instance() << "\n"
94  << "===============================\n";
95  }
96  //Put in analyzer stuff here....
97 
98  dbe = 0;
100  if (dbe) {
101  if (verbosity > 0 ) {
102  dbe->setVerbose(1);
103  } else {
104  dbe->setVerbose(0);
105  }
106  }
107  if (dbe) {
108  if (verbosity > 0 ) dbe->showDirStructure();
109  }
110 
111  //monitor elements
112 
113  //Si Strip
114  if(dbe) {
115  string SiStripString[19] = {"TECW1", "TECW2", "TECW3", "TECW4", "TECW5",
116  "TECW6", "TECW7", "TECW8", "TIBL1", "TIBL2",
117  "TIBL3", "TIBL4", "TIDW1", "TIDW2", "TIDW3",
118  "TOBL1", "TOBL2", "TOBL3", "TOBL4"};
119  for(int i = 0; i<19; ++i) {
120  mehSiStripn[i]=0;
121  mehSiStripResX[i]=0;
122  mehSiStripResY[i]=0;
123  }
124  string hcharname, hchartitle;
125  dbe->setCurrentFolder("GlobalRecHitsV/SiStrips");
126  for(int amend = 0; amend < 19; ++amend) {
127  hcharname = "hSiStripn_"+SiStripString[amend];
128  hchartitle= SiStripString[amend]+" rechits";
129  mehSiStripn[amend] = dbe->book1D(hcharname,hchartitle,200,0.,200.);
130  mehSiStripn[amend]->setAxisTitle("Number of hits in "+
131  SiStripString[amend],1);
132  mehSiStripn[amend]->setAxisTitle("Count",2);
133  hcharname = "hSiStripResX_"+SiStripString[amend];
134  hchartitle= SiStripString[amend]+" rechit x resolution";
135  mehSiStripResX[amend] = dbe->book1D(hcharname,hchartitle,200,-0.02,.02);
136  mehSiStripResX[amend]->setAxisTitle("X-resolution in "
137  +SiStripString[amend],1);
138  mehSiStripResX[amend]->setAxisTitle("Count",2);
139  hcharname = "hSiStripResY_"+SiStripString[amend];
140  hchartitle= SiStripString[amend]+" rechit y resolution";
141  mehSiStripResY[amend] = dbe->book1D(hcharname,hchartitle,200,-0.02,.02);
142  mehSiStripResY[amend]->setAxisTitle("Y-resolution in "+
143  SiStripString[amend],1);
144  mehSiStripResY[amend]->setAxisTitle("Count",2);
145  }
146 
147 
148  //HCal
149  //string hcharname, hchartitle;
150  string HCalString[4]={"HB", "HE", "HF", "HO"};
151  float HCalnUpper[4]={3000.,3000.,3000.,3000.};
152  float HCalnLower[4]={0.,0.,0.,0.};
153  for(int j =0; j <4; ++j) {
154  mehHcaln[j]=0;
155  mehHcalRes[j]=0;
156  }
157 
158  dbe->setCurrentFolder("GlobalRecHitsV/HCals");
159  for(int amend = 0; amend < 4; ++amend) {
160  hcharname = "hHcaln_"+HCalString[amend];
161  hchartitle= HCalString[amend]+" rechits";
162  mehHcaln[amend] = dbe->book1D(hcharname,hchartitle, 1000, HCalnLower[amend],
163  HCalnUpper[amend]);
164  mehHcaln[amend]->setAxisTitle("Number of RecHits",1);
165  mehHcaln[amend]->setAxisTitle("Count",2);
166  hcharname = "hHcalRes_"+HCalString[amend];
167  hchartitle= HCalString[amend]+" rechit resolution";
168  mehHcalRes[amend] = dbe->book1D(hcharname,hchartitle, 25, -2., 2.);
169  mehHcalRes[amend]->setAxisTitle("RecHit E - SimHit E",1);
170  mehHcalRes[amend]->setAxisTitle("Count",2);
171  }
172 
173 
174  //Ecal
175  string ECalString[3] = {"EB","EE", "ES"};
176  int ECalnBins[3] = {1000,3000,150};
177  float ECalnUpper[3] = {20000., 62000., 3000.};
178  float ECalnLower[3] = {0., 0., 0.};
179  int ECalResBins[3] = {200,200,200};
180  float ECalResUpper[3] = {1., 0.3, .0002};
181  float ECalResLower[3] = {-1., -0.3, -.0002};
182  for(int i =0; i<3; ++i) {
183  mehEcaln[i]=0;
184  mehEcalRes[i]=0;
185  }
186  dbe->setCurrentFolder("GlobalRecHitsV/ECals");
187 
188  for(int amend = 0; amend < 3; ++amend) {
189  hcharname = "hEcaln_"+ECalString[amend];
190  hchartitle= ECalString[amend]+" rechits";
191  mehEcaln[amend] = dbe->book1D(hcharname,hchartitle, ECalnBins[amend],
192  ECalnLower[amend], ECalnUpper[amend]);
193  mehEcaln[amend]->setAxisTitle("Number of RecHits",1);
194  mehEcaln[amend]->setAxisTitle("Count",2);
195  hcharname = "hEcalRes_"+ECalString[amend];
196  hchartitle= ECalString[amend]+" rechit resolution";
197  mehEcalRes[amend] = dbe->book1D(hcharname,hchartitle,ECalResBins[amend],
198  ECalResLower[amend],
199  ECalResUpper[amend]);
200  mehEcalRes[amend]->setAxisTitle("RecHit E - SimHit E",1);
201  mehEcalRes[amend]->setAxisTitle("Count",2);
202  }
203 
204  //Si Pixels
205  string SiPixelString[7] = {"BRL1", "BRL2", "BRL3", "FWD1n", "FWD1p",
206  "FWD2n", "FWD2p"};
207  for(int j =0; j<7; ++j) {
208  mehSiPixeln[j]=0;
209  mehSiPixelResX[j]=0;
210  mehSiPixelResY[j]=0;
211  }
212 
213  dbe->setCurrentFolder("GlobalRecHitsV/SiPixels");
214  for(int amend = 0; amend < 7; ++amend) {
215  hcharname = "hSiPixeln_"+SiPixelString[amend];
216  hchartitle= SiPixelString[amend]+" rechits";
217  mehSiPixeln[amend] = dbe->book1D(hcharname,hchartitle,200,0.,200.);
218  mehSiPixeln[amend]->setAxisTitle("Number of hits in "+
219  SiPixelString[amend],1);
220  mehSiPixeln[amend]->setAxisTitle("Count",2);
221  hcharname = "hSiPixelResX_"+SiPixelString[amend];
222  hchartitle= SiPixelString[amend]+" rechit x resolution";
223  mehSiPixelResX[amend] = dbe->book1D(hcharname,hchartitle,200,-0.02,.02);
224  mehSiPixelResX[amend]->setAxisTitle("X-resolution in "+
225  SiPixelString[amend],1);
226  mehSiPixelResX[amend]->setAxisTitle("Count",2);
227  hcharname = "hSiPixelResY_"+SiPixelString[amend];
228  hchartitle= SiPixelString[amend]+" rechit y resolution";
229 
230  mehSiPixelResY[amend] = dbe->book1D(hcharname,hchartitle,200,-0.02,.02);
231  mehSiPixelResY[amend]->setAxisTitle("Y-resolution in "+
232  SiPixelString[amend],1);
233  mehSiPixelResY[amend]->setAxisTitle("Count",2);
234  }
235 
236  //Muons
237  dbe->setCurrentFolder("GlobalRecHitsV/Muons");
238 
239  mehDtMuonn = 0;
240  mehCSCn = 0;
241  mehRPCn = 0;
242 
243  string n_List[3] = {"hDtMuonn", "hCSCn", "hRPCn"};
244  string hist_string[3] = {"Dt", "CSC", "RPC"};
245 
246  for(int amend=0; amend<3; ++amend) {
247  hchartitle = hist_string[amend]+" rechits";
248  if(amend==0) {
249  mehDtMuonn=dbe->book1D(n_List[amend],hchartitle,50, 0., 500.);
250  mehDtMuonn->setAxisTitle("Number of Rechits",1);
251  mehDtMuonn->setAxisTitle("Count",2);
252  }
253  if(amend==1) {
254  mehCSCn=dbe->book1D(n_List[amend],hchartitle,50, 0., 500.);
255  mehCSCn->setAxisTitle("Number of Rechits",1);
256  mehCSCn->setAxisTitle("Count",2);
257  }
258  if(amend==2){
259  mehRPCn=dbe->book1D(n_List[amend],hchartitle,50, 0., 500.);
260  mehRPCn->setAxisTitle("Number of Rechits",1);
261  mehRPCn->setAxisTitle("Count",2);
262  }
263  }
264 
265  mehDtMuonRes=0;
266  mehCSCResRDPhi=0;
267  mehRPCResX=0;
268 
269  hcharname = "hDtMuonRes";
270  hchartitle = "DT wire distance resolution";
271  mehDtMuonRes = dbe->book1D(hcharname, hchartitle, 200, -0.2, 0.2);
272  hcharname = "CSCResRDPhi";
273  hchartitle = "CSC perp*dphi resolution";
274  mehCSCResRDPhi = dbe->book1D(hcharname, hchartitle, 200, -0.2, 0.2);
275  hcharname = "hRPCResX";
276  hchartitle = "RPC rechits x resolution";
277  mehRPCResX = dbe->book1D(hcharname, hchartitle, 50, -5., 5.);
278  }
279 }
280 
282 
284 {
285  return;
286 }
287 
289 {
290  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_endJob";
291  if (verbosity >= 0)
292  edm::LogInfo(MsgLoggerCat)
293  << "Terminating having processed " << count << " events.";
294  return;
295 }
296 
298  const edm::EventSetup& iSetup)
299 {
300  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_analyze";
301 
302  // keep track of number of events processed
303  ++count;
304 
305  // get event id information
306  int nrun = iEvent.id().run();
307  int nevt = iEvent.id().event();
308 
309  if (verbosity > 0) {
310  edm::LogInfo(MsgLoggerCat)
311  << "Processing run " << nrun << ", event " << nevt
312  << " (" << count << " events total)";
313  } else if (verbosity == 0) {
314  if (nevt%frequency == 0 || nevt == 1) {
315  edm::LogInfo(MsgLoggerCat)
316  << "Processing run " << nrun << ", event " << nevt
317  << " (" << count << " events total)";
318  }
319  }
320 
321  // look at information available in the event
322  if (getAllProvenances) {
323 
324  std::vector<const edm::Provenance*> AllProv;
325  iEvent.getAllProvenance(AllProv);
326 
327  if (verbosity >= 0)
328  edm::LogInfo(MsgLoggerCat)
329  << "Number of Provenances = " << AllProv.size();
330 
331  if (printProvenanceInfo && (verbosity >= 0)) {
332  TString eventout("\nProvenance info:\n");
333 
334  for (unsigned int i = 0; i < AllProv.size(); ++i) {
335  eventout += "\n ******************************";
336  eventout += "\n Module : ";
337  eventout += AllProv[i]->moduleLabel();
338  eventout += "\n ProductID : ";
339  eventout += AllProv[i]->productID().id();
340  eventout += "\n ClassName : ";
341  eventout += AllProv[i]->className();
342  eventout += "\n InstanceName : ";
343  eventout += AllProv[i]->productInstanceName();
344  eventout += "\n BranchName : ";
345  eventout += AllProv[i]->branchName();
346  }
347  eventout += "\n ******************************\n";
348  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
349  printProvenanceInfo = false;
350  }
351  getAllProvenances = false;
352  }
353 
354  // call fill functions
355  // gather Ecal information from event
356  fillECal(iEvent, iSetup);
357  // gather Hcal information from event
358  fillHCal(iEvent, iSetup);
359  // gather Track information from event
360  fillTrk(iEvent, iSetup);
361  // gather Muon information from event
362  fillMuon(iEvent, iSetup);
363 
364  if (verbosity > 0)
365  edm::LogInfo (MsgLoggerCat)
366  << "Done gathering data from event.";
367 
368  return;
369 }
370 
372  const edm::EventSetup& iSetup)
373 {
374  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_fillECal";
375 
376  TString eventout;
377  if (verbosity > 0)
378  eventout = "\nGathering info:";
379 
380  // extract crossing frame from event
381  edm::Handle<CrossingFrame<PCaloHit> > crossingFrame;
382 
384  //extract EB information
387  iEvent.getByLabel(ECalUncalEBSrc_, EcalUncalibRecHitEB);
388  bool validUncalibRecHitEB = true;
389  if (!EcalUncalibRecHitEB.isValid()) {
390  LogDebug(MsgLoggerCat)
391  << "Unable to find EcalUncalRecHitEB in event!";
392  validUncalibRecHitEB = false;
393  }
394 
395  edm::Handle<EBRecHitCollection> EcalRecHitEB;
396  iEvent.getByLabel(ECalEBSrc_, EcalRecHitEB);
397  bool validRecHitEB = true;
398  if (!EcalRecHitEB.isValid()) {
399  LogDebug(MsgLoggerCat)
400  << "Unable to find EcalRecHitEB in event!";
401  validRecHitEB = false;
402  }
403 
404  // loop over simhits
405  const std::string barrelHitsName(hitsProducer+"EcalHitsEB");
406  iEvent.getByLabel("mix",barrelHitsName,crossingFrame);
407  bool validXFrame = true;
408  if (!crossingFrame.isValid()) {
409  LogDebug(MsgLoggerCat)
410  << "Unable to find cal barrel crossingFrame in event!";
411  validXFrame = false;
412  }
413 
414  MapType ebSimMap;
415  if (validXFrame) {
416  std::auto_ptr<MixCollection<PCaloHit> >
417  barrelHits(new MixCollection<PCaloHit>(crossingFrame.product()));
418 
419  // keep track of sum of simhit energy in each crystal
421  = barrelHits->begin();
422  hitItr != barrelHits->end();
423  ++hitItr) {
424 
425  EBDetId ebid = EBDetId(hitItr->id());
426 
427  uint32_t crystid = ebid.rawId();
428  ebSimMap[crystid] += hitItr->energy();
429  }
430  }
431 
432  int nEBRecHits = 0;
433  // loop over RecHits
434  if (validUncalibRecHitEB && validRecHitEB) {
435  const EBUncalibratedRecHitCollection *EBUncalibRecHit =
436  EcalUncalibRecHitEB.product();
437  const EBRecHitCollection *EBRecHit = EcalRecHitEB.product();
438 
440  EBUncalibRecHit->begin();
441  uncalibRecHit != EBUncalibRecHit->end();
442  ++uncalibRecHit) {
443 
444  EBDetId EBid = EBDetId(uncalibRecHit->id());
445 
446  EcalRecHitCollection::const_iterator myRecHit = EBRecHit->find(EBid);
447 
448  if (myRecHit != EBRecHit->end()) {
449  ++nEBRecHits;
450  mehEcalRes[1]->Fill(myRecHit->energy()-ebSimMap[EBid.rawId()]);
451  }
452  }
453 
454  if (verbosity > 1) {
455  eventout += "\n Number of EBRecHits collected:............ ";
456  eventout += nEBRecHits;
457  }
458  mehEcaln[1]->Fill((float)nEBRecHits);
459  }
460 
462  //extract EE information
465  iEvent.getByLabel(ECalUncalEESrc_, EcalUncalibRecHitEE);
466  bool validuncalibRecHitEE = true;
467  if (!EcalUncalibRecHitEE.isValid()) {
468  LogDebug(MsgLoggerCat)
469  << "Unable to find EcalUncalRecHitEE in event!";
470  validuncalibRecHitEE = false;
471  }
472 
473  edm::Handle<EERecHitCollection> EcalRecHitEE;
474  iEvent.getByLabel(ECalEESrc_, EcalRecHitEE);
475  bool validRecHitEE = true;
476  if (!EcalRecHitEE.isValid()) {
477  LogDebug(MsgLoggerCat)
478  << "Unable to find EcalRecHitEE in event!";
479  validRecHitEE = false;
480  }
481 
482  // loop over simhits
483  const std::string endcapHitsName(hitsProducer+"EcalHitsEE");
484  iEvent.getByLabel("mix",endcapHitsName,crossingFrame);
485  validXFrame = true;
486  if (!crossingFrame.isValid()) {
487  LogDebug(MsgLoggerCat)
488  << "Unable to find cal endcap crossingFrame in event!";
489  validXFrame = false;
490  }
491 
492  MapType eeSimMap;
493  if (validXFrame) {
494  std::auto_ptr<MixCollection<PCaloHit> >
495  endcapHits(new MixCollection<PCaloHit>(crossingFrame.product()));
496 
497  // keep track of sum of simhit energy in each crystal
499  = endcapHits->begin();
500  hitItr != endcapHits->end();
501  ++hitItr) {
502 
503  EEDetId eeid = EEDetId(hitItr->id());
504 
505  uint32_t crystid = eeid.rawId();
506  eeSimMap[crystid] += hitItr->energy();
507  }
508  }
509 
510  int nEERecHits = 0;
511  if (validuncalibRecHitEE && validRecHitEE) {
512  // loop over RecHits
513  const EEUncalibratedRecHitCollection *EEUncalibRecHit =
514  EcalUncalibRecHitEE.product();
515  const EERecHitCollection *EERecHit = EcalRecHitEE.product();
516 
518  EEUncalibRecHit->begin();
519  uncalibRecHit != EEUncalibRecHit->end();
520  ++uncalibRecHit) {
521 
522  EEDetId EEid = EEDetId(uncalibRecHit->id());
523 
524  EcalRecHitCollection::const_iterator myRecHit = EERecHit->find(EEid);
525 
526  if (myRecHit != EERecHit->end()) {
527  ++nEERecHits;
528  mehEcalRes[0]->Fill(myRecHit->energy()-eeSimMap[EEid.rawId()]);
529  }
530  }
531 
532  if (verbosity > 1) {
533  eventout += "\n Number of EERecHits collected:............ ";
534  eventout += nEERecHits;
535  }
536  mehEcaln[0]->Fill((float)nEERecHits);
537  }
538 
540  //extract ES information
542  edm::Handle<ESRecHitCollection> EcalRecHitES;
543  iEvent.getByLabel(ECalESSrc_, EcalRecHitES);
544  bool validRecHitES = true;
545  if (!EcalRecHitES.isValid()) {
546  LogDebug(MsgLoggerCat)
547  << "Unable to find EcalRecHitES in event!";
548  validRecHitES = false;
549  }
550 
551  // loop over simhits
552  const std::string preshowerHitsName(hitsProducer+"EcalHitsES");
553  iEvent.getByLabel("mix",preshowerHitsName,crossingFrame);
554  validXFrame = true;
555  if (!crossingFrame.isValid()) {
556  LogDebug(MsgLoggerCat)
557  << "Unable to find cal preshower crossingFrame in event!";
558  validXFrame = false;
559  }
560 
561  MapType esSimMap;
562  if (validXFrame) {
563  std::auto_ptr<MixCollection<PCaloHit> >
564  preshowerHits(new MixCollection<PCaloHit>(crossingFrame.product()));
565 
566  // keep track of sum of simhit energy in each crystal
568  = preshowerHits->begin();
569  hitItr != preshowerHits->end();
570  ++hitItr) {
571 
572  ESDetId esid = ESDetId(hitItr->id());
573 
574  uint32_t crystid = esid.rawId();
575  esSimMap[crystid] += hitItr->energy();
576  }
577  }
578 
579  int nESRecHits = 0;
580  if (validRecHitES) {
581  // loop over RecHits
582  const ESRecHitCollection *ESRecHit = EcalRecHitES.product();
584  ESRecHit->begin();
585  recHit != ESRecHit->end();
586  ++recHit) {
587 
588  ESDetId ESid = ESDetId(recHit->id());
589 
590  ++nESRecHits;
591  mehEcalRes[2]->Fill(recHit->energy()-esSimMap[ESid.rawId()]);
592  }
593 
594  if (verbosity > 1) {
595  eventout += "\n Number of ESRecHits collected:............ ";
596  eventout += nESRecHits;
597  }
598  mehEcaln[2]->Fill(float(nESRecHits));
599  }
600 
601  if (verbosity > 0)
602  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
603 
604  return;
605 }
606 
608  const edm::EventSetup& iSetup)
609 {
610  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_fillHCal";
611 
612  TString eventout;
613  if (verbosity > 0)
614  eventout = "\nGathering info:";
615 
616  // get geometry
618  iSetup.get<CaloGeometryRecord>().get(geometry);
619  if (!geometry.isValid()) {
620  edm::LogWarning(MsgLoggerCat)
621  << "Unable to find CaloGeometry in event!";
622  return;
623  }
624 
625  // iterator to access containers
626  edm::PCaloHitContainer::const_iterator itHit;
627 
629  // extract simhit info
632  iEvent.getByLabel(HCalSrc_,hcalHits);
633  bool validhcalHits = true;
634  if (!hcalHits.isValid()) {
635  LogDebug(MsgLoggerCat)
636  << "Unable to find hcalHits in event!";
637  validhcalHits = false;
638  }
639 
640  MapType fHBEnergySimHits;
641  MapType fHEEnergySimHits;
642  MapType fHOEnergySimHits;
643  MapType fHFEnergySimHits;
644  if (validhcalHits) {
645  const edm::PCaloHitContainer *simhitResult = hcalHits.product();
646 
647  for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin();
648  simhits != simhitResult->end();
649  ++simhits) {
650 
651  HcalDetId detId(simhits->id());
652  uint32_t cellid = detId.rawId();
653 
654  if (detId.subdet() == sdHcalBrl){
655  fHBEnergySimHits[cellid] += simhits->energy();
656  }
657  if (detId.subdet() == sdHcalEC){
658  fHEEnergySimHits[cellid] += simhits->energy();
659  }
660  if (detId.subdet() == sdHcalOut){
661  fHOEnergySimHits[cellid] += simhits->energy();
662  }
663  if (detId.subdet() == sdHcalFwd){
664  fHFEnergySimHits[cellid] += simhits->energy();
665  }
666  }
667  }
668 
669  // max values to be used (HO is found in HB)
670  Double_t maxHBEnergy = 0.;
671  Double_t maxHEEnergy = 0.;
672  Double_t maxHFEnergy = 0.;
673 
674  Double_t maxHBPhi = -1000.;
675  Double_t maxHEPhi = -1000.;
676  Double_t maxHOPhi = -1000.;
677  Double_t maxHFPhi = -1000.;
678 
679 
680  Double_t PI = 3.141592653589;
681 
683  // get HBHE information
685  std::vector<edm::Handle<HBHERecHitCollection> > hbhe;
686  iEvent.getManyByType(hbhe);
687  bool validHBHE = true;
688  if (!hbhe[0].isValid()) {
689  LogDebug(MsgLoggerCat)
690  << "Unable to find any HBHERecHitCollections in event!";
691  validHBHE = false;
692  }
693 
694  if (validHBHE) {
695  std::vector<edm::Handle<HBHERecHitCollection> >::iterator ihbhe;
696 
697  int iHB = 0;
698  int iHE = 0;
699  for (ihbhe = hbhe.begin(); ihbhe != hbhe.end(); ++ihbhe) {
700 
701  // find max values
702  for (HBHERecHitCollection::const_iterator jhbhe = (*ihbhe)->begin();
703  jhbhe != (*ihbhe)->end(); ++jhbhe) {
704 
705  HcalDetId cell(jhbhe->id());
706 
707  if (cell.subdet() == sdHcalBrl) {
708 
709  const CaloCellGeometry* cellGeometry =
710  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
711  double fPhi = cellGeometry->getPosition().phi () ;
712  if ( (jhbhe->energy()) > maxHBEnergy ) {
713  maxHBEnergy = jhbhe->energy();
714  maxHBPhi = fPhi;
715  maxHOPhi = maxHBPhi;
716  }
717  }
718 
719  if (cell.subdet() == sdHcalEC) {
720 
721  const CaloCellGeometry* cellGeometry =
722  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
723  double fPhi = cellGeometry->getPosition().phi () ;
724  if ( (jhbhe->energy()) > maxHEEnergy ) {
725  maxHEEnergy = jhbhe->energy();
726  maxHEPhi = fPhi;
727  }
728  }
729  } // end find max values
730 
731  for (HBHERecHitCollection::const_iterator jhbhe = (*ihbhe)->begin();
732  jhbhe != (*ihbhe)->end(); ++jhbhe) {
733 
734  HcalDetId cell(jhbhe->id());
735 
736  if (cell.subdet() == sdHcalBrl) {
737 
738  ++iHB;
739 
740  const CaloCellGeometry* cellGeometry =
741  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
742  double fPhi = cellGeometry->getPosition().phi () ;
743 
744  float deltaphi = maxHBPhi - fPhi;
745  if (fPhi > maxHBPhi) { deltaphi = fPhi - maxHBPhi;}
746  if (deltaphi > PI) { deltaphi = 2.0 * PI - deltaphi;}
747 
748  mehHcalRes[0]->Fill(jhbhe->energy() -
749  fHBEnergySimHits[cell.rawId()]);
750  }
751 
752  if (cell.subdet() == sdHcalEC) {
753 
754  ++iHE;
755 
756  const CaloCellGeometry* cellGeometry =
757  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
758  double fPhi = cellGeometry->getPosition().phi () ;
759 
760  float deltaphi = maxHEPhi - fPhi;
761  if (fPhi > maxHEPhi) { deltaphi = fPhi - maxHEPhi;}
762  if (deltaphi > PI) { deltaphi = 2.0 * PI - deltaphi;}
763  mehHcalRes[1]->Fill(jhbhe->energy() -
764  fHEEnergySimHits[cell.rawId()]);
765  }
766  }
767  } // end loop through collection
768 
769 
770  if (verbosity > 1) {
771  eventout += "\n Number of HBRecHits collected:............ ";
772  eventout += iHB;
773  }
774 
775  if (verbosity > 1) {
776  eventout += "\n Number of HERecHits collected:............ ";
777  eventout += iHE;
778  }
779  mehHcaln[0]->Fill((float)iHB);
780  mehHcaln[1]->Fill((float)iHE);
781  }
782 
784  // get HF information
786  std::vector<edm::Handle<HFRecHitCollection> > hf;
787  iEvent.getManyByType(hf);
788  bool validHF = true;
789  if (!hf[0].isValid()) {
790  LogDebug(MsgLoggerCat)
791  << "Unable to find any HFRecHitCollections in event!";
792  validHF = false;
793  }
794  if (validHF) {
795  std::vector<edm::Handle<HFRecHitCollection> >::iterator ihf;
796 
797  int iHF = 0;
798  for (ihf = hf.begin(); ihf != hf.end(); ++ihf) {
799 
800  // find max values
801  for (HFRecHitCollection::const_iterator jhf = (*ihf)->begin();
802  jhf != (*ihf)->end(); ++jhf) {
803 
804  HcalDetId cell(jhf->id());
805 
806  if (cell.subdet() == sdHcalFwd) {
807 
808  const CaloCellGeometry* cellGeometry =
809  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
810  double fPhi = cellGeometry->getPosition().phi () ;
811  if ( (jhf->energy()) > maxHFEnergy ) {
812  maxHFEnergy = jhf->energy();
813  maxHFPhi = fPhi;
814  }
815  }
816  } // end find max values
817 
818  for (HFRecHitCollection::const_iterator jhf = (*ihf)->begin();
819  jhf != (*ihf)->end(); ++jhf) {
820 
821  HcalDetId cell(jhf->id());
822 
823  if (cell.subdet() == sdHcalFwd) {
824 
825  ++iHF;
826 
827  const CaloCellGeometry* cellGeometry =
828  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
829  double fPhi = cellGeometry->getPosition().phi () ;
830 
831  float deltaphi = maxHBPhi - fPhi;
832  if (fPhi > maxHFPhi) { deltaphi = fPhi - maxHFPhi;}
833  if (deltaphi > PI) { deltaphi = 2.0 * PI - deltaphi;}
834 
835  mehHcalRes[2]->Fill(jhf->energy()-fHFEnergySimHits[cell.rawId()]);
836  }
837  }
838  } // end loop through collection
839 
840  if (verbosity > 1) {
841  eventout += "\n Number of HFDigis collected:.............. ";
842  eventout += iHF;
843  }
844  mehHcaln[2]->Fill((float)iHF);
845  }
846 
848  // get HO information
850  std::vector<edm::Handle<HORecHitCollection> > ho;
851  iEvent.getManyByType(ho);
852  bool validHO = true;
853  if (!ho[0].isValid()) {
854  LogDebug(MsgLoggerCat)
855  << "Unable to find any HORecHitCollections in event!";
856  validHO = false;
857  }
858 
859  if (validHO) {
860  std::vector<edm::Handle<HORecHitCollection> >::iterator iho;
861 
862  int iHO = 0;
863  for (iho = ho.begin(); iho != ho.end(); ++iho) {
864 
865  for (HORecHitCollection::const_iterator jho = (*iho)->begin();
866  jho != (*iho)->end(); ++jho) {
867 
868  HcalDetId cell(jho->id());
869 
870  if (cell.subdet() == sdHcalOut) {
871 
872  ++iHO;
873 
874  const CaloCellGeometry* cellGeometry =
875  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
876  double fPhi = cellGeometry->getPosition().phi () ;
877 
878  float deltaphi = maxHOPhi - fPhi;
879  if (fPhi > maxHOPhi) { deltaphi = fPhi - maxHOPhi;}
880  if (deltaphi > PI) { deltaphi = 2.0 * PI - deltaphi;}
881  mehHcalRes[3]->Fill(jho->energy()-fHOEnergySimHits[cell.rawId()]);
882  }
883  }
884  } // end loop through collection
885 
886  if (verbosity > 1) {
887  eventout += "\n Number of HODigis collected:.............. ";
888  eventout += iHO;
889  }
890  mehHcaln[3]->Fill((float)iHO);
891  }
892 
893  if (verbosity > 0)
894  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
895 
896  return;
897 }
898 
900  const edm::EventSetup& iSetup)
901 {
902  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_fillTrk";
903 
904  TString eventout;
905  if (verbosity > 0)
906  eventout = "\nGathering info:";
907 
908  // get strip information
910  iEvent.getByLabel(SiStripSrc_, rechitsmatched);
911  bool validstrip = true;
912  if (!rechitsmatched.isValid()) {
913  LogDebug(MsgLoggerCat)
914  << "Unable to find stripmatchedrechits in event!";
915  validstrip = false;
916  }
917 
918  TrackerHitAssociator associate(iEvent,conf_);
919 
921  iSetup.get<TrackerDigiGeometryRecord>().get(pDD);
922  if (!pDD.isValid()) {
923  edm::LogWarning(MsgLoggerCat)
924  << "Unable to find TrackerDigiGeometry in event!";
925  return;
926  }
927  const TrackerGeometry &tracker(*pDD);
928 
929  if (validstrip) {
930  int nStripBrl = 0, nStripFwd = 0;
931 
932  // loop over det units
933  for (TrackerGeometry::DetContainer::const_iterator it =
934  pDD->dets().begin();
935  it != pDD->dets().end(); ++it) {
936 
937  uint32_t myid = ((*it)->geographicalId()).rawId();
938  DetId detid = ((*it)->geographicalId());
939 
940  //loop over rechits-matched in the same subdetector
941  SiStripMatchedRecHit2DCollection::const_iterator rechitmatchedMatch = rechitsmatched->find(detid);
942 
943  if (rechitmatchedMatch != rechitsmatched->end()) {
944  SiStripMatchedRecHit2DCollection::DetSet rechitmatchedRange = *rechitmatchedMatch;
945  SiStripMatchedRecHit2DCollection::DetSet::const_iterator rechitmatchedRangeIteratorBegin = rechitmatchedRange.begin();
946  SiStripMatchedRecHit2DCollection::DetSet::const_iterator rechitmatchedRangeIteratorEnd = rechitmatchedRange.end();
947  SiStripMatchedRecHit2DCollection::DetSet::const_iterator itermatched = rechitmatchedRangeIteratorBegin;
948 
949  for ( itermatched = rechitmatchedRangeIteratorBegin;
950  itermatched != rechitmatchedRangeIteratorEnd;
951  ++itermatched) {
952 
953  SiStripMatchedRecHit2D const rechit = *itermatched;
954  LocalPoint position = rechit.localPosition();
955 
956  float mindist = 999999.;
957  float distx = 999999.;
958  float disty = 999999.;
959  float dist = 999999.;
960  std::pair<LocalPoint,LocalVector> closestPair;
961  matched.clear();
962 
963  float rechitmatchedx = position.x();
964  float rechitmatchedy = position.y();
965 
966  matched = associate.associateHit(rechit);
967 
968  if (!matched.empty()) {
969  //project simhit;
970  const GluedGeomDet* gluedDet =
971  (const GluedGeomDet*)tracker.idToDet(rechit.geographicalId());
972  const StripGeomDetUnit* partnerstripdet =
973  (StripGeomDetUnit*) gluedDet->stereoDet();
974  std::pair<LocalPoint,LocalVector> hitPair;
975 
976  for(std::vector<PSimHit>::const_iterator m = matched.begin();
977  m != matched.end(); m++){
978  //project simhit;
979  hitPair = projectHit((*m),partnerstripdet,gluedDet->surface());
980  distx = fabs(rechitmatchedx - hitPair.first.x());
981  disty = fabs(rechitmatchedy - hitPair.first.y());
982  dist = sqrt(distx*distx+disty*disty);
983 
984  if(dist < mindist){
985  mindist = dist;
986  closestPair = hitPair;
987  }
988  }
989 
990  // get TIB
991  if (detid.subdetId() == sdSiTIB) {
992 
993  TIBDetId tibid(myid);
994  ++nStripBrl;
995 
996  if (tibid.layer() == 1) {
997  mehSiStripResX[8]->Fill(rechitmatchedx-closestPair.first.x());
998  mehSiStripResY[8]->Fill(rechitmatchedy-closestPair.first.y());
999  }
1000  if (tibid.layer() == 2) {
1001  mehSiStripResX[9]->Fill(rechitmatchedx-closestPair.first.x());
1002  mehSiStripResY[9]->Fill(rechitmatchedy-closestPair.first.y());
1003  }
1004  if (tibid.layer() == 3) {
1005  mehSiStripResX[10]->Fill(rechitmatchedx-closestPair.first.x());
1006  mehSiStripResY[10]->Fill(rechitmatchedy-closestPair.first.y());
1007 
1008  }
1009  if (tibid.layer() == 4) {
1010  mehSiStripResX[11]->Fill(rechitmatchedx-closestPair.first.x());
1011  mehSiStripResY[11]->Fill(rechitmatchedy-closestPair.first.y());
1012  }
1013  }
1014 
1015  // get TOB
1016  if (detid.subdetId() == sdSiTOB) {
1017 
1018  TOBDetId tobid(myid);
1019  ++nStripBrl;
1020 
1021  if (tobid.layer() == 1) {
1022  mehSiStripResX[15]->Fill(rechitmatchedx-closestPair.first.x());
1023  mehSiStripResY[15]->Fill(rechitmatchedy-closestPair.first.y());
1024  }
1025  if (tobid.layer() == 2) {
1026  mehSiStripResX[16]->Fill(rechitmatchedx-closestPair.first.x());
1027  mehSiStripResY[16]->Fill(rechitmatchedy-closestPair.first.y());
1028  }
1029  if (tobid.layer() == 3) {
1030  mehSiStripResX[17]->Fill(rechitmatchedx-closestPair.first.x());
1031  mehSiStripResY[17]->Fill(rechitmatchedy-closestPair.first.y());
1032  }
1033  if (tobid.layer() == 4) {
1034  mehSiStripResX[18]->Fill(rechitmatchedx-closestPair.first.x());
1035  mehSiStripResY[18]->Fill(rechitmatchedy-closestPair.first.y());
1036  }
1037  }
1038 
1039  // get TID
1040  if (detid.subdetId() == sdSiTID) {
1041 
1042  TIDDetId tidid(myid);
1043  ++nStripFwd;
1044 
1045  if (tidid.wheel() == 1) {
1046  mehSiStripResX[12]->Fill(rechitmatchedx-closestPair.first.x());
1047  mehSiStripResY[12]->Fill(rechitmatchedy-closestPair.first.y());
1048  }
1049  if (tidid.wheel() == 2) {
1050  mehSiStripResX[13]->Fill(rechitmatchedx-closestPair.first.x());
1051  mehSiStripResY[13]->Fill(rechitmatchedy-closestPair.first.y());
1052  }
1053  if (tidid.wheel() == 3) {
1054  mehSiStripResX[14]->Fill(rechitmatchedx-closestPair.first.x());
1055  mehSiStripResY[14]->Fill(rechitmatchedy-closestPair.first.y());
1056  }
1057  }
1058 
1059  // get TEC
1060  if (detid.subdetId() == sdSiTEC) {
1061 
1062  TECDetId tecid(myid);
1063  ++nStripFwd;
1064 
1065  if (tecid.wheel() == 1) {
1066  mehSiStripResX[0]->Fill(rechitmatchedx-closestPair.first.x());
1067  mehSiStripResY[0]->Fill(rechitmatchedy-closestPair.first.y());
1068  }
1069  if (tecid.wheel() == 2) {
1070  mehSiStripResX[1]->Fill(rechitmatchedx-closestPair.first.x());
1071  mehSiStripResY[1]->Fill(rechitmatchedy-closestPair.first.y());
1072  }
1073  if (tecid.wheel() == 3) {
1074  mehSiStripResX[2]->Fill(rechitmatchedx-closestPair.first.x());
1075  mehSiStripResY[2]->Fill(rechitmatchedy-closestPair.first.y());
1076  }
1077  if (tecid.wheel() == 4) {
1078  mehSiStripResX[3]->Fill(rechitmatchedx-closestPair.first.x());
1079  mehSiStripResY[3]->Fill(rechitmatchedy-closestPair.first.y());
1080 
1081  }
1082  if (tecid.wheel() == 5) {
1083  mehSiStripResX[4]->Fill(rechitmatchedx-closestPair.first.x());
1084  mehSiStripResY[4]->Fill(rechitmatchedy-closestPair.first.y());
1085  }
1086  if (tecid.wheel() == 6) {
1087  mehSiStripResX[5]->Fill(rechitmatchedx-closestPair.first.x());
1088  mehSiStripResY[5]->Fill(rechitmatchedy-closestPair.first.y());
1089  }
1090  if (tecid.wheel() == 7) {
1091  mehSiStripResX[6]->Fill(rechitmatchedx-closestPair.first.x());
1092  mehSiStripResY[6]->Fill(rechitmatchedy-closestPair.first.y());
1093  }
1094  if (tecid.wheel() == 8) {
1095  mehSiStripResX[7]->Fill(rechitmatchedx-closestPair.first.x());
1096  mehSiStripResY[7]->Fill(rechitmatchedy-closestPair.first.y());
1097  }
1098  }
1099 
1100  } // end if matched empty
1101  }
1102  }
1103  } // end loop over det units
1104 
1105  if (verbosity > 1) {
1106  eventout += "\n Number of BrlStripRecHits collected:...... ";
1107  eventout += nStripBrl;
1108  }
1109 
1110  for(int i =8; i<12; ++i)
1111  {mehSiStripn[i]->Fill((float)nStripBrl);}
1112  for(int i =16; i<19; ++i)
1113  {mehSiStripn[i]->Fill((float)nStripBrl);}
1114 
1115  if (verbosity > 1) {
1116  eventout += "\n Number of FrwdStripRecHits collected:..... ";
1117  eventout += nStripFwd;
1118  }
1119  for(int i =0; i<8; ++i)
1120  {mehSiStripn[i]->Fill((float)nStripFwd);}
1121  for(int i =12; i<16; ++i)
1122  {mehSiStripn[i]->Fill((float)nStripFwd);}
1123  }
1124 
1125  // get pixel information
1126  //Get RecHits
1128  iEvent.getByLabel(SiPxlSrc_, recHitColl);
1129  bool validpixel = true;
1130  if (!recHitColl.isValid()) {
1131  LogDebug(MsgLoggerCat)
1132  << "Unable to find SiPixelRecHitCollection in event!";
1133  validpixel = false;
1134  }
1135 
1136  //Get event setup
1138  iSetup.get<TrackerDigiGeometryRecord>().get(geom);
1139  if (!geom.isValid()) {
1140  edm::LogWarning(MsgLoggerCat)
1141  << "Unable to find TrackerDigiGeometry in event!";
1142  return;
1143  }
1144 
1145  if (validpixel) {
1146  int nPxlBrl = 0, nPxlFwd = 0;
1147  //iterate over detunits
1148  for (TrackerGeometry::DetContainer::const_iterator it =
1149  geom->dets().begin();
1150  it != geom->dets().end(); ++it) {
1151 
1152  uint32_t myid = ((*it)->geographicalId()).rawId();
1153  DetId detId = ((*it)->geographicalId());
1154  int subid = detId.subdetId();
1155 
1156  if (! ((subid == sdPxlBrl) || (subid == sdPxlFwd))) continue;
1157 
1158  SiPixelRecHitCollection::const_iterator pixeldet = recHitColl->find(detId);
1159  if (pixeldet == recHitColl->end()) continue;
1160  SiPixelRecHitCollection::DetSet pixelrechitRange = *pixeldet;
1161  SiPixelRecHitCollection::DetSet::const_iterator pixelrechitRangeIteratorBegin = pixelrechitRange.begin();
1162  SiPixelRecHitCollection::DetSet::const_iterator pixelrechitRangeIteratorEnd = pixelrechitRange.end();
1163  SiPixelRecHitCollection::DetSet::const_iterator pixeliter = pixelrechitRangeIteratorBegin;
1164 
1165 
1166  std::vector<PSimHit> matched;
1167 
1168  //----Loop over rechits for this detId
1169  for ( ; pixeliter != pixelrechitRangeIteratorEnd; ++pixeliter) {
1170 
1171  matched.clear();
1172  matched = associate.associateHit(*pixeliter);
1173 
1174  if ( !matched.empty() ) {
1175 
1176  float closest = 9999.9;
1177  LocalPoint lp = pixeliter->localPosition();
1178  float rechit_x = lp.x();
1179  float rechit_y = lp.y();
1180 
1181  float sim_x = 0.;
1182  float sim_y = 0.;
1183 
1184  //loop over sim hits and fill closet
1185  for (std::vector<PSimHit>::const_iterator m = matched.begin();
1186  m != matched.end(); ++m) {
1187 
1188  float sim_x1 = (*m).entryPoint().x();
1189  float sim_x2 = (*m).exitPoint().x();
1190  float sim_xpos = 0.5*(sim_x1+sim_x2);
1191 
1192  float sim_y1 = (*m).entryPoint().y();
1193  float sim_y2 = (*m).exitPoint().y();
1194  float sim_ypos = 0.5*(sim_y1+sim_y2);
1195 
1196  float x_res = fabs(sim_xpos - rechit_x);
1197  float y_res = fabs(sim_ypos - rechit_y);
1198 
1199  float dist = sqrt(x_res*x_res + y_res*y_res);
1200 
1201  if ( dist < closest ) {
1202  closest = dist;
1203  sim_x = sim_xpos;
1204  sim_y = sim_ypos;
1205  }
1206  } // end sim hit loop
1207 
1208  // get Barrel pixels ***************Pixel STuff******************
1209  if (subid == sdPxlBrl) {
1210  PXBDetId bdetid(myid);
1211  ++nPxlBrl;
1212 
1213  if (bdetid.layer() == 1) {
1214  mehSiPixelResX[0]->Fill(rechit_x-sim_x);
1215  mehSiPixelResY[0]->Fill(rechit_y-sim_y);
1216 
1217  }
1218  if (bdetid.layer() == 2) {
1219  mehSiPixelResX[1]->Fill(rechit_x-sim_x);
1220  mehSiPixelResY[1]->Fill(rechit_y-sim_y);
1221  }
1222  if (bdetid.layer() == 3) {
1223  mehSiPixelResX[2]->Fill(rechit_x-sim_x);
1224  mehSiPixelResY[2]->Fill(rechit_y-sim_y);
1225  }
1226  }
1227 
1228  // get Forward pixels
1229  if (subid == sdPxlFwd) {
1230  PXFDetId fdetid(myid);
1231  ++nPxlFwd;
1232 
1233  if (fdetid.disk() == 1) {
1234  if (fdetid.side() == 1) {
1235  mehSiPixelResX[3]->Fill(rechit_x-sim_x);
1236  mehSiPixelResY[3]->Fill(rechit_y-sim_y);
1237  }
1238  if (fdetid.side() == 2) {
1239  mehSiPixelResX[4]->Fill(rechit_x-sim_x);
1240  mehSiPixelResY[4]->Fill(rechit_y-sim_y);
1241  }
1242  }
1243  if (fdetid.disk() == 2) {
1244  if (fdetid.side() == 1) {
1245  mehSiPixelResX[5]->Fill(rechit_x-sim_x);
1246  mehSiPixelResY[5]->Fill(rechit_y-sim_y);
1247  }
1248  if (fdetid.side() == 2) {
1249  mehSiPixelResX[6]->Fill(rechit_x-sim_x);
1250  mehSiPixelResY[6]->Fill(rechit_y-sim_y);
1251  }
1252  }
1253  }
1254  } // end matched emtpy
1255  } // <-----end rechit loop
1256  } // <------ end detunit loop
1257 
1258 
1259  if (verbosity > 1) {
1260  eventout += "\n Number of BrlPixelRecHits collected:...... ";
1261  eventout += nPxlBrl;
1262  }
1263  for(int i=0; i<3; ++i) {
1264  mehSiPixeln[i]->Fill((float)nPxlBrl);
1265  }
1266 
1267  if (verbosity > 1) {
1268  eventout += "\n Number of FrwdPixelRecHits collected:..... ";
1269  eventout += nPxlFwd;
1270  }
1271 
1272  for(int i=3; i<7; ++i) {
1273  mehSiPixeln[i]->Fill((float)nPxlFwd);
1274  }
1275  }
1276 
1277  if (verbosity > 0)
1278  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1279 
1280  return;
1281 }
1282 
1284  const edm::EventSetup& iSetup)
1285 {
1286  std::string MsgLoggerCat = "GlobalRecHitsAnalyzer_fillMuon";
1287 
1288  TString eventout;
1289  if (verbosity > 0)
1290  eventout = "\nGathering info:";
1291 
1292  // get DT information
1294  iSetup.get<MuonGeometryRecord>().get(dtGeom);
1295  if (!dtGeom.isValid()) {
1296  edm::LogWarning(MsgLoggerCat)
1297  << "Unable to find DTMuonGeometryRecord in event!";
1298  return;
1299  }
1300 
1302  iEvent.getByLabel(MuDTSimSrc_, dtsimHits);
1303  bool validdtsim = true;
1304  if (!dtsimHits.isValid()) {
1305  LogDebug(MsgLoggerCat)
1306  << "Unable to find dtsimHits in event!";
1307  validdtsim = false;
1308  }
1309 
1311  iEvent.getByLabel(MuDTSrc_, dtRecHits);
1312  bool validdtrec = true;
1313  if (!dtRecHits.isValid()) {
1314  LogDebug(MsgLoggerCat)
1315  << "Unable to find dtRecHits in event!";
1316  validdtrec = false;
1317  }
1318 
1319  if (validdtsim && validdtrec) {
1320 
1321  std::map<DTWireId, edm::PSimHitContainer> simHitsPerWire =
1323 
1324  std::map<DTWireId, std::vector<DTRecHit1DPair> > recHitsPerWire =
1325  map1DRecHitsPerWire(dtRecHits.product());
1326 
1327  int nDt = compute(dtGeom.product(), simHitsPerWire, recHitsPerWire, 1);
1328 
1329  if (verbosity > 1) {
1330  eventout += "\n Number of DtMuonRecHits collected:........ ";
1331  eventout += nDt;
1332  }
1333  mehDtMuonn->Fill(float(nDt));
1334  }
1335 
1336  // get CSC Strip information
1337  // get map of sim hits
1338  theMap.clear();
1340 
1341  iEvent.getByLabel("mix",hitsProducer+"MuonCSCHits",cf);
1342  bool validXFrame = true;
1343  if (!cf.isValid()) {
1344  LogDebug(MsgLoggerCat)
1345  << "Unable to find muo CSC crossingFrame in event!";
1346  validXFrame = false;
1347  }
1348  if (validXFrame) {
1350 
1351  // arrange the hits by detUnit
1352  for(MixCollection<PSimHit>::MixItr hitItr = simHits.begin();
1353  hitItr != simHits.end(); ++hitItr) {
1354  theMap[hitItr->detUnitId()].push_back(*hitItr);
1355  }
1356  }
1357 
1358  // get geometry
1360  iSetup.get<MuonGeometryRecord>().get(hGeom);
1361  if (!hGeom.isValid()) {
1362  edm::LogWarning(MsgLoggerCat)
1363  << "Unable to find CSCMuonGeometryRecord in event!";
1364  return;
1365  }
1366  const CSCGeometry *theCSCGeometry = &*hGeom;
1367 
1368  // get rechits
1370  iEvent.getByLabel(MuCSCSrc_, hRecHits);
1371  bool validCSC = true;
1372  if (!hRecHits.isValid()) {
1373  LogDebug(MsgLoggerCat)
1374  << "Unable to find CSC RecHits in event!";
1375  validCSC = false;
1376  }
1377 
1378  if (validCSC) {
1379  const CSCRecHit2DCollection *cscRecHits = hRecHits.product();
1380 
1381  int nCSC = 0;
1382  for (CSCRecHit2DCollection::const_iterator recHitItr = cscRecHits->begin();
1383  recHitItr != cscRecHits->end(); ++recHitItr) {
1384 
1385  int detId = (*recHitItr).cscDetId().rawId();
1386 
1388  std::map<int, edm::PSimHitContainer>::const_iterator mapItr =
1389  theMap.find(detId);
1390  if (mapItr != theMap.end()) {
1391  simHits = mapItr->second;
1392  }
1393 
1394  if (simHits.size() == 1) {
1395  ++nCSC;
1396 
1397  const GeomDetUnit* detUnit =
1398  theCSCGeometry->idToDetUnit(CSCDetId(detId));
1399  const CSCLayer *layer = dynamic_cast<const CSCLayer *>(detUnit);
1400 
1401  int chamberType = layer->chamber()->specs()->chamberType();
1402  plotResolution(simHits[0], *recHitItr, layer, chamberType);
1403  }
1404  }
1405 
1406  if (verbosity > 1) {
1407  eventout += "\n Number of CSCRecHits collected:........... ";
1408  eventout += nCSC;
1409  }
1410  mehCSCn->Fill((float)nCSC);
1411  }
1412 
1413  // get RPC information
1414  std::map<double, int> mapsim, maprec;
1415  std::map<int, double> nmapsim, nmaprec;
1416 
1418  iSetup.get<MuonGeometryRecord>().get(rpcGeom);
1419  if (!rpcGeom.isValid()) {
1420  edm::LogWarning(MsgLoggerCat)
1421  << "Unable to find RPCMuonGeometryRecord in event!";
1422  return;
1423  }
1424 
1426  iEvent.getByLabel(MuRPCSimSrc_, simHit);
1427  bool validrpcsim = true;
1428  if (!simHit.isValid()) {
1429  LogDebug(MsgLoggerCat)
1430  << "Unable to find RPCSimHit in event!";
1431  validrpcsim = false;
1432  }
1433 
1435  iEvent.getByLabel(MuRPCSrc_, recHit);
1436  bool validrpc = true;
1437  if (!simHit.isValid()) {
1438  LogDebug(MsgLoggerCat)
1439  << "Unable to find RPCRecHit in event!";
1440  validrpc = false;
1441  }
1442 
1443  if (validrpc) {
1444  int nRPC = 0;
1446  int nrec = 0;
1447  for (recIt = recHit->begin(); recIt != recHit->end(); ++recIt) {
1448  RPCDetId Rid = (RPCDetId)(*recIt).rpcId();
1449  const RPCRoll *roll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(Rid));
1450  if (roll->isForward()) {
1451 
1452  if (verbosity > 1) {
1453  eventout +=
1454  "\n Number of RPCRecHits collected:........... ";
1455  eventout += nRPC;
1456  }
1457 
1458  if (verbosity > 0)
1459  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1460  return;
1461  }
1462  nrec = nrec + 1;
1463  LocalPoint rhitlocal = (*recIt).localPosition();
1464  double rhitlocalx = rhitlocal.x();
1465  maprec[rhitlocalx] = nrec;
1466  }
1467 
1468  int i = 0;
1469  for (std::map<double,int>::iterator iter = maprec.begin();
1470  iter != maprec.end(); ++iter) {
1471  i = i + 1;
1472  nmaprec[i] = (*iter).first;
1473  }
1474 
1475  int nsim = 0;
1476  if (validrpcsim) {
1477  edm::PSimHitContainer::const_iterator simIt;
1478  for (simIt = simHit->begin(); simIt != simHit->end(); simIt++) {
1479  int ptype = (*simIt).particleType();
1480  if (ptype == 13 || ptype == -13) {
1481  nsim = nsim + 1;
1482  LocalPoint shitlocal = (*simIt).localPosition();
1483  double shitlocalx = shitlocal.x();
1484  mapsim[shitlocalx] = nsim;
1485  }
1486  }
1487 
1488  i = 0;
1489  for (std::map<double,int>::iterator iter = mapsim.begin();
1490  iter != mapsim.end(); ++iter) {
1491  i = i + 1;
1492  nmapsim[i] = (*iter).first;
1493  }
1494  }
1495 
1496  if (nsim == nrec) {
1497  for (int r = 0; r < nsim; r++) {
1498  ++nRPC;
1499  mehRPCResX->Fill(nmaprec[r+1]-nmapsim[r+1]);
1500  }
1501  }
1502 
1503  if (verbosity > 1) {
1504  eventout += "\n Number of RPCRecHits collected:........... ";
1505  eventout += nRPC;
1506  }
1507  mehRPCn->Fill((float)nRPC);
1508  }
1509 
1510  if (verbosity > 0)
1511  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1512 
1513  return;
1514 }
1515 
1516 //needed by to do the residual for matched hits in SiStrip
1517 std::pair<LocalPoint,LocalVector>
1519  const StripGeomDetUnit* stripDet,
1520  const BoundPlane& plane)
1521 {
1522 
1523  const StripTopology& topol = stripDet->specificTopology();
1524  GlobalPoint globalpos= stripDet->surface().toGlobal(hit.localPosition());
1525  LocalPoint localHit = plane.toLocal(globalpos);
1526  //track direction
1527  LocalVector locdir=hit.localDirection();
1528  //rotate track in new frame
1529 
1530  GlobalVector globaldir= stripDet->surface().toGlobal(locdir);
1531  LocalVector dir=plane.toLocal(globaldir);
1532  float scale = -localHit.z() / dir.z();
1533 
1534  LocalPoint projectedPos = localHit + scale*dir;
1535 
1536  float selfAngle = topol.stripAngle( topol.strip( hit.localPosition()));
1537 
1538  // vector along strip in hit frame
1539  LocalVector stripDir( sin(selfAngle), cos(selfAngle), 0);
1540 
1541  LocalVector
1542  localStripDir(plane.toLocal(stripDet->surface().toGlobal(stripDir)));
1543 
1544  return std::pair<LocalPoint,LocalVector>( projectedPos, localStripDir);
1545 }
1546 
1547 // Return a map between DTRecHit1DPair and wireId
1548 std::map<DTWireId, std::vector<DTRecHit1DPair> >
1550  dt1DRecHitPairs) {
1551  std::map<DTWireId, std::vector<DTRecHit1DPair> > ret;
1552 
1553  for(DTRecHitCollection::const_iterator rechit = dt1DRecHitPairs->begin();
1554  rechit != dt1DRecHitPairs->end(); rechit++) {
1555  ret[(*rechit).wireId()].push_back(*rechit);
1556  }
1557 
1558  return ret;
1559 }
1560 
1561 // Compute SimHit distance from wire (cm)
1563  DTWireId wireId,
1564  const PSimHit& hit) {
1565  float xwire = layer->specificTopology().wirePosition(wireId.wire());
1566  LocalPoint entryP = hit.entryPoint();
1567  LocalPoint exitP = hit.exitPoint();
1568  float xEntry = entryP.x()-xwire;
1569  float xExit = exitP.x()-xwire;
1570 
1571  //FIXME: check...
1572  return fabs(xEntry - (entryP.z()*(xExit-xEntry))/(exitP.z()-entryP.z()));
1573 }
1574 
1575 // Find the RecHit closest to the muon SimHit
1576 template <typename type>
1577 const type*
1579  DTWireId wireId,
1580  const std::vector<type>& recHits,
1581  const float simHitDist) {
1582  float res = 99999;
1583  const type* theBestRecHit = 0;
1584  // Loop over RecHits within the cell
1585  for(typename std::vector<type>::const_iterator recHit = recHits.begin();
1586  recHit != recHits.end();
1587  recHit++) {
1588  float distTmp = recHitDistFromWire(*recHit, layer);
1589  if(fabs(distTmp-simHitDist) < res) {
1590  res = fabs(distTmp-simHitDist);
1591  theBestRecHit = &(*recHit);
1592  }
1593  } // End of loop over RecHits within the cell
1594 
1595  return theBestRecHit;
1596 }
1597 
1598 // Compute the distance from wire (cm) of a hits in a DTRecHit1DPair
1599 float
1601  const DTLayer* layer) {
1602  // Compute the rechit distance from wire
1603  return fabs(hitPair.localPosition(DTEnums::Left).x() -
1604  hitPair.localPosition(DTEnums::Right).x())/2.;
1605 }
1606 
1607 // Compute the distance from wire (cm) of a hits in a DTRecHit1D
1608 float
1610  const DTLayer* layer) {
1611  return fabs(recHit.localPosition().x() -
1612  layer->specificTopology().wirePosition(recHit.wireId().wire()));
1613 }
1614 
1615 template <typename type>
1617  std::map<DTWireId, std::vector<PSimHit> >
1618  simHitsPerWire,
1619  std::map<DTWireId, std::vector<type> >
1620  recHitsPerWire,
1621  int step) {
1622 
1623  int nDt = 0;
1624  // Loop over cells with a muon SimHit
1625  for(std::map<DTWireId, std::vector<PSimHit> >::const_iterator wireAndSHits =
1626  simHitsPerWire.begin();
1627  wireAndSHits != simHitsPerWire.end();
1628  wireAndSHits++) {
1629  DTWireId wireId = (*wireAndSHits).first;
1630  std::vector<PSimHit> simHitsInCell = (*wireAndSHits).second;
1631 
1632  // Get the layer
1633  const DTLayer* layer = dtGeom->layer(wireId);
1634 
1635  // Look for a mu hit in the cell
1636  const PSimHit* muSimHit = DTHitQualityUtils::findMuSimHit(simHitsInCell);
1637  if (muSimHit==0) {
1638  continue; // Skip this cell
1639  }
1640 
1641  // Find the distance of the simhit from the wire
1642  float simHitWireDist = simHitDistFromWire(layer, wireId, *muSimHit);
1643  // Skip simhits out of the cell
1644  if(simHitWireDist>2.1) {
1645  continue; // Skip this cell
1646  }
1647 
1648  // Look for RecHits in the same cell
1649  if(recHitsPerWire.find(wireId) == recHitsPerWire.end()) {
1650  continue; // No RecHit found in this cell
1651  } else {
1652 
1653  std::vector<type> recHits = recHitsPerWire[wireId];
1654 
1655  // Find the best RecHit
1656  const type* theBestRecHit =
1657  findBestRecHit(layer, wireId, recHits, simHitWireDist);
1658 
1659  float recHitWireDist = recHitDistFromWire(*theBestRecHit, layer);
1660 
1661  ++nDt;
1662 
1663  mehDtMuonRes->Fill(recHitWireDist-simHitWireDist);
1664 
1665  } // find rechits
1666  } // loop over simhits
1667 
1668  return nDt;
1669 }
1670 
1671 void
1673  const CSCRecHit2D & recHit,
1674  const CSCLayer * layer,
1675  int chamberType) {
1676  GlobalPoint simHitPos = layer->toGlobal(simHit.localPosition());
1677  GlobalPoint recHitPos = layer->toGlobal(recHit.localPosition());
1678 
1679  mehCSCResRDPhi->Fill(recHitPos.phi()-simHitPos.phi());
1680 }
1681 
#define LogDebug(id)
RunNumber_t run() const
Definition: EventID.h:42
void getManyByType(std::vector< Handle< PROD > > &results) const
Definition: Event.h:408
type
Definition: HCALResponse.h:22
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:78
T getParameter(std::string const &) const
EventNumber_t event() const
Definition: EventID.h:44
GlobalRecHitsAnalyzer(const edm::ParameterSet &)
T getUntrackedParameter(std::string const &, T const &) const
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:88
void getAllProvenance(std::vector< Provenance const * > &provenances) const
Definition: Event.cc:70
int i
Definition: DBlmapReader.cc:9
MonitorElement * mehCSCResRDPhi
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
std::vector< PCaloHit > PCaloHitContainer
int ihf
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
virtual float stripAngle(float strip) const =0
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
static const int sdHcalOut
std::vector< PSimHit > matched
#define PI
list step
Definition: launcher.py:15
MonitorElement * mehHcalRes[4]
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:47
static const int sdSiTID
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
void fillMuon(const edm::Event &, const edm::EventSetup &)
Geom::Phi< T > phi() const
Definition: PV3DBase.h:68
std::vector< T >::const_iterator const_iterator
T y() const
Definition: PV3DBase.h:62
static const PSimHit * findMuSimHit(const edm::PSimHitContainer &hits)
Select the SimHit from a muon in a vector of SimHits.
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
float simHitDistFromWire(const DTLayer *layer, DTWireId wireId, const PSimHit &hit)
MonitorElement * mehEcalRes[3]
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
MonitorElement * mehSiStripn[19]
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
dictionary map
Definition: Association.py:205
virtual float strip(const LocalPoint &) const =0
void Fill(long long x)
void plotResolution(const PSimHit &simHit, const CSCRecHit2D &recHit, const CSCLayer *layer, int chamberType)
const DTLayer * layer(DTLayerId id) const
Return a layer given its id.
Definition: DTGeometry.cc:115
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
std::map< int, edm::PSimHitContainer > theMap
std::map< DTWireId, std::vector< DTRecHit1DPair > > map1DRecHitsPerWire(const DTRecHitCollection *dt1DRecHitPairs)
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:45
const DTTopology & specificTopology() const
Definition: DTLayer.cc:44
int iEvent
Definition: GenABIO.cc:243
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Definition: PSimHit.h:38
static const int sdSiTIB
const CSCChamberSpecs * specs() const
Definition: CSCChamber.h:42
static const int sdPxlBrl
Local3DPoint localPosition() const
Definition: PSimHit.h:44
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: CSCGeometry.cc:87
int compute(const DTGeometry *dtGeom, std::map< DTWireId, std::vector< PSimHit > > simHitsPerWire, std::map< DTWireId, std::vector< type > > recHitsPerWire, int step)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
T sqrt(T t)
Definition: SSEVec.h:46
LocalPoint toLocal(const GlobalPoint &gp) const
T z() const
Definition: PV3DBase.h:63
MonitorElement * mehSiPixelResX[7]
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
int j
Definition: DBlmapReader.cc:9
MonitorElement * mehEcaln[3]
const type * findBestRecHit(const DTLayer *layer, DTWireId wireId, const std::vector< type > &recHits, const float simHitDist)
static const int sdSiTOB
void setVerbose(unsigned level)
Definition: DQMStore.cc:393
MonitorElement * mehSiPixelResY[7]
MonitorElement * mehSiStripResY[19]
bool isValid() const
Definition: HandleBase.h:76
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
virtual const GeomDet * idToDet(DetId) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
unsigned int disk() const
disk id
Definition: PXFDetId.h:43
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &hit, const StripGeomDetUnit *stripDet, const BoundPlane &plane)
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
Definition: DTRecHit1D.h:62
const_iterator end() const
LocalVector localDirection() const
Obsolete. Same as momentumAtEntry().unit(), for backward compatibility.
Definition: PSimHit.h:52
int wire() const
Return the wire number.
Definition: DTWireId.h:58
Definition: DetId.h:20
int chamberType() const
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
MonitorElement * mehSiPixeln[7]
static const int sdHcalFwd
tuple simHits
Definition: trackerHits.py:16
T const * product() const
Definition: Handle.h:74
std::map< uint32_t, float, std::less< uint32_t > > MapType
unsigned int wheel() const
wheel id
Definition: TECDetId.h:52
static const int sdHcalBrl
void fillTrk(const edm::Event &, const edm::EventSetup &)
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
std::string const & label() const
Definition: InputTag.h:25
ESHandle< TrackerGeometry > geometry
edm::EventID id() const
Definition: EventBase.h:56
static const int sdSiTEC
iterator find(key_type k)
MonitorElement * mehHcaln[4]
iterator end()
Definition: DetSetNew.h:59
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
std::vector< PSimHit > associateHit(const TrackingRecHit &thit)
unsigned int side() const
positive or negative id
Definition: PXFDetId.h:38
void fillECal(const edm::Event &, const edm::EventSetup &)
std::vector< PSimHit > PSimHitContainer
static const int sdPxlFwd
dbl *** dir
Definition: mlp_gen.cc:35
static std::map< DTWireId, edm::PSimHitContainer > mapSimHitsPerWire(const edm::PSimHitContainer &simhits)
void showDirStructure(void) const
Definition: DQMStore.cc:2761
LocalPoint localPosition() const
Definition: CSCRecHit2D.h:50
bool isValid() const
Definition: ESHandle.h:37
bool isForward() const
Definition: RPCRoll.cc:98
T x() const
Definition: PV3DBase.h:61
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * mehSiStripResX[19]
std::string const & instance() const
Definition: InputTag.h:26
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Definition: PSimHit.h:35
static const int sdHcalEC
const CSCChamber * chamber() const
Definition: CSCLayer.h:52
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:21
const_iterator begin() const
virtual LocalPoint localPosition() const
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50
void fillHCal(const edm::Event &, const edm::EventSetup &)
DTWireId wireId() const
Return the wireId.
Definition: DTRecHit1D.h:109
iterator begin()
Definition: DetSetNew.h:56