CMS 3D CMS Logo

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

#include <EgammaBasicClusters.h>

Inheritance diagram for EgammaBasicClusters:
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
 
 EgammaBasicClusters (const edm::ParameterSet &)
 
 ~EgammaBasicClusters ()
 
- 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
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

edm::EDGetTokenT
< reco::BasicClusterCollection
barrelBasicClusterCollection_
 
edm::EDGetTokenT
< reco::BasicClusterCollection
endcapBasicClusterCollection_
 
MonitorElementhist_EB_BC_ET_
 
MonitorElementhist_EB_BC_ET_vs_Eta_
 
MonitorElementhist_EB_BC_ET_vs_Phi_
 
MonitorElementhist_EB_BC_Eta_
 
MonitorElementhist_EB_BC_NumRecHits_
 
MonitorElementhist_EB_BC_Phi_
 
MonitorElementhist_EB_BC_Size_
 
MonitorElementhist_EE_BC_ET_
 
MonitorElementhist_EE_BC_ET_vs_Eta_
 
MonitorElementhist_EE_BC_ET_vs_Phi_
 
MonitorElementhist_EE_BC_ET_vs_R_
 
MonitorElementhist_EE_BC_Eta_
 
MonitorElementhist_EE_BC_NumRecHits_
 
MonitorElementhist_EE_BC_Phi_
 
MonitorElementhist_EE_BC_Size_
 
HistSpec hsET_
 
HistSpec hsEta_
 
HistSpec hsNumRecHits_
 
HistSpec hsPhi_
 
HistSpec hsR_
 
