CMS 3D CMS Logo

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::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void analyze (edm::Event const &ev, edm::EventSetup const &c)
 
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
 
 HcalRecHitsValidation (edm::ParameterSet const &conf)
 
 ~HcalRecHitsValidation ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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< 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_
 
edm::ESHandle< CaloGeometrygeometry
 
std::string hcalselector_
 
int imc
 
int iz
 
std::string mc_
 
MonitorElementmeEnConeEtaProfile
 
MonitorElementmeEnConeEtaProfile_E
 
MonitorElementmeEnConeEtaProfile_EH
 
MonitorElementmeEnergyHcalVsEcalHB
 
MonitorElementmeEnergyHcalVsEcalHE
 
MonitorElementmeRecHitsEnergyHB
 
MonitorElementmeRecHitsEnergyHE
 
MonitorElementmeRecHitsEnergyHF
 
MonitorElementmeRecHitsEnergyHO
 
MonitorElementmeRecHitSimHitHB
 
MonitorElementmeRecHitSimHitHE
 
MonitorElementmeRecHitSimHitHF
 
MonitorElementmeRecHitSimHitHFL
 
MonitorElementmeRecHitSimHitHFS
 
MonitorElementmeRecHitSimHitHO
 
MonitorElementmeRecHitSimHitProfileHB
 
MonitorElementmeRecHitSimHitProfileHE
 
MonitorElementmeRecHitSimHitProfileHF
 
MonitorElementmeRecHitSimHitProfileHFL
 
MonitorElementmeRecHitSimHitProfileHFS
 
MonitorElementmeRecHitSimHitProfileHO
 
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< EBRecHitCollectiontok_EB_
 
edm::EDGetTokenT< EERecHitCollectiontok_EE_
 
edm::EDGetTokenT< edm::HepMCProducttok_evt_
 
edm::EDGetTokenT< HBHERecHitCollectiontok_hbhe_
 
edm::EDGetTokenT< HFRecHitCollectiontok_hf_
 
edm::EDGetTokenT< edm::PCaloHitContainertok_hh_
 
edm::EDGetTokenT< HORecHitCollectiontok_ho_
 
std::string topFolderName_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 56 of file HcalRecHitsValidation.h.

Constructor & Destructor Documentation

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

Definition at line 8 of file HcalRecHitsValidation.cc.

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

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

Definition at line 61 of file HcalRecHitsValidation.cc.

61 { }

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 181 of file HcalRecHitsValidation.cc.

References edm::SortedCollection< T, SORT >::begin(), cdepth, cen, ceta, cieta, cphi, csub, ctime, particleFlowClusterECALTimeSelected_cfi::depth, dR(), ecalselector_, edm::SortedCollection< T, SORT >::end(), PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), ALCARECOTkAlBeamHalo_cff::etaMax, MonitorElement::Fill(), fillRecHitsTmp(), edm::EventSetup::get(), edm::Event::getByToken(), edm::HepMCProduct::GetEvent(), HcalGeometry::getPosition(), CaloGeometry::getSubdetectorGeometry(), DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, mps_fire::i, imc, edm::HandleBase::isValid(), MuonErrorMatrixAnalyzer_cfi::maxPt, meEnConeEtaProfile, meEnConeEtaProfile_E, meEnConeEtaProfile_EH, meRecHitsEnergyHB, meRecHitsEnergyHE, meRecHitsEnergyHF, meRecHitsEnergyHO, meRecHitSimHitHB, meRecHitSimHitHE, meRecHitSimHitHF, meRecHitSimHitHFL, meRecHitSimHitHFS, meRecHitSimHitHO, meRecHitSimHitProfileHB, meRecHitSimHitProfileHE, meRecHitSimHitProfileHF, meRecHitSimHitProfileHFL, meRecHitSimHitProfileHFS, meRecHitSimHitProfileHO, 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(), EnergyCorrector::pt, alignCSCRings::r, HcalHitRelabeller::relabel(), HcalDetId::subdet(), subdet_, lumiQTWidget::t, testNumber_, tok_EB_, tok_EE_, tok_evt_, and tok_hh_.

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

Implements DQMEDAnalyzer.

Definition at line 63 of file HcalRecHitsValidation.cc.

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

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

Definition at line 667 of file HcalRecHitsValidation.cc.

References DEFINE_FWK_MODULE, PI, and tmp.

667  {
668  // clockwise phi2 w.r.t phi1 means "+" phi distance
669  // anti-clockwise phi2 w.r.t phi1 means "-" phi distance
670 
671  double PI = 3.1415926535898;
672  double a1 = phi1; double a2 = phi2;
673  double tmp = a2 - a1;
674  if( a1*a2 < 0.) {
675  if(a1 > 0.5 * PI) tmp += 2.*PI;
676  if(a2 > 0.5 * PI) tmp -= 2.*PI;
677  }
678  return tmp;
679 
680 }
#define PI
Definition: QcdUeDQM.h:36
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
double HcalRecHitsValidation::dR ( double  eta1,
double  phi1,
double  eta2,
double  phi2 
)
private

