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:
edm::EDAnalyzer

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
 EgammaBasicClusters (const edm::ParameterSet &)
 
virtual void endJob ()
 
 ~EgammaBasicClusters ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Attributes

edm::InputTag barrelBasicClusterCollection_
 
DQMStoredbe_
 
edm::InputTag endcapBasicClusterCollection_
 
int hist_bins_ET_
 
int hist_bins_Eta_
 
int hist_bins_NumRecHits_
 
int hist_bins_Phi_
 
int hist_bins_R_
 
int hist_bins_Size_
 
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_
 
double hist_max_ET_
 
double hist_max_Eta_
 
double hist_max_NumRecHits_
 
double hist_max_Phi_
 
double hist_max_R_
 
double hist_max_Size_
 
double hist_min_ET_
 
double hist_min_Eta_
 
double hist_min_NumRecHits_
 
double hist_min_Phi_
 
double hist_min_R_
 
double hist_min_Size_
 
std::string outputFile_
 
bool verboseDBE_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Description: SVSuite Basic Cluster Validation

Implementation: \

Author
: Michael A. Balazs, Nov 2006

Definition at line 25 of file EgammaBasicClusters.h.

Constructor & Destructor Documentation

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

Definition at line 12 of file EgammaBasicClusters.cc.

References barrelBasicClusterCollection_, endcapBasicClusterCollection_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hist_bins_ET_, hist_bins_Eta_, hist_bins_NumRecHits_, hist_bins_Phi_, hist_bins_R_, hist_bins_Size_, hist_max_ET_, hist_max_Eta_, hist_max_NumRecHits_, hist_max_Phi_, hist_max_R_, hist_max_Size_, hist_min_ET_, hist_min_Eta_, hist_min_NumRecHits_, hist_min_Phi_, hist_min_R_, hist_min_Size_, outputFile_, and verboseDBE_.

13 {
14  outputFile_ = ps.getUntrackedParameter<std::string>("outputFile", "");
15  //CMSSW_Version_ = ps.getUntrackedParameter<std::string>("CMSSW_Version", "");
16 
17  verboseDBE_ = ps.getUntrackedParameter<bool>("verboseDBE", false);
18 
19  hist_min_Size_ = ps.getParameter<double>("hist_min_Size");
20  hist_max_Size_ = ps.getParameter<double>("hist_max_Size");
21  hist_bins_Size_ = ps.getParameter<int> ("hist_bins_Size");
22 
23  hist_min_NumRecHits_ = ps.getParameter<double>("hist_min_NumRecHits");
24  hist_max_NumRecHits_ = ps.getParameter<double>("hist_max_NumRecHits");
25  hist_bins_NumRecHits_ = ps.getParameter<int> ("hist_bins_NumRecHits");
26 
27  hist_min_ET_ = ps.getParameter<double>("hist_min_ET");
28  hist_max_ET_ = ps.getParameter<double>("hist_max_ET");
29  hist_bins_ET_ = ps.getParameter<int> ("hist_bins_ET");
30 
31  hist_min_Eta_ = ps.getParameter<double>("hist_min_Eta");
32  hist_max_Eta_ = ps.getParameter<double>("hist_max_Eta");
33  hist_bins_Eta_ = ps.getParameter<int> ("hist_bins_Eta");
34 
35  hist_min_Phi_ = ps.getParameter<double>("hist_min_Phi");
36  hist_max_Phi_ = ps.getParameter<double>("hist_max_Phi");
37  hist_bins_Phi_ = ps.getParameter<int> ("hist_bins_Phi");
38 
39  hist_min_R_ = ps.getParameter<double>("hist_min_R");
40  hist_max_R_ = ps.getParameter<double>("hist_max_R");
41  hist_bins_R_ = ps.getParameter<int> ("hist_bins_R");
42 
43  barrelBasicClusterCollection_ = ps.getParameter<edm::InputTag>("barrelBasicClusterCollection");
44  endcapBasicClusterCollection_ = ps.getParameter<edm::InputTag>("endcapBasicClusterCollection");
45 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag endcapBasicClusterCollection_
edm::InputTag barrelBasicClusterCollection_
EgammaBasicClusters::~EgammaBasicClusters ( )

Definition at line 47 of file EgammaBasicClusters.cc.

47 {}

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 124 of file EgammaBasicClusters.cc.

References barrelBasicClusterCollection_, endcapBasicClusterCollection_, MonitorElement::Fill(), edm::Event::getByLabel(), 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(), edm::InputTag::label(), funct::pow(), edm::Handle< T >::product(), and mathSSE::sqrt().

125 {
126  edm::Handle<reco::BasicClusterCollection> pBarrelBasicClusters;
127  evt.getByLabel(barrelBasicClusterCollection_, pBarrelBasicClusters);
128  if (!pBarrelBasicClusters.isValid()) {
129  edm::LogError("EgammaBasicClusters") << "Error! can't get collection with label "
131  }
132 
133  const reco::BasicClusterCollection* barrelBasicClusters = pBarrelBasicClusters.product();
134  hist_EB_BC_Size_->Fill(barrelBasicClusters->size());
135 
136  for(reco::BasicClusterCollection::const_iterator aClus = barrelBasicClusters->begin();
137  aClus != barrelBasicClusters->end(); aClus++)
138  {
139  hist_EB_BC_NumRecHits_->Fill(aClus->size());
140  hist_EB_BC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
141  hist_EB_BC_Eta_->Fill(aClus->position().eta());
142  hist_EB_BC_Phi_->Fill(aClus->position().phi());
143 
144  hist_EB_BC_ET_vs_Eta_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->eta() );
145  hist_EB_BC_ET_vs_Phi_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->phi() );
146  }
147 
148  edm::Handle<reco::BasicClusterCollection> pEndcapBasicClusters;
149 
150  evt.getByLabel(endcapBasicClusterCollection_, pEndcapBasicClusters);
151  if (!pEndcapBasicClusters.isValid()) {
152  edm::LogError("EgammaBasicClusters") << "Error! can't get collection with label "
154  }
155 
156  const reco::BasicClusterCollection* endcapBasicClusters = pEndcapBasicClusters.product();
157  hist_EE_BC_Size_->Fill(endcapBasicClusters->size());
158 
159  for(reco::BasicClusterCollection::const_iterator aClus = endcapBasicClusters->begin();
160  aClus != endcapBasicClusters->end(); aClus++)
161  {
162  hist_EE_BC_NumRecHits_->Fill(aClus->size());
163  hist_EE_BC_ET_->Fill(aClus->energy()/std::cosh(aClus->position().eta()));
164  hist_EE_BC_Eta_->Fill(aClus->position().eta());
165  hist_EE_BC_Phi_->Fill(aClus->position().phi());
166 
167  hist_EE_BC_ET_vs_Eta_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->eta() );
168  hist_EE_BC_ET_vs_Phi_->Fill( aClus->energy()/std::cosh(aClus->position().eta()), aClus->phi() );
169  hist_EE_BC_ET_vs_R_->Fill( aClus->energy()/std::cosh(aClus->position().eta()),
170  std::sqrt( std::pow(aClus->x(),2) + std::pow(aClus->y(),2) ) );
171 
172  }
173 }
MonitorElement * hist_EE_BC_NumRecHits_
MonitorElement * hist_EB_BC_Eta_
MonitorElement * hist_EE_BC_ET_vs_R_
MonitorElement * hist_EE_BC_Phi_
edm::InputTag endcapBasicClusterCollection_
MonitorElement * hist_EB_BC_NumRecHits_
edm::InputTag barrelBasicClusterCollection_
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:28
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
MonitorElement * hist_EB_BC_Phi_
MonitorElement * hist_EE_BC_ET_
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
T const * product() const
Definition: Handle.h:74
std::string const & label() const
Definition: InputTag.h:25
MonitorElement * hist_EB_BC_Size_
MonitorElement * hist_EE_BC_Size_
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void EgammaBasicClusters::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 49 of file EgammaBasicClusters.cc.