HistSpec hsSize_
 

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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
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::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (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 Basic Cluster Validation

Implementation: \

Author
: Michael A. Balazs, Nov 2006

Definition at line 24 of file EgammaBasicClusters.h.

Constructor & Destructor Documentation

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

Definition at line 13 of file EgammaBasicClusters.cc.

13  :
14  barrelBasicClusterCollection_(consumes<reco::BasicClusterCollection>(ps.getParameter<edm::InputTag>("barrelBasicClusterCollection"))),
15  endcapBasicClusterCollection_(consumes<reco::BasicClusterCollection>(ps.getParameter<edm::InputTag>("endcapBasicClusterCollection"))),
16  hsSize_(ps, "Size"),
17  hsNumRecHits_(ps, "NumRecHits"),
18  hsET_(ps, "ET"),
19  hsEta_(ps, "Eta"),
20  hsPhi_(ps, "Phi"),
21  hsR_(ps, "R"),
26  hist_EB_BC_ET_(0),
27  hist_EE_BC_ET_(0),
28  hist_EB_BC_Eta_(0),
29  hist_EE_BC_Eta_(0),
30  hist_EB_BC_Phi_(0),
31  hist_EE_BC_Phi_(0),
37 {
38 }
T getParameter(std::string const &) const
MonitorElement * hist_EE_BC_NumRecHits_
MonitorElement * hist_EB_BC_Eta_
MonitorElement * hist_EE_BC_ET_vs_R_
MonitorElement * hist_EE_BC_Phi_
MonitorElement * hist_EB_BC_NumRecHits_
MonitorElement * hist_EE_BC_ET_vs_Phi_
MonitorElement * hist_EB_BC_ET_
MonitorElement * hist_EB_BC_ET_vs_Eta_
MonitorElement * hist_EE_BC_ET_vs_Eta_
MonitorElement * hist_EB_BC_ET_vs_Phi_
MonitorElement * hist_EE_BC_Eta_
MonitorElement * hist_EB_BC_Phi_
edm::EDGetTokenT< reco::BasicClusterCollection > barrelBasicClusterCollection_
MonitorElement * hist_EE_BC_ET_
MonitorElement * hist_EB_BC_Size_
MonitorElement * hist_EE_BC_Size_
edm::EDGetTokenT< reco::BasicClusterCollection > endcapBasicClusterCollection_
EgammaBasicClusters::~EgammaBasicClusters ( )

Definition at line 40 of file EgammaBasicClusters.cc.

41 {
42 }

Member Function Documentation

void EgammaBasicClusters::analyze ( const edm::Event evt,
const edm::EventSetup  
)
overridevirtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 112 of file EgammaBasicClusters.cc.

References barrelBasicClusterCollection_, endcapBasicClusterCollection_, MonitorElement::Fill(), edm::Event::getByToken(), hist_EB_BC_ET_, hist_EB_BC_ET_vs_Eta_, hist_EB_BC_ET_vs_Phi_, hist_EB_BC_Eta_, hist_EB_BC_NumRecHits_, hist_EB_BC_Phi_, hist_EB_BC_Size_, hist_EE_BC_ET_, hist_EE_BC_ET_vs_Eta_, hist_EE_BC_ET_vs_Phi_, hist_EE_BC_ET_vs_R_, hist_EE_BC_Eta_, hist_EE_BC_NumRecHits_, hist_EE_BC_Phi_, hist_EE_BC_Size_, edm::HandleBase::isValid(), cmsLHEtoEOSManager::l, edm::EDConsumerBase::labelsForToken(), edm::ProductLabels::module, funct::pow(), edm::Handle< T >::product(), and mathSSE::sqrt().

113 {
114  edm::Handle<reco::BasicClusterCollection> pBarrelBasicClusters;
115  evt.getByToken(barrelBasicClusterCollection_, pBarrelBasicClusters);
116  if (!pBarrelBasicClusters.isValid()) {
117 
118  Labels l;
120  edm::LogError("EgammaBasicClusters") << "Error! can't get collection with label "
121  << l.module;
122  }
123 
124  const reco::BasicClusterCollection* barrelBasicClusters = pBarrelBasicClusters.product();
125  hist_EB_BC_Size_->Fill(barrelBasicClusters->size());
126 
127  for(reco::BasicClusterCollection::const_iterator aClus = barrelBasicClusters->begin();
128  aClus != barrelBasicClusters->end(); aClus++)
129  {
130  hist_EB_BC_NumRecHits_->Fill(aClus->size());
131  hist_EB_BC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
132  hist_EB_BC_Eta_->Fill(aClus->position().eta());
133  hist_EB_BC_Phi_->Fill(aClus->position().phi());
134 
135  hist_EB_BC_ET_vs_Eta_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->eta() );
136  hist_EB_BC_ET_vs_Phi_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->phi() );
137  }
138 
139  edm::Handle<reco::BasicClusterCollection> pEndcapBasicClusters;
140 
141  evt.getByToken(endcapBasicClusterCollection_, pEndcapBasicClusters);
142  if (!pEndcapBasicClusters.isValid()) {
143 
144  Labels l;
146  edm::LogError("EgammaBasicClusters") << "Error! can't get collection with label "
147  << l.module;
148  }
149 
150  const reco::BasicClusterCollection* endcapBasicClusters = pEndcapBasicClusters.product();
151  hist_EE_BC_Size_->Fill(endcapBasicClusters->size());
152 
153  for(reco::BasicClusterCollection::const_iterator aClus = endcapBasicClusters->begin();
154  aClus != endcapBasicClusters->end(); aClus++)
155  {
156  hist_EE_BC_NumRecHits_->Fill(aClus->size());
157  hist_EE_BC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
158  hist_EE_BC_Eta_->Fill(aClus->position().eta());
159  hist_EE_BC_Phi_->Fill(aClus->position().phi());
160 
161  hist_EE_BC_ET_vs_Eta_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->eta() );
162  hist_EE_BC_ET_vs_Phi_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->phi() );
163  hist_EE_BC_ET_vs_R_->Fill( aClus->energy()/std::cosh(aClus->position().eta()),
164  std::sqrt( std::pow(aClus->x(),2) + std::pow(aClus->y(),2) ) );
165 
166  }
167 }
MonitorElement * hist_EE_BC_NumRecHits_
MonitorElement * hist_EB_BC_Eta_
MonitorElement * hist_EE_BC_ET_vs_R_
MonitorElement * hist_EE_BC_Phi_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
MonitorElement * hist_EB_BC_NumRecHits_
MonitorElement * hist_EE_BC_ET_vs_Phi_
MonitorElement * hist_EB_BC_ET_
MonitorElement * hist_EB_BC_ET_vs_Eta_
MonitorElement * hist_EE_BC_ET_vs_Eta_
void Fill(long long x)
MonitorElement * hist_EB_BC_ET_vs_Phi_
MonitorElement * hist_EE_BC_Eta_
T sqrt(T t)
Definition: SSEVec.h:18
bool isValid() const
Definition: HandleBase.h:75
MonitorElement * hist_EB_BC_Phi_
ProductLabels Labels
edm::EDGetTokenT< reco::BasicClusterCollection > barrelBasicClusterCollection_
T const * product() const
Definition: Handle.h:81
MonitorElement * hist_EE_BC_ET_
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
MonitorElement * hist_EB_BC_Size_
MonitorElement * hist_EE_BC_Size_
edm::EDGetTokenT< reco::BasicClusterCollection > endcapBasicClusterCollection_
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void EgammaBasicClusters::bookHistograms ( DQMStore::IBooker _ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 45 of file EgammaBasicClusters.cc.

References HistSpec::bins, DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), hist_EB_BC_ET_, hist_EB_BC_ET_vs_Eta_, hist_EB_BC_ET_vs_Phi_, hist_EB_BC_Eta_, hist_EB_BC_NumRecHits_, hist_EB_BC_Phi_, hist_EB_BC_Size_, hist_EE_BC_ET_, hist_EE_BC_ET_vs_Eta_, hist_EE_BC_ET_vs_Phi_, hist_EE_BC_ET_vs_R_, hist_EE_BC_Eta_, hist_EE_BC_NumRecHits_, hist_EE_BC_Phi_, hist_EE_BC_Size_, hsET_, hsEta_, hsNumRecHits_, hsPhi_, hsR_, hsSize_, HistSpec::max, HistSpec::min, and DQMStore::IBooker::setCurrentFolder().

