CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
EgammaSuperClusters Class Reference

#include <EgammaSuperClusters.h>

Inheritance diagram for EgammaSuperClusters:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 EgammaSuperClusters (const edm::ParameterSet &)
 
 ~EgammaSuperClusters ()
 
- 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

void closestMCParticle (HepMC::GenEvent const *, reco::SuperCluster const &, double &, double &) const
 
float ecalEta (float, float, float) const
 

Private Attributes

edm::EDGetTokenT< reco::SuperClusterCollectionbarrelCorSuperClusterCollectionToken_
 
edm::EDGetTokenT< reco::SuperClusterCollectionbarrelRawSuperClusterCollectionToken_
 
edm::EDGetTokenT< EcalRecHitCollectionbarrelRecHitCollectionToken_
 
edm::EDGetTokenT< reco::SuperClusterCollectionendcapCorSuperClusterCollectionToken_
 
edm::EDGetTokenT< reco::SuperClusterCollectionendcapPreSuperClusterCollectionToken_
 
edm::EDGetTokenT< reco::SuperClusterCollectionendcapRawSuperClusterCollectionToken_
 
edm::EDGetTokenT< EcalRecHitCollectionendcapRecHitCollectionToken_
 
MonitorElementhist_EB_CorSC_deltaR_
 
MonitorElementhist_EB_CorSC_EoverTruth_
 
MonitorElementhist_EB_CorSC_ET_
 
MonitorElementhist_EB_CorSC_ET_vs_Eta_
 
MonitorElementhist_EB_CorSC_ET_vs_Phi_
 
MonitorElementhist_EB_CorSC_Eta_
 
MonitorElementhist_EB_CorSC_etaWidth_
 
MonitorElementhist_EB_CorSC_NumBC_
 
MonitorElementhist_EB_CorSC_Phi_
 
MonitorElementhist_EB_CorSC_phiWidth_
 
MonitorElementhist_EB_CorSC_S1toS9_
 
MonitorElementhist_EB_CorSC_S25toE_
 
MonitorElementhist_EB_CorSC_Size_
 
MonitorElementhist_EB_RawSC_deltaR_
 
MonitorElementhist_EB_RawSC_EoverTruth_
 
MonitorElementhist_EB_RawSC_ET_
 
MonitorElementhist_EB_RawSC_Eta_
 
MonitorElementhist_EB_RawSC_NumBC_
 
MonitorElementhist_EB_RawSC_Phi_
 
MonitorElementhist_EB_RawSC_S1toS9_
 
MonitorElementhist_EB_RawSC_S25toE_
 
MonitorElementhist_EB_RawSC_Size_
 
MonitorElementhist_EE_CorSC_deltaR_
 
MonitorElementhist_EE_CorSC_EoverTruth_
 
MonitorElementhist_EE_CorSC_ET_
 
MonitorElementhist_EE_CorSC_ET_vs_Eta_
 
MonitorElementhist_EE_CorSC_ET_vs_Phi_
 
MonitorElementhist_EE_CorSC_ET_vs_R_
 
MonitorElementhist_EE_CorSC_Eta_
 
MonitorElementhist_EE_CorSC_etaWidth_
 
MonitorElementhist_EE_CorSC_NumBC_
 
MonitorElementhist_EE_CorSC_Phi_
 
MonitorElementhist_EE_CorSC_phiWidth_
 
MonitorElementhist_EE_CorSC_preshowerE_
 
MonitorElementhist_EE_CorSC_S1toS9_
 
MonitorElementhist_EE_CorSC_S25toE_
 
MonitorElementhist_EE_CorSC_Size_
 
MonitorElementhist_EE_PreSC_deltaR_
 
MonitorElementhist_EE_PreSC_EoverTruth_
 
MonitorElementhist_EE_PreSC_ET_
 
MonitorElementhist_EE_PreSC_Eta_
 
MonitorElementhist_EE_PreSC_NumBC_
 
MonitorElementhist_EE_PreSC_Phi_
 
MonitorElementhist_EE_PreSC_preshowerE_
 
MonitorElementhist_EE_PreSC_S1toS9_
 
MonitorElementhist_EE_PreSC_S25toE_
 
MonitorElementhist_EE_PreSC_Size_
 
MonitorElementhist_EE_RawSC_deltaR_
 
MonitorElementhist_EE_RawSC_EoverTruth_
 
MonitorElementhist_EE_RawSC_ET_
 
MonitorElementhist_EE_RawSC_Eta_
 
MonitorElementhist_EE_RawSC_NumBC_
 
MonitorElementhist_EE_RawSC_Phi_
 
MonitorElementhist_EE_RawSC_S1toS9_
 
MonitorElementhist_EE_RawSC_S25toE_
 
MonitorElementhist_EE_RawSC_Size_
 
HistSpec hsdeltaR_
 
HistSpec hsEoverTruth_
 
HistSpec hsET_
 
HistSpec hsEta_
 
HistSpec hsetaWidth_
 
HistSpec hsNumBC_
 
HistSpec hsPhi_
 
HistSpec hsphiWidth_
 
HistSpec hspreshowerE_
 
HistSpec hsR_
 
HistSpec hsS1toS9_
 
HistSpec hsS25toE_
 
HistSpec hsSize_
 
edm::EDGetTokenT< edm::HepMCProductMCTruthCollectionToken_
 

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

Description: SVSuite Super Cluster Validation

Implementation: \

Author
: Michael A. Balazs, Nov 2006

Definition at line 26 of file EgammaSuperClusters.h.

Constructor & Destructor Documentation

EgammaSuperClusters::EgammaSuperClusters ( const edm::ParameterSet ps)
explicit

Definition at line 18 of file EgammaSuperClusters.cc.