References DQMStore::book1D(), DQMStore::book2D(), dbe_, hist_bins_ET_, hist_bins_Eta_, hist_bins_NumRecHits_, hist_bins_Phi_, hist_bins_R_, hist_bins_Size_, 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_, hist_max_ET_, hist_max_Eta_, hist_max_NumRecHits_, hist_max_Phi_, hist_max_R_, hist_max_Size_, hist_min_ET_, hist_min_Eta_, hist_min_NumRecHits_, hist_min_Phi_, hist_min_R_, hist_min_Size_, cmsCodeRules.cppFunctionSkipper::operator, DQMStore::setCurrentFolder(), DQMStore::setVerbose(), DQMStore::showDirStructure(), and verboseDBE_.

50 {
52 
53  if ( verboseDBE_ )
54  {
55  dbe_->setVerbose(1);
57  }
58  else
59  dbe_->setVerbose(0);
60 
61  //dbe_->setCurrentFolder("Ecal/CMSSW_"+CMSSW_Version_+"/EcalClusters/BasicClusters/");
62  dbe_->setCurrentFolder("EcalClusterV/EcalBasicClusters/");
63 
65  = dbe_->book1D("hist_EB_BC_Size_","# Basic Clusters in Barrel",
68  = dbe_->book1D("hist_EE_BC_Size_","# Basic Clusters in Endcap",
70 
72  = dbe_->book1D("hist_EB_BC_NumRecHits_","# of RecHits in Basic Clusters in Barrel",
75  = dbe_->book1D("hist_EE_BC_NumRecHits_","# of RecHits in Basic Clusters in Endcap",
77 
79  = dbe_->book1D("hist_EB_BC_ET_","ET of Basic Clusters in Barrel",
82  = dbe_->book1D("hist_EE_BC_ET_","ET of Basic Clusters in Endcap",
84 
86  = dbe_->book1D("hist_EB_BC_Eta_","Eta of Basic Clusters in Barrel",
89  = dbe_->book1D("hist_EE_BC_Eta_","Eta of Basic Clusters in Endcap",
91 
93  = dbe_->book1D("hist_EB_BC_Phi_","Phi of Basic Clusters in Barrel",
96  = dbe_->book1D("hist_EE_BC_Phi_","Phi of Basic Clusters in Endcap",
98 
99 
100  hist_EB_BC_ET_vs_Eta_ = dbe_->book2D( "hist_EB_BC_ET_vs_Eta_", "Basic Cluster ET versus Eta in Barrel",
103 
104  hist_EB_BC_ET_vs_Phi_ = dbe_->book2D( "hist_EB_BC_ET_vs_Phi_", "Basic Cluster ET versus Phi in Barrel",
107 
108  hist_EE_BC_ET_vs_Eta_ = dbe_->book2D( "hist_EE_BC_ET_vs_Eta_", "Basic Cluster ET versus Eta in Endcap",
111 
112  hist_EE_BC_ET_vs_Phi_ = dbe_->book2D( "hist_EE_BC_ET_vs_Phi_", "Basic Cluster ET versus Phi in Endcap",
115 
116  hist_EE_BC_ET_vs_R_ = dbe_->book2D( "hist_EE_BC_ET_vs_R_", "Basic Cluster ET versus Radius in Endcap",
119 
120 
121 
122 }
MonitorElement * hist_EE_BC_NumRecHits_
MonitorElement * hist_EB_BC_Eta_
MonitorElement * hist_EE_BC_ET_vs_R_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
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_
void setVerbose(unsigned level)
Definition: DQMStore.cc:196
MonitorElement * hist_EB_BC_Phi_
MonitorElement * hist_EE_BC_ET_
MonitorElement * hist_EB_BC_Size_
void showDirStructure(void) const
Definition: DQMStore.cc:2554
MonitorElement * hist_EE_BC_Size_
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:642
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
void EgammaBasicClusters::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 175 of file EgammaBasicClusters.cc.

References dbe_, outputFile_, and DQMStore::save().

176 {
177  if (outputFile_.size() != 0 && dbe_) dbe_->save(outputFile_);
178 }
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:1898

Member Data Documentation

edm::InputTag EgammaBasicClusters::barrelBasicClusterCollection_
private

Definition at line 42 of file EgammaBasicClusters.h.

Referenced by analyze(), and EgammaBasicClusters().

DQMStore* EgammaBasicClusters::dbe_
private

Definition at line 40 of file EgammaBasicClusters.h.

Referenced by beginJob(), and endJob().

edm::InputTag EgammaBasicClusters::endcapBasicClusterCollection_
private

Definition at line 43 of file EgammaBasicClusters.h.

Referenced by analyze(), and EgammaBasicClusters().

int EgammaBasicClusters::hist_bins_ET_
private

Definition at line 64 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

int EgammaBasicClusters::hist_bins_Eta_
private

Definition at line 71 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

int EgammaBasicClusters::hist_bins_NumRecHits_
private

Definition at line 57 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

int EgammaBasicClusters::hist_bins_Phi_
private

Definition at line 78 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

int EgammaBasicClusters::hist_bins_R_
private

Definition at line 82 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

int EgammaBasicClusters::hist_bins_Size_
private

Definition at line 50 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

MonitorElement* EgammaBasicClusters::hist_EB_BC_ET_
private

Definition at line 59 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EB_BC_ET_vs_Eta_
private

Definition at line 84 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EB_BC_ET_vs_Phi_
private

Definition at line 85 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EB_BC_Eta_
private

Definition at line 66 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EB_BC_NumRecHits_
private

Definition at line 52 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EB_BC_Phi_
private

Definition at line 73 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EB_BC_Size_
private

Definition at line 45 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EE_BC_ET_
private

Definition at line 60 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EE_BC_ET_vs_Eta_
private

Definition at line 87 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EE_BC_ET_vs_Phi_
private

Definition at line 88 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EE_BC_ET_vs_R_
private

Definition at line 89 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EE_BC_Eta_
private

Definition at line 67 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EE_BC_NumRecHits_
private

Definition at line 53 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EE_BC_Phi_
private

Definition at line 74 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

MonitorElement* EgammaBasicClusters::hist_EE_BC_Size_
private

Definition at line 46 of file EgammaBasicClusters.h.

Referenced by analyze(), and beginJob().

double EgammaBasicClusters::hist_max_ET_
private

Definition at line 63 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_max_Eta_
private

Definition at line 70 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_max_NumRecHits_
private

Definition at line 56 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_max_Phi_
private

Definition at line 77 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_max_R_
private

Definition at line 81 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_max_Size_
private

Definition at line 49 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_min_ET_
private

Definition at line 62 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_min_Eta_
private

Definition at line 69 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_min_NumRecHits_
private

Definition at line 55 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_min_Phi_
private

Definition at line 76 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_min_R_
private

Definition at line 80 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

double EgammaBasicClusters::hist_min_Size_
private

Definition at line 48 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().

std::string EgammaBasicClusters::outputFile_
private

Definition at line 36 of file EgammaBasicClusters.h.

Referenced by EgammaBasicClusters(), and endJob().

bool EgammaBasicClusters::verboseDBE_
private

Definition at line 39 of file EgammaBasicClusters.h.

Referenced by beginJob(), and EgammaBasicClusters().