CMS 3D CMS Logo

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

#include <EgammaBasicClusters.h>

Inheritance diagram for EgammaBasicClusters:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

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 () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Private Attributes

edm::EDGetTokenT< reco::BasicClusterCollectionbarrelBasicClusterCollection_
 
edm::EDGetTokenT< reco::BasicClusterCollectionendcapBasicClusterCollection_
 
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_
 

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"),
22  hist_EB_BC_Size_(nullptr),
23  hist_EE_BC_Size_(nullptr),
24  hist_EB_BC_NumRecHits_(nullptr),
25  hist_EE_BC_NumRecHits_(nullptr),
26  hist_EB_BC_ET_(nullptr),
27  hist_EE_BC_ET_(nullptr),
28  hist_EB_BC_Eta_(nullptr),
29  hist_EE_BC_Eta_(nullptr),
30  hist_EB_BC_Phi_(nullptr),
31  hist_EE_BC_Phi_(nullptr),
32  hist_EB_BC_ET_vs_Eta_(nullptr),
33  hist_EB_BC_ET_vs_Phi_(nullptr),
34  hist_EE_BC_ET_vs_Eta_(nullptr),
35  hist_EE_BC_ET_vs_Phi_(nullptr),
36  hist_EE_BC_ET_vs_R_(nullptr)
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 ( )
override

Definition at line 40 of file EgammaBasicClusters.cc.

41 {
42 }

Member Function Documentation

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

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(), checklumidiff::l, 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;
119  labelsForToken(barrelBasicClusterCollection_,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;
145  labelsForToken(endcapBasicClusterCollection_,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:579
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:74
MonitorElement * hist_EB_BC_Phi_
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
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 &   
)
override

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_
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * hist_EE_BC_Eta_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * hist_EB_BC_Phi_
MonitorElement * hist_EE_BC_ET_
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
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().