18  :
19  MCTruthCollectionToken_(consumes<edm::HepMCProduct>(ps.getParameter<edm::InputTag>("MCTruthCollection"))),
20  barrelRawSuperClusterCollectionToken_(consumes<reco::SuperClusterCollection>(ps.getParameter<edm::InputTag>("barrelRawSuperClusterCollection"))),
21  barrelCorSuperClusterCollectionToken_(consumes<reco::SuperClusterCollection>(ps.getParameter<edm::InputTag>("barrelCorSuperClusterCollection"))),
22  endcapRawSuperClusterCollectionToken_(consumes<reco::SuperClusterCollection>(ps.getParameter<edm::InputTag>("endcapRawSuperClusterCollection"))),
23  endcapPreSuperClusterCollectionToken_(consumes<reco::SuperClusterCollection>(ps.getParameter<edm::InputTag>("endcapPreSuperClusterCollection"))),
24  endcapCorSuperClusterCollectionToken_(consumes<reco::SuperClusterCollection>(ps.getParameter<edm::InputTag>("endcapCorSuperClusterCollection"))),
25  barrelRecHitCollectionToken_(consumes<EcalRecHitCollection>(ps.getParameter<edm::InputTag>("barrelRecHitCollection"))),
26  endcapRecHitCollectionToken_(consumes<EcalRecHitCollection>(ps.getParameter<edm::InputTag>("endcapRecHitCollection"))),
27  hsSize_(ps, "Size"),
28  hsNumBC_(ps, "NumBC"),
29  hsET_(ps, "ET"),
30  hsEta_(ps, "Eta"),
31  hsPhi_(ps, "Phi"),
32  hsS1toS9_(ps, "S1toS9"),
33  hsS25toE_(ps, "S25toE"),
34  hsEoverTruth_(ps, "EoverTruth"),
35  hsdeltaR_(ps, "deltaR"),
36  hsphiWidth_(ps, "phiWidth"),
37  hsetaWidth_(ps, "etaWidth"),
38  hspreshowerE_(ps, "preshowerE"),
39  hsR_(ps, "R"),
96 {
97 }
T getParameter(std::string const &) const
MonitorElement * hist_EE_CorSC_ET_vs_Phi_
MonitorElement * hist_EE_CorSC_ET_vs_R_
MonitorElement * hist_EE_PreSC_ET_
edm::EDGetTokenT< reco::SuperClusterCollection > endcapRawSuperClusterCollectionToken_
MonitorElement * hist_EB_CorSC_ET_
MonitorElement * hist_EB_CorSC_NumBC_
MonitorElement * hist_EE_CorSC_etaWidth_
MonitorElement * hist_EE_PreSC_EoverTruth_
MonitorElement * hist_EE_CorSC_Eta_
MonitorElement * hist_EB_RawSC_Size_
MonitorElement * hist_EE_RawSC_NumBC_
MonitorElement * hist_EB_RawSC_S1toS9_
MonitorElement * hist_EB_RawSC_ET_
MonitorElement * hist_EE_CorSC_EoverTruth_
MonitorElement * hist_EE_CorSC_deltaR_
MonitorElement * hist_EB_RawSC_Phi_
MonitorElement * hist_EE_RawSC_ET_
MonitorElement * hist_EB_CorSC_phiWidth_
MonitorElement * hist_EE_PreSC_S1toS9_
edm::EDGetTokenT< reco::SuperClusterCollection > endcapPreSuperClusterCollectionToken_
MonitorElement * hist_EB_RawSC_Eta_
MonitorElement * hist_EB_CorSC_deltaR_
MonitorElement * hist_EE_RawSC_S1toS9_
MonitorElement * hist_EB_CorSC_S25toE_
MonitorElement * hist_EE_CorSC_S1toS9_
edm::EDGetTokenT< EcalRecHitCollection > endcapRecHitCollectionToken_
MonitorElement * hist_EE_RawSC_deltaR_
edm::EDGetTokenT< edm::HepMCProduct > MCTruthCollectionToken_
MonitorElement * hist_EE_PreSC_Phi_
MonitorElement * hist_EB_CorSC_ET_vs_Eta_
edm::EDGetTokenT< reco::SuperClusterCollection > barrelRawSuperClusterCollectionToken_
MonitorElement * hist_EB_CorSC_EoverTruth_
MonitorElement * hist_EB_CorSC_etaWidth_
MonitorElement * hist_EE_CorSC_ET_
edm::EDGetTokenT< reco::SuperClusterCollection > endcapCorSuperClusterCollectionToken_
MonitorElement * hist_EE_PreSC_deltaR_
MonitorElement * hist_EE_CorSC_Size_
MonitorElement * hist_EE_PreSC_preshowerE_
MonitorElement * hist_EB_CorSC_Phi_
MonitorElement * hist_EB_CorSC_S1toS9_
MonitorElement * hist_EB_CorSC_Size_
MonitorElement * hist_EE_CorSC_Phi_
edm::EDGetTokenT< reco::SuperClusterCollection > barrelCorSuperClusterCollectionToken_
MonitorElement * hist_EB_RawSC_EoverTruth_
MonitorElement * hist_EE_RawSC_EoverTruth_
MonitorElement * hist_EB_RawSC_S25toE_
MonitorElement * hist_EE_PreSC_Eta_
MonitorElement * hist_EB_CorSC_Eta_
MonitorElement * hist_EB_RawSC_NumBC_
MonitorElement * hist_EE_CorSC_preshowerE_
MonitorElement * hist_EE_RawSC_Size_
MonitorElement * hist_EE_CorSC_NumBC_
MonitorElement * hist_EE_CorSC_S25toE_
MonitorElement * hist_EE_RawSC_S25toE_
edm::EDGetTokenT< EcalRecHitCollection > barrelRecHitCollectionToken_
MonitorElement * hist_EE_CorSC_ET_vs_Eta_
MonitorElement * hist_EE_PreSC_NumBC_
MonitorElement * hist_EE_PreSC_S25toE_
MonitorElement * hist_EE_RawSC_Eta_
MonitorElement * hist_EE_PreSC_Size_
MonitorElement * hist_EB_RawSC_deltaR_
MonitorElement * hist_EE_RawSC_Phi_
MonitorElement * hist_EB_CorSC_ET_vs_Phi_
MonitorElement * hist_EE_CorSC_phiWidth_
EgammaSuperClusters::~EgammaSuperClusters ( )

Definition at line 99 of file EgammaSuperClusters.cc.

100 {
101 }

Member Function Documentation

void EgammaSuperClusters::analyze ( const edm::Event evt,
const edm::EventSetup es 
)
override

Definition at line 325 of file EgammaSuperClusters.cc.

References barrelCorSuperClusterCollectionToken_, barrelRawSuperClusterCollectionToken_, barrelRecHitCollectionToken_, closestMCParticle(), endcapCorSuperClusterCollectionToken_, endcapPreSuperClusterCollectionToken_, endcapRawSuperClusterCollectionToken_, endcapRecHitCollectionToken_, MonitorElement::Fill(), MCTruth::genEvent, edm::Event::getByToken(), edm::HepMCProduct::GetEvent(), hist_EB_CorSC_deltaR_, hist_EB_CorSC_EoverTruth_, hist_EB_CorSC_ET_, hist_EB_CorSC_ET_vs_Eta_, hist_EB_CorSC_ET_vs_Phi_, hist_EB_CorSC_Eta_, hist_EB_CorSC_etaWidth_, hist_EB_CorSC_NumBC_, hist_EB_CorSC_Phi_, hist_EB_CorSC_phiWidth_, hist_EB_CorSC_S1toS9_, hist_EB_CorSC_S25toE_, hist_EB_CorSC_Size_, hist_EB_RawSC_deltaR_, hist_EB_RawSC_EoverTruth_, hist_EB_RawSC_ET_, hist_EB_RawSC_Eta_, hist_EB_RawSC_NumBC_, hist_EB_RawSC_Phi_, hist_EB_RawSC_S1toS9_, hist_EB_RawSC_S25toE_, hist_EB_RawSC_Size_, hist_EE_CorSC_deltaR_, hist_EE_CorSC_EoverTruth_, hist_EE_CorSC_ET_, hist_EE_CorSC_ET_vs_Eta_, hist_EE_CorSC_ET_vs_Phi_, hist_EE_CorSC_ET_vs_R_, hist_EE_CorSC_Eta_, hist_EE_CorSC_etaWidth_, hist_EE_CorSC_NumBC_, hist_EE_CorSC_Phi_, hist_EE_CorSC_phiWidth_, hist_EE_CorSC_preshowerE_, hist_EE_CorSC_S1toS9_, hist_EE_CorSC_S25toE_, hist_EE_CorSC_Size_, hist_EE_PreSC_deltaR_, hist_EE_PreSC_EoverTruth_, hist_EE_PreSC_ET_, hist_EE_PreSC_Eta_, hist_EE_PreSC_NumBC_, hist_EE_PreSC_Phi_, hist_EE_PreSC_preshowerE_, hist_EE_PreSC_S1toS9_, hist_EE_PreSC_S25toE_, hist_EE_PreSC_Size_, hist_EE_RawSC_deltaR_, hist_EE_RawSC_EoverTruth_, hist_EE_RawSC_ET_, hist_EE_RawSC_Eta_, hist_EE_RawSC_NumBC_, hist_EE_RawSC_Phi_, hist_EE_RawSC_S1toS9_, hist_EE_RawSC_S25toE_, hist_EE_RawSC_Size_, edm::HandleBase::isValid(), MCTruthCollectionToken_, funct::pow(), edm::Handle< T >::product(), SurveyInfoScenario_cff::seed, and mathSSE::sqrt().