Definition at line 641 of file HcalRecHitsValidation.cc.

References PI, mathSSE::sqrt(), and tmp.

Referenced by analyze().

641  {
642  double PI = 3.1415926535898;
643  double deltaphi= phi1 - phi2;
644  if( phi2 > phi1 ) { deltaphi= phi2 - phi1;}
645  if(deltaphi > PI) { deltaphi = 2.*PI - deltaphi;}
646  double deltaeta = eta2 - eta1;
647  double tmp = sqrt(deltaeta* deltaeta + deltaphi*deltaphi);
648  return tmp;
649 }
T sqrt(T t)
Definition: SSEVec.h:18
#define PI
Definition: QcdUeDQM.h:36
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void HcalRecHitsValidation::fillRecHitsTmp ( int  subdet_,
edm::Event const &  ev 
)
privatevirtual

Definition at line 506 of file HcalRecHitsValidation.cc.

References edm::SortedCollection< T, SORT >::begin(), cdepth, cen, ceta, cieta, ciphi, cphi, csub, ctime, cz, particleFlowClusterECALTimeSelected_cfi::depth, edm::SortedCollection< T, SORT >::end(), PVValHelper::eta, edm::Event::getByToken(), CaloGeometry::getSubdetectorGeometry(), DetId::Hcal, iz, phi, lumiQTWidget::t, tok_hbhe_, tok_hf_, and tok_ho_.

Referenced by analyze().

506  {
507 
508  using namespace edm;
509 
510  // initialize data vectors
511  csub.clear();
512  cen.clear();
513  ceta.clear();
514  cphi.clear();
515  ctime.clear();
516  cieta.clear();
517  ciphi.clear();
518  cdepth.clear();
519  cz.clear();
520 
521  if( subdet_ == 1 || subdet_ == 2 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
522 
523  //HBHE
525  if ( ev.getByToken(tok_hbhe_, hbhecoll) ) {
526  const CaloGeometry* geo = geometry.product();
527 
528  for (HBHERecHitCollection::const_iterator j=hbhecoll->begin(); j != hbhecoll->end(); j++) {
529 
530  HcalDetId cell(j->id());
531  const HcalGeometry* cellGeometry =
532  (HcalGeometry*)(geo->getSubdetectorGeometry(DetId::Hcal,cell.subdet()));
533  // const CaloCellGeometry* cellGeometry =
534  // geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
535  double eta = cellGeometry->getPosition(cell).eta () ;
536  double phi = cellGeometry->getPosition(cell).phi () ;
537  double zc = cellGeometry->getPosition(cell).z ();
538  int sub = cell.subdet();
539  int depth = cell.depth();
540  int inteta = cell.ieta();
541  if(inteta > 0) inteta -= 1;
542  int intphi = cell.iphi()-1;
543  double en = j->energy();
544  double t = j->time();
545 
546  if((iz > 0 && eta > 0.) || (iz < 0 && eta <0.) || iz == 0) {
547 
548  csub.push_back(sub);
549  cen.push_back(en);
550  ceta.push_back(eta);
551  cphi.push_back(phi);
552  ctime.push_back(t);
553  cieta.push_back(inteta);
554  ciphi.push_back(intphi);
555  cdepth.push_back(depth);
556  cz.push_back(zc);
557  }
558  }
559  }
560 
561  }
562 
563  if( subdet_ == 4 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
564 
565  //HF
567  if ( ev.getByToken(tok_hf_, hfcoll) ) {
568 
569  for (HFRecHitCollection::const_iterator j = hfcoll->begin(); j != hfcoll->end(); j++) {
570 
571  HcalDetId cell(j->id());
572  const CaloCellGeometry* cellGeometry =
573  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
574 
575  double eta = cellGeometry->getPosition().eta () ;
576  double phi = cellGeometry->getPosition().phi () ;
577  double zc = cellGeometry->getPosition().z ();
578  int sub = cell.subdet();
579  int depth = cell.depth();
580  int inteta = cell.ieta();
581  if(inteta > 0) inteta -= 1;
582  int intphi = cell.iphi()-1;
583  double en = j->energy();
584  double t = j->time();
585 
586  if((iz > 0 && eta > 0.) || (iz < 0 && eta <0.) || iz == 0) {
587 
588  csub.push_back(sub);
589  cen.push_back(en);
590  ceta.push_back(eta);
591  cphi.push_back(phi);
592  ctime.push_back(t);
593  cieta.push_back(inteta);
594  ciphi.push_back(intphi);
595  cdepth.push_back(depth);
596  cz.push_back(zc);
597  }
598  }
599  }
600  }
601 
602  //HO
603  if( subdet_ == 3 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
604 
606  if ( ev.getByToken(tok_ho_, hocoll) ) {
607 
608  for (HORecHitCollection::const_iterator j = hocoll->begin(); j != hocoll->end(); j++) {
609 
610  HcalDetId cell(j->id());
611  const CaloCellGeometry* cellGeometry =
612  geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
613 
614  double eta = cellGeometry->getPosition().eta () ;
615  double phi = cellGeometry->getPosition().phi () ;
616  double zc = cellGeometry->getPosition().z ();
617  int sub = cell.subdet();
618  int depth = cell.depth();
619  int inteta = cell.ieta();
620  if(inteta > 0) inteta -= 1;
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  }
636  }
637  }
638  }
639 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:45
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
std::vector< HBHERecHit >::const_iterator const_iterator
bool ev
std::vector< double > ceta
edm::EDGetTokenT< HORecHitCollection > tok_ho_
std::vector< double > cphi
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
const_iterator end() const
std::vector< double > ctime
std::vector< double > cz
HLT enums.
std::vector< double > cen
const_iterator begin() const
double HcalRecHitsValidation::phi12 ( double  phi1,
double  en1,
double  phi2,
double  en2 
)
private

