CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
HcalRecHitsValidation Class Reference

#include <HcalRecHitsValidation.h>

Inheritance diagram for HcalRecHitsValidation:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

void analyze (edm::Event const &ev, edm::EventSetup const &c) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 HcalRecHitsValidation (edm::ParameterSet const &conf)
 
 ~HcalRecHitsValidation () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

double dPhiWsign (double phi1, double phi2)
 
double dR (double eta1, double phi1, double eta2, double phi2)
 
virtual void fillRecHitsTmp (int subdet_, edm::Event const &ev)
 
double phi12 (double phi1, double en1, double phi2, double en2)
 

Private Attributes

std::vector< uint32_t > cauxstwd
 
std::vector< double > cchi2
 
std::vector< int > cdepth
 
std::vector< double > cen
 
std::vector< double > ceta
 
std::vector< int > cieta
 
std::vector< int > ciphi
 
std::vector< double > cphi
 
std::vector< uint32_t > cstwd
 
std::vector< int > csub
 
std::vector< double > ctime
 
std::vector< double > cz
 
std::string ecalselector_
 
const CaloGeometrygeometry_
 
std::string hcalselector_
 
int imc
 
int iz
 
std::string mc_
 
MonitorElementmeEnConeEtaProfile
 
MonitorElementmeEnConeEtaProfile_E
 
MonitorElementmeEnConeEtaProfile_EH
 
MonitorElementmeEnergyHcalVsEcalHB
 
MonitorElementmeEnergyHcalVsEcalHE
 
MonitorElementmeLog10Chi2profileHB
 
MonitorElementmeLog10Chi2profileHE
 
MonitorElementmeRecHitsEnergyHB
 
MonitorElementmeRecHitsEnergyHE
 
MonitorElementmeRecHitsEnergyHF
 
MonitorElementmeRecHitsEnergyHO
 
MonitorElementmeRecHitSimHitHB
 
MonitorElementmeRecHitSimHitHE
 
MonitorElementmeRecHitSimHitHF
 
MonitorElementmeRecHitSimHitHFL
 
MonitorElementmeRecHitSimHitHFS
 
MonitorElementmeRecHitSimHitHO
 
MonitorElementmeRecHitSimHitProfileHB
 
MonitorElementmeRecHitSimHitProfileHE
 
MonitorElementmeRecHitSimHitProfileHF
 
MonitorElementmeRecHitSimHitProfileHFL
 
MonitorElementmeRecHitSimHitProfileHFS
 
MonitorElementmeRecHitSimHitProfileHO
 
MonitorElementmeRecHitsM2Chi2HB
 
MonitorElementmeRecHitsM2Chi2HE
 
MonitorElementmeTEprofileHB
 
MonitorElementmeTEprofileHB_High
 
MonitorElementmeTEprofileHB_Low
 
MonitorElementmeTEprofileHE
 
MonitorElementmeTEprofileHE_Low
 
MonitorElementmeTEprofileHF
 
MonitorElementmeTEprofileHF_Low
 
MonitorElementmeTEprofileHO
 
MonitorElementmeTEprofileHO_High
 
int nevtot
 
std::string outputFile_
 
std::string sign_
 
int subdet_
 
bool testNumber_
 
edm::EDGetTokenT
< EBRecHitCollection
tok_EB_
 
edm::EDGetTokenT
< EERecHitCollection
tok_EE_
 
edm::EDGetTokenT
< edm::HepMCProduct
tok_evt_
 
edm::ESGetToken< CaloGeometry,
CaloGeometryRecord
tok_Geom_
 
edm::EDGetTokenT
< HBHERecHitCollection
tok_hbhe_
 
edm::EDGetTokenT
< HFRecHitCollection
tok_hf_
 
edm::EDGetTokenT
< edm::PCaloHitContainer
tok_hh_
 
edm::EDGetTokenT
< HORecHitCollection
tok_ho_
 
edm::ESGetToken
< HcalDDDRecConstants,
HcalRecNumberingRecord
tok_HRNDC_
 
std::string topFolderName_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 57 of file HcalRecHitsValidation.h.

Constructor & Destructor Documentation

HcalRecHitsValidation::HcalRecHitsValidation ( edm::ParameterSet const &  conf)

Definition at line 6 of file HcalRecHitsValidation.cc.

References ecalselector_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hcalselector_, imc, HLT_FULL_cff::InputTag, iz, mc_, nevtot, outputFile_, sign_, AlCaHLTBitMon_QueryRunRegistry::string, subdet_, testNumber_, tok_EB_, tok_EE_, tok_evt_, tok_Geom_, tok_hbhe_, tok_hf_, tok_hh_, tok_ho_, and tok_HRNDC_.

7  : topFolderName_(conf.getParameter<std::string>("TopFolderName")) {
8  // DQM ROOT output
9  outputFile_ = conf.getUntrackedParameter<std::string>("outputFile", "myfile.root");
10 
11  if (!outputFile_.empty()) {
12  edm::LogInfo("OutputInfo") << " Hcal RecHit Task histograms will be saved to '" << outputFile_.c_str() << "'";
13  } else {
14  edm::LogInfo("OutputInfo") << " Hcal RecHit Task histograms will NOT be saved";
15  }
16 
17  nevtot = 0;
18 
19  hcalselector_ = conf.getUntrackedParameter<std::string>("hcalselector", "all");
20  ecalselector_ = conf.getUntrackedParameter<std::string>("ecalselector", "yes");
21  sign_ = conf.getUntrackedParameter<std::string>("sign", "*");
22  mc_ = conf.getUntrackedParameter<std::string>("mc", "yes");
23  testNumber_ = conf.getParameter<bool>("TestNumber");
24 
25  // Collections
26  tok_hbhe_ = consumes<HBHERecHitCollection>(conf.getUntrackedParameter<edm::InputTag>("HBHERecHitCollectionLabel"));
27  tok_hf_ = consumes<HFRecHitCollection>(conf.getUntrackedParameter<edm::InputTag>("HFRecHitCollectionLabel"));
28  tok_ho_ = consumes<HORecHitCollection>(conf.getUntrackedParameter<edm::InputTag>("HORecHitCollectionLabel"));
29 
30  // register for data access
31  tok_evt_ = consumes<edm::HepMCProduct>(edm::InputTag("generatorSmeared"));
32  edm::InputTag EBRecHitCollectionLabel = conf.getParameter<edm::InputTag>("EBRecHitCollectionLabel");
33  tok_EB_ = consumes<EBRecHitCollection>(EBRecHitCollectionLabel);
34  edm::InputTag EERecHitCollectionLabel = conf.getParameter<edm::InputTag>("EERecHitCollectionLabel");
35  tok_EE_ = consumes<EERecHitCollection>(EERecHitCollectionLabel);
36 
37  tok_hh_ = consumes<edm::PCaloHitContainer>(conf.getUntrackedParameter<edm::InputTag>("SimHitCollectionLabel"));
38 
39  tok_HRNDC_ = esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord>();
40  tok_Geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
41 
42  subdet_ = 5;
43  if (hcalselector_ == "noise")
44  subdet_ = 0;
45  if (hcalselector_ == "HB")
46  subdet_ = 1;
47  if (hcalselector_ == "HE")
48  subdet_ = 2;
49  if (hcalselector_ == "HO")
50  subdet_ = 3;
51  if (hcalselector_ == "HF")
52  subdet_ = 4;
53  if (hcalselector_ == "all")
54  subdet_ = 5;
55  if (hcalselector_ == "ZS")
56  subdet_ = 6;
57 
58  iz = 1;
59  if (sign_ == "-")
60  iz = -1;
61  if (sign_ == "*")
62  iz = 0;
63 
64  imc = 1;
65  if (mc_ == "no")
66  imc = 0;
67 }
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hh_
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
edm::EDGetTokenT< HORecHitCollection > tok_ho_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_Geom_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
edm::EDGetTokenT< EBRecHitCollection > tok_EB_
Log< level::Info, false > LogInfo
edm::EDGetTokenT< EERecHitCollection > tok_EE_
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_HRNDC_
edm::EDGetTokenT< edm::HepMCProduct > tok_evt_
HcalRecHitsValidation::~HcalRecHitsValidation ( )
override