326 {
327 
328  bool skipMC = false;
329  bool skipBarrel = false;
330  bool skipEndcap = false;
331 
332  //
333  // Get MCTRUTH
334  //
336  evt.getByToken(MCTruthCollectionToken_, pMCTruth);
337  if (!pMCTruth.isValid()) {
338  edm::LogError("EgammaSuperClusters") << "Error! can't get MC collection ";
339  skipMC = true;
340  }
341  const HepMC::GenEvent* genEvent = pMCTruth->GetEvent();
342 
343  if( skipMC ) return;
344 
345  //
346  // Get the BARREL products
347  //
348  edm::Handle<reco::SuperClusterCollection> pBarrelRawSuperClusters;
349  evt.getByToken(barrelRawSuperClusterCollectionToken_, pBarrelRawSuperClusters);
350  if (!pBarrelRawSuperClusters.isValid()) {
351  edm::LogError("EgammaSuperClusters") << "Error! can't get collection Raw SC";
352  skipBarrel = true;
353  }
354 
355  edm::Handle<reco::SuperClusterCollection> pBarrelCorSuperClusters;
356  evt.getByToken(barrelCorSuperClusterCollectionToken_, pBarrelCorSuperClusters);
357  if (!pBarrelCorSuperClusters.isValid()) {
358  edm::LogError("EgammaSuperClusters") << "Error! can't get collection Cor SC";
359  skipBarrel = true;
360  }
361 
362  edm::Handle< EBRecHitCollection > pBarrelRecHitCollection;
363  evt.getByToken( barrelRecHitCollectionToken_, pBarrelRecHitCollection );
364  if ( ! pBarrelRecHitCollection.isValid() ) {
365  skipBarrel = true;
366  }
367  edm::Handle< EERecHitCollection > pEndcapRecHitCollection;
368  evt.getByToken( endcapRecHitCollectionToken_, pEndcapRecHitCollection );
369  if ( ! pEndcapRecHitCollection.isValid() ) {
370  skipEndcap = true;
371  }
372 
373  if( skipBarrel || skipEndcap ) return;
374 
376 
377  // Get the BARREL collections
378  const reco::SuperClusterCollection* barrelRawSuperClusters = pBarrelRawSuperClusters.product();
379  const reco::SuperClusterCollection* barrelCorSuperClusters = pBarrelCorSuperClusters.product();
380 
381  // Number of entries in collections
382  hist_EB_RawSC_Size_->Fill(barrelRawSuperClusters->size());
383  hist_EB_CorSC_Size_->Fill(barrelCorSuperClusters->size());
384 
385  // Do RAW BARREL SuperClusters
386  for(reco::SuperClusterCollection::const_iterator aClus = barrelRawSuperClusters->begin();
387  aClus != barrelRawSuperClusters->end(); aClus++)
388  {
389  // kinematics
390  hist_EB_RawSC_NumBC_->Fill(aClus->clustersSize());
391  hist_EB_RawSC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
392  hist_EB_RawSC_Eta_->Fill(aClus->position().eta());
393  hist_EB_RawSC_Phi_->Fill(aClus->position().phi());
394 
395  // cluster shape
396  const reco::CaloClusterPtr seed = aClus->seed();
397  hist_EB_RawSC_S1toS9_->Fill( lazyTool.eMax( *seed ) / lazyTool.e3x3( *seed ) );
398  hist_EB_RawSC_S25toE_->Fill( lazyTool.e5x5( *seed ) / aClus->energy() );
399 
400  // truth
401  double dRClosest = 999.9;
402  double energyClosest = 0;
403  closestMCParticle(genEvent, *aClus, dRClosest, energyClosest);
404 
405  if (dRClosest < 0.1)
406  {
407  hist_EB_RawSC_EoverTruth_->Fill(aClus->energy()/energyClosest);
408  hist_EB_RawSC_deltaR_->Fill(dRClosest);
409 
410  }
411 
412  }
413 
414  // Do CORRECTED BARREL SuperClusters
415  for(reco::SuperClusterCollection::const_iterator aClus = barrelCorSuperClusters->begin();
416  aClus != barrelCorSuperClusters->end(); aClus++)
417  {
418  // kinematics
419  hist_EB_CorSC_NumBC_->Fill(aClus->clustersSize());
420  hist_EB_CorSC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
421  hist_EB_CorSC_Eta_->Fill(aClus->position().eta());
422  hist_EB_CorSC_Phi_->Fill(aClus->position().phi());
423 
424  hist_EB_CorSC_ET_vs_Eta_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->eta() );
425  hist_EB_CorSC_ET_vs_Phi_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->phi() );
426 
427 
428  // cluster shape
429  const reco::CaloClusterPtr seed = aClus->seed();
430  hist_EB_CorSC_S1toS9_->Fill( lazyTool.eMax( *seed ) / lazyTool.e3x3( *seed ) );
431  hist_EB_CorSC_S25toE_->Fill( lazyTool.e5x5( *seed ) / aClus->energy() );
432 
433  // correction variables
434  hist_EB_CorSC_phiWidth_->Fill(aClus->phiWidth());
435  hist_EB_CorSC_etaWidth_->Fill(aClus->etaWidth());
436 
437  // truth
438  double dRClosest = 999.9;
439  double energyClosest = 0;
440  closestMCParticle(genEvent, *aClus, dRClosest, energyClosest);
441 
442  if (dRClosest < 0.1)
443  {
444  hist_EB_CorSC_EoverTruth_->Fill(aClus->energy()/energyClosest);
445  hist_EB_CorSC_deltaR_->Fill(dRClosest);
446 
447  }
448 
449  }
450 
451  //
452  // Get the ENDCAP products
453  //
454  edm::Handle<reco::SuperClusterCollection> pEndcapRawSuperClusters;
455  evt.getByToken(endcapRawSuperClusterCollectionToken_, pEndcapRawSuperClusters);
456  if (!pEndcapRawSuperClusters.isValid()) {
457  edm::LogError("EgammaSuperClusters") << "Error! can't get collection Raw EE SC";
458  }
459 
460  edm::Handle<reco::SuperClusterCollection> pEndcapPreSuperClusters;
461  evt.getByToken(endcapPreSuperClusterCollectionToken_, pEndcapPreSuperClusters);
462  if (!pEndcapPreSuperClusters.isValid()) {
463  edm::LogError("EgammaSuperClusters") << "Error! can't get collection Pre EE SC";
464  }
465 
466  edm::Handle<reco::SuperClusterCollection> pEndcapCorSuperClusters;
467  evt.getByToken(endcapCorSuperClusterCollectionToken_, pEndcapCorSuperClusters);
468  if (!pEndcapCorSuperClusters.isValid()) {
469  edm::LogError("EgammaSuperClusters") << "Error! can't get collection Cor EE SC";
470  }
471 
472  // Get the ENDCAP collections
473  const reco::SuperClusterCollection* endcapRawSuperClusters = pEndcapRawSuperClusters.product();
474  const reco::SuperClusterCollection* endcapPreSuperClusters = pEndcapPreSuperClusters.product();
475  const reco::SuperClusterCollection* endcapCorSuperClusters = pEndcapCorSuperClusters.product();
476 
477  // Number of entries in collections
478  hist_EE_RawSC_Size_->Fill(endcapRawSuperClusters->size());
479  hist_EE_PreSC_Size_->Fill(endcapPreSuperClusters->size());
480  hist_EE_CorSC_Size_->Fill(endcapCorSuperClusters->size());
481 
482  // Do RAW ENDCAP SuperClusters
483  for(reco::SuperClusterCollection::const_iterator aClus = endcapRawSuperClusters->begin();
484  aClus != endcapRawSuperClusters->end(); aClus++)
485  {
486  hist_EE_RawSC_NumBC_->Fill(aClus->clustersSize());
487  hist_EE_RawSC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
488  hist_EE_RawSC_Eta_->Fill(aClus->position().eta());
489  hist_EE_RawSC_Phi_->Fill(aClus->position().phi());
490 
491  const reco::CaloClusterPtr seed = aClus->seed();
492  hist_EE_RawSC_S1toS9_->Fill( lazyTool.eMax( *seed ) / lazyTool.e3x3( *seed ) );
493  hist_EE_RawSC_S25toE_->Fill( lazyTool.e5x5( *seed ) / aClus->energy() );
494 
495  // truth
496  double dRClosest = 999.9;
497  double energyClosest = 0;
498  closestMCParticle(genEvent, *aClus, dRClosest, energyClosest);
499 
500  if (dRClosest < 0.1)
501  {
502  hist_EE_RawSC_EoverTruth_->Fill(aClus->energy()/energyClosest);
503  hist_EE_RawSC_deltaR_->Fill(dRClosest);
504  }
505 
506  }
507 
508  // Do ENDCAP SuperClusters with PRESHOWER
509  for(reco::SuperClusterCollection::const_iterator aClus = endcapPreSuperClusters->begin();
510  aClus != endcapPreSuperClusters->end(); aClus++)
511  {
512  hist_EE_PreSC_NumBC_->Fill(aClus->clustersSize());
513  hist_EE_PreSC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
514  hist_EE_PreSC_Eta_->Fill(aClus->position().eta());
515  hist_EE_PreSC_Phi_->Fill(aClus->position().phi());
516  hist_EE_PreSC_preshowerE_->Fill(aClus->preshowerEnergy());
517 
518  const reco::CaloClusterPtr seed = aClus->seed();
519  hist_EE_PreSC_S1toS9_->Fill( lazyTool.eMax( *seed ) / lazyTool.e3x3( *seed ) );
520  hist_EE_PreSC_S25toE_->Fill( lazyTool.e5x5( *seed ) / aClus->energy() );
521 
522  // truth
523  double dRClosest = 999.9;
524  double energyClosest = 0;
525  closestMCParticle(genEvent, *aClus, dRClosest, energyClosest);
526 
527  if (dRClosest < 0.1)
528  {
529  hist_EE_PreSC_EoverTruth_->Fill(aClus->energy()/energyClosest);
530  hist_EE_PreSC_deltaR_->Fill(dRClosest);
531  }
532 
533  }
534 
535  // Do CORRECTED ENDCAP SuperClusters
536  for(reco::SuperClusterCollection::const_iterator aClus = endcapCorSuperClusters->begin();
537  aClus != endcapCorSuperClusters->end(); aClus++)
538  {
539  hist_EE_CorSC_NumBC_->Fill(aClus->clustersSize());
540  hist_EE_CorSC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
541  hist_EE_CorSC_Eta_->Fill(aClus->position().eta());
542  hist_EE_CorSC_Phi_->Fill(aClus->position().phi());
543  hist_EE_CorSC_preshowerE_->Fill(aClus->preshowerEnergy());
544 
545  hist_EE_CorSC_ET_vs_Eta_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->eta() );
546  hist_EE_CorSC_ET_vs_Phi_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->phi() );
547  hist_EE_CorSC_ET_vs_R_->Fill( aClus->energy()/std::cosh(aClus->position().eta()),
548  std::sqrt( std::pow(aClus->x(),2) + std::pow(aClus->y(),2) ) );
549 
550 
551  // correction variables
552  hist_EE_CorSC_phiWidth_->Fill(aClus->phiWidth());
553  hist_EE_CorSC_etaWidth_->Fill(aClus->etaWidth());
554 
555  const reco::CaloClusterPtr seed = aClus->seed();
556  hist_EE_CorSC_S1toS9_->Fill( lazyTool.eMax( *seed ) / lazyTool.e3x3( *seed ) );
557  hist_EE_CorSC_S25toE_->Fill( lazyTool.e5x5( *seed ) / aClus->energy() );
558 
559  // truth
560  double dRClosest = 999.9;
561  double energyClosest = 0;
562  closestMCParticle(genEvent, *aClus, dRClosest, energyClosest);
563 
564  if (dRClosest < 0.1)
565  {
566  hist_EE_CorSC_EoverTruth_->Fill(aClus->energy()/energyClosest);
567  hist_EE_CorSC_deltaR_->Fill(dRClosest);
568  }
569 
570  }
571 
572 }
MonitorElement * hist_EE_CorSC_ET_vs_Phi_
MonitorElement * hist_EE_CorSC_ET_vs_R_
MonitorElement * hist_EE_PreSC_ET_
edm::EDGetTokenT< reco::SuperClusterCollection > endcapRawSuperClusterCollectionToken_
MonitorElement * hist_EB_CorSC_ET_
MonitorElement * hist_EB_CorSC_NumBC_
MonitorElement * hist_EE_CorSC_etaWidth_
MonitorElement * hist_EE_PreSC_EoverTruth_
MonitorElement * hist_EE_CorSC_Eta_
MonitorElement * hist_EB_RawSC_Size_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
MonitorElement * hist_EE_RawSC_NumBC_
MonitorElement * hist_EB_RawSC_S1toS9_
MonitorElement * hist_EB_RawSC_ET_
MonitorElement * hist_EE_CorSC_EoverTruth_
MonitorElement * hist_EE_CorSC_deltaR_
MonitorElement * hist_EB_RawSC_Phi_
MonitorElement * hist_EE_RawSC_ET_
genEvent
Definition: MCTruth.py:33
void Fill(long long x)
MonitorElement * hist_EB_CorSC_phiWidth_
MonitorElement * hist_EE_PreSC_S1toS9_
edm::EDGetTokenT< reco::SuperClusterCollection > endcapPreSuperClusterCollectionToken_
MonitorElement * hist_EB_RawSC_Eta_
MonitorElement * hist_EB_CorSC_deltaR_
MonitorElement * hist_EE_RawSC_S1toS9_
MonitorElement * hist_EB_CorSC_S25toE_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
MonitorElement * hist_EE_CorSC_S1toS9_
edm::EDGetTokenT< EcalRecHitCollection > endcapRecHitCollectionToken_
MonitorElement * hist_EE_RawSC_deltaR_
edm::EDGetTokenT< edm::HepMCProduct > MCTruthCollectionToken_
T sqrt(T t)
Definition: SSEVec.h:18
MonitorElement * hist_EE_PreSC_Phi_
MonitorElement * hist_EB_CorSC_ET_vs_Eta_
edm::EDGetTokenT< reco::SuperClusterCollection > barrelRawSuperClusterCollectionToken_
MonitorElement * hist_EB_CorSC_EoverTruth_
MonitorElement * hist_EB_CorSC_etaWidth_
MonitorElement * hist_EE_CorSC_ET_
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< reco::SuperClusterCollection > endcapCorSuperClusterCollectionToken_
MonitorElement * hist_EE_PreSC_deltaR_
MonitorElement * hist_EE_CorSC_Size_
MonitorElement * hist_EE_PreSC_preshowerE_
MonitorElement * hist_EB_CorSC_Phi_
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:38
T const * product() const
Definition: Handle.h:81
MonitorElement * hist_EB_CorSC_S1toS9_
MonitorElement * hist_EB_CorSC_Size_
MonitorElement * hist_EE_CorSC_Phi_
edm::EDGetTokenT< reco::SuperClusterCollection > barrelCorSuperClusterCollectionToken_
MonitorElement * hist_EB_RawSC_EoverTruth_
MonitorElement * hist_EE_RawSC_EoverTruth_
MonitorElement * hist_EB_RawSC_S25toE_
MonitorElement * hist_EE_PreSC_Eta_
MonitorElement * hist_EB_CorSC_Eta_
MonitorElement * hist_EB_RawSC_NumBC_
MonitorElement * hist_EE_CorSC_preshowerE_
MonitorElement * hist_EE_RawSC_Size_
MonitorElement * hist_EE_CorSC_NumBC_
MonitorElement * hist_EE_CorSC_S25toE_
MonitorElement * hist_EE_RawSC_S25toE_
edm::EDGetTokenT< EcalRecHitCollection > barrelRecHitCollectionToken_
MonitorElement * hist_EE_CorSC_ET_vs_Eta_
void closestMCParticle(HepMC::GenEvent const *, reco::SuperCluster const &, double &, double &) const
MonitorElement * hist_EE_PreSC_NumBC_
MonitorElement * hist_EE_PreSC_S25toE_
MonitorElement * hist_EE_RawSC_Eta_
MonitorElement * hist_EE_PreSC_Size_
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
MonitorElement * hist_EB_RawSC_deltaR_
MonitorElement * hist_EE_RawSC_Phi_
MonitorElement * hist_EB_CorSC_ET_vs_Phi_
MonitorElement * hist_EE_CorSC_phiWidth_
void EgammaSuperClusters::bookHistograms ( DQMStore::IBooker _ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 104 of file EgammaSuperClusters.cc.

References HistSpec::bins, DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), hist_EB_CorSC_deltaR_, hist_EB_CorSC_EoverTruth_, hist_EB_CorSC_ET_, hist_EB_CorSC_ET_vs_Eta_, hist_EB_CorSC_ET_vs_Phi_, hist_EB_CorSC_Eta_, hist_EB_CorSC_etaWidth_, hist_EB_CorSC_NumBC_, hist_EB_CorSC_Phi_, hist_EB_CorSC_phiWidth_, hist_EB_CorSC_S1toS9_, hist_EB_CorSC_S25toE_, hist_EB_CorSC_Size_, hist_EB_RawSC_deltaR_, hist_EB_RawSC_EoverTruth_, hist_EB_RawSC_ET_, hist_EB_RawSC_Eta_, hist_EB_RawSC_NumBC_, hist_EB_RawSC_Phi_, hist_EB_RawSC_S1toS9_, hist_EB_RawSC_S25toE_, hist_EB_RawSC_Size_, hist_EE_CorSC_deltaR_, hist_EE_CorSC_EoverTruth_, hist_EE_CorSC_ET_, hist_EE_CorSC_ET_vs_Eta_, hist_EE_CorSC_ET_vs_Phi_, hist_EE_CorSC_ET_vs_R_, hist_EE_CorSC_Eta_, hist_EE_CorSC_etaWidth_, hist_EE_CorSC_NumBC_, hist_EE_CorSC_Phi_, hist_EE_CorSC_phiWidth_, hist_EE_CorSC_preshowerE_, hist_EE_CorSC_S1toS9_, hist_EE_CorSC_S25toE_, hist_EE_CorSC_Size_, hist_EE_PreSC_deltaR_, hist_EE_PreSC_EoverTruth_, hist_EE_PreSC_ET_, hist_EE_PreSC_Eta_, hist_EE_PreSC_NumBC_, hist_EE_PreSC_Phi_, hist_EE_PreSC_preshowerE_, hist_EE_PreSC_S1toS9_, hist_EE_PreSC_S25toE_, hist_EE_PreSC_Size_, hist_EE_RawSC_deltaR_, hist_EE_RawSC_EoverTruth_, hist_EE_RawSC_ET_, hist_EE_RawSC_Eta_, hist_EE_RawSC_NumBC_, hist_EE_RawSC_Phi_, hist_EE_RawSC_S1toS9_, hist_EE_RawSC_S25toE_, hist_EE_RawSC_Size_, hsdeltaR_, hsEoverTruth_, hsET_, hsEta_, hsetaWidth_, hsNumBC_, hsPhi_, hsphiWidth_, hspreshowerE_, hsR_, hsS1toS9_, hsS25toE_, hsSize_, HistSpec::max, HistSpec::min, and DQMStore::IBooker::setCurrentFolder().