Definition at line 651 of file HcalRecHitsValidation.cc.

References PI, and tmp.

651  {
652  // weighted mean value of phi1 and phi2
653 
654  double tmp;
655  double PI = 3.1415926535898;
656  double a1 = phi1; double a2 = phi2;
657 
658  if( a1 > 0.5*PI && a2 < 0.) a2 += 2*PI;
659  if( a2 > 0.5*PI && a1 < 0.) a1 += 2*PI;
660  tmp = (a1 * en1 + a2 * en2)/(en1 + en2);
661  if(tmp > PI) tmp -= 2.*PI;
662 
663  return tmp;
664 
665 }
#define PI
Definition: QcdUeDQM.h:36
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100

Member Data Documentation

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

Definition at line 159 of file HcalRecHitsValidation.h.

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

Definition at line 152 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

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

Definition at line 153 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

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

Definition at line 154 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

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

Definition at line 150 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

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

Definition at line 151 of file HcalRecHitsValidation.h.

Referenced by fillRecHitsTmp().

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

Definition at line 155 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

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

Definition at line 158 of file HcalRecHitsValidation.h.

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

Definition at line 149 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

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

Definition at line 156 of file HcalRecHitsValidation.h.

Referenced by analyze(), and fillRecHitsTmp().

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

Definition at line 157 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().

edm::ESHandle<CaloGeometry> HcalRecHitsValidation::geometry
private
std::string HcalRecHitsValidation::hcalselector_
private

Definition at line 74 of file HcalRecHitsValidation.h.

Referenced by HcalRecHitsValidation().

int HcalRecHitsValidation::imc
private

Definition at line 94 of file HcalRecHitsValidation.h.

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

int HcalRecHitsValidation::iz
private

Definition at line 93 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 101 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meEnConeEtaProfile_E
private

Definition at line 102 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meEnConeEtaProfile_EH
private

Definition at line 103 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meEnergyHcalVsEcalHB
private

Definition at line 141 of file HcalRecHitsValidation.h.

MonitorElement* HcalRecHitsValidation::meEnergyHcalVsEcalHE
private

Definition at line 142 of file HcalRecHitsValidation.h.

MonitorElement* HcalRecHitsValidation::meRecHitsEnergyHB
private

Definition at line 106 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitsEnergyHE
private

Definition at line 107 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitsEnergyHF
private

Definition at line 109 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitsEnergyHO
private

Definition at line 108 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitHB
private

Definition at line 126 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitHE
private

Definition at line 127 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitHF
private

Definition at line 129 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitHFL
private

Definition at line 130 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitHFS
private

Definition at line 131 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitHO
private

Definition at line 128 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitProfileHB
private

Definition at line 133 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitProfileHE
private

Definition at line 134 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitProfileHF
private

Definition at line 136 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitProfileHFL
private

Definition at line 137 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitProfileHFS
private

Definition at line 138 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meRecHitSimHitProfileHO
private

Definition at line 135 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHB
private

Definition at line 112 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHB_High
private

Definition at line 113 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHB_Low
private

Definition at line 111 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHE
private

Definition at line 116 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHE_Low
private

Definition at line 115 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHF
private

Definition at line 122 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHF_Low
private

Definition at line 121 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHO
private

Definition at line 118 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HcalRecHitsValidation::meTEprofileHO_High
private

Definition at line 119 of file HcalRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

int HcalRecHitsValidation::nevtot
private

Definition at line 162 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 90 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::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().

std::string HcalRecHitsValidation::topFolderName_
private

Definition at line 71 of file HcalRecHitsValidation.h.

Referenced by bookHistograms().