Definition at line 69 of file HcalRecHitsValidation.cc.

69 {}

Member Function Documentation

void HcalRecHitsValidation::analyze ( edm::Event const &  ev,
edm::EventSetup const &  c 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 190 of file HcalRecHitsValidation.cc.

References cchi2, cdepth, cen, ceta, HLT_FULL_cff::chi2, cieta, cphi, csub, ctime, HLT_FULL_cff::depth, dR(), ecalselector_, PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), Puppi_cff::etaMax, dqm::impl::MonitorElement::Fill(), fillRecHitsTmp(), geometry_, edm::Event::getByToken(), edm::EventSetup::getData(), CaloSubdetectorGeometry::getGeometry(), HcalGeometry::getPosition(), CaloGeometry::getSubdetectorGeometry(), DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, mps_fire::i, imc, edm::HandleBase::isValid(), meEnConeEtaProfile, meEnConeEtaProfile_E, meEnConeEtaProfile_EH, meLog10Chi2profileHB, meLog10Chi2profileHE, meRecHitsEnergyHB, meRecHitsEnergyHE, meRecHitsEnergyHF, meRecHitsEnergyHO, meRecHitSimHitHB, meRecHitSimHitHE, meRecHitSimHitHF, meRecHitSimHitHFL, meRecHitSimHitHFS, meRecHitSimHitHO, meRecHitSimHitProfileHB, meRecHitSimHitProfileHE, meRecHitSimHitProfileHF, meRecHitSimHitProfileHFL, meRecHitSimHitProfileHFS, meRecHitSimHitProfileHO, meRecHitsM2Chi2HB, meRecHitsM2Chi2HE, meTEprofileHB, meTEprofileHB_High, meTEprofileHB_Low, meTEprofileHE, meTEprofileHE_Low, meTEprofileHF, meTEprofileHF_Low, meTEprofileHO, meTEprofileHO_High, nevtot, npart, AlCaHLTBitMon_ParallelJobs::p, phi, PV3DBase< T, PVType, FrameType >::phi(), edm::Handle< T >::product(), DiDispStaMuonMonitor_cfi::pt, alignCSCRings::r, HcalHitRelabeller::relabel(), HcalDetId::subdet(), subdet_, submitPVValidationJobs::t, testNumber_, tok_EB_, tok_EE_, tok_evt_, tok_Geom_, tok_hh_, and tok_HRNDC_.

