CMS 3D CMS Logo

GlobalRecHitsProducer.cc
Go to the documentation of this file.
1 
13 
15  : fName(""),
16  verbosity(0),
17  frequency(0),
18  label(""),
19  getAllProvenances(false),
20  printProvenanceInfo(false),
21  trackerHitAssociatorConfig_(iPSet, consumesCollector()),
22  caloGeomToken_(esConsumes()),
23  tTopoToken_(esConsumes()),
24  tGeomToken_(esConsumes()),
25  dtGeomToken_(esConsumes()),
26  cscGeomToken_(esConsumes()),
27  rpcGeomToken_(esConsumes()),
28  count(0) {
29  std::string MsgLoggerCat = "GlobalRecHitsProducer_GlobalRecHitsProducer";
30 
31  // get information from parameter set
32  fName = iPSet.getUntrackedParameter<std::string>("Name");
33  verbosity = iPSet.getUntrackedParameter<int>("Verbosity");
34  frequency = iPSet.getUntrackedParameter<int>("Frequency");
35  label = iPSet.getParameter<std::string>("Label");
36  edm::ParameterSet m_Prov = iPSet.getParameter<edm::ParameterSet>("ProvenanceLookup");
37  getAllProvenances = m_Prov.getUntrackedParameter<bool>("GetAllProvenances");
38  printProvenanceInfo = m_Prov.getUntrackedParameter<bool>("PrintProvenanceInfo");
39 
40  //get Labels to use to extract information
41  ECalEBSrc_ = iPSet.getParameter<edm::InputTag>("ECalEBSrc");
42  ECalUncalEBSrc_ = iPSet.getParameter<edm::InputTag>("ECalUncalEBSrc");
43  ECalEESrc_ = iPSet.getParameter<edm::InputTag>("ECalEESrc");
44  ECalUncalEESrc_ = iPSet.getParameter<edm::InputTag>("ECalUncalEESrc");
45  ECalESSrc_ = iPSet.getParameter<edm::InputTag>("ECalESSrc");
46  HCalSrc_ = iPSet.getParameter<edm::InputTag>("HCalSrc");
47  SiStripSrc_ = iPSet.getParameter<edm::InputTag>("SiStripSrc");
48  SiPxlSrc_ = iPSet.getParameter<edm::InputTag>("SiPxlSrc");
49  MuDTSrc_ = iPSet.getParameter<edm::InputTag>("MuDTSrc");
50  MuDTSimSrc_ = iPSet.getParameter<edm::InputTag>("MuDTSimSrc");
51  MuCSCSrc_ = iPSet.getParameter<edm::InputTag>("MuCSCSrc");
52  MuRPCSrc_ = iPSet.getParameter<edm::InputTag>("MuRPCSrc");
53  MuRPCSimSrc_ = iPSet.getParameter<edm::InputTag>("MuRPCSimSrc");
54 
55  // fix for consumes
56  ECalUncalEBSrc_Token_ = consumes<EBUncalibratedRecHitCollection>(iPSet.getParameter<edm::InputTag>("ECalUncalEBSrc"));
57  ECalUncalEESrc_Token_ = consumes<EEUncalibratedRecHitCollection>(iPSet.getParameter<edm::InputTag>("ECalUncalEESrc"));
58  ECalEBSrc_Token_ = consumes<EBRecHitCollection>(iPSet.getParameter<edm::InputTag>("ECalEBSrc"));
59  ECalEESrc_Token_ = consumes<EERecHitCollection>(iPSet.getParameter<edm::InputTag>("ECalEESrc"));
60  ECalESSrc_Token_ = consumes<ESRecHitCollection>(iPSet.getParameter<edm::InputTag>("ECalESSrc"));
61  HCalSrc_Token_ = consumes<edm::PCaloHitContainer>(iPSet.getParameter<edm::InputTag>("HCalSrc"));
62  SiStripSrc_Token_ = consumes<SiStripMatchedRecHit2DCollection>(iPSet.getParameter<edm::InputTag>("SiStripSrc"));
63  SiPxlSrc_Token_ = consumes<SiPixelRecHitCollection>(iPSet.getParameter<edm::InputTag>("SiPxlSrc"));
64 
65  MuDTSrc_Token_ = consumes<DTRecHitCollection>(iPSet.getParameter<edm::InputTag>("MuDTSrc"));
66  MuDTSimSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("MuDTSimSrc"));
67 
68  MuCSCSrc_Token_ = consumes<CSCRecHit2DCollection>(iPSet.getParameter<edm::InputTag>("MuCSCSrc"));
69  MuCSCHits_Token_ = consumes<CrossingFrame<PSimHit>>(
70  edm::InputTag(std::string("mix"), iPSet.getParameter<std::string>("hitsProducer") + std::string("MuonCSCHits")));
71 
72  MuRPCSrc_Token_ = consumes<RPCRecHitCollection>(iPSet.getParameter<edm::InputTag>("MuRPCSrc"));
73  MuRPCSimSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("MuRPCSimSrc"));
74 
75  EBHits_Token_ = consumes<CrossingFrame<PCaloHit>>(
76  edm::InputTag(std::string("mix"), iPSet.getParameter<std::string>("hitsProducer") + std::string("EcalHitsEB")));
78  consumes<CrossingFrame<PCaloHit>>(edm::InputTag(std::string("mix"), iPSet.getParameter<std::string>("hitsProduc\
79 er") + std::string("EcalHitsEE")));
80 
81  // use value of first digit to determine default output level (inclusive)
82  // 0 is none, 1 is basic, 2 is fill output, 3 is gather output
83  verbosity %= 10;
84 
85  // create persistent object
86  produces<PGlobalRecHit>(label);
87 
88  // print out Parameter Set information being used
89  if (verbosity >= 0) {
90  edm::LogInfo(MsgLoggerCat) << "\n===============================\n"
91  << "Initialized as EDProducer with parameter values:\n"
92  << " Name = " << fName << "\n"
93  << " Verbosity = " << verbosity << "\n"
94  << " Frequency = " << frequency << "\n"
95  << " Label = " << label << "\n"
96  << " GetProv = " << getAllProvenances << "\n"
97  << " PrintProv = " << printProvenanceInfo << "\n"
98  << " ECalEBSrc = " << ECalEBSrc_.label() << ":" << ECalEBSrc_.instance() << "\n"
99  << " ECalUncalEBSrc = " << ECalUncalEBSrc_.label() << ":"
100  << ECalUncalEBSrc_.instance() << "\n"
101  << " ECalEESrc = " << ECalEESrc_.label() << ":" << ECalUncalEESrc_.instance()
102  << "\n"
103  << " ECalUncalEESrc = " << ECalUncalEESrc_.label() << ":" << ECalEESrc_.instance()
104  << "\n"
105  << " ECalESSrc = " << ECalESSrc_.label() << ":" << ECalESSrc_.instance() << "\n"
106  << " HCalSrc = " << HCalSrc_.label() << ":" << HCalSrc_.instance() << "\n"
107  << " SiStripSrc = " << SiStripSrc_.label() << ":" << SiStripSrc_.instance()
108  << "\n"
109  << " SiPixelSrc = " << SiPxlSrc_.label() << ":" << SiPxlSrc_.instance() << "\n"
110  << " MuDTSrc = " << MuDTSrc_.label() << ":" << MuDTSrc_.instance() << "\n"
111  << " MuDTSimSrc = " << MuDTSimSrc_.label() << ":" << MuDTSimSrc_.instance()
112  << "\n"
113  << " MuCSCSrc = " << MuCSCSrc_.label() << ":" << MuCSCSrc_.instance() << "\n"
114  << " MuRPCSrc = " << MuRPCSrc_.label() << ":" << MuRPCSrc_.instance() << "\n"
115  << " MuRPCSimSrc = " << MuRPCSimSrc_.label() << ":" << MuRPCSimSrc_.instance()
116  << "\n"
117  << "===============================\n";
118  }
119 }
120 
122 
124  std::string MsgLoggerCat = "GlobalRecHitsProducer_beginJob";
125 
126  // clear storage vectors
127  clear();
128  return;
129 }
130 
132  std::string MsgLoggerCat = "GlobalRecHitsProducer_endJob";
133  if (verbosity >= 0)
134  edm::LogInfo(MsgLoggerCat) << "Terminating having processed " << count << " events.";
135  return;
136 }
137 
139  std::string MsgLoggerCat = "GlobalRecHitsProducer_produce";
140 
141  // keep track of number of events processed
142  ++count;
143 
144  // get event id information
145  edm::RunNumber_t nrun = iEvent.id().run();
146  edm::EventNumber_t nevt = iEvent.id().event();
147 
148  if (verbosity > 0) {
149  edm::LogInfo(MsgLoggerCat) << "Processing run " << nrun << ", event " << nevt << " (" << count << " events total)";
150  } else if (verbosity == 0) {
151  if (nevt % frequency == 0 || nevt == 1) {
152  edm::LogInfo(MsgLoggerCat) << "Processing run " << nrun << ", event " << nevt << " (" << count
153  << " events total)";
154  }
155  }
156 
157  // clear event holders
158  clear();
159 
160  // look at information available in the event
161  if (getAllProvenances) {
162  std::vector<const edm::StableProvenance*> AllProv;
163  iEvent.getAllStableProvenance(AllProv);
164 
165  if (verbosity >= 0)
166  edm::LogInfo(MsgLoggerCat) << "Number of Provenances = " << AllProv.size();
167 
168  if (printProvenanceInfo && (verbosity >= 0)) {
169  TString eventout("\nProvenance info:\n");
170 
171  for (unsigned int i = 0; i < AllProv.size(); ++i) {
172  eventout += "\n ******************************";
173  eventout += "\n Module : ";
174  //eventout += (AllProv[i]->product).moduleLabel();
175  eventout += AllProv[i]->moduleLabel();
176  eventout += "\n ProductID : ";
177  //eventout += (AllProv[i]->product).productID_.id_;
178  eventout += AllProv[i]->productID().id();
179  eventout += "\n ClassName : ";
180  //eventout += (AllProv[i]->product).fullClassName_;
181  eventout += AllProv[i]->className();
182  eventout += "\n InstanceName : ";
183  //eventout += (AllProv[i]->product).productInstanceName_;
184  eventout += AllProv[i]->productInstanceName();
185  eventout += "\n BranchName : ";
186  //eventout += (AllProv[i]->product).branchName_;
187  eventout += AllProv[i]->branchName();
188  }
189  eventout += "\n ******************************\n";
190  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
191  printProvenanceInfo = false;
192  }
193  getAllProvenances = false;
194  }
195 
196  // call fill functions
197  // gather Ecal information from event
198  fillECal(iEvent, iSetup);
199  // gather Hcal information from event
200  fillHCal(iEvent, iSetup);
201  // gather Track information from event
202  fillTrk(iEvent, iSetup);
203  // gather Muon information from event
204  fillMuon(iEvent, iSetup);
205 
206  if (verbosity > 0)
207  edm::LogInfo(MsgLoggerCat) << "Done gathering data from event.";
208 
209  // produce object to put into event
210  std::unique_ptr<PGlobalRecHit> pOut(new PGlobalRecHit);
211 
212  if (verbosity > 2)
213  edm::LogInfo(MsgLoggerCat) << "Saving event contents:";
214 
215  // call store functions
216  // store ECal information in produce
217  storeECal(*pOut);
218  // store HCal information in produce
219  storeHCal(*pOut);
220  // store Track information in produce
221  storeTrk(*pOut);
222  // store Muon information in produce
223  storeMuon(*pOut);
224 
225  // store information in event
226  iEvent.put(std::move(pOut), label);
227 
228  return;
229 }
230 
232  std::string MsgLoggerCat = "GlobalRecHitsProducer_fillECal";
233 
234  TString eventout;
235  if (verbosity > 0)
236  eventout = "\nGathering info:";
237 
238  // extract crossing frame from event
239  //edm::Handle<CrossingFrame> crossingFrame;
241  //iEvent.getByType(crossingFrame);
242  //if (!crossingFrame.isValid()) {
243  // edm::LogWarning(MsgLoggerCat)
244  // << "Unable to find crossingFrame in event!";
245  // return;
246  //}
247 
249  //extract EB information
252  iEvent.getByToken(ECalUncalEBSrc_Token_, EcalUncalibRecHitEB);
253  if (!EcalUncalibRecHitEB.isValid()) {
254  edm::LogWarning(MsgLoggerCat) << "Unable to find EcalUncalRecHitEB in event!";
255  return;
256  }
257 
258  edm::Handle<EBRecHitCollection> EcalRecHitEB;
259  iEvent.getByToken(ECalEBSrc_Token_, EcalRecHitEB);
260  if (!EcalRecHitEB.isValid()) {
261  edm::LogWarning(MsgLoggerCat) << "Unable to find EcalRecHitEB in event!";
262  return;
263  }
264 
265  // loop over simhits
266  iEvent.getByToken(EBHits_Token_, crossingFrame);
267  if (!crossingFrame.isValid()) {
268  edm::LogWarning(MsgLoggerCat) << "Unable to find cal barrel crossingFrame in event!";
269  return;
270  }
271  //std::unique_ptr<MixCollection<PCaloHit> >
272  // barrelHits(new MixCollection<PCaloHit>
273  // (crossingFrame.product(), barrelHitsName));
274  std::unique_ptr<MixCollection<PCaloHit>> barrelHits(new MixCollection<PCaloHit>(crossingFrame.product()));
275 
276  // keep track of sum of simhit energy in each crystal
277  MapType ebSimMap;
278  for (MixCollection<PCaloHit>::MixItr hitItr = barrelHits->begin(); hitItr != barrelHits->end(); ++hitItr) {
279  EBDetId ebid = EBDetId(hitItr->id());
280 
281  uint32_t crystid = ebid.rawId();
282  ebSimMap[crystid] += hitItr->energy();
283  }
284 
285  int nEBRecHits = 0;
286  // loop over RecHits
287  const EBUncalibratedRecHitCollection* EBUncalibRecHit = EcalUncalibRecHitEB.product();
288  const EBRecHitCollection* EBRecHit = EcalRecHitEB.product();
289 
291  uncalibRecHit != EBUncalibRecHit->end();
292  ++uncalibRecHit) {
293  EBDetId EBid = EBDetId(uncalibRecHit->id());
294 
295  EcalRecHitCollection::const_iterator myRecHit = EBRecHit->find(EBid);
296 
297  if (myRecHit != EBRecHit->end()) {
298  ++nEBRecHits;
299  EBRE.push_back(myRecHit->energy());
300  EBSHE.push_back(ebSimMap[EBid.rawId()]);
301  }
302  }
303 
304  if (verbosity > 1) {
305  eventout += "\n Number of EBRecHits collected:............ ";
306  eventout += nEBRecHits;
307  }
308 
310  //extract EE information
313  iEvent.getByToken(ECalUncalEESrc_Token_, EcalUncalibRecHitEE);
314  if (!EcalUncalibRecHitEE.isValid()) {
315  edm::LogWarning(MsgLoggerCat) << "Unable to find EcalUncalRecHitEE in event!";
316  return;
317  }
318 
319  edm::Handle<EERecHitCollection> EcalRecHitEE;
320  iEvent.getByToken(ECalEESrc_Token_, EcalRecHitEE);
321  if (!EcalRecHitEE.isValid()) {
322  edm::LogWarning(MsgLoggerCat) << "Unable to find EcalRecHitEE in event!";
323  return;
324  }
325 
326  // loop over simhits
327  iEvent.getByToken(EEHits_Token_, crossingFrame);
328  if (!crossingFrame.isValid()) {
329  edm::LogWarning(MsgLoggerCat) << "Unable to find cal endcap crossingFrame in event!";
330  return;
331  }
332  //std::unique_ptr<MixCollection<PCaloHit> >
333  // endcapHits(new MixCollection<PCaloHit>
334  // (crossingFrame.product(), endcapHitsName));
335  std::unique_ptr<MixCollection<PCaloHit>> endcapHits(new MixCollection<PCaloHit>(crossingFrame.product()));
336 
337  // keep track of sum of simhit energy in each crystal
338  MapType eeSimMap;
339  for (MixCollection<PCaloHit>::MixItr hitItr = endcapHits->begin(); hitItr != endcapHits->end(); ++hitItr) {
340  EEDetId eeid = EEDetId(hitItr->id());
341 
342  uint32_t crystid = eeid.rawId();
343  eeSimMap[crystid] += hitItr->energy();
344  }
345 
346  int nEERecHits = 0;
347  // loop over RecHits
348  const EEUncalibratedRecHitCollection* EEUncalibRecHit = EcalUncalibRecHitEE.product();
349  const EERecHitCollection* EERecHit = EcalRecHitEE.product();
350 
352  uncalibRecHit != EEUncalibRecHit->end();
353  ++uncalibRecHit) {
354  EEDetId EEid = EEDetId(uncalibRecHit->id());
355 
356  EcalRecHitCollection::const_iterator myRecHit = EERecHit->find(EEid);
357 
358  if (myRecHit != EERecHit->end()) {
359  ++nEERecHits;
360  EERE.push_back(myRecHit->energy());
361  EESHE.push_back(eeSimMap[EEid.rawId()]);
362  }
363  }
364 
365  if (verbosity > 1) {
366  eventout += "\n Number of EERecHits collected:............ ";
367  eventout += nEERecHits;
368  }
369 
371  //extract ES information
373  edm::Handle<ESRecHitCollection> EcalRecHitES;
374  iEvent.getByToken(ECalESSrc_Token_, EcalRecHitES);
375  if (!EcalRecHitES.isValid()) {
376  edm::LogWarning(MsgLoggerCat) << "Unable to find EcalRecHitES in event!";
377  return;
378  }
379 
380  // loop over simhits
381  iEvent.getByToken(ESHits_Token_, crossingFrame);
382  if (!crossingFrame.isValid()) {
383  edm::LogWarning(MsgLoggerCat) << "Unable to find cal preshower crossingFrame in event!";
384  return;
385  }
386  //std::unique_ptr<MixCollection<PCaloHit> >
387  // preshowerHits(new MixCollection<PCaloHit>
388  // (crossingFrame.product(), preshowerHitsName));
389  std::unique_ptr<MixCollection<PCaloHit>> preshowerHits(new MixCollection<PCaloHit>(crossingFrame.product()));
390 
391  // keep track of sum of simhit energy in each crystal
392  MapType esSimMap;
393  for (MixCollection<PCaloHit>::MixItr hitItr = preshowerHits->begin(); hitItr != preshowerHits->end(); ++hitItr) {
394  ESDetId esid = ESDetId(hitItr->id());
395 
396  uint32_t crystid = esid.rawId();
397  esSimMap[crystid] += hitItr->energy();
398  }
399 
400  int nESRecHits = 0;
401  // loop over RecHits
402  const ESRecHitCollection* ESRecHit = EcalRecHitES.product();
403  for (EcalRecHitCollection::const_iterator recHit = ESRecHit->begin(); recHit != ESRecHit->end(); ++recHit) {
404  ESDetId ESid = ESDetId(recHit->id());
405 
406  ++nESRecHits;
407  ESRE.push_back(recHit->energy());
408  ESSHE.push_back(esSimMap[ESid.rawId()]);
409  }
410 
411  if (verbosity > 1) {
412  eventout += "\n Number of ESRecHits collected:............ ";
413  eventout += nESRecHits;
414  }
415 
416  if (verbosity > 0)
417  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
418 
419  return;
420 }
421 
423  std::string MsgLoggerCat = "GlobalRecHitsProducer_storeECal";
424 
425  if (verbosity > 2) {
426  TString eventout("\n nEBRecHits = ");
427  eventout += EBRE.size();
428  for (unsigned int i = 0; i < EBRE.size(); ++i) {
429  eventout += "\n (RE, SHE) = (";
430  eventout += EBRE[i];
431  eventout += ", ";
432  eventout += EBSHE[i];
433  eventout += ")";
434  }
435  eventout += "\n nEERecHits = ";
436  eventout += EERE.size();
437  for (unsigned int i = 0; i < EERE.size(); ++i) {
438  eventout += "\n (RE, SHE) = (";
439  eventout += EERE[i];
440  eventout += ", ";
441  eventout += EESHE[i];
442  eventout += ")";
443  }
444  eventout += "\n nESRecHits = ";
445  eventout += ESRE.size();
446  for (unsigned int i = 0; i < ESRE.size(); ++i) {
447  eventout += "\n (RE, SHE) = (";
448  eventout += ESRE[i];
449  eventout += ", ";
450  eventout += ESSHE[i];
451  eventout += ")";
452  }
453  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
454  }
455 
456  product.putEBCalRecHits(EBRE, EBSHE);
457  product.putEECalRecHits(EERE, EESHE);
458  product.putESCalRecHits(ESRE, ESSHE);
459 
460  return;
461 }
462 
464  std::string MsgLoggerCat = "GlobalRecHitsProducer_fillHCal";
465 
466  TString eventout;
467  if (verbosity > 0)
468  eventout = "\nGathering info:";
469 
470  // get geometry
471  const auto& geometry = iSetup.getHandle(caloGeomToken_);
472  if (!geometry.isValid()) {
473  edm::LogWarning(MsgLoggerCat) << "Unable to find CaloGeometry in event!";
474  return;
475  }
476 
478  // extract simhit info
481  iEvent.getByToken(HCalSrc_Token_, hcalHits);
482  if (!hcalHits.isValid()) {
483  edm::LogWarning(MsgLoggerCat) << "Unable to find hcalHits in event!";
484  return;
485  }
486  const edm::PCaloHitContainer* simhitResult = hcalHits.product();
487 
488  MapType fHBEnergySimHits;
489  MapType fHEEnergySimHits;
490  MapType fHOEnergySimHits;
491  MapType fHFEnergySimHits;
492  for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end();
493  ++simhits) {
494  HcalDetId detId(simhits->id());
495  uint32_t cellid = detId.rawId();
496 
497  if (detId.subdet() == sdHcalBrl) {
498  fHBEnergySimHits[cellid] += simhits->energy();
499  }
500  if (detId.subdet() == sdHcalEC) {
501  fHEEnergySimHits[cellid] += simhits->energy();
502  }
503  if (detId.subdet() == sdHcalOut) {
504  fHOEnergySimHits[cellid] += simhits->energy();
505  }
506  if (detId.subdet() == sdHcalFwd) {
507  fHFEnergySimHits[cellid] += simhits->energy();
508  }
509  }
510 
511  // max values to be used (HO is found in HB)
512  Double_t maxHBEnergy = 0.;
513  Double_t maxHEEnergy = 0.;
514  Double_t maxHFEnergy = 0.;
515 
516  Double_t maxHBPhi = -1000.;
517  Double_t maxHEPhi = -1000.;
518  Double_t maxHOPhi = -1000.;
519  Double_t maxHFPhi = -1000.;
520 
521  Double_t maxHBEta = -1000.;
522  Double_t maxHEEta = -1000.;
523  Double_t maxHOEta = -1000.;
524  Double_t maxHFEta = -1000.;
525 
526  Double_t PI = 3.141592653589;
527 
529  // get HBHE information
531  std::vector<edm::Handle<HBHERecHitCollection>> hbhe;
532  iEvent.getManyByType(hbhe);
533  if (!hbhe[0].isValid()) {
534  edm::LogWarning(MsgLoggerCat) << "Unable to find any HBHERecHitCollections in event!";
535  return;
536  }
537  std::vector<edm::Handle<HBHERecHitCollection>>::iterator ihbhe;
538  const CaloGeometry* geo = geometry.product();
539 
540  int iHB = 0;
541  int iHE = 0;
542  for (ihbhe = hbhe.begin(); ihbhe != hbhe.end(); ++ihbhe) {
543  // find max values
544  for (HBHERecHitCollection::const_iterator jhbhe = (*ihbhe)->begin(); jhbhe != (*ihbhe)->end(); ++jhbhe) {
545  HcalDetId cell(jhbhe->id());
546 
547  if (cell.subdet() == sdHcalBrl) {
548  const HcalGeometry* cellGeometry =
549  dynamic_cast<const HcalGeometry*>(geo->getSubdetectorGeometry(DetId::Hcal, cell.subdet()));
550  double fEta = cellGeometry->getPosition(cell).eta();
551  double fPhi = cellGeometry->getPosition(cell).phi();
552  if ((jhbhe->energy()) > maxHBEnergy) {
553  maxHBEnergy = jhbhe->energy();
554  maxHBPhi = fPhi;
555  maxHOPhi = maxHBPhi;
556  maxHBEta = fEta;
557  maxHOEta = maxHBEta;
558  }
559  }
560 
561  if (cell.subdet() == sdHcalEC) {
562  const HcalGeometry* cellGeometry =
563  dynamic_cast<const HcalGeometry*>(geo->getSubdetectorGeometry(DetId::Hcal, cell.subdet()));
564  double fEta = cellGeometry->getPosition(cell).eta();
565  double fPhi = cellGeometry->getPosition(cell).phi();
566  if ((jhbhe->energy()) > maxHEEnergy) {
567  maxHEEnergy = jhbhe->energy();
568  maxHEPhi = fPhi;
569  maxHEEta = fEta;
570  }
571  }
572  } // end find max values
573 
574  for (HBHERecHitCollection::const_iterator jhbhe = (*ihbhe)->begin(); jhbhe != (*ihbhe)->end(); ++jhbhe) {
575  HcalDetId cell(jhbhe->id());
576 
577  if (cell.subdet() == sdHcalBrl) {
578  ++iHB;
579 
580  const HcalGeometry* cellGeometry =
581  dynamic_cast<const HcalGeometry*>(geo->getSubdetectorGeometry(DetId::Hcal, cell.subdet()));
582  double fEta = cellGeometry->getPosition(cell).eta();
583  double fPhi = cellGeometry->getPosition(cell).phi();
584 
585  float deltaphi = maxHBPhi - fPhi;
586  if (fPhi > maxHBPhi) {
587  deltaphi = fPhi - maxHBPhi;
588  }
589  if (deltaphi > PI) {
590  deltaphi = 2.0 * PI - deltaphi;
591  }
592  float deltaeta = fEta - maxHBEta;
593  Double_t r = sqrt(deltaeta * deltaeta + deltaphi * deltaphi);
594 
595  HBCalREC.push_back(jhbhe->energy());
596  HBCalR.push_back(r);
597  HBCalSHE.push_back(fHBEnergySimHits[cell.rawId()]);
598  }
599 
600  if (cell.subdet() == sdHcalEC) {
601  ++iHE;
602 
603  const HcalGeometry* cellGeometry =
604  dynamic_cast<const HcalGeometry*>(geo->getSubdetectorGeometry(DetId::Hcal, cell.subdet()));
605  double fEta = cellGeometry->getPosition(cell).eta();
606  double fPhi = cellGeometry->getPosition(cell).phi();
607 
608  float deltaphi = maxHEPhi - fPhi;
609  if (fPhi > maxHEPhi) {
610  deltaphi = fPhi - maxHEPhi;
611  }
612  if (deltaphi > PI) {
613  deltaphi = 2.0 * PI - deltaphi;
614  }
615  float deltaeta = fEta - maxHEEta;
616  Double_t r = sqrt(deltaeta * deltaeta + deltaphi * deltaphi);
617 
618  HECalREC.push_back(jhbhe->energy());
619  HECalR.push_back(r);
620  HECalSHE.push_back(fHEEnergySimHits[cell.rawId()]);
621  }
622  }
623  } // end loop through collection
624 
625  if (verbosity > 1) {
626  eventout += "\n Number of HBRecHits collected:............ ";
627  eventout += iHB;
628  }
629 
630  if (verbosity > 1) {
631  eventout += "\n Number of HERecHits collected:............ ";
632  eventout += iHE;
633  }
634 
636  // get HF information
638  std::vector<edm::Handle<HFRecHitCollection>> hf;
639  iEvent.getManyByType(hf);
640  if (!hf[0].isValid()) {
641  edm::LogWarning(MsgLoggerCat) << "Unable to find any HFRecHitCollections in event!";
642  return;
643  }
644  std::vector<edm::Handle<HFRecHitCollection>>::iterator ihf;
645 
646  int iHF = 0;
647  for (ihf = hf.begin(); ihf != hf.end(); ++ihf) {
648  // find max values
649  for (HFRecHitCollection::const_iterator jhf = (*ihf)->begin(); jhf != (*ihf)->end(); ++jhf) {
650  HcalDetId cell(jhf->id());
651 
652  if (cell.subdet() == sdHcalFwd) {
653  auto cellGeometry = geometry->getSubdetectorGeometry(cell)->getGeometry(cell);
654  double fEta = cellGeometry->getPosition().eta();
655  double fPhi = cellGeometry->getPosition().phi();
656  if ((jhf->energy()) > maxHFEnergy) {
657  maxHFEnergy = jhf->energy();
658  maxHFPhi = fPhi;
659  maxHFEta = fEta;
660  }
661  }
662  } // end find max values
663 
664  for (HFRecHitCollection::const_iterator jhf = (*ihf)->begin(); jhf != (*ihf)->end(); ++jhf) {
665  HcalDetId cell(jhf->id());
666 
667  if (cell.subdet() == sdHcalFwd) {
668  ++iHF;
669 
670  auto cellGeometry = geometry->getSubdetectorGeometry(cell)->getGeometry(cell);
671  double fEta = cellGeometry->getPosition().eta();
672  double fPhi = cellGeometry->getPosition().phi();
673 
674  float deltaphi = maxHBPhi - fPhi;
675  if (fPhi > maxHFPhi) {
676  deltaphi = fPhi - maxHFPhi;
677  }
678  if (deltaphi > PI) {
679  deltaphi = 2.0 * PI - deltaphi;
680  }
681  float deltaeta = fEta - maxHFEta;
682  Double_t r = sqrt(deltaeta * deltaeta + deltaphi * deltaphi);
683 
684  HFCalREC.push_back(jhf->energy());
685  HFCalR.push_back(r);
686  HFCalSHE.push_back(fHFEnergySimHits[cell.rawId()]);
687  }
688  }
689  } // end loop through collection
690 
691  if (verbosity > 1) {
692  eventout += "\n Number of HFDigis collected:.............. ";
693  eventout += iHF;
694  }
695 
697  // get HO information
699  std::vector<edm::Handle<HORecHitCollection>> ho;
700  iEvent.getManyByType(ho);
701  if (!ho[0].isValid()) {
702  edm::LogWarning(MsgLoggerCat) << "Unable to find any HORecHitCollections in event!";
703  return;
704  }
705  std::vector<edm::Handle<HORecHitCollection>>::iterator iho;
706 
707  int iHO = 0;
708  for (iho = ho.begin(); iho != ho.end(); ++iho) {
709  for (HORecHitCollection::const_iterator jho = (*iho)->begin(); jho != (*iho)->end(); ++jho) {
710  HcalDetId cell(jho->id());
711 
712  if (cell.subdet() == sdHcalOut) {
713  ++iHO;
714 
715  auto cellGeometry = geometry->getSubdetectorGeometry(cell)->getGeometry(cell);
716  double fEta = cellGeometry->getPosition().eta();
717  double fPhi = cellGeometry->getPosition().phi();
718 
719  float deltaphi = maxHOPhi - fPhi;
720  if (fPhi > maxHOPhi) {
721  deltaphi = fPhi - maxHOPhi;
722  }
723  if (deltaphi > PI) {
724  deltaphi = 2.0 * PI - deltaphi;
725  }
726  float deltaeta = fEta - maxHOEta;
727  Double_t r = sqrt(deltaeta * deltaeta + deltaphi * deltaphi);
728 
729  HOCalREC.push_back(jho->energy());
730  HOCalR.push_back(r);
731  HOCalSHE.push_back(fHOEnergySimHits[cell.rawId()]);
732  }
733  }
734  } // end loop through collection
735 
736  if (verbosity > 1) {
737  eventout += "\n Number of HODigis collected:.............. ";
738  eventout += iHO;
739  }
740 
741  if (verbosity > 0)
742  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
743 
744  return;
745 }
746 
748  std::string MsgLoggerCat = "GlobalRecHitsProducer_storeHCal";
749 
750  if (verbosity > 2) {
751  TString eventout("\n nHBRecHits = ");
752  eventout += HBCalREC.size();
753  for (unsigned int i = 0; i < HBCalREC.size(); ++i) {
754  eventout += "\n (REC, R, SHE) = (";
755  eventout += HBCalREC[i];
756  eventout += ", ";
757  eventout += HBCalR[i];
758  eventout += ", ";
759  eventout += HBCalSHE[i];
760  eventout += ")";
761  }
762  eventout += "\n nHERecHits = ";
763  eventout += HECalREC.size();
764  for (unsigned int i = 0; i < HECalREC.size(); ++i) {
765  eventout += "\n (REC, R, SHE) = (";
766  eventout += HECalREC[i];
767  eventout += ", ";
768  eventout += HECalR[i];
769  eventout += ", ";
770  eventout += HECalSHE[i];
771  eventout += ")";
772  }
773  eventout += "\n nHFRecHits = ";
774  eventout += HFCalREC.size();
775  for (unsigned int i = 0; i < HFCalREC.size(); ++i) {
776  eventout += "\n (REC, R, SHE) = (";
777  eventout += HFCalREC[i];
778  eventout += ", ";
779  eventout += HFCalR[i];
780  eventout += ", ";
781  eventout += HFCalSHE[i];
782  eventout += ")";
783  }
784  eventout += "\n nHORecHits = ";
785  eventout += HOCalREC.size();
786  for (unsigned int i = 0; i < HOCalREC.size(); ++i) {
787  eventout += "\n (REC, R, SHE) = (";
788  eventout += HOCalREC[i];
789  eventout += ", ";
790  eventout += HOCalR[i];
791  eventout += ", ";
792  eventout += HOCalSHE[i];
793  eventout += ")";
794  }
795 
796  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
797  }
798 
803 
804  return;
805 }
806 
808  //Retrieve tracker topology from geometry
809  const TrackerTopology* const tTopo = &iSetup.getData(tTopoToken_);
810  ;
811  std::string MsgLoggerCat = "GlobalRecHitsProducer_fillTrk";
812  TString eventout;
813  if (verbosity > 0)
814  eventout = "\nGathering info:";
815 
816  // get strip information
818  iEvent.getByToken(SiStripSrc_Token_, rechitsmatched);
819  if (!rechitsmatched.isValid()) {
820  edm::LogWarning(MsgLoggerCat) << "Unable to find stripmatchedrechits in event!";
821  return;
822  }
823 
825 
826  const auto& tGeomHandle = iSetup.getHandle(tGeomToken_);
827  if (!tGeomHandle.isValid()) {
828  edm::LogWarning(MsgLoggerCat) << "Unable to find TrackerDigiGeometry in event!";
829  return;
830  }
831  const TrackerGeometry& tracker(*tGeomHandle);
832 
833  int nStripBrl = 0, nStripFwd = 0;
834 
835  // loop over det units
836  for (TrackerGeometry::DetContainer::const_iterator it = tGeomHandle->dets().begin(); it != tGeomHandle->dets().end();
837  ++it) {
838  uint32_t myid = ((*it)->geographicalId()).rawId();
839  DetId detid = ((*it)->geographicalId());
840 
841  //loop over rechits-matched in the same subdetector
842  SiStripMatchedRecHit2DCollection::const_iterator rechitmatchedMatch = rechitsmatched->find(detid);
843 
844  if (rechitmatchedMatch != rechitsmatched->end()) {
845  SiStripMatchedRecHit2DCollection::DetSet rechitmatchedRange = *rechitmatchedMatch;
846  SiStripMatchedRecHit2DCollection::DetSet::const_iterator rechitmatchedRangeIteratorBegin =
847  rechitmatchedRange.begin();
848  SiStripMatchedRecHit2DCollection::DetSet::const_iterator rechitmatchedRangeIteratorEnd = rechitmatchedRange.end();
849  SiStripMatchedRecHit2DCollection::DetSet::const_iterator itermatched = rechitmatchedRangeIteratorBegin;
850 
851  for (itermatched = rechitmatchedRangeIteratorBegin; itermatched != rechitmatchedRangeIteratorEnd; ++itermatched) {
852  SiStripMatchedRecHit2D const rechit = *itermatched;
853  LocalPoint position = rechit.localPosition();
854 
855  float mindist = 999999.;
856  float distx = 999999.;
857  float disty = 999999.;
858  float dist = 999999.;
859  std::pair<LocalPoint, LocalVector> closestPair;
860  matched.clear();
861 
862  float rechitmatchedx = position.x();
863  float rechitmatchedy = position.y();
864 
865  matched = associate.associateHit(rechit);
866 
867  if (!matched.empty()) {
868  //project simhit;
869  const GluedGeomDet* gluedDet = (const GluedGeomDet*)tracker.idToDet(rechit.geographicalId());
870  const StripGeomDetUnit* partnerstripdet = (StripGeomDetUnit*)gluedDet->stereoDet();
871  std::pair<LocalPoint, LocalVector> hitPair;
872 
873  for (std::vector<PSimHit>::const_iterator m = matched.begin(); m != matched.end(); m++) {
874  //project simhit;
875  hitPair = projectHit((*m), partnerstripdet, gluedDet->surface());
876  distx = fabs(rechitmatchedx - hitPair.first.x());
877  disty = fabs(rechitmatchedy - hitPair.first.y());
878  dist = sqrt(distx * distx + disty * disty);
879 
880  if (dist < mindist) {
881  mindist = dist;
882  closestPair = hitPair;
883  }
884  }
885 
886  // get TIB
887  if (detid.subdetId() == sdSiTIB) {
888  ++nStripBrl;
889 
890  if (tTopo->tibLayer(myid) == 1) {
891  TIBL1RX.push_back(rechitmatchedx);
892  TIBL1RY.push_back(rechitmatchedy);
893  TIBL1SX.push_back(closestPair.first.x());
894  TIBL1SY.push_back(closestPair.first.y());
895  }
896  if (tTopo->tibLayer(myid) == 2) {
897  TIBL2RX.push_back(rechitmatchedx);
898  TIBL2RY.push_back(rechitmatchedy);
899  TIBL2SX.push_back(closestPair.first.x());
900  TIBL2SY.push_back(closestPair.first.y());
901  }
902  if (tTopo->tibLayer(myid) == 3) {
903  TIBL3RX.push_back(rechitmatchedx);
904  TIBL3RY.push_back(rechitmatchedy);
905  TIBL3SX.push_back(closestPair.first.x());
906  TIBL3SY.push_back(closestPair.first.y());
907  }
908  if (tTopo->tibLayer(myid) == 4) {
909  TIBL4RX.push_back(rechitmatchedx);
910  TIBL4RY.push_back(rechitmatchedy);
911  TIBL4SX.push_back(closestPair.first.x());
912  TIBL4SY.push_back(closestPair.first.y());
913  }
914  }
915 
916  // get TOB
917  if (detid.subdetId() == sdSiTOB) {
918  ++nStripBrl;
919 
920  if (tTopo->tobLayer(myid) == 1) {
921  TOBL1RX.push_back(rechitmatchedx);
922  TOBL1RY.push_back(rechitmatchedy);
923  TOBL1SX.push_back(closestPair.first.x());
924  TOBL1SY.push_back(closestPair.first.y());
925  }
926  if (tTopo->tobLayer(myid) == 2) {
927  TOBL2RX.push_back(rechitmatchedx);
928  TOBL2RY.push_back(rechitmatchedy);
929  TOBL2SX.push_back(closestPair.first.x());
930  TOBL2SY.push_back(closestPair.first.y());
931  }
932  if (tTopo->tobLayer(myid) == 3) {
933  TOBL3RX.push_back(rechitmatchedx);
934  TOBL3RY.push_back(rechitmatchedy);
935  TOBL3SX.push_back(closestPair.first.x());
936  TOBL3SY.push_back(closestPair.first.y());
937  }
938  if (tTopo->tobLayer(myid) == 4) {
939  TOBL4RX.push_back(rechitmatchedx);
940  TOBL4RY.push_back(rechitmatchedy);
941  TOBL4SX.push_back(closestPair.first.x());
942  TOBL4SY.push_back(closestPair.first.y());
943  }
944  }
945 
946  // get TID
947  if (detid.subdetId() == sdSiTID) {
948  ++nStripFwd;
949 
950  if (tTopo->tidWheel(myid) == 1) {
951  TIDW1RX.push_back(rechitmatchedx);
952  TIDW1RY.push_back(rechitmatchedy);
953  TIDW1SX.push_back(closestPair.first.x());
954  TIDW1SY.push_back(closestPair.first.y());
955  }
956  if (tTopo->tidWheel(myid) == 2) {
957  TIDW2RX.push_back(rechitmatchedx);
958  TIDW2RY.push_back(rechitmatchedy);
959  TIDW2SX.push_back(closestPair.first.x());
960  TIDW2SY.push_back(closestPair.first.y());
961  }
962  if (tTopo->tidWheel(myid) == 3) {
963  TIDW3RX.push_back(rechitmatchedx);
964  TIDW3RY.push_back(rechitmatchedy);
965  TIDW3SX.push_back(closestPair.first.x());
966  TIDW3SY.push_back(closestPair.first.y());
967  }
968  }
969 
970  // get TEC
971  if (detid.subdetId() == sdSiTEC) {
972  ++nStripFwd;
973 
974  if (tTopo->tecWheel(myid) == 1) {
975  TECW1RX.push_back(rechitmatchedx);
976  TECW1RY.push_back(rechitmatchedy);
977  TECW1SX.push_back(closestPair.first.x());
978  TECW1SY.push_back(closestPair.first.y());
979  }
980  if (tTopo->tecWheel(myid) == 2) {
981  TECW2RX.push_back(rechitmatchedx);
982  TECW2RY.push_back(rechitmatchedy);
983  TECW2SX.push_back(closestPair.first.x());
984  TECW2SY.push_back(closestPair.first.y());
985  }
986  if (tTopo->tecWheel(myid) == 3) {
987  TECW3RX.push_back(rechitmatchedx);
988  TECW3RY.push_back(rechitmatchedy);
989  TECW3SX.push_back(closestPair.first.x());
990  TECW3SY.push_back(closestPair.first.y());
991  }
992  if (tTopo->tecWheel(myid) == 4) {
993  TECW4RX.push_back(rechitmatchedx);
994  TECW4RY.push_back(rechitmatchedy);
995  TECW4SX.push_back(closestPair.first.x());
996  TECW4SY.push_back(closestPair.first.y());
997  }
998  if (tTopo->tecWheel(myid) == 5) {
999  TECW5RX.push_back(rechitmatchedx);
1000  TECW5RY.push_back(rechitmatchedy);
1001  TECW5SX.push_back(closestPair.first.x());
1002  TECW5SY.push_back(closestPair.first.y());
1003  }
1004  if (tTopo->tecWheel(myid) == 6) {
1005  TECW6RX.push_back(rechitmatchedx);
1006  TECW6RY.push_back(rechitmatchedy);
1007  TECW6SX.push_back(closestPair.first.x());
1008  TECW6SY.push_back(closestPair.first.y());
1009  }
1010  if (tTopo->tecWheel(myid) == 7) {
1011  TECW7RX.push_back(rechitmatchedx);
1012  TECW7RY.push_back(rechitmatchedy);
1013  TECW7SX.push_back(closestPair.first.x());
1014  TECW7SY.push_back(closestPair.first.y());
1015  }
1016  if (tTopo->tecWheel(myid) == 8) {
1017  TECW8RX.push_back(rechitmatchedx);
1018  TECW8RY.push_back(rechitmatchedy);
1019  TECW8SX.push_back(closestPair.first.x());
1020  TECW8SY.push_back(closestPair.first.y());
1021  }
1022  }
1023 
1024  } // end if matched empty
1025  }
1026  }
1027  } // end loop over det units
1028 
1029  if (verbosity > 1) {
1030  eventout += "\n Number of BrlStripRecHits collected:...... ";
1031  eventout += nStripBrl;
1032  }
1033 
1034  if (verbosity > 1) {
1035  eventout += "\n Number of FrwdStripRecHits collected:..... ";
1036  eventout += nStripFwd;
1037  }
1038 
1039  // get pixel information
1040  //Get RecHits
1042  iEvent.getByToken(SiPxlSrc_Token_, recHitColl);
1043  if (!recHitColl.isValid()) {
1044  edm::LogWarning(MsgLoggerCat) << "Unable to find SiPixelRecHitCollection in event!";
1045  return;
1046  }
1047 
1048  int nPxlBrl = 0, nPxlFwd = 0;
1049  //iterate over detunits
1050  for (TrackerGeometry::DetContainer::const_iterator it = tGeomHandle->dets().begin(); it != tGeomHandle->dets().end();
1051  ++it) {
1052  uint32_t myid = ((*it)->geographicalId()).rawId();
1053  DetId detId = ((*it)->geographicalId());
1054  int subid = detId.subdetId();
1055 
1056  if (!((subid == sdPxlBrl) || (subid == sdPxlFwd)))
1057  continue;
1058 
1059  //const PixelGeomDetUnit * theGeomDet =
1060  // dynamic_cast<const PixelGeomDetUnit*>(theTracker.idToDet(detId) );
1061 
1062  SiPixelRecHitCollection::const_iterator pixeldet = recHitColl->find(detId);
1063  if (pixeldet == recHitColl->end())
1064  continue;
1065  SiPixelRecHitCollection::DetSet pixelrechitRange = *pixeldet;
1066  SiPixelRecHitCollection::DetSet::const_iterator pixelrechitRangeIteratorBegin = pixelrechitRange.begin();
1067  SiPixelRecHitCollection::DetSet::const_iterator pixelrechitRangeIteratorEnd = pixelrechitRange.end();
1068  SiPixelRecHitCollection::DetSet::const_iterator pixeliter = pixelrechitRangeIteratorBegin;
1069  std::vector<PSimHit> matched;
1070 
1071  //----Loop over rechits for this detId
1072  for (; pixeliter != pixelrechitRangeIteratorEnd; ++pixeliter) {
1073  matched.clear();
1074  matched = associate.associateHit(*pixeliter);
1075 
1076  if (!matched.empty()) {
1077  float closest = 9999.9;
1078  //std::vector<PSimHit>::const_iterator closestit = matched.begin();
1079  LocalPoint lp = pixeliter->localPosition();
1080  float rechit_x = lp.x();
1081  float rechit_y = lp.y();
1082 
1083  float sim_x = 0.;
1084  float sim_y = 0.;
1085 
1086  //loop over sim hits and fill closet
1087  for (std::vector<PSimHit>::const_iterator m = matched.begin(); m != matched.end(); ++m) {
1088  float sim_x1 = (*m).entryPoint().x();
1089  float sim_x2 = (*m).exitPoint().x();
1090  float sim_xpos = 0.5 * (sim_x1 + sim_x2);
1091 
1092  float sim_y1 = (*m).entryPoint().y();
1093  float sim_y2 = (*m).exitPoint().y();
1094  float sim_ypos = 0.5 * (sim_y1 + sim_y2);
1095 
1096  float x_res = fabs(sim_xpos - rechit_x);
1097  float y_res = fabs(sim_ypos - rechit_y);
1098 
1099  float dist = sqrt(x_res * x_res + y_res * y_res);
1100 
1101  if (dist < closest) {
1102  closest = dist;
1103  sim_x = sim_xpos;
1104  sim_y = sim_ypos;
1105  }
1106  } // end sim hit loop
1107 
1108  // get Barrel pixels
1109  if (subid == sdPxlBrl) {
1110  ++nPxlBrl;
1111 
1112  if (tTopo->pxbLayer(myid) == 1) {
1113  BRL1RX.push_back(rechit_x);
1114  BRL1RY.push_back(rechit_y);
1115  BRL1SX.push_back(sim_x);
1116  BRL1SY.push_back(sim_y);
1117  }
1118  if (tTopo->pxbLayer(myid) == 2) {
1119  BRL2RX.push_back(rechit_x);
1120  BRL2RY.push_back(rechit_y);
1121  BRL2SX.push_back(sim_x);
1122  BRL2SY.push_back(sim_y);
1123  }
1124  if (tTopo->pxbLayer(myid) == 3) {
1125  BRL3RX.push_back(rechit_x);
1126  BRL3RY.push_back(rechit_y);
1127  BRL3SX.push_back(sim_x);
1128  BRL3SY.push_back(sim_y);
1129  }
1130  }
1131 
1132  // get Forward pixels
1133  if (subid == sdPxlFwd) {
1134  ++nPxlFwd;
1135 
1136  if (tTopo->pxfDisk(myid) == 1) {
1137  if (tTopo->pxfSide(myid) == 1) {
1138  FWD1nRX.push_back(rechit_x);
1139  FWD1nRY.push_back(rechit_y);
1140  FWD1nSX.push_back(sim_x);
1141  FWD1nSY.push_back(sim_y);
1142  }
1143  if (tTopo->pxfSide(myid) == 2) {
1144  FWD1pRX.push_back(rechit_x);
1145  FWD1pRY.push_back(rechit_y);
1146  FWD1pSX.push_back(sim_x);
1147  FWD1pSY.push_back(sim_y);
1148  }
1149  }
1150  if (tTopo->pxfDisk(myid) == 2) {
1151  if (tTopo->pxfSide(myid) == 1) {
1152  FWD2nRX.push_back(rechit_x);
1153  FWD2nRY.push_back(rechit_y);
1154  FWD2nSX.push_back(sim_x);
1155  FWD2nSY.push_back(sim_y);
1156  }
1157  if (tTopo->pxfSide(myid) == 2) {
1158  FWD2pRX.push_back(rechit_x);
1159  FWD2pRY.push_back(rechit_y);
1160  FWD2pSX.push_back(sim_x);
1161  FWD2pSY.push_back(sim_y);
1162  }
1163  }
1164  }
1165  } // end matched emtpy
1166  } // <-----end rechit loop
1167  } // <------ end detunit loop
1168 
1169  if (verbosity > 1) {
1170  eventout += "\n Number of BrlPixelRecHits collected:...... ";
1171  eventout += nPxlBrl;
1172  }
1173 
1174  if (verbosity > 1) {
1175  eventout += "\n Number of FrwdPixelRecHits collected:..... ";
1176  eventout += nPxlFwd;
1177  }
1178 
1179  if (verbosity > 0)
1180  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1181 
1182  return;
1183 }
1184 
1186  std::string MsgLoggerCat = "GlobalRecHitsProducer_storeTrk";
1187 
1188  if (verbosity > 2) {
1189  // strip output
1190  TString eventout("\n nTIBL1 = ");
1191  eventout += TIBL1RX.size();
1192  for (unsigned int i = 0; i < TIBL1RX.size(); ++i) {
1193  eventout += "\n (RX, RY, SX, SY) = (";
1194  eventout += TIBL1RX[i];
1195  eventout += ", ";
1196  eventout += TIBL1RY[i];
1197  eventout += ", ";
1198  eventout += TIBL1SX[i];
1199  eventout += ", ";
1200  eventout += TIBL1SY[i];
1201  eventout += ")";
1202  }
1203  eventout += "\n nTIBL2 = ";
1204  eventout += TIBL2RX.size();
1205  for (unsigned int i = 0; i < TIBL2RX.size(); ++i) {
1206  eventout += "\n (RX, RY, SX, SY) = (";
1207  eventout += TIBL2RX[i];
1208  eventout += ", ";
1209  eventout += TIBL2RY[i];
1210  eventout += ", ";
1211  eventout += TIBL2SX[i];
1212  eventout += ", ";
1213  eventout += TIBL2SY[i];
1214  eventout += ")";
1215  }
1216  eventout += "\n nTIBL3 = ";
1217  eventout += TIBL3RX.size();
1218  for (unsigned int i = 0; i < TIBL3RX.size(); ++i) {
1219  eventout += "\n (RX, RY, SX, SY) = (";
1220  eventout += TIBL3RX[i];
1221  eventout += ", ";
1222  eventout += TIBL3RY[i];
1223  eventout += ", ";
1224  eventout += TIBL3SX[i];
1225  eventout += ", ";
1226  eventout += TIBL3SY[i];
1227  eventout += ")";
1228  }
1229  eventout += "\n nTIBL4 = ";
1230  eventout += TIBL4RX.size();
1231  for (unsigned int i = 0; i < TIBL4RX.size(); ++i) {
1232  eventout += "\n (RX, RY, SX, SY) = (";
1233  eventout += TIBL4RX[i];
1234  eventout += ", ";
1235  eventout += TIBL4RY[i];
1236  eventout += ", ";
1237  eventout += TIBL4SX[i];
1238  eventout += ", ";
1239  eventout += TIBL4SY[i];
1240  eventout += ")";
1241  }
1242  eventout += "\n nTOBL1 = ";
1243  eventout += TOBL1RX.size();
1244  for (unsigned int i = 0; i < TOBL1RX.size(); ++i) {
1245  eventout += "\n (RX, RY, SX, SY) = (";
1246  eventout += TOBL1RX[i];
1247  eventout += ", ";
1248  eventout += TOBL1RY[i];
1249  eventout += ", ";
1250  eventout += TOBL1SX[i];
1251  eventout += ", ";
1252  eventout += TOBL1SY[i];
1253  eventout += ")";
1254  }
1255  eventout += "\n nTOBL2 = ";
1256  eventout += TOBL2RX.size();
1257  for (unsigned int i = 0; i < TOBL2RX.size(); ++i) {
1258  eventout += "\n (RX, RY, SX, SY) = (";
1259  eventout += TOBL2RX[i];
1260  eventout += ", ";
1261  eventout += TOBL2RY[i];
1262  eventout += ", ";
1263  eventout += TOBL2SX[i];
1264  eventout += ", ";
1265  eventout += TOBL2SY[i];
1266  eventout += ")";
1267  }
1268  eventout += "\n nTOBL3 = ";
1269  eventout += TOBL3RX.size();
1270  for (unsigned int i = 0; i < TOBL3RX.size(); ++i) {
1271  eventout += "\n (RX, RY, SX, SY) = (";
1272  eventout += TOBL3RX[i];
1273  eventout += ", ";
1274  eventout += TOBL3RY[i];
1275  eventout += ", ";
1276  eventout += TOBL3SX[i];
1277  eventout += ", ";
1278  eventout += TOBL3SY[i];
1279  eventout += ")";
1280  }
1281  eventout += "\n nTOBL4 = ";
1282  eventout += TOBL4RX.size();
1283  for (unsigned int i = 0; i < TOBL4RX.size(); ++i) {
1284  eventout += "\n (RX, RY, SX, SY) = (";
1285  eventout += TOBL4RX[i];
1286  eventout += ", ";
1287  eventout += TOBL4RY[i];
1288  eventout += ", ";
1289  eventout += TOBL4SX[i];
1290  eventout += ", ";
1291  eventout += TOBL4SY[i];
1292  eventout += ")";
1293  }
1294  eventout += "\n nTIDW1 = ";
1295  eventout += TIDW1RX.size();
1296  for (unsigned int i = 0; i < TIDW1RX.size(); ++i) {
1297  eventout += "\n (RX, RY, SX, SY) = (";
1298  eventout += TIDW1RX[i];
1299  eventout += ", ";
1300  eventout += TIDW1RY[i];
1301  eventout += ", ";
1302  eventout += TIDW1SX[i];
1303  eventout += ", ";
1304  eventout += TIDW1SY[i];
1305  eventout += ")";
1306  }
1307  eventout += "\n nTIDW2 = ";
1308  eventout += TIDW2RX.size();
1309  for (unsigned int i = 0; i < TIDW2RX.size(); ++i) {
1310  eventout += "\n (RX, RY, SX, SY) = (";
1311  eventout += TIDW2RX[i];
1312  eventout += ", ";
1313  eventout += TIDW2RY[i];
1314  eventout += ", ";
1315  eventout += TIDW2SX[i];
1316  eventout += ", ";
1317  eventout += TIDW2SY[i];
1318  eventout += ")";
1319  }
1320  eventout += "\n nTIDW3 = ";
1321  eventout += TIDW3RX.size();
1322  for (unsigned int i = 0; i < TIDW3RX.size(); ++i) {
1323  eventout += "\n (RX, RY, SX, SY) = (";
1324  eventout += TIDW3RX[i];
1325  eventout += ", ";
1326  eventout += TIDW3RY[i];
1327  eventout += ", ";
1328  eventout += TIDW3SX[i];
1329  eventout += ", ";
1330  eventout += TIDW3SY[i];
1331  eventout += ")";
1332  }
1333  eventout += "\n nTECW1 = ";
1334  eventout += TECW1RX.size();
1335  for (unsigned int i = 0; i < TECW1RX.size(); ++i) {
1336  eventout += "\n (RX, RY, SX, SY) = (";
1337  eventout += TECW1RX[i];
1338  eventout += ", ";
1339  eventout += TECW1RY[i];
1340  eventout += ", ";
1341  eventout += TECW1SX[i];
1342  eventout += ", ";
1343  eventout += TECW1SY[i];
1344  eventout += ")";
1345  }
1346  eventout += "\n nTECW2 = ";
1347  eventout += TECW2RX.size();
1348  for (unsigned int i = 0; i < TECW2RX.size(); ++i) {
1349  eventout += "\n (RX, RY, SX, SY) = (";
1350  eventout += TECW2RX[i];
1351  eventout += ", ";
1352  eventout += TECW2RY[i];
1353  eventout += ", ";
1354  eventout += TECW2SX[i];
1355  eventout += ", ";
1356  eventout += TECW2SY[i];
1357  eventout += ")";
1358  }
1359  eventout += "\n nTECW3 = ";
1360  eventout += TECW3RX.size();
1361  for (unsigned int i = 0; i < TECW3RX.size(); ++i) {
1362  eventout += "\n (RX, RY, SX, SY) = (";
1363  eventout += TECW3RX[i];
1364  eventout += ", ";
1365  eventout += TECW3RY[i];
1366  eventout += ", ";
1367  eventout += TECW3SX[i];
1368  eventout += ", ";
1369  eventout += TECW3SY[i];
1370  eventout += ")";
1371  }
1372  eventout += "\n nTECW4 = ";
1373  eventout += TECW4RX.size();
1374  for (unsigned int i = 0; i < TECW4RX.size(); ++i) {
1375  eventout += "\n (RX, RY, SX, SY) = (";
1376  eventout += TECW4RX[i];
1377  eventout += ", ";
1378  eventout += TECW4RY[i];
1379  eventout += ", ";
1380  eventout += TECW4SX[i];
1381  eventout += ", ";
1382  eventout += TECW4SY[i];
1383  eventout += ")";
1384  }
1385  eventout += "\n nTECW5 = ";
1386  eventout += TECW5RX.size();
1387  for (unsigned int i = 0; i < TECW5RX.size(); ++i) {
1388  eventout += "\n (RX, RY, SX, SY) = (";
1389  eventout += TECW5RX[i];
1390  eventout += ", ";
1391  eventout += TECW5RY[i];
1392  eventout += ", ";
1393  eventout += TECW5SX[i];
1394  eventout += ", ";
1395  eventout += TECW5SY[i];
1396  eventout += ")";
1397  }
1398  eventout += "\n nTECW6 = ";
1399  eventout += TECW6RX.size();
1400  for (unsigned int i = 0; i < TECW6RX.size(); ++i) {
1401  eventout += "\n (RX, RY, SX, SY) = (";
1402  eventout += TECW6RX[i];
1403  eventout += ", ";
1404  eventout += TECW6RY[i];
1405  eventout += ", ";
1406  eventout += TECW6SX[i];
1407  eventout += ", ";
1408  eventout += TECW6SY[i];
1409  eventout += ")";
1410  }
1411  eventout += "\n nTECW7 = ";
1412  eventout += TECW7RX.size();
1413  for (unsigned int i = 0; i < TECW7RX.size(); ++i) {
1414  eventout += "\n (RX, RY, SX, SY) = (";
1415  eventout += TECW7RX[i];
1416  eventout += ", ";
1417  eventout += TECW7RY[i];
1418  eventout += ", ";
1419  eventout += TECW7SX[i];
1420  eventout += ", ";
1421  eventout += TECW7SY[i];
1422  eventout += ")";
1423  }
1424  eventout += "\n nTECW8 = ";
1425  eventout += TECW8RX.size();
1426  for (unsigned int i = 0; i < TECW8RX.size(); ++i) {
1427  eventout += "\n (RX, RY, SX, SY) = (";
1428  eventout += TECW8RX[i];
1429  eventout += ", ";
1430  eventout += TECW8RY[i];
1431  eventout += ", ";
1432  eventout += TECW8SX[i];
1433  eventout += ", ";
1434  eventout += TECW8SY[i];
1435  eventout += ")";
1436  }
1437 
1438  // pixel output
1439  eventout += "\n nBRL1 = ";
1440  eventout += BRL1RX.size();
1441  for (unsigned int i = 0; i < BRL1RX.size(); ++i) {
1442  eventout += "\n (RX, RY, SX, SY) = (";
1443  eventout += BRL1RX[i];
1444  eventout += ", ";
1445  eventout += BRL1RY[i];
1446  eventout += ", ";
1447  eventout += BRL1SX[i];
1448  eventout += ", ";
1449  eventout += BRL1SY[i];
1450  eventout += ")";
1451  }
1452  eventout += "\n nBRL2 = ";
1453  eventout += BRL2RX.size();
1454  for (unsigned int i = 0; i < BRL2RX.size(); ++i) {
1455  eventout += "\n (RX, RY, SX, SY) = (";
1456  eventout += BRL2RX[i];
1457  eventout += ", ";
1458  eventout += BRL2RY[i];
1459  eventout += ", ";
1460  eventout += BRL2SX[i];
1461  eventout += ", ";
1462  eventout += BRL2SY[i];
1463  eventout += ")";
1464  }
1465  eventout += "\n nBRL3 = ";
1466  eventout += BRL3RX.size();
1467  for (unsigned int i = 0; i < BRL3RX.size(); ++i) {
1468  eventout += "\n (RX, RY, SX, SY) = (";
1469  eventout += BRL3RX[i];
1470  eventout += ", ";
1471  eventout += BRL3RY[i];
1472  eventout += ", ";
1473  eventout += BRL3SX[i];
1474  eventout += ", ";
1475  eventout += BRL3SY[i];
1476  eventout += ")";
1477  }
1478  eventout += "\n nFWD1p = ";
1479  eventout += FWD1pRX.size();
1480  for (unsigned int i = 0; i < FWD1pRX.size(); ++i) {
1481  eventout += "\n (RX, RY, SX, SY) = (";
1482  eventout += FWD1pRX[i];
1483  eventout += ", ";
1484  eventout += FWD1pRY[i];
1485  eventout += ", ";
1486  eventout += FWD1pSX[i];
1487  eventout += ", ";
1488  eventout += FWD1pSY[i];
1489  eventout += ")";
1490  }
1491  eventout += "\n nFWD1n = ";
1492  eventout += FWD1nRX.size();
1493  for (unsigned int i = 0; i < FWD1nRX.size(); ++i) {
1494  eventout += "\n (RX, RY, SX, SY) = (";
1495  eventout += FWD1nRX[i];
1496  eventout += ", ";
1497  eventout += FWD1nRY[i];
1498  eventout += ", ";
1499  eventout += FWD1nSX[i];
1500  eventout += ", ";
1501  eventout += FWD1nSY[i];
1502  eventout += ")";
1503  }
1504  eventout += "\n nFWD2p = ";
1505  eventout += FWD2pRX.size();
1506  for (unsigned int i = 0; i < FWD2pRX.size(); ++i) {
1507  eventout += "\n (RX, RY, SX, SY) = (";
1508  eventout += FWD2pRX[i];
1509  eventout += ", ";
1510  eventout += FWD2pRY[i];
1511  eventout += ", ";
1512  eventout += FWD2pSX[i];
1513  eventout += ", ";
1514  eventout += FWD2pSY[i];
1515  eventout += ")";
1516  }
1517  eventout += "\n nFWD2p = ";
1518  eventout += FWD2nRX.size();
1519  for (unsigned int i = 0; i < FWD2nRX.size(); ++i) {
1520  eventout += "\n (RX, RY, SX, SY) = (";
1521  eventout += FWD2nRX[i];
1522  eventout += ", ";
1523  eventout += FWD2nRY[i];
1524  eventout += ", ";
1525  eventout += FWD2nSX[i];
1526  eventout += ", ";
1527  eventout += FWD2nSY[i];
1528  eventout += ")";
1529  }
1530 
1531  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1532  }
1533 
1534  // strip output
1554 
1555  // pixel output
1563 
1564  return;
1565 }
1566 
1568  std::string MsgLoggerCat = "GlobalRecHitsProducer_fillMuon";
1569 
1570  TString eventout;
1571  if (verbosity > 0)
1572  eventout = "\nGathering info:";
1573 
1574  // get DT information
1575  const auto& dtGeom = iSetup.getHandle(dtGeomToken_);
1576  if (!dtGeom.isValid()) {
1577  edm::LogWarning(MsgLoggerCat) << "Unable to find DTMuonGeometryRecord in event!";
1578  return;
1579  }
1580 
1582  iEvent.getByToken(MuDTSimSrc_Token_, dtsimHits);
1583  if (!dtsimHits.isValid()) {
1584  edm::LogWarning(MsgLoggerCat) << "Unable to find dtsimHits in event!";
1585  return;
1586  }
1587 
1588  std::map<DTWireId, edm::PSimHitContainer> simHitsPerWire =
1590 
1592  iEvent.getByToken(MuDTSrc_Token_, dtRecHits);
1593  if (!dtRecHits.isValid()) {
1594  edm::LogWarning(MsgLoggerCat) << "Unable to find dtRecHits in event!";
1595  return;
1596  }
1597 
1598  std::map<DTWireId, std::vector<DTRecHit1DPair>> recHitsPerWire = map1DRecHitsPerWire(dtRecHits.product());
1599 
1600  int nDt = compute(dtGeom.product(), simHitsPerWire, recHitsPerWire, 1);
1601 
1602  if (verbosity > 1) {
1603  eventout += "\n Number of DtMuonRecHits collected:........ ";
1604  eventout += nDt;
1605  }
1606 
1607  // get CSC Strip information
1608  // get map of sim hits
1609  theMap.clear();
1610  //edm::Handle<CrossingFrame> cf;
1612  //iEvent.getByType(cf);
1613  //if (!cf.isValid()) {
1614  // edm::LogWarning(MsgLoggerCat)
1615  // << "Unable to find CrossingFrame in event!";
1616  // return;
1617  //}
1618  //MixCollection<PSimHit> simHits(cf.product(), "MuonCSCHits");
1619  iEvent.getByToken(MuCSCHits_Token_, cf);
1620  if (!cf.isValid()) {
1621  edm::LogWarning(MsgLoggerCat) << "Unable to find muo CSC crossingFrame in event!";
1622  return;
1623  }
1625 
1626  // arrange the hits by detUnit
1627  for (MixCollection<PSimHit>::MixItr hitItr = simHits.begin(); hitItr != simHits.end(); ++hitItr) {
1628  theMap[hitItr->detUnitId()].push_back(*hitItr);
1629  }
1630 
1631  // get geometry
1632  const auto& hGeom = iSetup.getHandle(cscGeomToken_);
1633  if (!hGeom.isValid()) {
1634  edm::LogWarning(MsgLoggerCat) << "Unable to find CSCMuonGeometryRecord in event!";
1635  return;
1636  }
1637  const CSCGeometry* theCSCGeometry = &*hGeom;
1638 
1639  // get rechits
1641  iEvent.getByToken(MuCSCSrc_Token_, hRecHits);
1642  if (!hRecHits.isValid()) {
1643  edm::LogWarning(MsgLoggerCat) << "Unable to find CSC RecHits in event!";
1644  return;
1645  }
1646  const CSCRecHit2DCollection* cscRecHits = hRecHits.product();
1647 
1648  int nCSC = 0;
1649  for (CSCRecHit2DCollection::const_iterator recHitItr = cscRecHits->begin(); recHitItr != cscRecHits->end();
1650  ++recHitItr) {
1651  int detId = (*recHitItr).cscDetId().rawId();
1652 
1654  std::map<int, edm::PSimHitContainer>::const_iterator mapItr = theMap.find(detId);
1655  if (mapItr != theMap.end()) {
1656  simHits = mapItr->second;
1657  }
1658 
1659  if (simHits.size() == 1) {
1660  ++nCSC;
1661 
1662  const GeomDetUnit* detUnit = theCSCGeometry->idToDetUnit(CSCDetId(detId));
1663  const CSCLayer* layer = dynamic_cast<const CSCLayer*>(detUnit);
1664 
1665  int chamberType = layer->chamber()->specs()->chamberType();
1666  plotResolution(simHits[0], *recHitItr, layer, chamberType);
1667  }
1668  }
1669 
1670  if (verbosity > 1) {
1671  eventout += "\n Number of CSCRecHits collected:........... ";
1672  eventout += nCSC;
1673  }
1674 
1675  // get RPC information
1676  std::map<double, int> mapsim, maprec;
1677  std::map<int, double> nmapsim, nmaprec;
1678 
1679  const auto& rpcGeom = iSetup.getHandle(rpcGeomToken_);
1680  if (!rpcGeom.isValid()) {
1681  edm::LogWarning(MsgLoggerCat) << "Unable to find RPCMuonGeometryRecord in event!";
1682  return;
1683  }
1684 
1686  iEvent.getByToken(MuRPCSimSrc_Token_, simHit);
1687  if (!simHit.isValid()) {
1688  edm::LogWarning(MsgLoggerCat) << "Unable to find RPCSimHit in event!";
1689  return;
1690  }
1691 
1693  iEvent.getByToken(MuRPCSrc_Token_, recHit);
1694  if (!simHit.isValid()) {
1695  edm::LogWarning(MsgLoggerCat) << "Unable to find RPCRecHit in event!";
1696  return;
1697  }
1698 
1699  int nRPC = 0;
1701  int nrec = 0;
1702  for (recIt = recHit->begin(); recIt != recHit->end(); ++recIt) {
1703  RPCDetId Rid = (RPCDetId)(*recIt).rpcId();
1704  const RPCRoll* roll = dynamic_cast<const RPCRoll*>(rpcGeom->roll(Rid));
1705  if (roll->isForward()) {
1706  if (verbosity > 1) {
1707  eventout += "\n Number of RPCRecHits collected:........... ";
1708  eventout += nRPC;
1709  }
1710 
1711  if (verbosity > 0)
1712  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1713  return;
1714  }
1715  nrec = nrec + 1;
1716  LocalPoint rhitlocal = (*recIt).localPosition();
1717  double rhitlocalx = rhitlocal.x();
1718  maprec[rhitlocalx] = nrec;
1719  }
1720 
1721  int i = 0;
1722  for (std::map<double, int>::iterator iter = maprec.begin(); iter != maprec.end(); ++iter) {
1723  i = i + 1;
1724  nmaprec[i] = (*iter).first;
1725  }
1726 
1727  edm::PSimHitContainer::const_iterator simIt;
1728  int nsim = 0;
1729  for (simIt = simHit->begin(); simIt != simHit->end(); simIt++) {
1730  int ptype = (*simIt).particleType();
1731  //RPCDetId Rsid = (RPCDetId)(*simIt).detUnitId();
1732  if (ptype == 13 || ptype == -13) {
1733  nsim = nsim + 1;
1734  LocalPoint shitlocal = (*simIt).localPosition();
1735  double shitlocalx = shitlocal.x();
1736  mapsim[shitlocalx] = nsim;
1737  }
1738  }
1739 
1740  i = 0;
1741  for (std::map<double, int>::iterator iter = mapsim.begin(); iter != mapsim.end(); ++iter) {
1742  i = i + 1;
1743  nmapsim[i] = (*iter).first;
1744  }
1745 
1746  if (nsim == nrec) {
1747  for (int r = 0; r < nsim; r++) {
1748  ++nRPC;
1749  RPCRHX.push_back(nmaprec[r + 1]);
1750  RPCSHX.push_back(nmapsim[r + 1]);
1751  }
1752  }
1753 
1754  if (verbosity > 1) {
1755  eventout += "\n Number of RPCRecHits collected:........... ";
1756  eventout += nRPC;
1757  }
1758 
1759  if (verbosity > 0)
1760  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1761 
1762  return;
1763 }
1764 
1766  std::string MsgLoggerCat = "GlobalRecHitsProducer_storeMuon";
1767 
1768  if (verbosity > 2) {
1769  // dt output
1770  TString eventout("\n nDT = ");
1771  eventout += DTRHD.size();
1772  for (unsigned int i = 0; i < DTRHD.size(); ++i) {
1773  eventout += "\n (RHD, SHD) = (";
1774  eventout += DTRHD[i];
1775  eventout += ", ";
1776  eventout += DTSHD[i];
1777  eventout += ")";
1778  }
1779 
1780  // CSC Strip
1781  eventout += "\n nCSC = ";
1782  eventout += CSCRHPHI.size();
1783  for (unsigned int i = 0; i < CSCRHPHI.size(); ++i) {
1784  eventout += "\n (rhphi, rhperp, shphi) = (";
1785  eventout += CSCRHPHI[i];
1786  eventout += ", ";
1787  eventout += CSCRHPERP[i];
1788  eventout += ", ";
1789  eventout += CSCSHPHI[i];
1790  eventout += ")";
1791  }
1792 
1793  // RPC
1794  eventout += "\n nRPC = ";
1795  eventout += RPCRHX.size();
1796  for (unsigned int i = 0; i < RPCRHX.size(); ++i) {
1797  eventout += "\n (rhx, shx) = (";
1798  eventout += RPCRHX[i];
1799  eventout += ", ";
1800  eventout += RPCSHX[i];
1801  eventout += ")";
1802  }
1803 
1804  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1805  }
1806 
1807  product.putDTRecHits(DTRHD, DTSHD);
1808 
1810 
1811  product.putRPCRecHits(RPCRHX, RPCSHX);
1812 
1813  return;
1814 }
1815 
1817  std::string MsgLoggerCat = "GlobalRecHitsProducer_clear";
1818 
1819  if (verbosity > 0)
1820  edm::LogInfo(MsgLoggerCat) << "Clearing event holders";
1821 
1822  // reset electromagnetic info
1823  // EE info
1824  EERE.clear();
1825  EESHE.clear();
1826  // EB info
1827  EBRE.clear();
1828  EBSHE.clear();
1829  // ES info
1830  ESRE.clear();
1831  ESSHE.clear();
1832 
1833  // reset HCal Info
1834  HBCalREC.clear();
1835  HBCalR.clear();
1836  HBCalSHE.clear();
1837  HECalREC.clear();
1838  HECalR.clear();
1839  HECalSHE.clear();
1840  HOCalREC.clear();
1841  HOCalR.clear();
1842  HOCalSHE.clear();
1843  HFCalREC.clear();
1844  HFCalR.clear();
1845  HFCalSHE.clear();
1846 
1847  // reset Track Info
1848  TIBL1RX.clear();
1849  TIBL2RX.clear();
1850  TIBL3RX.clear();
1851  TIBL4RX.clear();
1852  TIBL1RY.clear();
1853  TIBL2RY.clear();
1854  TIBL3RY.clear();
1855  TIBL4RY.clear();
1856  TIBL1SX.clear();
1857  TIBL2SX.clear();
1858  TIBL3SX.clear();
1859  TIBL4SX.clear();
1860  TIBL1SY.clear();
1861  TIBL2SY.clear();
1862  TIBL3SY.clear();
1863  TIBL4SY.clear();
1864 
1865  TOBL1RX.clear();
1866  TOBL2RX.clear();
1867  TOBL3RX.clear();
1868  TOBL4RX.clear();
1869  TOBL1RY.clear();
1870  TOBL2RY.clear();
1871  TOBL3RY.clear();
1872  TOBL4RY.clear();
1873  TOBL1SX.clear();
1874  TOBL2SX.clear();
1875  TOBL3SX.clear();
1876  TOBL4SX.clear();
1877  TOBL1SY.clear();
1878  TOBL2SY.clear();
1879  TOBL3SY.clear();
1880  TOBL4SY.clear();
1881 
1882  TIDW1RX.clear();
1883  TIDW2RX.clear();
1884  TIDW3RX.clear();
1885  TIDW1RY.clear();
1886  TIDW2RY.clear();
1887  TIDW3RY.clear();
1888  TIDW1SX.clear();
1889  TIDW2SX.clear();
1890  TIDW3SX.clear();
1891  TIDW1SY.clear();
1892  TIDW2SY.clear();
1893  TIDW3SY.clear();
1894 
1895  TECW1RX.clear();
1896  TECW2RX.clear();
1897  TECW3RX.clear();
1898  TECW4RX.clear();
1899  TECW5RX.clear();
1900  TECW6RX.clear();
1901  TECW7RX.clear();
1902  TECW8RX.clear();
1903  TECW1RY.clear();
1904  TECW2RY.clear();
1905  TECW3RY.clear();
1906  TECW4RY.clear();
1907  TECW5RY.clear();
1908  TECW6RY.clear();
1909  TECW7RY.clear();
1910  TECW8RY.clear();
1911  TECW1SX.clear();
1912  TECW2SX.clear();
1913  TECW3SX.clear();
1914  TECW4SX.clear();
1915  TECW5SX.clear();
1916  TECW6SX.clear();
1917  TECW7SX.clear();
1918  TECW8SX.clear();
1919  TECW1SY.clear();
1920  TECW2SY.clear();
1921  TECW3SY.clear();
1922  TECW4SY.clear();
1923  TECW5SY.clear();
1924  TECW6SY.clear();
1925  TECW7SY.clear();
1926  TECW8SY.clear();
1927 
1928  BRL1RX.clear();
1929  BRL1RY.clear();
1930  BRL1SX.clear();
1931  BRL1SY.clear();
1932  BRL2RX.clear();
1933  BRL2RY.clear();
1934  BRL2SX.clear();
1935  BRL2SY.clear();
1936  BRL3RX.clear();
1937  BRL3RY.clear();
1938  BRL3SX.clear();
1939  BRL3SY.clear();
1940 
1941  FWD1pRX.clear();
1942  FWD1pRY.clear();
1943  FWD1pSX.clear();
1944  FWD1pSY.clear();
1945  FWD1nRX.clear();
1946  FWD1nRY.clear();
1947  FWD1nSX.clear();
1948  FWD1nSY.clear();
1949  FWD2pRX.clear();
1950  FWD2pRY.clear();
1951  FWD2pSX.clear();
1952  FWD2pSY.clear();
1953  FWD2nRX.clear();
1954  FWD2nRY.clear();
1955  FWD2nSX.clear();
1956  FWD2nSY.clear();
1957 
1958  //muon clear
1959  DTRHD.clear();
1960  DTSHD.clear();
1961 
1962  CSCRHPHI.clear();
1963  CSCRHPERP.clear();
1964  CSCSHPHI.clear();
1965 
1966  RPCRHX.clear();
1967  RPCSHX.clear();
1968 
1969  return;
1970 }
1971 
1972 //needed by to do the residual for matched hits in SiStrip
1973 std::pair<LocalPoint, LocalVector> GlobalRecHitsProducer::projectHit(const PSimHit& hit,
1974  const StripGeomDetUnit* stripDet,
1975  const BoundPlane& plane) {
1976  const StripTopology& topol = stripDet->specificTopology();
1977  GlobalPoint globalpos = stripDet->surface().toGlobal(hit.localPosition());
1978  LocalPoint localHit = plane.toLocal(globalpos);
1979  //track direction
1980  LocalVector locdir = hit.localDirection();
1981  //rotate track in new frame
1982 
1983  GlobalVector globaldir = stripDet->surface().toGlobal(locdir);
1984  LocalVector dir = plane.toLocal(globaldir);
1985  float scale = -localHit.z() / dir.z();
1986 
1987  LocalPoint projectedPos = localHit + scale * dir;
1988 
1989  float selfAngle = topol.stripAngle(topol.strip(hit.localPosition()));
1990 
1991  // vector along strip in hit frame
1992  LocalVector stripDir(sin(selfAngle), cos(selfAngle), 0);
1993 
1994  LocalVector localStripDir(plane.toLocal(stripDet->surface().toGlobal(stripDir)));
1995 
1996  return std::pair<LocalPoint, LocalVector>(projectedPos, localStripDir);
1997 }
1998 
1999 // Return a map between DTRecHit1DPair and wireId
2000 std::map<DTWireId, std::vector<DTRecHit1DPair>> GlobalRecHitsProducer::map1DRecHitsPerWire(
2001  const DTRecHitCollection* dt1DRecHitPairs) {
2002  std::map<DTWireId, std::vector<DTRecHit1DPair>> ret;
2003 
2004  for (DTRecHitCollection::const_iterator rechit = dt1DRecHitPairs->begin(); rechit != dt1DRecHitPairs->end();
2005  rechit++) {
2006  ret[(*rechit).wireId()].push_back(*rechit);
2007  }
2008 
2009  return ret;
2010 }
2011 
2012 // Compute SimHit distance from wire (cm)
2014  float xwire = layer->specificTopology().wirePosition(wireId.wire());
2015  LocalPoint entryP = hit.entryPoint();
2016  LocalPoint exitP = hit.exitPoint();
2017  float xEntry = entryP.x() - xwire;
2018  float xExit = exitP.x() - xwire;
2019 
2020  //FIXME: check...
2021  return fabs(xEntry - (entryP.z() * (xExit - xEntry)) / (exitP.z() - entryP.z()));
2022 }
2023 
2024 // Find the RecHit closest to the muon SimHit
2025 template <typename type>
2027  DTWireId wireId,
2028  const std::vector<type>& recHits,
2029  const float simHitDist) {
2030  float res = 99999;
2031  const type* theBestRecHit = nullptr;
2032  // Loop over RecHits within the cell
2033  for (typename std::vector<type>::const_iterator recHit = recHits.begin(); recHit != recHits.end(); recHit++) {
2034  float distTmp = recHitDistFromWire(*recHit, layer);
2035  if (fabs(distTmp - simHitDist) < res) {
2036  res = fabs(distTmp - simHitDist);
2037  theBestRecHit = &(*recHit);
2038  }
2039  } // End of loop over RecHits within the cell
2040 
2041  return theBestRecHit;
2042 }
2043 
2044 // Compute the distance from wire (cm) of a hits in a DTRecHit1DPair
2046  // Compute the rechit distance from wire
2047  return fabs(hitPair.localPosition(DTEnums::Left).x() - hitPair.localPosition(DTEnums::Right).x()) / 2.;
2048 }
2049 
2050 // Compute the distance from wire (cm) of a hits in a DTRecHit1D
2052  return fabs(recHit.localPosition().x() - layer->specificTopology().wirePosition(recHit.wireId().wire()));
2053 }
2054 
2055 template <typename type>
2057  const std::map<DTWireId, std::vector<PSimHit>>& _simHitsPerWire,
2058  const std::map<DTWireId, std::vector<type>>& _recHitsPerWire,
2059  int step) {
2060  std::map<DTWireId, std::vector<PSimHit>> simHitsPerWire = _simHitsPerWire;
2061  std::map<DTWireId, std::vector<type>> recHitsPerWire = _recHitsPerWire;
2062  int nDt = 0;
2063  // Loop over cells with a muon SimHit
2064  for (std::map<DTWireId, std::vector<PSimHit>>::const_iterator wireAndSHits = simHitsPerWire.begin();
2065  wireAndSHits != simHitsPerWire.end();
2066  wireAndSHits++) {
2067  DTWireId wireId = (*wireAndSHits).first;
2068  std::vector<PSimHit> simHitsInCell = (*wireAndSHits).second;
2069 
2070  // Get the layer
2071  const DTLayer* layer = dtGeom->layer(wireId);
2072 
2073  // Look for a mu hit in the cell
2074  const PSimHit* muSimHit = DTHitQualityUtils::findMuSimHit(simHitsInCell);
2075  if (muSimHit == nullptr) {
2076  continue; // Skip this cell
2077  }
2078 
2079  // Find the distance of the simhit from the wire
2080  float simHitWireDist = simHitDistFromWire(layer, wireId, *muSimHit);
2081  // Skip simhits out of the cell
2082  if (simHitWireDist > 2.1) {
2083  continue; // Skip this cell
2084  }
2085  //GlobalPoint simHitGlobalPos = layer->toGlobal(muSimHit->localPosition());
2086 
2087  // Look for RecHits in the same cell
2088  if (recHitsPerWire.find(wireId) == recHitsPerWire.end()) {
2089  continue; // No RecHit found in this cell
2090  } else {
2091  // vector<type> recHits = (*wireAndRecHits).second;
2092  std::vector<type> recHits = recHitsPerWire[wireId];
2093 
2094  // Find the best RecHit
2095  const type* theBestRecHit = findBestRecHit(layer, wireId, recHits, simHitWireDist);
2096 
2097  float recHitWireDist = recHitDistFromWire(*theBestRecHit, layer);
2098 
2099  ++nDt;
2100 
2101  DTRHD.push_back(recHitWireDist);
2102  DTSHD.push_back(simHitWireDist);
2103 
2104  } // find rechits
2105  } // loop over simhits
2106 
2107  return nDt;
2108 }
2109 
2111  const CSCRecHit2D& recHit,
2112  const CSCLayer* layer,
2113  int chamberType) {
2114  GlobalPoint simHitPos = layer->toGlobal(simHit.localPosition());
2115  GlobalPoint recHitPos = layer->toGlobal(recHit.localPosition());
2116 
2117  CSCRHPHI.push_back(recHitPos.phi());
2118  CSCRHPERP.push_back(recHitPos.perp());
2119  CSCSHPHI.push_back(simHitPos.phi());
2120 }
2121 
2122 //define this as a plug-in
2123 //DEFINE_FWK_MODULE(GlobalRecHitsProducer);
Vector3DBase< float, LocalTag >
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:543
GlobalRecHitsProducer::tGeomToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tGeomToken_
Definition: GlobalRecHitsProducer.h:339
PI
Definition: PayloadInspector.h:21
DTGeometry
Definition: DTGeometry.h:28
GlobalRecHitsProducer::FWD2nRX
FloatVector FWD2nRX
Definition: GlobalRecHitsProducer.h:270
RPCRoll
Definition: RPCRoll.h:12
GlobalRecHitsProducer::BRL3RY
FloatVector BRL3RY
Definition: GlobalRecHitsProducer.h:266
GlobalRecHitsProducer::TECW7SY
FloatVector TECW7SY
Definition: GlobalRecHitsProducer.h:252
GlobalRecHitsProducer::FWD2pRX
FloatVector FWD2pRX
Definition: GlobalRecHitsProducer.h:270
GlobalRecHitsProducer::BRL3SX
FloatVector BRL3SX
Definition: GlobalRecHitsProducer.h:267
GlobalRecHitsProducer::HECalR
FloatVector HECalR
Definition: GlobalRecHitsProducer.h:217
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
sdSiTID
static const int sdSiTID
Definition: GlobalDigisAnalyzer.h:260
GlobalRecHitsProducer::BRL2RY
FloatVector BRL2RY
Definition: GlobalRecHitsProducer.h:266
ctppsCommonDQMSource_cfi.verbosity
verbosity
Definition: ctppsCommonDQMSource_cfi.py:14
DTWireId::wire
int wire() const
Return the wire number.
Definition: DTWireId.h:42
GlobalRecHitsProducer::FWD1pSX
FloatVector FWD1pSX
Definition: GlobalRecHitsProducer.h:272
sdSiTEC
static const int sdSiTEC
Definition: GlobalDigisAnalyzer.h:262
GlobalRecHitsProducer::HFCalREC
FloatVector HFCalREC
Definition: GlobalRecHitsProducer.h:224
CSCRecHit2DCollection
GlobalRecHitsProducer::TECW6SY
FloatVector TECW6SY
Definition: GlobalRecHitsProducer.h:252
mps_fire.i
i
Definition: mps_fire.py:428
GlobalRecHitsProducer::SiPxlSrc_
edm::InputTag SiPxlSrc_
Definition: GlobalRecHitsProducer.h:275
GlobalRecHitsProducer::TIBL3RX
FloatVector TIBL3RX
Definition: GlobalRecHitsProducer.h:234
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
PGlobalRecHit::putFWD2nRecHits
void putFWD2nRecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:1187
GlobalRecHitsProducer::CSCRHPHI
FloatVector CSCRHPHI
Definition: GlobalRecHitsProducer.h:316
GlobalRecHitsProducer::TOBL3RY
FloatVector TOBL3RY
Definition: GlobalRecHitsProducer.h:240
GlobalRecHitsProducer::getAllProvenances
bool getAllProvenances
Definition: GlobalRecHitsProducer.h:181
GlobalRecHitsProducer::FWD1nRX
FloatVector FWD1nRX
Definition: GlobalRecHitsProducer.h:270
GlobalRecHitsProducer::BRL2SX
FloatVector BRL2SX
Definition: GlobalRecHitsProducer.h:267
funct::false
false
Definition: Factorize.h:29
GlobalRecHitsProducer::TIDW2RX
FloatVector TIDW2RX
Definition: GlobalRecHitsProducer.h:244
GlobalRecHitsProducer::TIBL1SY
FloatVector TIBL1SY
Definition: GlobalRecHitsProducer.h:237
GlobalRecHitsProducer::TIBL1SX
FloatVector TIBL1SX
Definition: GlobalRecHitsProducer.h:236
GlobalRecHitsProducer::FWD1pRX
FloatVector FWD1pRX
Definition: GlobalRecHitsProducer.h:270
PGlobalRecHit::putTIDW2RecHits
void putTIDW2RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:931
GeomDet
Definition: GeomDet.h:27
GlobalRecHitsProducer::ECalUncalEESrc_
edm::InputTag ECalUncalEESrc_
Definition: GlobalRecHitsProducer.h:199
HLT_FULL_cff.endcapHits
endcapHits
Definition: HLT_FULL_cff.py:84485
edm::Handle::product
T const * product() const
Definition: Handle.h:70
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
PGlobalRecHit::putTECW2RecHits
void putTECW2RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:979
GlobalRecHitsProducer::TECW3SY
FloatVector TECW3SY
Definition: GlobalRecHitsProducer.h:252
sdHcalEC
static const int sdHcalEC
Definition: GlobalDigisAnalyzer.h:282
PGlobalRecHit::putTOBL4RecHits
void putTOBL4RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:899
edm::InputTag::instance
std::string const & instance() const
Definition: InputTag.h:37
GlobalRecHitsProducer::HCalSrc_Token_
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
Definition: GlobalRecHitsProducer.h:229
GlobalRecHitsProducer::TIBL2RY
FloatVector TIBL2RY
Definition: GlobalRecHitsProducer.h:235
step
step
Definition: StallMonitor.cc:94
TrackerTopology::pxfSide
unsigned int pxfSide(const DetId &id) const
Definition: TrackerTopology.h:192
GlobalRecHitsProducer::ECalUncalEESrc_Token_
edm::EDGetTokenT< EEUncalibratedRecHitCollection > ECalUncalEESrc_Token_
Definition: GlobalRecHitsProducer.h:205
GlobalRecHitsProducer::fillMuon
void fillMuon(edm::Event &, const edm::EventSetup &)
Definition: GlobalRecHitsProducer.cc:1567
GlobalRecHitsProducer::FWD2nSX
FloatVector FWD2nSX
Definition: GlobalRecHitsProducer.h:272
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
PGlobalRecHit::putDTRecHits
void putDTRecHits(const std::vector< float > &rhd, const std::vector< float > &shd)
Definition: PValidationFormats.cc:1203
CollectionTags_cfi.EBRecHit
EBRecHit
Definition: CollectionTags_cfi.py:40
GlobalRecHitsProducer::theMap
std::map< int, edm::PSimHitContainer > theMap
Definition: GlobalRecHitsProducer.h:324
GlobalRecHitsProducer::TIDW2SY
FloatVector TIDW2SY
Definition: GlobalRecHitsProducer.h:247
GlobalRecHitsProducer::FWD1nSX
FloatVector FWD1nSX
Definition: GlobalRecHitsProducer.h:272
GlobalRecHitsProducer::FWD2nRY
FloatVector FWD2nRY
Definition: GlobalRecHitsProducer.h:271
EBDetId
Definition: EBDetId.h:17
GlobalRecHitsProducer::TECW6SX
FloatVector TECW6SX
Definition: GlobalRecHitsProducer.h:251
GlobalRecHitsProducer::BRL1RY
FloatVector BRL1RY
Definition: GlobalRecHitsProducer.h:266
TrackerTopology
Definition: TrackerTopology.h:16
GlobalRecHitsProducer::EESHE
FloatVector EESHE
Definition: GlobalRecHitsProducer.h:191
GlobalRecHitsProducer::TOBL1RX
FloatVector TOBL1RX
Definition: GlobalRecHitsProducer.h:239
GlobalRecHitsProducer::TOBL2SY
FloatVector TOBL2SY
Definition: GlobalRecHitsProducer.h:242
GlobalRecHitsProducer::HCalSrc_
edm::InputTag HCalSrc_
Definition: GlobalRecHitsProducer.h:228
GlobalRecHitsProducer::TOBL3RX
FloatVector TOBL3RX
Definition: GlobalRecHitsProducer.h:239
RPCDetId
Definition: RPCDetId.h:16
GlobalRecHitsProducer::TECW3RY
FloatVector TECW3RY
Definition: GlobalRecHitsProducer.h:250
geometry
Definition: geometry.py:1
GlobalRecHitsProducer::SiPxlSrc_Token_
edm::EDGetTokenT< SiPixelRecHitCollection > SiPxlSrc_Token_
Definition: GlobalRecHitsProducer.h:276
DTRecHit1D
Definition: DTRecHit1D.h:25
GlobalRecHitsProducer::fillTrk
void fillTrk(edm::Event &, const edm::EventSetup &)
Definition: GlobalRecHitsProducer.cc:807
DetId::Hcal
Definition: DetId.h:28
CollectionTags_cfi.EERecHit
EERecHit
Definition: CollectionTags_cfi.py:41
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
TrackerHitAssociator::associateHit
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
Definition: TrackerHitAssociator.cc:212
GlobalRecHitsProducer::HOCalR
FloatVector HOCalR
Definition: GlobalRecHitsProducer.h:221
edmNew::DetSetVector::const_iterator
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetSetVectorNew.h:197
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
OfflineHarvestingSequence_cosmic.ptype
ptype
Definition: OfflineHarvestingSequence_cosmic.py:7
GlobalRecHitsProducer::TIBL2RX
FloatVector TIBL2RX
Definition: GlobalRecHitsProducer.h:234
GlobalRecHitsProducer::TECW2SY
FloatVector TECW2SY
Definition: GlobalRecHitsProducer.h:252
GlobalRecHitsProducer::fillECal
void fillECal(edm::Event &, const edm::EventSetup &)
Definition: GlobalRecHitsProducer.cc:231
GlobalRecHitsProducer::ECalEESrc_Token_
edm::EDGetTokenT< EERecHitCollection > ECalEESrc_Token_
Definition: GlobalRecHitsProducer.h:202
FastTrackerRecHitCombiner_cfi.simHits
simHits
Definition: FastTrackerRecHitCombiner_cfi.py:5
edm::SortedCollection
Definition: SortedCollection.h:49
L1TrackObjectNtupleMaker_cfg.pOut
pOut
Definition: L1TrackObjectNtupleMaker_cfg.py:172
GlobalRecHitsProducer::TECW5RY
FloatVector TECW5RY
Definition: GlobalRecHitsProducer.h:250
GlobalRecHitsProducer::TECW7RY
FloatVector TECW7RY
Definition: GlobalRecHitsProducer.h:250
CSCLayer
Definition: CSCLayer.h:24
GlobalRecHitsProducer::TECW3SX
FloatVector TECW3SX
Definition: GlobalRecHitsProducer.h:251
GlobalRecHitsProducer::MuRPCSrc_
edm::InputTag MuRPCSrc_
Definition: GlobalRecHitsProducer.h:332
GlobalRecHitsProducer::TIDW1SX
FloatVector TIDW1SX
Definition: GlobalRecHitsProducer.h:246
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
GlobalRecHitsProducer::HOCalSHE
FloatVector HOCalSHE
Definition: GlobalRecHitsProducer.h:222
ESDetId
Definition: ESDetId.h:15
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
GlobalRecHitsProducer::endJob
void endJob() override
Definition: GlobalRecHitsProducer.cc:131
GlobalRecHitsProducer::beginJob
void beginJob() override
Definition: GlobalRecHitsProducer.cc:123
GlobalRecHitsProducer::fName
std::string fName
Definition: GlobalRecHitsProducer.h:177
GlobalRecHitsProducer::TIBL4SX
FloatVector TIBL4SX
Definition: GlobalRecHitsProducer.h:236
GlobalRecHitsProducer::FWD1pSY
FloatVector FWD1pSY
Definition: GlobalRecHitsProducer.h:273
edm::Handle
Definition: AssociativeIterator.h:50
GlobalRecHitsProducer::TOBL4RY
FloatVector TOBL4RY
Definition: GlobalRecHitsProducer.h:240
GlobalRecHitsProducer::TIBL4RX
FloatVector TIBL4RX
Definition: GlobalRecHitsProducer.h:234
sdHcalOut
static const int sdHcalOut
Definition: GlobalDigisAnalyzer.h:283
RPCRoll::isForward
bool isForward() const
Definition: RPCRoll.cc:43
PGlobalRecHit::putTOBL2RecHits
void putTOBL2RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:867
MixCollection::MixItr
Definition: MixCollection.h:61
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
GlobalRecHitsProducer::RPCRHX
FloatVector RPCRHX
Definition: GlobalRecHitsProducer.h:329
GlobalRecHitsProducer::tTopoToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
Definition: GlobalRecHitsProducer.h:338
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
GlobalRecHitsProducer::TIBL2SY
FloatVector TIBL2SY
Definition: GlobalRecHitsProducer.h:237
GlobalRecHitsProducer::FWD1nRY
FloatVector FWD1nRY
Definition: GlobalRecHitsProducer.h:271
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
GlobalRecHitsProducer::rpcGeomToken_
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcGeomToken_
Definition: GlobalRecHitsProducer.h:342
HcalGeometry.h
ihf
int ihf
Definition: CascadeWrapper.h:27
GlobalRecHitsProducer::TOBL2SX
FloatVector TOBL2SX
Definition: GlobalRecHitsProducer.h:241
GlobalRecHitsProducer::TIBL3SX
FloatVector TIBL3SX
Definition: GlobalRecHitsProducer.h:236
TrackerTopology::tidWheel
unsigned int tidWheel(const DetId &id) const
Definition: TrackerTopology.h:201
GlobalRecHitsProducer::TECW1SX
FloatVector TECW1SX
Definition: GlobalRecHitsProducer.h:251
GlobalRecHitsProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: GlobalRecHitsProducer.cc:138
MainPageGenerator.fName
fName
Definition: MainPageGenerator.py:301
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
GlobalRecHitsProducer::projectHit
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &hit, const StripGeomDetUnit *stripDet, const BoundPlane &plane)
Definition: GlobalRecHitsProducer.cc:1973
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PGlobalRecHit::putHOCalRecHits
void putHOCalRecHits(const std::vector< float > &rec, const std::vector< float > &r, const std::vector< float > &she)
Definition: PValidationFormats.cc:759
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
CSCGeometry
Definition: CSCGeometry.h:24
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
DetId
Definition: DetId.h:17
GlobalRecHitsProducer::MuCSCSrc_
edm::InputTag MuCSCSrc_
Definition: GlobalRecHitsProducer.h:320
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
edmNew::DetSet::end
iterator end()
Definition: DetSetNew.h:56
TrackerTopology.h
CaloGeometry
Definition: CaloGeometry.h:21
PGlobalRecHit::putTOBL3RecHits
void putTOBL3RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:883
edmNew::DetSetVector::find
const_iterator find(id_type i, bool update=false) const
Definition: DetSetVectorNew.h:533
DTEnums::Left
Definition: DTEnums.h:15
GlobalRecHitsProducer::TECW5RX
FloatVector TECW5RX
Definition: GlobalRecHitsProducer.h:249
CollectionTags_cfi.EBUncalibRecHit
EBUncalibRecHit
Definition: CollectionTags_cfi.py:32
DTHitQualityUtils::findMuSimHit
const PSimHit * findMuSimHit(const edm::PSimHitContainer &hits)
Select the SimHit from a muon in a vector of SimHits.
photonIsolationHIProducer_cfi.hf
hf
Definition: photonIsolationHIProducer_cfi.py:9
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
TrackerTopologyRcd.h
GlobalRecHitsProducer::ECalEBSrc_
edm::InputTag ECalEBSrc_
Definition: GlobalRecHitsProducer.h:196
GlobalRecHitsProducer::matched
std::vector< PSimHit > matched
Definition: GlobalRecHitsProducer.h:257
GlobalRecHitsProducer::TIBL1RY
FloatVector TIBL1RY
Definition: GlobalRecHitsProducer.h:235
PGlobalRecHit::putHFCalRecHits
void putHFCalRecHits(const std::vector< float > &rec, const std::vector< float > &r, const std::vector< float > &she)
Definition: PValidationFormats.cc:773
PGlobalRecHit::putTOBL1RecHits
void putTOBL1RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:851
GlobalRecHitsProducer::TECW2RY
FloatVector TECW2RY
Definition: GlobalRecHitsProducer.h:250
GlobalRecHitsProducer::TOBL2RX
FloatVector TOBL2RX
Definition: GlobalRecHitsProducer.h:239
DTRecHitCollection
DTWireId
Definition: DTWireId.h:12
MixCollection
Definition: MixCollection.h:10
PGlobalRecHit::putTIBL3RecHits
void putTIBL3RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:819
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
rpcPointValidation_cfi.simHit
simHit
Definition: rpcPointValidation_cfi.py:24
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
GlobalRecHitsProducer::storeTrk
void storeTrk(PGlobalRecHit &)
Definition: GlobalRecHitsProducer.cc:1185
GlobalRecHitsProducer::TIBL4RY
FloatVector TIBL4RY
Definition: GlobalRecHitsProducer.h:235
GlobalRecHitsProducer::MuRPCSrc_Token_
edm::EDGetTokenT< RPCRecHitCollection > MuRPCSrc_Token_
Definition: GlobalRecHitsProducer.h:334
GlobalRecHitsProducer::~GlobalRecHitsProducer
~GlobalRecHitsProducer() override
Definition: GlobalRecHitsProducer.cc:121
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
GlobalRecHitsProducer::HECalSHE
FloatVector HECalSHE
Definition: GlobalRecHitsProducer.h:218
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
GlobalRecHitsProducer::TOBL1SY
FloatVector TOBL1SY
Definition: GlobalRecHitsProducer.h:242
PGlobalRecHit::putTIDW1RecHits
void putTIDW1RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:915
GlobalRecHitsProducer::BRL2RX
FloatVector BRL2RX
Definition: GlobalRecHitsProducer.h:265
GlobalRecHitsProducer::BRL1RX
FloatVector BRL1RX
Definition: GlobalRecHitsProducer.h:265
edmNew::DetSet
Definition: DetSetNew.h:22
GlobalRecHitsProducer::MuDTSrc_Token_
edm::EDGetTokenT< DTRecHitCollection > MuDTSrc_Token_
Definition: GlobalRecHitsProducer.h:286
GlobalRecHitsProducer::TIDW3RY
FloatVector TIDW3RY
Definition: GlobalRecHitsProducer.h:245
PGlobalRecHit::putTECW4RecHits
void putTECW4RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:1011
DTRecHit1DPair
Definition: DTRecHit1DPair.h:26
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
GlobalRecHitsProducer::FWD2pSY
FloatVector FWD2pSY
Definition: GlobalRecHitsProducer.h:273
edm::EventNumber_t
unsigned long long EventNumber_t
Definition: RunLumiEventNumber.h:12
GlobalRecHitsProducer::TECW7RX
FloatVector TECW7RX
Definition: GlobalRecHitsProducer.h:249
GlobalRecHitsProducer::TECW4SX
FloatVector TECW4SX
Definition: GlobalRecHitsProducer.h:251
GlobalRecHitsProducer::MapType
std::map< uint32_t, float, std::less< uint32_t > > MapType
Definition: GlobalRecHitsProducer.h:154
GlobalRecHitsProducer::TOBL4SY
FloatVector TOBL4SY
Definition: GlobalRecHitsProducer.h:242
Point3DBase< float, LocalTag >
GlobalRecHitsProducer::TIDW3SX
FloatVector TIDW3SX
Definition: GlobalRecHitsProducer.h:246
sistrip::SpyUtilities::isValid
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
Definition: SiStripSpyUtilities.cc:124
PGlobalRecHit::putHBCalRecHits
void putHBCalRecHits(const std::vector< float > &rec, const std::vector< float > &r, const std::vector< float > &she)
Definition: PValidationFormats.cc:731
GlobalRecHitsProducer::TECW3RX
FloatVector TECW3RX
Definition: GlobalRecHitsProducer.h:249
StripTopology::strip
virtual float strip(const LocalPoint &) const =0
GlobalRecHitsProducer::TIBL1RX
FloatVector TIBL1RX
Definition: GlobalRecHitsProducer.h:234
GlobalRecHitsProducer::TECW8RX
FloatVector TECW8RX
Definition: GlobalRecHitsProducer.h:249
GlobalRecHitsProducer::ECalUncalEBSrc_Token_
edm::EDGetTokenT< EBUncalibratedRecHitCollection > ECalUncalEBSrc_Token_
Definition: GlobalRecHitsProducer.h:204
GlobalRecHitsProducer::TOBL1RY
FloatVector TOBL1RY
Definition: GlobalRecHitsProducer.h:240
GluedGeomDet
Definition: GluedGeomDet.h:7
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
EEDetId
Definition: EEDetId.h:14
GlobalRecHitsProducer::compute
int compute(const DTGeometry *dtGeom, const std::map< DTWireId, std::vector< PSimHit >> &simHitsPerWire, const std::map< DTWireId, std::vector< type >> &recHitsPerWire, int step)
Definition: GlobalRecHitsProducer.cc:2056
CaloGeometryRecord.h
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
GlobalRecHitsProducer::ESSHE
FloatVector ESSHE
Definition: GlobalRecHitsProducer.h:194
HLT_FULL_cff.barrelHits
barrelHits
Definition: HLT_FULL_cff.py:84484
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
GlobalRecHitsProducer::BRL2SY
FloatVector BRL2SY
Definition: GlobalRecHitsProducer.h:268
PGlobalRecHit::putBRL3RecHits
void putBRL3RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:1123
GlobalRecHitsProducer::DTSHD
FloatVector DTSHD
Definition: GlobalRecHitsProducer.h:282
GlobalRecHitsProducer::FWD2pRY
FloatVector FWD2pRY
Definition: GlobalRecHitsProducer.h:271
GlobalRecHitsProducer::EBSHE
FloatVector EBSHE
Definition: GlobalRecHitsProducer.h:188
GlobalRecHitsProducer::TIDW3SY
FloatVector TIDW3SY
Definition: GlobalRecHitsProducer.h:247
GlobalRecHitsProducer::TOBL4SX
FloatVector TOBL4SX
Definition: GlobalRecHitsProducer.h:241
HLTBitAnalyser_cfi.simhits
simhits
SIM objects.
Definition: HLTBitAnalyser_cfi.py:21
DTHitQualityUtils::mapSimHitsPerWire
std::map< DTWireId, edm::PSimHitContainer > mapSimHitsPerWire(const edm::PSimHitContainer &simhits)
edm::ParameterSet
Definition: ParameterSet.h:47
CSCRecHit2D
Definition: CSCRecHit2D.h:18
GlobalRecHitsProducer::DTRHD
FloatVector DTRHD
Definition: GlobalRecHitsProducer.h:281
DTGeometry::layer
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
Definition: DTGeometry.cc:96
PGlobalRecHit::putCSCRecHits
void putCSCRecHits(const std::vector< float > &rhphi, const std::vector< float > &rhperp, const std::vector< float > &shphi)
Definition: PValidationFormats.cc:1214
GlobalRecHitsProducer::FWD1nSY
FloatVector FWD1nSY
Definition: GlobalRecHitsProducer.h:273
GlobalRecHitsProducer::TIBL3RY
FloatVector TIBL3RY
Definition: GlobalRecHitsProducer.h:235
GlobalRecHitsProducer::TIDW1RY
FloatVector TIDW1RY
Definition: GlobalRecHitsProducer.h:245
PGlobalRecHit::putESCalRecHits
void putESCalRecHits(const std::vector< float > &re, const std::vector< float > &she)
Definition: PValidationFormats.cc:720
HcalGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Definition: HcalGeometry.cc:179
GlobalRecHitsProducer::TIDW2SX
FloatVector TIDW2SX
Definition: GlobalRecHitsProducer.h:246
PGlobalRecHit::putTECW6RecHits
void putTECW6RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:1043
GlobalRecHitsProducer::MuCSCHits_Token_
edm::EDGetTokenT< CrossingFrame< PSimHit > > MuCSCHits_Token_
Definition: GlobalRecHitsProducer.h:322
sdHcalFwd
static const int sdHcalFwd
Definition: GlobalDigisAnalyzer.h:284
GlobalRecHitsProducer::TECW8RY
FloatVector TECW8RY
Definition: GlobalRecHitsProducer.h:250
GlobalRecHitsProducer::verbosity
int verbosity
Definition: GlobalRecHitsProducer.h:178
GlobalRecHitsProducer::caloGeomToken_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeomToken_
Definition: GlobalRecHitsProducer.h:337
GlobalRecHitsProducer::MuDTSimSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > MuDTSimSrc_Token_
Definition: GlobalRecHitsProducer.h:287
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
CollectionTags_cfi.EEUncalibRecHit
EEUncalibRecHit
Definition: CollectionTags_cfi.py:33
GlobalRecHitsProducer::TIDW1RX
FloatVector TIDW1RX
Definition: GlobalRecHitsProducer.h:244
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
GlobalRecHitsProducer::BRL3SY
FloatVector BRL3SY
Definition: GlobalRecHitsProducer.h:268
edm::RangeMap::const_iterator
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
PGlobalRecHit::putTIBL2RecHits
void putTIBL2RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:803
CSCDetId
Definition: CSCDetId.h:26
GlobalRecHitsProducer::TOBL1SX
FloatVector TOBL1SX
Definition: GlobalRecHitsProducer.h:241
GlobalRecHitsProducer::label
std::string label
Definition: GlobalRecHitsProducer.h:180
sdPxlBrl
static const int sdPxlBrl
Definition: GlobalDigisAnalyzer.h:257
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
GlobalRecHitsProducer::CSCSHPHI
FloatVector CSCSHPHI
Definition: GlobalRecHitsProducer.h:318
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
GlobalRecHitsProducer::FWD2pSX
FloatVector FWD2pSX
Definition: GlobalRecHitsProducer.h:272
sdPxlFwd
static const int sdPxlFwd
Definition: GlobalDigisAnalyzer.h:258
HcalDetId
Definition: HcalDetId.h:12
StripTopology::stripAngle
virtual float stripAngle(float strip) const =0
GlobalRecHitsProducer::TIBL2SX
FloatVector TIBL2SX
Definition: GlobalRecHitsProducer.h:236
iEvent
int iEvent
Definition: GenABIO.cc:224
GlobalRecHitsProducer::trackerHitAssociatorConfig_
TrackerHitAssociator::Config trackerHitAssociatorConfig_
Definition: GlobalRecHitsProducer.h:261
GlobalRecHitsProducer::fillHCal
void fillHCal(edm::Event &, const edm::EventSetup &)
Definition: GlobalRecHitsProducer.cc:463
GlobalRecHitsProducer::TECW6RY
FloatVector TECW6RY
Definition: GlobalRecHitsProducer.h:250
PGlobalRecHit::putTECW3RecHits
void putTECW3RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:995
GlobalRecHitsProducer::ECalESSrc_
edm::InputTag ECalESSrc_
Definition: GlobalRecHitsProducer.h:200
PGlobalRecHit::putTECW1RecHits
void putTECW1RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:963
TrackerTopology::pxfDisk
unsigned int pxfDisk(const DetId &id) const
Definition: TrackerTopology.h:446
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
GlobalRecHitsProducer::TECW8SX
FloatVector TECW8SX
Definition: GlobalRecHitsProducer.h:251
photonIsolationHIProducer_cfi.ho
ho
Definition: photonIsolationHIProducer_cfi.py:10
GlobalRecHitsProducer::HFCalR
FloatVector HFCalR
Definition: GlobalRecHitsProducer.h:225
GlobalRecHitsProducer::ECalEESrc_
edm::InputTag ECalEESrc_
Definition: GlobalRecHitsProducer.h:198
edmNew::DetSet::begin
iterator begin()
Definition: DetSetNew.h:54
GlobalRecHitsProducer::GlobalRecHitsProducer
GlobalRecHitsProducer(const edm::ParameterSet &)
Definition: GlobalRecHitsProducer.cc:14
GlobalRecHitsProducer::MuDTSrc_
edm::InputTag MuDTSrc_
Definition: GlobalRecHitsProducer.h:284
PGlobalRecHit::putTIDW3RecHits
void putTIDW3RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:947
GlobalRecHitsProducer::MuCSCSrc_Token_
edm::EDGetTokenT< CSCRecHit2DCollection > MuCSCSrc_Token_
Definition: GlobalRecHitsProducer.h:321
GlobalRecHitsProducer::ESRE
FloatVector ESRE
Definition: GlobalRecHitsProducer.h:193
edm::EventSetup
Definition: EventSetup.h:58
GlobalRecHitsProducer::TECW8SY
FloatVector TECW8SY
Definition: GlobalRecHitsProducer.h:252
PGlobalRecHit::putFWD2pRecHits
void putFWD2pRecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:1171
GlobalRecHitsProducer::ECalUncalEBSrc_
edm::InputTag ECalUncalEBSrc_
Definition: GlobalRecHitsProducer.h:197
PGlobalRecHit::putFWD1pRecHits
void putFWD1pRecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:1139
res
Definition: Electron.h:6
PGlobalRecHit::putTIBL4RecHits
void putTIBL4RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:835
GlobalRecHitsProducer::EBHits_Token_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EBHits_Token_
Definition: GlobalRecHitsProducer.h:206
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GlobalRecHitsProducer::ECalEBSrc_Token_
edm::EDGetTokenT< EBRecHitCollection > ECalEBSrc_Token_
Definition: GlobalRecHitsProducer.h:201
sdSiTIB
static const int sdSiTIB
Definition: GlobalDigisAnalyzer.h:259
DTLayer
Definition: DTLayer.h:25
GlobalRecHitsProducer::ESHits_Token_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > ESHits_Token_
Definition: GlobalRecHitsProducer.h:208
GlobalRecHitsProducer::TECW2SX
FloatVector TECW2SX
Definition: GlobalRecHitsProducer.h:251
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
GlobalRecHitsProducer::TOBL2RY
FloatVector TOBL2RY
Definition: GlobalRecHitsProducer.h:240
alignCSCRings.r
r
Definition: alignCSCRings.py:93
photonIsolationHIProducer_cfi.hbhe
hbhe
Definition: photonIsolationHIProducer_cfi.py:8
GlobalRecHitsProducer::TECW1RX
FloatVector TECW1RX
Definition: GlobalRecHitsProducer.h:249
PGlobalRecHit::putBRL2RecHits
void putBRL2RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:1107
GlobalRecHitsProducer::TECW1SY
FloatVector TECW1SY
Definition: GlobalRecHitsProducer.h:252
GlobalRecHitsProducer::HECalREC
FloatVector HECalREC
Definition: GlobalRecHitsProducer.h:216
GlobalRecHitsProducer::FWD2nSY
FloatVector FWD2nSY
Definition: GlobalRecHitsProducer.h:273
GlobalRecHitsProducer::HBCalSHE
FloatVector HBCalSHE
Definition: GlobalRecHitsProducer.h:214
GlobalRecHitsProducer::CSCRHPERP
FloatVector CSCRHPERP
Definition: GlobalRecHitsProducer.h:317
GluedGeomDet::stereoDet
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:20
PGlobalRecHit::putBRL1RecHits
void putBRL1RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:1091
nevt
int nevt
Definition: ReggeGribovPartonMCHadronizer.h:66
GlobalRecHitsProducer::dtGeomToken_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
Definition: GlobalRecHitsProducer.h:340
GlobalRecHitsProducer::EEHits_Token_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EEHits_Token_
Definition: GlobalRecHitsProducer.h:207
TrackerHitAssociator
Definition: TrackerHitAssociator.h:55
PGlobalRecHit
Definition: PValidationFormats.h:597
GlobalRecHitsProducer::TECW4RY
FloatVector TECW4RY
Definition: GlobalRecHitsProducer.h:250
TrackerTopology::tobLayer
unsigned int tobLayer(const DetId &id) const
Definition: TrackerTopology.h:147
DTEnums::Right
Definition: DTEnums.h:15
GlobalRecHitsProducer::TOBL4RX
FloatVector TOBL4RX
Definition: GlobalRecHitsProducer.h:239
GlobalRecHitsProducer::TECW5SY
FloatVector TECW5SY
Definition: GlobalRecHitsProducer.h:252
eostools.move
def move(src, dest)
Definition: eostools.py:511
PGlobalRecHit::putTIBL1RecHits
void putTIBL1RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:787
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
GlobalRecHitsProducer::HOCalREC
FloatVector HOCalREC
Definition: GlobalRecHitsProducer.h:220
BaseTrackerRecHit::localPosition
LocalPoint localPosition() const override
Definition: BaseTrackerRecHit.h:56
DTRecHit1DPair::localPosition
LocalPoint localPosition() const override
Definition: DTRecHit1DPair.cc:29
GlobalRecHitsProducer::TIDW1SY
FloatVector TIDW1SY
Definition: GlobalRecHitsProducer.h:247
GlobalRecHitsProducer::storeECal
void storeECal(PGlobalRecHit &)
Definition: GlobalRecHitsProducer.cc:422
SiStripMatchedRecHit2D
Definition: SiStripMatchedRecHit2D.h:8
GlobalRecHitsProducer::TECW1RY
FloatVector TECW1RY
Definition: GlobalRecHitsProducer.h:250
GlobalRecHitsProducer::TIBL3SY
FloatVector TIBL3SY
Definition: GlobalRecHitsProducer.h:237
GlobalRecHitsProducer::RPCSHX
FloatVector RPCSHX
Definition: GlobalRecHitsProducer.h:330
GlobalRecHitsProducer::TOBL3SX
FloatVector TOBL3SX
Definition: GlobalRecHitsProducer.h:241
GlobalRecHitsProducer::count
unsigned int count
Definition: GlobalRecHitsProducer.h:345
edmNew::DetSetVector::end
const_iterator end(bool update=false) const
Definition: DetSetVectorNew.h:550
GlobalRecHitsProducer::plotResolution
void plotResolution(const PSimHit &simHit, const CSCRecHit2D &recHit, const CSCLayer *layer, int chamberType)
Definition: GlobalRecHitsProducer.cc:2110
GlobalRecHitsProducer::TECW4RX
FloatVector TECW4RX
Definition: GlobalRecHitsProducer.h:249
BoundPlane
GlobalRecHitsProducer::clear
void clear()
Definition: GlobalRecHitsProducer.cc:1816
GlobalRecHitsProducer::FWD1pRY
FloatVector FWD1pRY
Definition: GlobalRecHitsProducer.h:271
sdSiTOB
static const int sdSiTOB
Definition: GlobalDigisAnalyzer.h:261
GlobalRecHitsProducer::EERE
FloatVector EERE
Definition: GlobalRecHitsProducer.h:190
GlobalRecHitsProducer::BRL3RX
FloatVector BRL3RX
Definition: GlobalRecHitsProducer.h:265
edm::PCaloHitContainer
std::vector< PCaloHit > PCaloHitContainer
Definition: PCaloHitContainer.h:8
GlobalRecHitsProducer::findBestRecHit
const type * findBestRecHit(const DTLayer *layer, DTWireId wireId, const std::vector< type > &recHits, const float simHitDist)
Definition: GlobalRecHitsProducer.cc:2026
GlobalRecHitsProducer::cscGeomToken_
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken_
Definition: GlobalRecHitsProducer.h:341
GlobalRecHitsProducer::TIDW3RX
FloatVector TIDW3RX
Definition: GlobalRecHitsProducer.h:244
GlobalRecHitsProducer::simHitDistFromWire
float simHitDistFromWire(const DTLayer *layer, DTWireId wireId, const PSimHit &hit)
Definition: GlobalRecHitsProducer.cc:2013
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
GlobalRecHitsProducer::TECW6RX
FloatVector TECW6RX
Definition: GlobalRecHitsProducer.h:249
PGlobalRecHit::putEBCalRecHits
void putEBCalRecHits(const std::vector< float > &re, const std::vector< float > &she)
Definition: PValidationFormats.cc:698
PGlobalRecHit::putHECalRecHits
void putHECalRecHits(const std::vector< float > &rec, const std::vector< float > &r, const std::vector< float > &she)
Definition: PValidationFormats.cc:745
GlobalRecHitsProducer::TOBL3SY
FloatVector TOBL3SY
Definition: GlobalRecHitsProducer.h:242
StripGeomDetUnit::specificTopology
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
Definition: StripGeomDetUnit.cc:17
GlobalRecHitsProducer::BRL1SY
FloatVector BRL1SY
Definition: GlobalRecHitsProducer.h:268
GlobalRecHitsProducer::MuRPCSimSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > MuRPCSimSrc_Token_
Definition: GlobalRecHitsProducer.h:335
GlobalRecHitsProducer::SiStripSrc_
edm::InputTag SiStripSrc_
Definition: GlobalRecHitsProducer.h:254
PGlobalRecHit::putFWD1nRecHits
void putFWD1nRecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:1155
genParticles_cff.map
map
Definition: genParticles_cff.py:11
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
GlobalRecHitsProducer::HFCalSHE
FloatVector HFCalSHE
Definition: GlobalRecHitsProducer.h:226
GlobalRecHitsProducer::TECW5SX
FloatVector TECW5SX
Definition: GlobalRecHitsProducer.h:251
GlobalRecHitsProducer::storeMuon
void storeMuon(PGlobalRecHit &)
Definition: GlobalRecHitsProducer.cc:1765
GlobalRecHitsProducer.h
PSimHit
Definition: PSimHit.h:15
PGlobalRecHit::putTECW8RecHits
void putTECW8RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:1075
GlobalRecHitsProducer::BRL1SX
FloatVector BRL1SX
Definition: GlobalRecHitsProducer.h:267
sdHcalBrl
static const int sdHcalBrl
Definition: GlobalDigisAnalyzer.h:281
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
GlobalRecHitsProducer::frequency
int frequency
Definition: GlobalRecHitsProducer.h:179
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
GlobalRecHitsProducer::TIBL4SY
FloatVector TIBL4SY
Definition: GlobalRecHitsProducer.h:237
edm::Event
Definition: Event.h:73
gedPhotons_cfi.preshowerHits
preshowerHits
Definition: gedPhotons_cfi.py:48
TrackerTopology::tecWheel
unsigned int tecWheel(const DetId &id) const
Definition: TrackerTopology.h:198
CSCGeometry::idToDetUnit
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: CSCGeometry.cc:89
PGlobalRecHit::putTECW5RecHits
void putTECW5RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:1027
HcalGeometry
Definition: HcalGeometry.h:17
StripTopology
Definition: StripTopology.h:11
GlobalRecHitsProducer::printProvenanceInfo
bool printProvenanceInfo
Definition: GlobalRecHitsProducer.h:182
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
GlobalRecHitsProducer::TIDW2RY
FloatVector TIDW2RY
Definition: GlobalRecHitsProducer.h:245
GlobalRecHitsProducer::ECalESSrc_Token_
edm::EDGetTokenT< ESRecHitCollection > ECalESSrc_Token_
Definition: GlobalRecHitsProducer.h:203
GlobalRecHitsProducer::EBRE
FloatVector EBRE
Definition: GlobalRecHitsProducer.h:187
GlobalRecHitsProducer::recHitDistFromWire
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
Definition: GlobalRecHitsProducer.cc:2045
GlobalRecHitsProducer::MuDTSimSrc_
edm::InputTag MuDTSimSrc_
Definition: GlobalRecHitsProducer.h:285
GlobalRecHitsProducer::MuRPCSimSrc_
edm::InputTag MuRPCSimSrc_
Definition: GlobalRecHitsProducer.h:333
edm::InputTag
Definition: InputTag.h:15
GlobalRecHitsProducer::TECW2RX
FloatVector TECW2RX
Definition: GlobalRecHitsProducer.h:249
label
const char * label
Definition: PFTauDecayModeTools.cc:11
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
hit
Definition: SiStripHitEffFromCalibTree.cc:88
GlobalRecHitsProducer::TECW4SY
FloatVector TECW4SY
Definition: GlobalRecHitsProducer.h:252
PGlobalRecHit::putTECW7RecHits
void putTECW7RecHits(const std::vector< float > &rx, const std::vector< float > &ry, const std::vector< float > &sx, const std::vector< float > &sy)
Definition: PValidationFormats.cc:1059
GlobalRecHitsProducer::TECW7SX
FloatVector TECW7SX
Definition: GlobalRecHitsProducer.h:251
GlobalRecHitsProducer::storeHCal
void storeHCal(PGlobalRecHit &)
Definition: GlobalRecHitsProducer.cc:747
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
StripGeomDetUnit
Definition: StripGeomDetUnit.h:15
TrackerTopology::tibLayer
unsigned int tibLayer(const DetId &id) const
Definition: TrackerTopology.h:150
TrackerGeometry
Definition: TrackerGeometry.h:14
GlobalRecHitsProducer::map1DRecHitsPerWire
std::map< DTWireId, std::vector< DTRecHit1DPair > > map1DRecHitsPerWire(const DTRecHitCollection *dt1DRecHitPairs)
Definition: GlobalRecHitsProducer.cc:2000
GlobalRecHitsProducer::SiStripSrc_Token_
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > SiStripSrc_Token_
Definition: GlobalRecHitsProducer.h:255
GlobalRecHitsProducer::HBCalR
FloatVector HBCalR
Definition: GlobalRecHitsProducer.h:213
GlobalRecHitsProducer::HBCalREC
FloatVector HBCalREC
Definition: GlobalRecHitsProducer.h:212
PGlobalRecHit::putRPCRecHits
void putRPCRecHits(const std::vector< float > &rhx, const std::vector< float > &shx)
Definition: PValidationFormats.cc:1228
PGlobalRecHit::putEECalRecHits
void putEECalRecHits(const std::vector< float > &re, const std::vector< float > &she)
Definition: PValidationFormats.cc:709