CMS 3D CMS Logo

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

#include <EgammaBasicClusters.h>

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

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 DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

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

Detailed Description

Description: SVSuite Basic Cluster Validation

Implementation: \

Author
: Michael A. Balazs, Nov 2006

Definition at line 23 of file EgammaBasicClusters.h.

Constructor & Destructor Documentation

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

Definition at line 13 of file EgammaBasicClusters.cc.

15  consumes<reco::BasicClusterCollection>(ps.getParameter<edm::InputTag>("barrelBasicClusterCollection"))),
17  consumes<reco::BasicClusterCollection>(ps.getParameter<edm::InputTag>("endcapBasicClusterCollection"))),
18  hsSize_(ps, "Size"),
19  hsNumRecHits_(ps, "NumRecHits"),
20  hsET_(ps, "ET"),
21  hsEta_(ps, "Eta"),
22  hsPhi_(ps, "Phi"),
23  hsR_(ps, "R"),
24  hist_EB_BC_Size_(nullptr),
25  hist_EE_BC_Size_(nullptr),
26  hist_EB_BC_NumRecHits_(nullptr),
27  hist_EE_BC_NumRecHits_(nullptr),
28  hist_EB_BC_ET_(nullptr),
29  hist_EE_BC_ET_(nullptr),
30  hist_EB_BC_Eta_(nullptr),
31  hist_EE_BC_Eta_(nullptr),
32  hist_EB_BC_Phi_(nullptr),
33  hist_EE_BC_Phi_(nullptr),
34  hist_EB_BC_ET_vs_Eta_(nullptr),
35  hist_EB_BC_ET_vs_Phi_(nullptr),
36  hist_EE_BC_ET_vs_Eta_(nullptr),
37  hist_EE_BC_ET_vs_Phi_(nullptr),
38  hist_EE_BC_ET_vs_R_(nullptr) {}
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_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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.

40 {}

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 122 of file EgammaBasicClusters.cc.

References barrelBasicClusterCollection_, endcapBasicClusterCollection_, dqm::impl::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, funct::pow(), edm::Handle< T >::product(), and mathSSE::sqrt().