190  {
191  using namespace edm;
192 
193  const HcalDDDRecConstants *hcons = &c.getData(tok_HRNDC_);
194 
195  // cuts for each subdet_ector mimiking "Scheme B"
196  // double cutHB = 0.9, cutHE = 1.4, cutHO = 1.1, cutHFL = 1.2, cutHFS = 1.8;
197 
198  // energy in HCAL
199  double eHcal = 0.;
200  double eHcalCone = 0.;
201  double eHcalConeHB = 0.;
202  double eHcalConeHE = 0.;
203  double eHcalConeHO = 0.;
204  double eHcalConeHF = 0.;
205  double eHcalConeHFL = 0.;
206  double eHcalConeHFS = 0.;
207 
208  // Total numbet of RecHits in HCAL, in the cone, above 1 GeV theshold
209  int nrechits = 0;
210  int nrechitsCone = 0;
211  int nrechitsThresh = 0;
212 
213  // energy in ECAL
214  double eEcal = 0.;
215  double eEcalB = 0.;
216  double eEcalE = 0.;
217  double eEcalCone = 0.;
218  int numrechitsEcal = 0;
219 
220  // MC info
221  double phi_MC = -999999.; // phi of initial particle from HepMC
222  double eta_MC = -999999.; // eta of initial particle from HepMC
223 
224  // HCAL energy around MC eta-phi at all depths;
225  double partR = 0.3;
226 
227  if (imc != 0) {
229  ev.getByToken(tok_evt_, evtMC); // generator in late 310_preX
230  if (!evtMC.isValid()) {
231  edm::LogInfo("HcalRecHitsValidation") << "no HepMCProduct found";
232  } else {
233  // std::cout << "*** source HepMCProduct found"<< std::endl;
234  }
235 
236  // MC particle with highest pt is taken as a direction reference
237  double maxPt = -99999.;
238  int npart = 0;
239  const HepMC::GenEvent *myGenEvent = evtMC->GetEvent();
240  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end();
241  ++p) {
242  double phip = (*p)->momentum().phi();
243  double etap = (*p)->momentum().eta();
244  // phi_MC = phip;
245  // eta_MC = etap;
246  double pt = (*p)->momentum().perp();
247  if (pt > maxPt) {
248  npart++;
249  maxPt = pt;
250  phi_MC = phip;
251  eta_MC = etap;
252  }
253  }
254  // std::cout << "*** Max pT = " << maxPt << std::endl;
255  }
256 
257  // std::cout << "*** 2" << std::endl;
258 
260  ;
261 
262  // Fill working vectors of HCAL RecHits quantities (all of these are drawn)
264 
265  // std::cout << "*** 3" << std::endl;
266 
267  //===========================================================================
268  // IN ALL other CASES : ieta-iphi maps
269  //===========================================================================
270 
271  // ECAL
272  if (ecalselector_ == "yes" && (subdet_ == 1 || subdet_ == 2 || subdet_ == 5)) {
274 
277 
278  if (ev.getByToken(tok_EB_, rhitEB)) {
279  RecHit = rhitEB.product()->begin();
280  RecHitEnd = rhitEB.product()->end();
281 
282  for (; RecHit != RecHitEnd; ++RecHit) {
283  EBDetId EBid = EBDetId(RecHit->id());
284 
285  auto cellGeometry = geometry_->getSubdetectorGeometry(EBid)->getGeometry(EBid);
286  double eta = cellGeometry->getPosition().eta();
287  double phi = cellGeometry->getPosition().phi();
288  double en = RecHit->energy();
289  eEcal += en;
290  eEcalB += en;
291 
292  double r = dR(eta_MC, phi_MC, eta, phi);
293  if (r < partR) {
294  eEcalCone += en;
295  numrechitsEcal++;
296  }
297  }
298  }
299 
301 
302  if (ev.getByToken(tok_EE_, rhitEE)) {
303  RecHit = rhitEE.product()->begin();
304  RecHitEnd = rhitEE.product()->end();
305 
306  for (; RecHit != RecHitEnd; ++RecHit) {
307  EEDetId EEid = EEDetId(RecHit->id());
308 
309  auto cellGeometry = geometry_->getSubdetectorGeometry(EEid)->getGeometry(EEid);
310  double eta = cellGeometry->getPosition().eta();
311  double phi = cellGeometry->getPosition().phi();
312  double en = RecHit->energy();
313  eEcal += en;
314  eEcalE += en;
315 
316  double r = dR(eta_MC, phi_MC, eta, phi);
317  if (r < partR) {
318  eEcalCone += en;
319  numrechitsEcal++;
320  }
321  }
322  }
323  } // end of ECAL selection
324 
325  // std::cout << "*** 4" << std::endl;
326 
327  //===========================================================================
328  // SUBSYSTEMS,
329  //===========================================================================
330 
331  if ((subdet_ != 6) && (subdet_ != 0)) {
332  // std::cout << "*** 6" << std::endl;
333 
334  double HcalCone = 0.;
335 
336  int ietaMax = 9999;
337  double etaMax = 9999.;
338 
339  // CYCLE over cells ====================================================
340 
341  for (unsigned int i = 0; i < cen.size(); i++) {
342  int sub = csub[i];
343  int depth = cdepth[i];
344  double eta = ceta[i];
345  double phi = cphi[i];
346  double en = cen[i];
347  double t = ctime[i];
348  int ieta = cieta[i];
349  double chi2 = cchi2[i];
350 
351  double chi2_log10 = 9.99; // initial value above histos limits , keep it if chi2 <= 0.
352  if (chi2 > 0.)
353  chi2_log10 = log10(chi2);
354 
355  nrechits++;
356  eHcal += en;
357  if (en > 1.)
358  nrechitsThresh++;
359 
360  double r = dR(eta_MC, phi_MC, eta, phi);
361  if (r < partR) {
362  if (sub == 1)
363  eHcalConeHB += en;
364  if (sub == 2)
365  eHcalConeHE += en;
366  if (sub == 3)
367  eHcalConeHO += en;
368  if (sub == 4) {
369  eHcalConeHF += en;
370  if (depth == 1)
371  eHcalConeHFL += en;
372  else
373  eHcalConeHFS += en;
374  }
375  eHcalCone += en;
376  nrechitsCone++;
377 
378  HcalCone += en;
379 
380  // alternative: ietamax -> closest to MC eta !!!
381  float eta_diff = fabs(eta_MC - eta);
382  if (eta_diff < etaMax) {
383  etaMax = eta_diff;
384  ietaMax = ieta;
385  }
386  }
387 
388  // The energy and overall timing histos are drawn while
389  // the ones split by depth are not
390  if (sub == 1 && (subdet_ == 1 || subdet_ == 5)) {
391  meRecHitsM2Chi2HB->Fill(chi2_log10);
392  meLog10Chi2profileHB->Fill(en, chi2_log10);
393 
394  meRecHitsEnergyHB->Fill(en);
395 
396  meTEprofileHB_Low->Fill(en, t);
397  meTEprofileHB->Fill(en, t);
398  meTEprofileHB_High->Fill(en, t);
399  }
400  if (sub == 2 && (subdet_ == 2 || subdet_ == 5)) {
401  meRecHitsM2Chi2HE->Fill(chi2_log10);
402  meLog10Chi2profileHE->Fill(en, chi2_log10);
403 
404  meRecHitsEnergyHE->Fill(en);
405 
406  meTEprofileHE_Low->Fill(en, t);
407  meTEprofileHE->Fill(en, t);
408  }
409  if (sub == 4 && (subdet_ == 4 || subdet_ == 5)) {
410  meRecHitsEnergyHF->Fill(en);
411 
412  meTEprofileHF_Low->Fill(en, t);
413  meTEprofileHF->Fill(en, t);
414  }
415  if (sub == 3 && (subdet_ == 3 || subdet_ == 5)) {
416  meRecHitsEnergyHO->Fill(en);
417 
418  meTEprofileHO->Fill(en, t);
419  meTEprofileHO_High->Fill(en, t);
420  }
421  }
422 
423  if (imc != 0) {
424  meEnConeEtaProfile->Fill(double(ietaMax), HcalCone); //
425  meEnConeEtaProfile_E->Fill(double(ietaMax), eEcalCone);
426  meEnConeEtaProfile_EH->Fill(double(ietaMax), HcalCone + eEcalCone);
427  }
428 
429  // std::cout << "*** 7" << std::endl;
430  }
431 
432  // SimHits vs. RecHits
433  if (subdet_ > 0 && subdet_ < 6 && imc != 0) { // not noise
434 
436  if (ev.getByToken(tok_hh_, hcalHits)) {
437  const PCaloHitContainer *SimHitResult = hcalHits.product();
438 
439  double enSimHits = 0.;
440  double enSimHitsHB = 0.;
441  double enSimHitsHE = 0.;
442  double enSimHitsHO = 0.;
443  double enSimHitsHF = 0.;
444  double enSimHitsHFL = 0.;
445  double enSimHitsHFS = 0.;
446  // sum of SimHits in the cone
447 
448  for (std::vector<PCaloHit>::const_iterator SimHits = SimHitResult->begin(); SimHits != SimHitResult->end();
449  ++SimHits) {
450  int sub, depth;
451  HcalDetId cell;
452 
453  if (testNumber_)
454  cell = HcalHitRelabeller::relabel(SimHits->id(), hcons);
455  else
456  cell = HcalDetId(SimHits->id());
457 
458  sub = cell.subdet();
459  depth = cell.depth();
460 
461  if (sub != subdet_ && subdet_ != 5)
462  continue; // If we are not looking at all of the subdetectors and the
463  // simhit doesn't come from the specific subdetector of
464  // interest, then we won't do any thing with it
465 
466  const HcalGeometry *cellGeometry =
467  dynamic_cast<const HcalGeometry *>(geometry_->getSubdetectorGeometry(DetId::Hcal, cell.subdet()));
468  double etaS = cellGeometry->getPosition(cell).eta();
469  double phiS = cellGeometry->getPosition(cell).phi();
470  double en = SimHits->energy();
471 
472  double r = dR(eta_MC, phi_MC, etaS, phiS);
473 
474  if (r < partR) { // just energy in the small cone
475 
476  enSimHits += en;
477  if (sub == static_cast<int>(HcalBarrel))
478  enSimHitsHB += en;
479  if (sub == static_cast<int>(HcalEndcap))
480  enSimHitsHE += en;
481  if (sub == static_cast<int>(HcalOuter))
482  enSimHitsHO += en;
483  if (sub == static_cast<int>(HcalForward)) {
484  enSimHitsHF += en;
485  if (depth == 1)
486  enSimHitsHFL += en;
487  else
488  enSimHitsHFS += en;
489  }
490  }
491  }
492 
493  // Now some histos with SimHits
494 
495  if (subdet_ == 4 || subdet_ == 5) {
496  meRecHitSimHitHF->Fill(enSimHitsHF, eHcalConeHF);
497  meRecHitSimHitProfileHF->Fill(enSimHitsHF, eHcalConeHF);
498 
499  meRecHitSimHitHFL->Fill(enSimHitsHFL, eHcalConeHFL);
500  meRecHitSimHitProfileHFL->Fill(enSimHitsHFL, eHcalConeHFL);
501  meRecHitSimHitHFS->Fill(enSimHitsHFS, eHcalConeHFS);
502  meRecHitSimHitProfileHFS->Fill(enSimHitsHFS, eHcalConeHFS);
503  }
504  if (subdet_ == 1 || subdet_ == 5) {
505  meRecHitSimHitHB->Fill(enSimHitsHB, eHcalConeHB);
506  meRecHitSimHitProfileHB->Fill(enSimHitsHB, eHcalConeHB);
507  }
508  if (subdet_ == 2 || subdet_ == 5) {
509  meRecHitSimHitHE->Fill(enSimHitsHE, eHcalConeHE);
510  meRecHitSimHitProfileHE->Fill(enSimHitsHE, eHcalConeHE);
511  }
512  if (subdet_ == 3 || subdet_ == 5) {
513  meRecHitSimHitHO->Fill(enSimHitsHO, eHcalConeHO);
514  meRecHitSimHitProfileHO->Fill(enSimHitsHO, eHcalConeHO);
515  }
516  }
517  }
518 
519  nevtot++;
520 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
std::vector< double > cchi2
MonitorElement * meRecHitsM2Chi2HB
std::vector< PCaloHit > PCaloHitContainer
const edm::EventSetup & c
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hh_
MonitorElement * meRecHitsEnergyHF
MonitorElement * meTEprofileHE_Low
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
std::vector< EcalRecHit >::const_iterator const_iterator
MonitorElement * meLog10Chi2profileHB
MonitorElement * meEnConeEtaProfile
double npart
Definition: HydjetWrapper.h:46
bool ev
MonitorElement * meRecHitSimHitProfileHF
MonitorElement * meRecHitSimHitProfileHFS
MonitorElement * meRecHitsEnergyHB
std::vector< double > ceta
MonitorElement * meRecHitSimHitHF
MonitorElement * meRecHitsEnergyHE
MonitorElement * meRecHitSimHitProfileHE
MonitorElement * meEnConeEtaProfile_E
const CaloGeometry * geometry_
MonitorElement * meRecHitSimHitHB
MonitorElement * meRecHitSimHitHFS
void Fill(long long x)
bool getData(T &iHolder) const
Definition: EventSetup.h:128
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
std::vector< double > cphi
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_Geom_
MonitorElement * meRecHitsM2Chi2HE
MonitorElement * meTEprofileHB
virtual void fillRecHitsTmp(int subdet_, edm::Event const &ev)
double dR(double eta1, double phi1, double eta2, double phi2)
MonitorElement * meLog10Chi2profileHE
bool isValid() const
Definition: HandleBase.h:70
MonitorElement * meRecHitSimHitHO
MonitorElement * meRecHitSimHitProfileHB
GlobalPoint getPosition(const DetId &id) const
MonitorElement * meTEprofileHF_Low
edm::EDGetTokenT< EBRecHitCollection > tok_EB_
MonitorElement * meTEprofileHO_High
Log< level::Info, false > LogInfo
MonitorElement * meTEprofileHE
T const * product() const
Definition: Handle.h:70
MonitorElement * meTEprofileHF
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
MonitorElement * meRecHitSimHitProfileHO
edm::EDGetTokenT< EERecHitCollection > tok_EE_
std::vector< double > ctime
MonitorElement * meEnConeEtaProfile_EH
MonitorElement * meRecHitSimHitProfileHFL
T eta() const
Definition: PV3DBase.h:73
MonitorElement * meRecHitsEnergyHO
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_HRNDC_
MonitorElement * meRecHitSimHitHFL
MonitorElement * meTEprofileHO
edm::EDGetTokenT< edm::HepMCProduct > tok_evt_
DetId relabel(const uint32_t testId) const
MonitorElement * meTEprofileHB_Low
tuple etaMax
Definition: Puppi_cff.py:46
MonitorElement * meRecHitSimHitHE
MonitorElement * meTEprofileHB_High
std::vector< double > cen
void HcalRecHitsValidation::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  run,
edm::EventSetup const &  es 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 71 of file HcalRecHitsValidation.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookProfile(), timingPdfMaker::histo, imc, meEnConeEtaProfile, meEnConeEtaProfile_E, meEnConeEtaProfile_EH, meLog10Chi2profileHB, meLog10Chi2profileHE, meRecHitsEnergyHB, meRecHitsEnergyHE, meRecHitsEnergyHF, meRecHitsEnergyHO, meRecHitSimHitHB, meRecHitSimHitHE, meRecHitSimHitHF, meRecHitSimHitHFL, meRecHitSimHitHFS, meRecHitSimHitHO, meRecHitSimHitProfileHB, meRecHitSimHitProfileHE, meRecHitSimHitProfileHF, meRecHitSimHitProfileHFL, meRecHitSimHitProfileHFS, meRecHitSimHitProfileHO, meRecHitsM2Chi2HB, meRecHitsM2Chi2HE, meTEprofileHB, meTEprofileHB_High, meTEprofileHB_Low, meTEprofileHE, meTEprofileHE_Low, meTEprofileHF, meTEprofileHF_Low, meTEprofileHO, meTEprofileHO_High, dqm::implementation::NavigatorBase::setCurrentFolder(), subdet_, and topFolderName_.