105 {
106  _ibooker.setCurrentFolder("EcalClusterV/EcalSuperClusters/");
107 
108  // Number of SuperClusters
109  //
111  = _ibooker.book1D("hist_EB_RawSC_Size_","# Raw SuperClusters in Barrel",
114  = _ibooker.book1D("hist_EE_RawSC_Size_","# Raw SuperClusters in Endcap",
117  = _ibooker.book1D("hist_EB_CorSC_Size_","# Corrected SuperClusters in Barrel",
120  = _ibooker.book1D("hist_EE_CorSC_Size_","# Corrected SuperClusters in Endcap",
123  = _ibooker.book1D("hist_EE_PreSC_Size_","# SuperClusters with Preshower in Endcap",
125 
126  // Number of BasicClusters in SuperCluster
127  //
129  = _ibooker.book1D("hist_EB_RawSC_NumBC_","# of Basic Clusters in Raw Super Clusters in Barrel",
132  = _ibooker.book1D("hist_EE_RawSC_NumBC_","# of Basic Clusters in Raw Super Clusters in Endcap",
135  = _ibooker.book1D("hist_EB_CorSC_NumBC_","# of Basic Clusters in Corrected SuperClusters in Barrel",
138  = _ibooker.book1D("hist_EE_CorSC_NumBC_","# of Basic Clusters in Corrected SuperClusters in Endcap",
141  = _ibooker.book1D("hist_EE_PreSC_NumBC_","# of Basic Clusters in SuperClusters with Preshower in Endcap",
143 
144  // ET distribution of SuperClusters
145  //
147  = _ibooker.book1D("hist_EB_RawSC_ET_","ET of Raw SuperClusters in Barrel",
150  = _ibooker.book1D("hist_EE_RawSC_ET_","ET of Raw SuperClusters in Endcap",
153  = _ibooker.book1D("hist_EB_CorSC_ET_","ET of Corrected SuperClusters in Barrel",
156  = _ibooker.book1D("hist_EE_CorSC_ET_","ET of Corrected SuperClusters in Endcap",
159  = _ibooker.book1D("hist_EE_PreSC_ET_","ET of SuperClusters with Preshower in Endcap",
161 
162  // Eta distribution of SuperClusters
163  //
165  = _ibooker.book1D("hist_EB_RawSC_Eta_","Eta of Raw SuperClusters in Barrel",
168  = _ibooker.book1D("hist_EE_RawSC_Eta_","Eta of Raw SuperClusters in Endcap",
171  = _ibooker.book1D("hist_EB_CorSC_Eta_","Eta of Corrected SuperClusters in Barrel",
174  = _ibooker.book1D("hist_EE_CorSC_Eta_","Eta of Corrected SuperClusters in Endcap",
177  = _ibooker.book1D("hist_EE_PreSC_Eta_","Eta of SuperClusters with Preshower in Endcap",
179 
180  // Phi distribution of SuperClusters
181  //
183  = _ibooker.book1D("hist_EB_RawSC_Phi_","Phi of Raw SuperClusters in Barrel",
186  = _ibooker.book1D("hist_EE_RawSC_Phi_","Phi of Raw SuperClusters in Endcap",
189  = _ibooker.book1D("hist_EB_CorSC_Phi_","Phi of Corrected SuperClusters in Barrel",
192  = _ibooker.book1D("hist_EE_CorSC_Phi_","Phi of Corrected SuperClusters in Endcap",
195  = _ibooker.book1D("hist_EE_PreSC_Phi_","Phi of SuperClusters with Preshower in Endcap",
197 
198  // S1/S9 distribution of SuperClusters
199  //
201  = _ibooker.book1D("hist_EB_RawSC_S1toS9_","S1/S9 of Raw Super Clusters in Barrel",
204  = _ibooker.book1D("hist_EE_RawSC_S1toS9_","S1/S9 of Raw Super Clusters in Endcap",
207  = _ibooker.book1D("hist_EB_CorSC_S1toS9_","S1/S9 of Corrected SuperClusters in Barrel",
210  = _ibooker.book1D("hist_EE_CorSC_S1toS9_","S1/S9 of Corrected SuperClusters in Endcap",
213  = _ibooker.book1D("hist_EE_PreSC_S1toS9_","S1/S9 of SuperClusters with Preshower in Endcap",
215 
216  // S25/E distribution of SuperClusters
217  //
219  = _ibooker.book1D("hist_EB_RawSC_S25toE_","S25/E of Raw Super Clusters in Barrel",
222  = _ibooker.book1D("hist_EE_RawSC_S25toE_","S25/E of Raw Super Clusters in Endcap",
225  = _ibooker.book1D("hist_EB_CorSC_S25toE_","S25/E of Corrected SuperClusters in Barrel",
228  = _ibooker.book1D("hist_EE_CorSC_S25toE_","S25/E of Corrected SuperClusters in Endcap",
231  = _ibooker.book1D("hist_EE_PreSC_S25toE_","S25/E of SuperClusters with Preshower in Endcap",
233 
234  // E/E(true) distribution of SuperClusters
235  //
237  = _ibooker.book1D("hist_EB_RawSC_EoverTruth_","E/True E of Raw SuperClusters in Barrel",
240  = _ibooker.book1D("hist_EE_RawSC_EoverTruth_","E/True E of Raw SuperClusters in Endcap",
243  = _ibooker.book1D("hist_EB_CorSC_EoverTruth_","E/True E of Corrected SuperClusters in Barrel",
246  = _ibooker.book1D("hist_EE_CorSC_EoverTruth_","E/True E of Corrected SuperClusters in Endcap",
249  = _ibooker.book1D("hist_EE_PreSC_EoverTruth_","E/True E of SuperClusters with Preshower in Endcap",
251 
252  // dR distribution of SuperClusters from truth
253  //
255  = _ibooker.book1D("hist_EB_RawSC_deltaR_","dR to MC truth of Raw Super Clusters in Barrel",
258  = _ibooker.book1D("hist_EE_RawSC_deltaR_","dR to MC truth of Raw Super Clusters in Endcap",
261  = _ibooker.book1D("hist_EB_CorSC_deltaR_","dR to MC truth of Corrected SuperClusters in Barrel",
264  = _ibooker.book1D("hist_EE_CorSC_deltaR_","dR to MC truth of Corrected SuperClusters in Endcap",
267  = _ibooker.book1D("hist_EE_PreSC_deltaR_","dR to MC truth of SuperClusters with Preshower in Endcap",
269 
270  // phi width stored in corrected SuperClusters
272  = _ibooker.book1D("hist_EB_CorSC_phiWidth_","phiWidth of Corrected Super Clusters in Barrel",
275  = _ibooker.book1D("hist_EE_CorSC_phiWidth_","phiWidth of Corrected Super Clusters in Endcap",
277 
278  // eta width stored in corrected SuperClusters
280  = _ibooker.book1D("hist_EB_CorSC_etaWidth_","etaWidth of Corrected Super Clusters in Barrel",
283  = _ibooker.book1D("hist_EE_CorSC_etaWidth_","etaWidth of Corrected Super Clusters in Endcap",
285 
286 
287  // preshower energy
289  = _ibooker.book1D("hist_EE_PreSC_preshowerE_","preshower energy in Super Clusters with Preshower in Endcap",
292  = _ibooker.book1D("hist_EE_CorSC_preshowerE_","preshower energy in Corrected Super Clusters with Preshower in Endcap",
294 
295 
296  //
298  = _ibooker.book2D( "hist_EB_CorSC_ET_vs_Eta_", "Corr Super Cluster ET versus Eta in Barrel",
301 
303  = _ibooker.book2D( "hist_EB_CorSC_ET_vs_Phi_", "Corr Super Cluster ET versus Phi in Barrel",
306 
308  = _ibooker.book2D( "hist_EE_CorSC_ET_vs_Eta_", "Corr Super Cluster ET versus Eta in Endcap",
311 
313  = _ibooker.book2D( "hist_EE_CorSC_ET_vs_Phi_", "Corr Super Cluster ET versus Phi in Endcap",
316 
318  = _ibooker.book2D( "hist_EE_CorSC_ET_vs_R_", "Corr Super Cluster ET versus Radius in Endcap",
320  hsR_.bins, hsR_.min, hsR_.max);
321 
322 }
MonitorElement * hist_EE_CorSC_ET_vs_Phi_
MonitorElement * hist_EE_CorSC_ET_vs_R_
MonitorElement * hist_EE_PreSC_ET_
MonitorElement * hist_EB_CorSC_ET_
MonitorElement * hist_EB_CorSC_NumBC_
MonitorElement * hist_EE_CorSC_etaWidth_
MonitorElement * hist_EE_PreSC_EoverTruth_
MonitorElement * hist_EE_CorSC_Eta_
MonitorElement * hist_EB_RawSC_Size_
MonitorElement * hist_EE_RawSC_NumBC_
int bins
Definition: HistSpec.h:9
MonitorElement * hist_EB_RawSC_S1toS9_
MonitorElement * hist_EB_RawSC_ET_
double max
Definition: HistSpec.h:8
MonitorElement * hist_EE_CorSC_EoverTruth_
MonitorElement * hist_EE_CorSC_deltaR_
MonitorElement * hist_EB_RawSC_Phi_
MonitorElement * hist_EE_RawSC_ET_
MonitorElement * hist_EB_CorSC_phiWidth_
MonitorElement * hist_EE_PreSC_S1toS9_
double min
Definition: HistSpec.h:7
MonitorElement * hist_EB_RawSC_Eta_
MonitorElement * hist_EB_CorSC_deltaR_
MonitorElement * hist_EE_RawSC_S1toS9_
MonitorElement * hist_EB_CorSC_S25toE_
MonitorElement * hist_EE_CorSC_S1toS9_
MonitorElement * hist_EE_RawSC_deltaR_
MonitorElement * hist_EE_PreSC_Phi_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * hist_EB_CorSC_ET_vs_Eta_
MonitorElement * hist_EB_CorSC_EoverTruth_
MonitorElement * hist_EB_CorSC_etaWidth_
MonitorElement * hist_EE_CorSC_ET_
MonitorElement * hist_EE_PreSC_deltaR_
MonitorElement * hist_EE_CorSC_Size_
MonitorElement * hist_EE_PreSC_preshowerE_
MonitorElement * hist_EB_CorSC_Phi_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * hist_EB_CorSC_S1toS9_
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * hist_EB_CorSC_Size_
MonitorElement * hist_EE_CorSC_Phi_
MonitorElement * hist_EB_RawSC_EoverTruth_
MonitorElement * hist_EE_RawSC_EoverTruth_
MonitorElement * hist_EB_RawSC_S25toE_
MonitorElement * hist_EE_PreSC_Eta_
MonitorElement * hist_EB_CorSC_Eta_
MonitorElement * hist_EB_RawSC_NumBC_
MonitorElement * hist_EE_CorSC_preshowerE_
MonitorElement * hist_EE_RawSC_Size_
MonitorElement * hist_EE_CorSC_NumBC_
MonitorElement * hist_EE_CorSC_S25toE_
MonitorElement * hist_EE_RawSC_S25toE_
MonitorElement * hist_EE_CorSC_ET_vs_Eta_
MonitorElement * hist_EE_PreSC_NumBC_
MonitorElement * hist_EE_PreSC_S25toE_
MonitorElement * hist_EE_RawSC_Eta_
MonitorElement * hist_EE_PreSC_Size_
MonitorElement * hist_EB_RawSC_deltaR_
MonitorElement * hist_EE_RawSC_Phi_
MonitorElement * hist_EB_CorSC_ET_vs_Phi_
MonitorElement * hist_EE_CorSC_phiWidth_
void EgammaSuperClusters::closestMCParticle ( HepMC::GenEvent const *  ,
reco::SuperCluster const &  ,
double &  ,
double &   
) const
private

Definition at line 578 of file EgammaSuperClusters.cc.

References reco::deltaPhi(), deltaR(), ecalEta(), reco::CaloCluster::eta(), reco::CaloCluster::phi(), mathSSE::sqrt(), and badGlobalMuonTaggersAOD_cff::vtx.

Referenced by analyze().

580 {
581 
582  // SuperCluster eta, phi
583  double scEta = sc.eta();
584  double scPhi = sc.phi();
585 
586  // initialize dRClosest to a large number
587  dRClosest = 999.9;
588 
589  // loop over the MC truth particles to find the
590  // closest to the superCluster in dR space
591  for(HepMC::GenEvent::particle_const_iterator currentParticle = genEvent->particles_begin();
592  currentParticle != genEvent->particles_end(); currentParticle++ )
593  {
594  if((*currentParticle)->status() == 1)
595  {
596  // need GenParticle in ECAL co-ordinates
597  HepMC::FourVector vtx = (*currentParticle)->production_vertex()->position();
598  double phiTrue = (*currentParticle)->momentum().phi();
599  double etaTrue = ecalEta((*currentParticle)->momentum().eta(), vtx.z()/10., vtx.perp()/10.);
600 
601  double dPhi = reco::deltaPhi(phiTrue, scPhi);
602  double dEta = scEta - etaTrue;
603  double deltaR = std::sqrt(dPhi*dPhi + dEta*dEta);
604 
605  if(deltaR < dRClosest)
606  {
607  dRClosest = deltaR;
608  energyClosest = (*currentParticle)->momentum().e();
609  }
610 
611  } // end if stable particle
612 
613  } // end loop on get particles
614 
615 }
float phi() const
Momentum azimuthal angle. Note this is taken from the first SimTrack only.
Definition: SimCluster.h:161
genEvent
Definition: MCTruth.py:33
float ecalEta(float, float, float) const
T sqrt(T t)
Definition: SSEVec.h:18
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:22
float eta() const
Momentum pseudorapidity. Note this is taken from the simtrack before the calorimeter.
Definition: SimCluster.h:171
float EgammaSuperClusters::ecalEta ( float  EtaParticle,
float  Zvertex,
float  plane_Radius 
) const
private

Definition at line 622 of file EgammaSuperClusters.cc.

References ETA, etaBarrelEndcap, cmsBatch::log, Geom::pi(), R_ECAL, funct::tan(), and Z_Endcap.

Referenced by closestMCParticle().

623 {
624  const float R_ECAL = 136.5;
625  const float Z_Endcap = 328.0;
626  const float etaBarrelEndcap = 1.479;
627 
628  if(EtaParticle != 0.)
629  {
630  float Theta = 0.0 ;
631  float ZEcal = (R_ECAL-plane_Radius)*sinh(EtaParticle)+Zvertex;
632 
633  if(ZEcal != 0.0) Theta = atan(R_ECAL/ZEcal);
634  if(Theta<0.0) Theta = Theta+Geom::pi() ;
635 
636  float ETA = - log(tan(0.5*Theta));
637 
638  if( fabs(ETA) > etaBarrelEndcap )
639  {
640  float Zend = Z_Endcap ;
641  if(EtaParticle<0.0 ) Zend = -Zend ;
642  float Zlen = Zend - Zvertex ;
643  float RR = Zlen/sinh(EtaParticle);
644  Theta = atan((RR+plane_Radius)/Zend);
645  if(Theta<0.0) Theta = Theta+Geom::pi() ;
646  ETA = - log(tan(0.5*Theta));
647  }
648 
649  return ETA;
650  }
651  else
652  {
653  edm::LogWarning("") << "[EgammaSuperClusters::ecalEta] Warning: Eta equals to zero, not correcting" ;
654  return EtaParticle;
655  }
656 }
#define ETA
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
static const float etaBarrelEndcap
static const float Z_Endcap
static const float R_ECAL
constexpr double pi()
Definition: Pi.h:31

Member Data Documentation

edm::EDGetTokenT<reco::SuperClusterCollection> EgammaSuperClusters::barrelCorSuperClusterCollectionToken_
private

Definition at line 41 of file EgammaSuperClusters.h.

Referenced by analyze().

edm::EDGetTokenT<reco::SuperClusterCollection> EgammaSuperClusters::barrelRawSuperClusterCollectionToken_
private

Definition at line 40 of file EgammaSuperClusters.h.

Referenced by analyze().

edm::EDGetTokenT<EcalRecHitCollection> EgammaSuperClusters::barrelRecHitCollectionToken_
private

Definition at line 49 of file EgammaSuperClusters.h.

Referenced by analyze().

edm::EDGetTokenT<reco::SuperClusterCollection> EgammaSuperClusters::endcapCorSuperClusterCollectionToken_
private

Definition at line 46 of file EgammaSuperClusters.h.

Referenced by analyze().

edm::EDGetTokenT<reco::SuperClusterCollection> EgammaSuperClusters::endcapPreSuperClusterCollectionToken_
private

Definition at line 45 of file EgammaSuperClusters.h.

Referenced by analyze().

edm::EDGetTokenT<reco::SuperClusterCollection> EgammaSuperClusters::endcapRawSuperClusterCollectionToken_
private

Definition at line 44 of file EgammaSuperClusters.h.

Referenced by analyze().

edm::EDGetTokenT<EcalRecHitCollection> EgammaSuperClusters::endcapRecHitCollectionToken_
private

Definition at line 50 of file EgammaSuperClusters.h.

Referenced by analyze().

MonitorElement* EgammaSuperClusters::hist_EB_CorSC_deltaR_
private

Definition at line 108 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_CorSC_EoverTruth_
private

Definition at line 103 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_CorSC_ET_
private

Definition at line 78 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_CorSC_ET_vs_Eta_
private

Definition at line 117 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_CorSC_ET_vs_Phi_
private

Definition at line 118 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_CorSC_Eta_
private

Definition at line 83 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_CorSC_etaWidth_
private

Definition at line 116 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_CorSC_NumBC_
private

Definition at line 73 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_CorSC_Phi_
private

Definition at line 88 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_CorSC_phiWidth_
private

Definition at line 114 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_CorSC_S1toS9_
private

Definition at line 93 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_CorSC_S25toE_
private

Definition at line 98 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_CorSC_Size_
private

Definition at line 68 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_RawSC_deltaR_
private

Definition at line 106 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_RawSC_EoverTruth_
private

Definition at line 101 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_RawSC_ET_
private

Definition at line 76 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_RawSC_Eta_
private

Definition at line 81 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_RawSC_NumBC_
private

Definition at line 71 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_RawSC_Phi_
private

Definition at line 86 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_RawSC_S1toS9_
private

Definition at line 91 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_RawSC_S25toE_
private

Definition at line 96 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EB_RawSC_Size_
private

Definition at line 66 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_CorSC_deltaR_
private

Definition at line 109 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_CorSC_EoverTruth_
private

Definition at line 104 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_CorSC_ET_
private

Definition at line 79 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_CorSC_ET_vs_Eta_
private

Definition at line 119 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_CorSC_ET_vs_Phi_
private

Definition at line 120 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_CorSC_ET_vs_R_
private

Definition at line 121 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_CorSC_Eta_
private

Definition at line 84 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_CorSC_etaWidth_
private

Definition at line 115 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_CorSC_NumBC_
private

Definition at line 74 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_CorSC_Phi_
private

Definition at line 89 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_CorSC_phiWidth_
private

Definition at line 113 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_CorSC_preshowerE_
private

Definition at line 112 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_CorSC_S1toS9_
private

Definition at line 94 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_CorSC_S25toE_
private

Definition at line 99 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_CorSC_Size_
private

Definition at line 69 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_PreSC_deltaR_
private

Definition at line 110 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_PreSC_EoverTruth_
private

Definition at line 105 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_PreSC_ET_
private

Definition at line 80 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_PreSC_Eta_
private

Definition at line 85 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_PreSC_NumBC_
private

Definition at line 75 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_PreSC_Phi_
private

Definition at line 90 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_PreSC_preshowerE_
private

Definition at line 111 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_PreSC_S1toS9_
private

Definition at line 95 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_PreSC_S25toE_
private

Definition at line 100 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_PreSC_Size_
private

Definition at line 70 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_RawSC_deltaR_
private

Definition at line 107 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_RawSC_EoverTruth_
private

Definition at line 102 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_RawSC_ET_
private

Definition at line 77 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_RawSC_Eta_
private

Definition at line 82 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_RawSC_NumBC_
private

Definition at line 72 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_RawSC_Phi_
private

Definition at line 87 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_RawSC_S1toS9_
private

Definition at line 92 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_RawSC_S25toE_
private

Definition at line 97 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaSuperClusters::hist_EE_RawSC_Size_
private

Definition at line 67 of file EgammaSuperClusters.h.

Referenced by analyze(), and bookHistograms().

HistSpec EgammaSuperClusters::hsdeltaR_
private

Definition at line 60 of file EgammaSuperClusters.h.

Referenced by bookHistograms().

HistSpec EgammaSuperClusters::hsEoverTruth_
private

Definition at line 59 of file EgammaSuperClusters.h.

Referenced by bookHistograms().

HistSpec EgammaSuperClusters::hsET_
private

Definition at line 54 of file EgammaSuperClusters.h.

Referenced by bookHistograms().

HistSpec EgammaSuperClusters::hsEta_
private

Definition at line 55 of file EgammaSuperClusters.h.

Referenced by bookHistograms().

HistSpec EgammaSuperClusters::hsetaWidth_
private

Definition at line 62 of file EgammaSuperClusters.h.

Referenced by bookHistograms().

HistSpec EgammaSuperClusters::hsNumBC_
private

Definition at line 53 of file EgammaSuperClusters.h.

Referenced by bookHistograms().

HistSpec EgammaSuperClusters::hsPhi_
private

Definition at line 56 of file EgammaSuperClusters.h.

Referenced by bookHistograms().

HistSpec EgammaSuperClusters::hsphiWidth_
private

Definition at line 61 of file EgammaSuperClusters.h.

Referenced by bookHistograms().

HistSpec EgammaSuperClusters::hspreshowerE_
private

Definition at line 63 of file EgammaSuperClusters.h.

Referenced by bookHistograms().

HistSpec EgammaSuperClusters::hsR_
private

Definition at line 64 of file EgammaSuperClusters.h.

Referenced by bookHistograms().

HistSpec EgammaSuperClusters::hsS1toS9_
private

Definition at line 57 of file EgammaSuperClusters.h.

Referenced by bookHistograms().

HistSpec EgammaSuperClusters::hsS25toE_
private

Definition at line 58 of file EgammaSuperClusters.h.

Referenced by bookHistograms().

HistSpec EgammaSuperClusters::hsSize_
private

Definition at line 52 of file EgammaSuperClusters.h.

Referenced by bookHistograms().

edm::EDGetTokenT<edm::HepMCProduct> EgammaSuperClusters::MCTruthCollectionToken_
private

Definition at line 37 of file EgammaSuperClusters.h.

Referenced by analyze().