122  {
123  edm::Handle<reco::BasicClusterCollection> pBarrelBasicClusters;
124  evt.getByToken(barrelBasicClusterCollection_, pBarrelBasicClusters);
125  if (!pBarrelBasicClusters.isValid()) {
126  Labels l;
127  labelsForToken(barrelBasicClusterCollection_, l);
128  edm::LogError("EgammaBasicClusters") << "Error! can't get collection with label " << l.module;
129  }
130 
131  const reco::BasicClusterCollection *barrelBasicClusters = pBarrelBasicClusters.product();
132  hist_EB_BC_Size_->Fill(barrelBasicClusters->size());
133 
134  for (reco::BasicClusterCollection::const_iterator aClus = barrelBasicClusters->begin();
135  aClus != barrelBasicClusters->end();
136  aClus++) {
137  hist_EB_BC_NumRecHits_->Fill(aClus->size());
138  hist_EB_BC_ET_->Fill(aClus->energy() / std::cosh(aClus->position().eta()));
139  hist_EB_BC_Eta_->Fill(aClus->position().eta());
140  hist_EB_BC_Phi_->Fill(aClus->position().phi());
141 
142  hist_EB_BC_ET_vs_Eta_->Fill(aClus->energy() / std::cosh(aClus->position().eta()), aClus->eta());
143  hist_EB_BC_ET_vs_Phi_->Fill(aClus->energy() / std::cosh(aClus->position().eta()), aClus->phi());
144  }
145 
146  edm::Handle<reco::BasicClusterCollection> pEndcapBasicClusters;
147 
148  evt.getByToken(endcapBasicClusterCollection_, pEndcapBasicClusters);
149  if (!pEndcapBasicClusters.isValid()) {
150  Labels l;
151  labelsForToken(endcapBasicClusterCollection_, l);
152  edm::LogError("EgammaBasicClusters") << "Error! can't get collection with label " << l.module;
153  }
154 
155  const reco::BasicClusterCollection *endcapBasicClusters = pEndcapBasicClusters.product();
156  hist_EE_BC_Size_->Fill(endcapBasicClusters->size());
157 
158  for (reco::BasicClusterCollection::const_iterator aClus = endcapBasicClusters->begin();
159  aClus != endcapBasicClusters->end();
160  aClus++) {
161  hist_EE_BC_NumRecHits_->Fill(aClus->size());
162  hist_EE_BC_ET_->Fill(aClus->energy() / std::cosh(aClus->position().eta()));
163  hist_EE_BC_Eta_->Fill(aClus->position().eta());
164  hist_EE_BC_Phi_->Fill(aClus->position().phi());
165 
166  hist_EE_BC_ET_vs_Eta_->Fill(aClus->energy() / std::cosh(aClus->position().eta()), aClus->eta());
167  hist_EE_BC_ET_vs_Phi_->Fill(aClus->energy() / std::cosh(aClus->position().eta()), aClus->phi());
168  hist_EE_BC_ET_vs_R_->Fill(aClus->energy() / std::cosh(aClus->position().eta()),
169  std::sqrt(std::pow(aClus->x(), 2) + std::pow(aClus->y(), 2)));
170  }
171 }
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:539
MonitorElement * hist_EB_BC_NumRecHits_
MonitorElement * hist_EE_BC_ET_vs_Phi_
MonitorElement * hist_EB_BC_ET_
Log< level::Error, false > LogError
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:19
bool isValid() const
Definition: HandleBase.h:70
MonitorElement * hist_EB_BC_Phi_
edm::EDGetTokenT< reco::BasicClusterCollection > barrelBasicClusterCollection_
T const * product() const
Definition: Handle.h:70
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:29
void EgammaBasicClusters::bookHistograms ( DQMStore::IBooker _ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 42 of file EgammaBasicClusters.cc.

References HistSpec::bins, dqm::implementation::IBooker::book1D(), dqm::implementation::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 dqm::implementation::NavigatorBase::setCurrentFolder().

42  {
43  _ibooker.setCurrentFolder("EcalClusterV/EcalBasicClusters/");
44 
46  _ibooker.book1D("hist_EB_BC_Size_", "# Basic Clusters in Barrel", hsSize_.bins, hsSize_.min, hsSize_.max);
48  _ibooker.book1D("hist_EE_BC_Size_", "# Basic Clusters in Endcap", hsSize_.bins, hsSize_.min, hsSize_.max);
49 
50  hist_EB_BC_NumRecHits_ = _ibooker.book1D("hist_EB_BC_NumRecHits_",
51  "# of RecHits in Basic Clusters in Barrel",
55  hist_EE_BC_NumRecHits_ = _ibooker.book1D("hist_EE_BC_NumRecHits_",
56  "# of RecHits in Basic Clusters in Endcap",
60 
62  _ibooker.book1D("hist_EB_BC_ET_", "ET of Basic Clusters in Barrel", hsET_.bins, hsET_.min, hsET_.max);
64  _ibooker.book1D("hist_EE_BC_ET_", "ET of Basic Clusters in Endcap", hsET_.bins, hsET_.min, hsET_.max);
65 
67  _ibooker.book1D("hist_EB_BC_Eta_", "Eta of Basic Clusters in Barrel", hsEta_.bins, hsEta_.min, hsEta_.max);
69  _ibooker.book1D("hist_EE_BC_Eta_", "Eta of Basic Clusters in Endcap", hsEta_.bins, hsEta_.min, hsEta_.max);
70 
72  _ibooker.book1D("hist_EB_BC_Phi_", "Phi of Basic Clusters in Barrel", hsPhi_.bins, hsPhi_.min, hsPhi_.max);
74  _ibooker.book1D("hist_EE_BC_Phi_", "Phi of Basic Clusters in Endcap", hsPhi_.bins, hsPhi_.min, hsPhi_.max);
75 
76  hist_EB_BC_ET_vs_Eta_ = _ibooker.book2D("hist_EB_BC_ET_vs_Eta_",
77  "Basic Cluster ET versus Eta in Barrel",
78  hsET_.bins,
79  hsET_.min,
80  hsET_.max,
81  hsEta_.bins,
82  hsEta_.min,
83  hsEta_.max);
84 
85  hist_EB_BC_ET_vs_Phi_ = _ibooker.book2D("hist_EB_BC_ET_vs_Phi_",
86  "Basic Cluster ET versus Phi in Barrel",
87  hsET_.bins,
88  hsET_.min,
89  hsET_.max,
90  hsPhi_.bins,
91  hsPhi_.min,
92  hsPhi_.max);
93 
94  hist_EE_BC_ET_vs_Eta_ = _ibooker.book2D("hist_EE_BC_ET_vs_Eta_",
95  "Basic Cluster ET versus Eta in Endcap",
96  hsET_.bins,
97  hsET_.min,
98  hsET_.max,
99  hsEta_.bins,
100  hsEta_.min,
101  hsEta_.max);
102 
103  hist_EE_BC_ET_vs_Phi_ = _ibooker.book2D("hist_EE_BC_ET_vs_Phi_",
104  "Basic Cluster ET versus Phi in Endcap",
105  hsET_.bins,
106  hsET_.min,
107  hsET_.max,
108  hsPhi_.bins,
109  hsPhi_.min,
110  hsPhi_.max);
111 
112  hist_EE_BC_ET_vs_R_ = _ibooker.book2D("hist_EE_BC_ET_vs_R_",
113  "Basic Cluster ET versus Radius in Endcap",
114  hsET_.bins,
115  hsET_.min,
116  hsET_.max,
117  hsR_.bins,
118  hsR_.min,
119  hsR_.max);
120 }
MonitorElement * hist_EE_BC_NumRecHits_
MonitorElement * hist_EB_BC_Eta_
MonitorElement * hist_EE_BC_ET_vs_R_
MonitorElement * hist_EE_BC_Phi_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
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 * hist_EB_BC_Phi_
MonitorElement * hist_EE_BC_ET_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
MonitorElement * hist_EB_BC_Size_
MonitorElement * hist_EE_BC_Size_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

Member Data Documentation

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

Definition at line 32 of file EgammaBasicClusters.h.

Referenced by analyze().

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

Definition at line 33 of file EgammaBasicClusters.h.

Referenced by analyze().

MonitorElement* EgammaBasicClusters::hist_EB_BC_ET_
private

Definition at line 46 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EB_BC_ET_vs_Eta_
private

Definition at line 52 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EB_BC_ET_vs_Phi_
private

Definition at line 53 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EB_BC_Eta_
private

Definition at line 48 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EB_BC_NumRecHits_
private

Definition at line 44 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EB_BC_Phi_
private

Definition at line 50 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EB_BC_Size_
private

Definition at line 42 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_ET_
private

Definition at line 47 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_ET_vs_Eta_
private

Definition at line 54 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_ET_vs_Phi_
private

Definition at line 55 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_ET_vs_R_
private

Definition at line 56 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_Eta_
private

Definition at line 49 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_NumRecHits_
private

Definition at line 45 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_Phi_
private

Definition at line 51 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* EgammaBasicClusters::hist_EE_BC_Size_
private

Definition at line 43 of file EgammaBasicClusters.h.

Referenced by analyze(), and bookHistograms().

HistSpec EgammaBasicClusters::hsET_
private

Definition at line 37 of file EgammaBasicClusters.h.

Referenced by bookHistograms().

HistSpec EgammaBasicClusters::hsEta_
private

Definition at line 38 of file EgammaBasicClusters.h.

Referenced by bookHistograms().

HistSpec EgammaBasicClusters::hsNumRecHits_
private

Definition at line 36 of file EgammaBasicClusters.h.

Referenced by bookHistograms().

HistSpec EgammaBasicClusters::hsPhi_
private

Definition at line 39 of file EgammaBasicClusters.h.

Referenced by bookHistograms().

HistSpec EgammaBasicClusters::hsR_
private

Definition at line 40 of file EgammaBasicClusters.h.

Referenced by bookHistograms().

HistSpec EgammaBasicClusters::hsSize_
private

Definition at line 35 of file EgammaBasicClusters.h.

Referenced by bookHistograms().