71  {
72  Char_t histo[200];
73 
75 
76  //======================= Now various cases one by one ===================
77 
78  // Histograms drawn for single pion scan
79  if (subdet_ != 0 && imc != 0) { // just not for noise
80  sprintf(histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths");
81  meEnConeEtaProfile = ib.bookProfile(histo, histo, 83, -41.5, 41.5, -100., 2000., " ");
82 
83  sprintf(histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths_E");
84  meEnConeEtaProfile_E = ib.bookProfile(histo, histo, 83, -41.5, 41.5, -100., 2000., " ");
85 
86  sprintf(histo, "HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths_EH");
87  meEnConeEtaProfile_EH = ib.bookProfile(histo, histo, 83, -41.5, 41.5, -100., 2000., " ");
88  }
89 
90  // ************** HB **********************************
91  if (subdet_ == 1 || subdet_ == 5) {
92  sprintf(histo, "HcalRecHitTask_M2Log10Chi2_of_rechits_HB"); // Chi2
93  meRecHitsM2Chi2HB = ib.book1D(histo, histo, 120, -2., 10.);
94 
95  sprintf(histo, "HcalRecHitTask_Log10Chi2_vs_energy_profile_HB");
96  meLog10Chi2profileHB = ib.bookProfile(histo, histo, 300, -5., 295., -2., 9.9, " ");
97 
98  sprintf(histo, "HcalRecHitTask_energy_of_rechits_HB");
99  meRecHitsEnergyHB = ib.book1D(histo, histo, 2010, -10., 2000.);
100 
101  sprintf(histo, "HcalRecHitTask_timing_vs_energy_profile_HB");
102  meTEprofileHB = ib.bookProfile(histo, histo, 150, -5., 295., -48., 92., " ");
103 
104  sprintf(histo, "HcalRecHitTask_timing_vs_energy_profile_Low_HB");
105  meTEprofileHB_Low = ib.bookProfile(histo, histo, 150, -5., 295., -48., 92., " ");
106 
107  sprintf(histo, "HcalRecHitTask_timing_vs_energy_profile_High_HB");
108  meTEprofileHB_High = ib.bookProfile(histo, histo, 150, -5., 295., 48., 92., " ");
109 
110  if (imc != 0) {
111  sprintf(histo, "HcalRecHitTask_energy_rechits_vs_simhits_HB");
112  meRecHitSimHitHB = ib.book2D(histo, histo, 120, 0., 1.2, 300, 0., 150.);
113  sprintf(histo, "HcalRecHitTask_energy_rechits_vs_simhits_profile_HB");
114  meRecHitSimHitProfileHB = ib.bookProfile(histo, histo, 120, 0., 1.2, 0., 500., " ");
115  }
116  }
117 
118  // ********************** HE ************************************
119  if (subdet_ == 2 || subdet_ == 5) {
120  sprintf(histo, "HcalRecHitTask_M2Log10Chi2_of_rechits_HE"); // Chi2
121  meRecHitsM2Chi2HE = ib.book1D(histo, histo, 120, -2., 10.);
122 
123  sprintf(histo, "HcalRecHitTask_Log10Chi2_vs_energy_profile_HE");
124  meLog10Chi2profileHE = ib.bookProfile(histo, histo, 1000, -5., 995., -2., 9.9, " ");
125 
126  sprintf(histo, "HcalRecHitTask_energy_of_rechits_HE");
127  meRecHitsEnergyHE = ib.book1D(histo, histo, 2010, -10., 2000.);
128 
129  sprintf(histo, "HcalRecHitTask_timing_vs_energy_profile_Low_HE");
130  meTEprofileHE_Low = ib.bookProfile(histo, histo, 80, -5., 75., -48., 92., " ");
131 
132  sprintf(histo, "HcalRecHitTask_timing_vs_energy_profile_HE");
133  meTEprofileHE = ib.bookProfile(histo, histo, 200, -5., 2995., -48., 92., " ");
134 
135  if (imc != 0) {
136  sprintf(histo, "HcalRecHitTask_energy_rechits_vs_simhits_HE");
137  meRecHitSimHitHE = ib.book2D(histo, histo, 120, 0., 0.6, 300, 0., 150.);
138  sprintf(histo, "HcalRecHitTask_energy_rechits_vs_simhits_profile_HE");
139  meRecHitSimHitProfileHE = ib.bookProfile(histo, histo, 120, 0., 0.6, 0., 500., " ");
140  }
141  }
142 
143  // ************** HO ****************************************
144  if (subdet_ == 3 || subdet_ == 5) {
145  sprintf(histo, "HcalRecHitTask_energy_of_rechits_HO");
146  meRecHitsEnergyHO = ib.book1D(histo, histo, 2010, -10., 2000.);
147 
148  sprintf(histo, "HcalRecHitTask_timing_vs_energy_profile_HO");
149  meTEprofileHO = ib.bookProfile(histo, histo, 60, -5., 55., -48., 92., " ");
150 
151  sprintf(histo, "HcalRecHitTask_timing_vs_energy_profile_High_HO");
152  meTEprofileHO_High = ib.bookProfile(histo, histo, 100, -5., 995., -48., 92., " ");
153 
154  if (imc != 0) {
155  sprintf(histo, "HcalRecHitTask_energy_rechits_vs_simhits_HO");
156  meRecHitSimHitHO = ib.book2D(histo, histo, 150, 0., 1.5, 350, 0., 350.);
157  sprintf(histo, "HcalRecHitTask_energy_rechits_vs_simhits_profile_HO");
158  meRecHitSimHitProfileHO = ib.bookProfile(histo, histo, 150, 0., 1.5, 0., 500., " ");
159  }
160  }
161 
162  // ********************** HF ************************************
163  if (subdet_ == 4 || subdet_ == 5) {
164  sprintf(histo, "HcalRecHitTask_energy_of_rechits_HF");
165  meRecHitsEnergyHF = ib.book1D(histo, histo, 2010, -10., 2000.);
166 
167  sprintf(histo, "HcalRecHitTask_timing_vs_energy_profile_Low_HF");
168  meTEprofileHF_Low = ib.bookProfile(histo, histo, 100, -5., 195., -48., 92., " ");
169 
170  sprintf(histo, "HcalRecHitTask_timing_vs_energy_profile_HF");
171  meTEprofileHF = ib.bookProfile(histo, histo, 200, -5., 995., -48., 92., " ");
172 
173  if (imc != 0) {
174  sprintf(histo, "HcalRecHitTask_energy_rechits_vs_simhits_HF");
175  meRecHitSimHitHF = ib.book2D(histo, histo, 50, 0., 50., 150, 0., 150.);
176  sprintf(histo, "HcalRecHitTask_energy_rechits_vs_simhits_HFL");
177  meRecHitSimHitHFL = ib.book2D(histo, histo, 50, 0., 50., 150, 0., 150.);
178  sprintf(histo, "HcalRecHitTask_energy_rechits_vs_simhits_HFS");
179  meRecHitSimHitHFS = ib.book2D(histo, histo, 50, 0., 50., 150, 0., 150.);
180  sprintf(histo, "HcalRecHitTask_energy_rechits_vs_simhits_profile_HF");
181  meRecHitSimHitProfileHF = ib.bookProfile(histo, histo, 50, 0., 50., 0., 500., " ");
182  sprintf(histo, "HcalRecHitTask_energy_rechits_vs_simhits_profile_HFL");
183  meRecHitSimHitProfileHFL = ib.bookProfile(histo, histo, 50, 0., 50., 0., 500., " ");
184  sprintf(histo, "HcalRecHitTask_energy_rechits_vs_simhits_profile_HFS");
185  meRecHitSimHitProfileHFS = ib.bookProfile(histo, histo, 50, 0., 50., 0., 500., " ");
186  }
187  }
188 }
MonitorElement * meRecHitsM2Chi2HB
MonitorElement * meRecHitsEnergyHF
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * meTEprofileHE_Low
MonitorElement * meLog10Chi2profileHB
MonitorElement * meEnConeEtaProfile
MonitorElement * meRecHitSimHitProfileHF
MonitorElement * meRecHitSimHitProfileHFS
MonitorElement * meRecHitsEnergyHB
MonitorElement * meRecHitSimHitHF
MonitorElement * meRecHitsEnergyHE
MonitorElement * meRecHitSimHitProfileHE
MonitorElement * meEnConeEtaProfile_E
MonitorElement * meRecHitSimHitHB
MonitorElement * meRecHitSimHitHFS
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
MonitorElement * meRecHitsM2Chi2HE
MonitorElement * meTEprofileHB
MonitorElement * meLog10Chi2profileHE
MonitorElement * meRecHitSimHitHO
MonitorElement * meRecHitSimHitProfileHB
MonitorElement * meTEprofileHF_Low
MonitorElement * meTEprofileHO_High
MonitorElement * meTEprofileHE
MonitorElement * meTEprofileHF
MonitorElement * meRecHitSimHitProfileHO
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
MonitorElement * meEnConeEtaProfile_EH
MonitorElement * meRecHitSimHitProfileHFL
MonitorElement * meRecHitsEnergyHO
MonitorElement * meRecHitSimHitHFL
MonitorElement * meTEprofileHO
MonitorElement * meTEprofileHB_Low
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * meRecHitSimHitHE
MonitorElement * meTEprofileHB_High
double HcalRecHitsValidation::dPhiWsign ( double  phi1,
double  phi2 
)
private

Definition at line 675 of file HcalRecHitsValidation.cc.

References isotrackTrainRegressor::a1, isotrackTrainRegressor::a2, PI, and createJobs::tmp.

675  {
676  // clockwise phi2 w.r.t phi1 means "+" phi distance
677  // anti-clockwise phi2 w.r.t phi1 means "-" phi distance
678 
679  double PI = 3.1415926535898;
680  double a1 = phi1;
681  double a2 = phi2;
682  double tmp = a2 - a1;
683  if (a1 * a2 < 0.) {
684  if (a1 > 0.5 * PI)
685  tmp += 2. * PI;
686  if (a2 > 0.5 * PI)
687  tmp -= 2. * PI;
688  }
689  return tmp;
690 }
#define PI
Definition: QcdUeDQM.h:37
tmp
align.sh
Definition: createJobs.py:716
double HcalRecHitsValidation::dR ( double  eta1,
double  phi1,
double  eta2,
double  phi2 
)
private

Definition at line 642 of file HcalRecHitsValidation.cc.

References HLT_FULL_cff::eta1, PI, mathSSE::sqrt(), and createJobs::tmp.

Referenced by analyze().

642  {
643  double PI = 3.1415926535898;
644  double deltaphi = phi1 - phi2;
645  if (phi2 > phi1) {
646  deltaphi = phi2 - phi1;
647  }
648  if (deltaphi > PI) {
649  deltaphi = 2. * PI - deltaphi;
650  }
651  double deltaeta = eta2 - eta1;
652  double tmp = sqrt(deltaeta * deltaeta + deltaphi * deltaphi);
653  return tmp;
654 }
T sqrt(T t)
Definition: SSEVec.h:19
#define PI
Definition: QcdUeDQM.h:37
tmp
align.sh
Definition: createJobs.py:716
void HcalRecHitsValidation::fillRecHitsTmp ( int  subdet_,
edm::Event const &  ev 
)
privatevirtual

Definition at line 523 of file HcalRecHitsValidation.cc.

References cchi2, cdepth, cen, ceta, HLT_FULL_cff::chi2, cieta, ciphi, cphi, csub, ctime, cz, HLT_FULL_cff::depth, PVValHelper::eta, geometry_, edm::Event::getByToken(), CaloSubdetectorGeometry::getGeometry(), CaloGeometry::getSubdetectorGeometry(), DetId::Hcal, iz, dqmiolumiharvest::j, phi, submitPVValidationJobs::t, tok_hbhe_, tok_hf_, and tok_ho_.

Referenced by analyze().

523  {
524  using namespace edm;
525 
526  // initialize data vectors
527  csub.clear();
528  cen.clear();
529  ceta.clear();
530  cphi.clear();
531  ctime.clear();
532  cieta.clear();
533  ciphi.clear();
534  cdepth.clear();
535  cz.clear();
536  cchi2.clear();
537 
538  if (subdet_ == 1 || subdet_ == 2 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
539  // HBHE
541  if (ev.getByToken(tok_hbhe_, hbhecoll)) {
542  for (HBHERecHitCollection::const_iterator j = hbhecoll->begin(); j != hbhecoll->end(); j++) {
543  HcalDetId cell(j->id());
544  const HcalGeometry *cellGeometry =
545  dynamic_cast<const HcalGeometry *>(geometry_->getSubdetectorGeometry(DetId::Hcal, cell.subdet()));
546  double eta = cellGeometry->getPosition(cell).eta();
547  double phi = cellGeometry->getPosition(cell).phi();
548  double zc = cellGeometry->getPosition(cell).z();
549  int sub = cell.subdet();
550  int depth = cell.depth();
551  int inteta = cell.ieta();
552  int intphi = cell.iphi() - 1;
553  double en = j->energy();
554  double t = j->time();
555  double chi2 = j->chi2();
556 
557  if ((iz > 0 && eta > 0.) || (iz < 0 && eta < 0.) || iz == 0) {
558  csub.push_back(sub);
559  cen.push_back(en);
560  ceta.push_back(eta);
561  cphi.push_back(phi);
562  ctime.push_back(t);
563  cieta.push_back(inteta);
564  ciphi.push_back(intphi);
565  cdepth.push_back(depth);
566  cz.push_back(zc);
567  cchi2.push_back(chi2);
568  }
569  }
570  }
571  }
572 
573  if (subdet_ == 4 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
574  // HF
576  if (ev.getByToken(tok_hf_, hfcoll)) {
577  for (HFRecHitCollection::const_iterator j = hfcoll->begin(); j != hfcoll->end(); j++) {
578  HcalDetId cell(j->id());
579  auto cellGeometry = geometry_->getSubdetectorGeometry(cell)->getGeometry(cell);
580 
581  double eta = cellGeometry->getPosition().eta();
582  double phi = cellGeometry->getPosition().phi();
583  double zc = cellGeometry->getPosition().z();
584  int sub = cell.subdet();
585  int depth = cell.depth();
586  int inteta = cell.ieta();
587  int intphi = cell.iphi() - 1;
588  double en = j->energy();
589  double t = j->time();
590 
591  if ((iz > 0 && eta > 0.) || (iz < 0 && eta < 0.) || iz == 0) {
592  csub.push_back(sub);
593  cen.push_back(en);
594  ceta.push_back(eta);
595  cphi.push_back(phi);
596  ctime.push_back(t);
597  cieta.push_back(inteta);
598  ciphi.push_back(intphi);
599  cdepth.push_back(depth);
600  cz.push_back(zc);
601  cchi2.push_back(0.);
602  }
603  }
604  }
605  }
606 
607  // HO
608  if (subdet_ == 3 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
610  if (ev.getByToken(tok_ho_, hocoll)) {
611  for (HORecHitCollection::const_iterator j = hocoll->begin(); j != hocoll->end(); j++) {
612  HcalDetId cell(j->id());
613  auto cellGeometry = geometry_->getSubdetectorGeometry(cell)->getGeometry(cell);
614 
615  double eta = cellGeometry->getPosition().eta();
616  double phi = cellGeometry->getPosition().phi();
617  double zc = cellGeometry->getPosition().z();
618  int sub = cell.subdet();
619  int depth = cell.depth();
620  int inteta = cell.ieta();
621  int intphi = cell.iphi() - 1;
622  double t = j->time();
623  double en = j->energy();
624 
625  if ((iz > 0 && eta > 0.) || (iz < 0 && eta < 0.) || iz == 0) {
626  csub.push_back(sub);
627  cen.push_back(en);
628  ceta.push_back(eta);
629  cphi.push_back(phi);
630  ctime.push_back(t);
631  cieta.push_back(inteta);
632  ciphi.push_back(intphi);
633  cdepth.push_back(depth);
634  cz.push_back(zc);
635  cchi2.push_back(0.);
636  }
637  }
638  }
639  }
640 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
std::vector< double > cchi2
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
std::vector< T >::const_iterator const_iterator
bool ev
std::vector< double > ceta
edm::EDGetTokenT< HORecHitCollection > tok_ho_
const CaloGeometry * geometry_
std::vector< double > cphi
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
std::vector< double > ctime
std::vector< double > cz
std::vector< double > cen
double HcalRecHitsValidation::phi12 ( double  phi1,
double  en1,
double  phi2,
double  en2 
)
private

Definition at line 656 of file HcalRecHitsValidation.cc.

References isotrackTrainRegressor::a1, isotrackTrainRegressor::a2, PI, and createJobs::tmp.

656  {
657  // weighted mean value of phi1 and phi2
658 
659  double tmp;
660  double PI = 3.1415926535898;
661  double a1 = phi1;
662  double a2 = phi2;
663 
664  if (a1 > 0.5 * PI && a2 < 0.)
665  a2 += 2 * PI;
666  if (a2 > 0.5 * PI && a1 < 0.)
667  a1 += 2 * PI;
668  tmp = (a1 * en1 + a2 * en2) / (en1 + en2);
669  if (tmp > PI)
670  tmp -= 2. * PI;
671 
672  return tmp;
673 }
#define PI
Definition: QcdUeDQM.h:37
tmp
align.sh
Definition: createJobs.py:716

Member Data Documentation

std::vector<uint32_t> HcalRecHitsValidation::cauxstwd
private

Definition at line 166 of file HcalRecHitsValidation.h.

std::vector<double> HcalRecHitsValidation::cchi2
private

Definition at line 167 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

std::vector<int> HcalRecHitsValidation::cdepth
private

Definition at line 159 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

std::vector<double> HcalRecHitsValidation::cen
private

Definition at line 160 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

std::vector<double> HcalRecHitsValidation::ceta
private

Definition at line 161 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

std::vector<int> HcalRecHitsValidation::cieta
private

Definition at line 157 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

std::vector<int> HcalRecHitsValidation::ciphi
private

Definition at line 158 of file HcalRecHitsValidation.h.

Referenced by fillRecHitsTmp().

std::vector<double> HcalRecHitsValidation::cphi
private

Definition at line 162 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

std::vector<uint32_t> HcalRecHitsValidation::cstwd
private

Definition at line 165 of file HcalRecHitsValidation.h.

std::vector<int> HcalRecHitsValidation::csub
private

Definition at line 156 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

std::vector<double> HcalRecHitsValidation::ctime
private

Definition at line 163 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

std::vector<double> HcalRecHitsValidation::cz
private

Definition at line 164 of file HcalRecHitsValidation.h.

Referenced by fillRecHitsTmp().

std::string HcalRecHitsValidation::ecalselector_
private

Definition at line 75 of file HcalRecHitsValidation.h.

Referenced by analyze(), and HcalRecHitsValidation().

const CaloGeometry* HcalRecHitsValidation::geometry_
private

Definition at line 153 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

std::string HcalRecHitsValidation::hcalselector_
private

Definition at line 74 of file HcalRecHitsValidation.h.

Referenced by HcalRecHitsValidation().

int HcalRecHitsValidation::imc
private

Definition at line 97 of file HcalRecHitsValidation.h.

Referenced by analyze(), bookHistograms(), and HcalRecHitsValidation().

int HcalRecHitsValidation::iz
private

Definition at line 96 of file HcalRecHitsValidation.h.

Referenced by fillRecHitsTmp(), and HcalRecHitsValidation().

std::string HcalRecHitsValidation::mc_
private

Definition at line 77 of file HcalRecHitsValidation.h.

Referenced by HcalRecHitsValidation().

MonitorElement* HcalRecHitsValidation::meEnConeEtaProfile
private

Definition at line 104 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meEnConeEtaProfile_E
private

Definition at line 105 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meEnConeEtaProfile_EH
private

Definition at line 106 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meEnergyHcalVsEcalHB
private

Definition at line 143 of file HcalRecHitsValidation.h.

MonitorElement* HcalRecHitsValidation::meEnergyHcalVsEcalHE
private

Definition at line 144 of file HcalRecHitsValidation.h.

MonitorElement* HcalRecHitsValidation::meLog10Chi2profileHB
private

Definition at line 150 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meLog10Chi2profileHE
private

Definition at line 151 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitsEnergyHB
private

Definition at line 109 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitsEnergyHE
private

Definition at line 110 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitsEnergyHF
private

Definition at line 112 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitsEnergyHO
private

Definition at line 111 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitHB
private

Definition at line 128 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitHE
private

Definition at line 129 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitHF
private

Definition at line 131 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitHFL
private

Definition at line 132 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitHFS
private

Definition at line 133 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitHO
private

Definition at line 130 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitProfileHB
private

Definition at line 135 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitProfileHE
private

Definition at line 136 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitProfileHF
private

Definition at line 138 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitProfileHFL
private

Definition at line 139 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitProfileHFS
private

Definition at line 140 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitProfileHO
private

Definition at line 137 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitsM2Chi2HB
private

Definition at line 147 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitsM2Chi2HE
private

Definition at line 148 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHB
private

Definition at line 115 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHB_High
private

Definition at line 116 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHB_Low
private

Definition at line 114 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHE
private

Definition at line 119 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHE_Low
private

Definition at line 118 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHF
private

Definition at line 125 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHF_Low
private

Definition at line 124 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHO
private

Definition at line 121 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHO_High
private

Definition at line 122 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

int HcalRecHitsValidation::nevtot
private

Definition at line 170 of file HcalRecHitsValidation.h.

Referenced by analyze(), and HcalRecHitsValidation().

std::string HcalRecHitsValidation::outputFile_
private

Definition at line 73 of file HcalRecHitsValidation.h.

Referenced by HcalRecHitsValidation().

std::string HcalRecHitsValidation::sign_
private

Definition at line 76 of file HcalRecHitsValidation.h.

Referenced by HcalRecHitsValidation().

int HcalRecHitsValidation::subdet_
private

Definition at line 93 of file HcalRecHitsValidation.h.

Referenced by analyze(), bookHistograms(), and HcalRecHitsValidation().

bool HcalRecHitsValidation::testNumber_
private

Definition at line 78 of file HcalRecHitsValidation.h.

Referenced by analyze(), and HcalRecHitsValidation().

edm::EDGetTokenT<EBRecHitCollection> HcalRecHitsValidation::tok_EB_
private

Definition at line 82 of file HcalRecHitsValidation.h.

Referenced by analyze(), and HcalRecHitsValidation().

edm::EDGetTokenT<EERecHitCollection> HcalRecHitsValidation::tok_EE_
private

Definition at line 83 of file HcalRecHitsValidation.h.

Referenced by analyze(), and HcalRecHitsValidation().

edm::EDGetTokenT<edm::HepMCProduct> HcalRecHitsValidation::tok_evt_
private

Definition at line 81 of file HcalRecHitsValidation.h.

Referenced by analyze(), and HcalRecHitsValidation().

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> HcalRecHitsValidation::tok_Geom_
private

Definition at line 90 of file HcalRecHitsValidation.h.

Referenced by analyze(), and HcalRecHitsValidation().

edm::EDGetTokenT<HBHERecHitCollection> HcalRecHitsValidation::tok_hbhe_
private

Definition at line 85 of file HcalRecHitsValidation.h.

Referenced by fillRecHitsTmp(), and HcalRecHitsValidation().

edm::EDGetTokenT<HFRecHitCollection> HcalRecHitsValidation::tok_hf_
private

Definition at line 86 of file HcalRecHitsValidation.h.

Referenced by fillRecHitsTmp(), and HcalRecHitsValidation().

edm::EDGetTokenT<edm::PCaloHitContainer> HcalRecHitsValidation::tok_hh_
private

Definition at line 84 of file HcalRecHitsValidation.h.

Referenced by analyze(), and HcalRecHitsValidation().

edm::EDGetTokenT<HORecHitCollection> HcalRecHitsValidation::tok_ho_
private

Definition at line 87 of file HcalRecHitsValidation.h.

Referenced by fillRecHitsTmp(), and HcalRecHitsValidation().

edm::ESGetToken<HcalDDDRecConstants, HcalRecNumberingRecord> HcalRecHitsValidation::tok_HRNDC_
private

Definition at line 89 of file HcalRecHitsValidation.h.

Referenced by analyze(), and HcalRecHitsValidation().

std::string HcalRecHitsValidation::topFolderName_
private

Definition at line 71 of file HcalRecHitsValidation.h.

Referenced by bookHistograms().