46 {
47  _ibooker.setCurrentFolder("EcalClusterV/EcalBasicClusters/");
48 
50  = _ibooker.book1D("hist_EB_BC_Size_","# Basic Clusters in Barrel",
53  = _ibooker.book1D("hist_EE_BC_Size_","# Basic Clusters in Endcap",
55 
57  = _ibooker.book1D("hist_EB_BC_NumRecHits_","# of RecHits in Basic Clusters in Barrel",
60  = _ibooker.book1D("hist_EE_BC_NumRecHits_","# of RecHits in Basic Clusters in Endcap",
62 
64  = _ibooker.book1D("hist_EB_BC_ET_","ET of Basic Clusters in Barrel",
67  = _ibooker.book1D("hist_EE_BC_ET_","ET of Basic Clusters in Endcap",
69 
71  = _ibooker.book1D("hist_EB_BC_Eta_","Eta of Basic Clusters in Barrel",
74  = _ibooker.book1D("hist_EE_BC_Eta_","Eta of Basic Clusters in Endcap",
76 
78  = _ibooker.book1D("hist_EB_BC_Phi_","Phi of Basic Clusters in Barrel",
81  = _ibooker.book1D("hist_EE_BC_Phi_","Phi of Basic Clusters in Endcap",
83 
84 
86  = _ibooker.book2D( "hist_EB_BC_ET_vs_Eta_", "Basic Cluster ET versus Eta in Barrel",
89 
91  = _ibooker.book2D( "hist_EB_BC_ET_vs_Phi_", "Basic Cluster ET versus Phi in Barrel",
94 
96  = _ibooker.book2D( "hist_EE_BC_ET_vs_Eta_", "Basic Cluster ET versus Eta in Endcap",
99 
101  = _ibooker.book2D( "hist_EE_BC_ET_vs_Phi_", "Basic Cluster ET versus Phi in Endcap",
104 
106  = _ibooker.book2D( "hist_EE_BC_ET_vs_R_", "Basic Cluster ET versus Radius in Endcap",
108  hsR_.bins, hsR_.min, hsR_.max );
109 }
MonitorElement * hist_EE_BC_NumRecHits_
MonitorElement * hist_EB_BC_Eta_
MonitorElement * hist_EE_BC_ET_vs_R_
MonitorElement * hist_EE_BC_Phi_
int bins
Definition: HistSpec.h:9
MonitorElement * hist_EB_BC_NumRecHits_
MonitorElement * hist_EE_BC_ET_vs_Phi_
MonitorElement * hist_EB_BC_ET_
double max
Definition: HistSpec.h:8
MonitorElement * hist_EB_BC_ET_vs_Eta_
MonitorElement * hist_EE_BC_ET_vs_Eta_
double min
Definition: HistSpec.h:7
MonitorElement * hist_EB_BC_ET_vs_Phi_
MonitorElement * hist_EE_BC_Eta_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * hist_EB_BC_Phi_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:273
MonitorElement * hist_EE_BC_ET_
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * hist_EB_BC_Size_
MonitorElement * hist_EE_BC_Size_

Member Data Documentation

edm::EDGetTokenT<reco::BasicClusterCollection> EgammaBasicClusters::barrelBasicClusterCollection_
private

Definition at line 34 of file EgammaBasicClusters.h.

Referenced by analyze().

edm::EDGetTokenT<reco::BasicClusterCollection> EgammaBasicClusters::endcapBasicClusterCollection_
private

Definition at line 35 of file EgammaBasicClusters.h.

Referenced by analyze().

MonitorElement* EgammaBasicClusters::hist_EB_BC_ET_
private

Definition at line 48 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EB_BC_ET_vs_Eta_
private

Definition at line 54 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EB_BC_ET_vs_Phi_
private

Definition at line 55 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EB_BC_Eta_
private

Definition at line 50 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EB_BC_NumRecHits_
private

Definition at line 46 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EB_BC_Phi_
private

Definition at line 52 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EB_BC_Size_
private

Definition at line 44 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_ET_
private

Definition at line 49 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_ET_vs_Eta_
private

Definition at line 56 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_ET_vs_Phi_
private

Definition at line 57 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_ET_vs_R_
private

Definition at line 58 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_Eta_
private

Definition at line 51 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_NumRecHits_
private

Definition at line 47 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_Phi_
private

Definition at line 53 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_Size_
private

Definition at line 45 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

HistSpec EgammaBasicClusters::hsET_
private

Definition at line 39 of file EgammaBasicClusters.h.

Referenced by bookHistograms().

HistSpec EgammaBasicClusters::hsEta_
private

Definition at line 40 of file EgammaBasicClusters.h.

Referenced by bookHistograms().

HistSpec EgammaBasicClusters::hsNumRecHits_
private

Definition at line 38 of file EgammaBasicClusters.h.

Referenced by bookHistograms().

HistSpec EgammaBasicClusters::hsPhi_
private

Definition at line 41 of file EgammaBasicClusters.h.

Referenced by bookHistograms().

HistSpec EgammaBasicClusters::hsR_
private

Definition at line 42 of file EgammaBasicClusters.h.

Referenced by bookHistograms().

HistSpec EgammaBasicClusters::hsSize_
private

Definition at line 37 of file EgammaBasicClusters.h.

Referenced by bookHistograms().