CMS 3D CMS Logo

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

#include <EERecoSummary.h>

Inheritance diagram for EERecoSummary:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 EERecoSummary (const edm::ParameterSet &)
 
 ~EERecoSummary ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Attributes

edm::InputTag basicClusterCollection_EE_
 
double ethrEE_
 
edm::InputTag recHitCollection_EE_
 
edm::InputTag redRecHitCollection_EE_
 
double scEtThrEE_
 
edm::InputTag superClusterCollection_EE_
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void endJob ()
 

Private Attributes

DQMStoredqmStore_
 
MonitorElementh_basicClusters_recHits_EE_recoFlag
 
MonitorElementh_recHits_EE_recoFlag
 
MonitorElementh_recHits_EEM_Chi2
 
MonitorElementh_recHits_EEM_energyMax
 
MonitorElementh_recHits_EEM_time
 
MonitorElementh_recHits_EEP_Chi2
 
MonitorElementh_recHits_EEP_energyMax
 
MonitorElementh_recHits_EEP_time
 
MonitorElementh_redRecHits_EE_recoFlag
 
MonitorElementh_superClusters_EE_phi
 
MonitorElementh_superClusters_EEM_nBC
 
MonitorElementh_superClusters_EEP_nBC
 
MonitorElementh_superClusters_eta
 
std::string prefixME_
 

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)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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

Definition at line 42 of file EERecoSummary.h.

Constructor & Destructor Documentation

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

Definition at line 69 of file EERecoSummary.cc.

References basicClusterCollection_EE_, dqmStore_, ethrEE_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), h_basicClusters_recHits_EE_recoFlag, h_recHits_EE_recoFlag, h_recHits_EEM_Chi2, h_recHits_EEM_energyMax, h_recHits_EEM_time, h_recHits_EEP_Chi2, h_recHits_EEP_energyMax, h_recHits_EEP_time, h_redRecHits_EE_recoFlag, h_superClusters_EE_phi, h_superClusters_EEM_nBC, h_superClusters_EEP_nBC, h_superClusters_eta, cppFunctionSkipper::operator, prefixME_, recHitCollection_EE_, redRecHitCollection_EE_, scEtThrEE_, AlCaHLTBitMon_QueryRunRegistry::string, and superClusterCollection_EE_.

70 {
71 
72  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
73 
74  //now do what ever initialization is needed
75  recHitCollection_EE_ = ps.getParameter<edm::InputTag>("recHitCollection_EE");
76  redRecHitCollection_EE_ = ps.getParameter<edm::InputTag>("redRecHitCollection_EE");
77  basicClusterCollection_EE_ = ps.getParameter<edm::InputTag>("basicClusterCollection_EE");
78  superClusterCollection_EE_ = ps.getParameter<edm::InputTag>("superClusterCollection_EE");
79 
80  ethrEE_ = ps.getParameter<double>("ethrEE");
81 
82  scEtThrEE_ = ps.getParameter<double>("scEtThrEE");
83 
84  // DQM Store -------------------
86 
87  // Monitor Elements (ex THXD)
88  dqmStore_->setCurrentFolder(prefixME_ + "/EERecoSummary"); // to organise the histos in folders
89 
90  // ReducedRecHits ----------------------------------------------
91  // ... endcap
92  h_redRecHits_EE_recoFlag = dqmStore_->book1D("redRecHits_EE_recoFlag","redRecHits_EE_recoFlag",16,-0.5,15.5);
93 
94  // RecHits ----------------------------------------------
95  // ... endcap
96  h_recHits_EE_recoFlag = dqmStore_->book1D("recHits_EE_recoFlag","recHits_EE_recoFlag",16,-0.5,15.5);
97 
98  // ... endcap +
99  h_recHits_EEP_energyMax = dqmStore_->book1D("recHits_EEP_energyMax","recHitsEEP_energyMax",110,-10,100);
100  h_recHits_EEP_Chi2 = dqmStore_->book1D("recHits_EEP_Chi2","recHits_EEP_Chi2",200,0,100);
101  h_recHits_EEP_time = dqmStore_->book1D("recHits_EEP_time","recHits_EEP_time",200,-50,50);
102 
103  // ... endcap -
104  h_recHits_EEM_energyMax = dqmStore_->book1D("recHits_EEM_energyMax","recHits_EEM_energyMax",110,-10,100);
105  h_recHits_EEM_Chi2 = dqmStore_->book1D("recHits_EEM_Chi2","recHits_EEM_Chi2",200,0,100);
106  h_recHits_EEM_time = dqmStore_->book1D("recHits_EEM_time","recHits_EEM_time",200,-50,50);
107 
108  // Basic Clusters ----------------------------------------------
109  // ... associated endcap rec hits
110  h_basicClusters_recHits_EE_recoFlag = dqmStore_->book1D("basicClusters_recHits_EE_recoFlag","basicClusters_recHits_EE_recoFlag",16,-0.5,15.5);
111 
112  // Super Clusters ----------------------------------------------
113  // ... endcap
114  h_superClusters_EEP_nBC = dqmStore_->book1D("superClusters_EEP_nBC","superClusters_EEP_nBC",100,0.,100.);
115  h_superClusters_EEM_nBC = dqmStore_->book1D("superClusters_EEM_nBC","superClusters_EEM_nBC",100,0.,100.);
116 
117  h_superClusters_eta = dqmStore_->book1D("superClusters_eta","superClusters_eta",150,-3.,3.);
118  h_superClusters_EE_phi = dqmStore_->book1D("superClusters_EE_phi","superClusters_EE_phi",360,-3.1415927,3.1415927);
119 
120 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
double scEtThrEE_
Definition: EERecoSummary.h:99
MonitorElement * h_redRecHits_EE_recoFlag
Definition: EERecoSummary.h:64
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
std::string prefixME_
Definition: EERecoSummary.h:58
MonitorElement * h_basicClusters_recHits_EE_recoFlag
Definition: EERecoSummary.h:79
edm::InputTag basicClusterCollection_EE_
Definition: EERecoSummary.h:94
edm::InputTag superClusterCollection_EE_
Definition: EERecoSummary.h:95
MonitorElement * h_recHits_EEM_Chi2
Definition: EERecoSummary.h:75
MonitorElement * h_recHits_EE_recoFlag
Definition: EERecoSummary.h:68
MonitorElement * h_recHits_EEP_Chi2
Definition: EERecoSummary.h:71
edm::InputTag recHitCollection_EE_
Definition: EERecoSummary.h:92
MonitorElement * h_recHits_EEP_time
Definition: EERecoSummary.h:72
MonitorElement * h_superClusters_EEM_nBC
Definition: EERecoSummary.h:84
MonitorElement * h_recHits_EEM_energyMax
Definition: EERecoSummary.h:74
MonitorElement * h_superClusters_eta
Definition: EERecoSummary.h:86
MonitorElement * h_superClusters_EEP_nBC
Definition: EERecoSummary.h:83
MonitorElement * h_recHits_EEM_time
Definition: EERecoSummary.h:76
DQMStore * dqmStore_
Definition: EERecoSummary.h:56
edm::InputTag redRecHitCollection_EE_
Definition: EERecoSummary.h:93
MonitorElement * h_recHits_EEP_energyMax
Definition: EERecoSummary.h:70
MonitorElement * h_superClusters_EE_phi
Definition: EERecoSummary.h:87
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
EERecoSummary::~EERecoSummary ( )

Definition at line 124 of file EERecoSummary.cc.

125 {
126  // do anything here that needs to be done at desctruction time
127  // (e.g. close files, deallocate resources etc.)
128 }

Member Function Documentation

void EERecoSummary::analyze ( const edm::Event ev,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 136 of file EERecoSummary.cc.

References basicClusterCollection_EE_, edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), relval_parameters_module::energy, eta(), ethrEE_, create_public_lumi_plots::exp, MonitorElement::Fill(), HcalObjRepresent::Fill(), edm::SortedCollection< T, SORT >::find(), edm::EventSetup::get(), edm::Event::getByLabel(), h_basicClusters_recHits_EE_recoFlag, h_recHits_EE_recoFlag, h_recHits_EEM_Chi2, h_recHits_EEM_energyMax, h_recHits_EEM_time, h_recHits_EEP_Chi2, h_recHits_EEP_energyMax, h_recHits_EEP_time, h_redRecHits_EE_recoFlag, h_superClusters_EE_phi, h_superClusters_EEM_nBC, h_superClusters_EEP_nBC, h_superClusters_eta, edm::HandleBase::isValid(), EEDetId::ix(), EEDetId::iy(), phi, edm::Handle< T >::product(), recHitCollection_EE_, redRecHitCollection_EE_, scEtThrEE_, funct::sin(), superClusterCollection_EE_, cond::rpcobgas::time, detailsBasic3DVector::z, and EEDetId::zside().

137 {
138 
139  //Get the magnetic field
140  edm::ESHandle<MagneticField> theMagField;
141  iSetup.get<IdealMagneticFieldRecord>().get(theMagField);
142 
143  // --- REDUCED REC HITS -------------------------------------------------------------------------------------
144  // ... endcap
146  ev.getByLabel( redRecHitCollection_EE_, redRecHitsEE );
147  const EcalRecHitCollection* theEndcapEcalredRecHits = redRecHitsEE.product () ;
148  if ( ! redRecHitsEE.isValid() ) {
149  edm::LogWarning("EERecoSummary") << "redRecHitsEE not found";
150  }
151 
152  for ( EcalRecHitCollection::const_iterator itr = theEndcapEcalredRecHits->begin () ;
153  itr != theEndcapEcalredRecHits->end () ; ++itr)
154  {
155 
156  EEDetId eeid( itr -> id() );
157 
158  h_redRecHits_EE_recoFlag->Fill( itr -> recoFlag() );
159 
160  }
161 
162  // --- REC HITS -------------------------------------------------------------------------------------
163 
164  // ... endcap
166  ev.getByLabel( recHitCollection_EE_, recHitsEE );
167  const EcalRecHitCollection* theEndcapEcalRecHits = recHitsEE.product () ;
168  if ( ! recHitsEE.isValid() ) {
169  edm::LogWarning("EERecoSummary") << "recHitsEE not found";
170  }
171 
172  float maxRecHitEnergyEEP = -999.;
173  float maxRecHitEnergyEEM = -999.;
174 
175  EEDetId eeid_MrecHitEEM;
176  EEDetId eeid_MrecHitEEP;
177 
178  for ( EcalRecHitCollection::const_iterator itr = theEndcapEcalRecHits->begin () ;
179  itr != theEndcapEcalRecHits->end () ; ++itr)
180  {
181 
182  EEDetId eeid( itr -> id() );
183 
184  // EE+
185  if ( eeid.zside() > 0 ){
186 
187  h_recHits_EE_recoFlag -> Fill( itr -> recoFlag() );
188 
189  // max E rec hit
190  if (itr -> energy() > maxRecHitEnergyEEP &&
191  !(eeid.ix()>=41 && eeid.ix()<=60 && eeid.iy()>=41 && eeid.iy()<=60) ) {
192  maxRecHitEnergyEEP = itr -> energy() ;
193  }
194 
195  // only channels above noise
196  if ( itr -> energy() > ethrEE_ ){
197  h_recHits_EEP_Chi2 -> Fill( itr -> chi2() );
198  h_recHits_EEP_time -> Fill( itr -> time() );
199  }
200  }
201 
202  // EE-
203  if ( eeid.zside() < 0 ){
204 
205  h_recHits_EE_recoFlag -> Fill( itr -> recoFlag() );
206 
207  // max E rec hit
208  if (itr -> energy() > maxRecHitEnergyEEM &&
209  !(eeid.ix()>=41 && eeid.ix()<=60 && eeid.iy()>=41 && eeid.iy()<=60) ) {
210  maxRecHitEnergyEEM = itr -> energy() ;
211  }
212 
213  // only channels above noise
214  if ( itr -> energy() > ethrEE_ ) {
215  h_recHits_EEM_Chi2 -> Fill( itr -> chi2() );
216  h_recHits_EEM_time -> Fill( itr -> time() );
217  }
218 
219  }
220  } // end loop over EE rec hits
221 
222  // energy
223  h_recHits_EEP_energyMax -> Fill( maxRecHitEnergyEEP );
224  h_recHits_EEM_energyMax -> Fill( maxRecHitEnergyEEM );
225 
226  //--- BASIC CLUSTERS --------------------------------------------------------------
227 
228  // ... endcap
230  ev.getByLabel( basicClusterCollection_EE_, basicClusters_EE_h );
231  if ( ! basicClusters_EE_h.isValid() ) {
232  edm::LogWarning("EERecoSummary") << "basicClusters_EE_h not found";
233  }
234 
235  for (unsigned int icl = 0; icl < basicClusters_EE_h->size(); ++icl) {
236 
237  //Get the associated RecHits
238  const std::vector<std::pair<DetId,float> > & hits= (*basicClusters_EE_h)[icl].hitsAndFractions();
239  for (std::vector<std::pair<DetId,float> > ::const_iterator rh = hits.begin(); rh!=hits.end(); ++rh){
240 
241  EBRecHitCollection::const_iterator itrechit = theEndcapEcalRecHits->find((*rh).first);
242  if (itrechit==theEndcapEcalRecHits->end()) continue;
243  h_basicClusters_recHits_EE_recoFlag -> Fill ( itrechit -> recoFlag() );
244  }
245 
246  }
247 
248  // Super Clusters
249  // ... endcap
251  ev.getByLabel( superClusterCollection_EE_, superClusters_EE_h );
252  const reco::SuperClusterCollection* theEndcapSuperClusters = superClusters_EE_h.product () ;
253  if ( ! superClusters_EE_h.isValid() ) {
254  edm::LogWarning("EERecoSummary") << "superClusters_EE_h not found";
255  }
256 
257  for (reco::SuperClusterCollection::const_iterator itSC = theEndcapSuperClusters->begin();
258  itSC != theEndcapSuperClusters->end(); ++itSC ) {
259 
260  double scEt = itSC -> energy() * sin(2.*atan( exp(- itSC->position().eta() )));
261 
262  if (scEt < scEtThrEE_ ) continue;
263 
264  h_superClusters_eta -> Fill( itSC -> eta() );
265  h_superClusters_EE_phi -> Fill( itSC -> phi() );
266 
267  if ( itSC -> z() > 0 ){
268  h_superClusters_EEP_nBC -> Fill( itSC -> clustersSize() );
269  }
270 
271  if ( itSC -> z() < 0 ){
272  h_superClusters_EEM_nBC -> Fill( itSC -> clustersSize() );
273  }
274  }
275 
276  //--------------------------------------------------------
277 
278 }
double scEtThrEE_
Definition: EERecoSummary.h:99
MonitorElement * h_redRecHits_EE_recoFlag
Definition: EERecoSummary.h:64
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< EcalRecHit >::const_iterator const_iterator
MonitorElement * h_basicClusters_recHits_EE_recoFlag
Definition: EERecoSummary.h:79
edm::InputTag basicClusterCollection_EE_
Definition: EERecoSummary.h:94
edm::InputTag superClusterCollection_EE_
Definition: EERecoSummary.h:95
MonitorElement * h_recHits_EEM_Chi2
Definition: EERecoSummary.h:75
T eta() const
MonitorElement * h_recHits_EE_recoFlag
Definition: EERecoSummary.h:68
float float float z
MonitorElement * h_recHits_EEP_Chi2
Definition: EERecoSummary.h:71
void Fill(long long x)
edm::InputTag recHitCollection_EE_
Definition: EERecoSummary.h:92
MonitorElement * h_recHits_EEP_time
Definition: EERecoSummary.h:72
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * h_superClusters_EEM_nBC
Definition: EERecoSummary.h:84
MonitorElement * h_recHits_EEM_energyMax
Definition: EERecoSummary.h:74
MonitorElement * h_superClusters_eta
Definition: EERecoSummary.h:86
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
MonitorElement * h_superClusters_EEP_nBC
Definition: EERecoSummary.h:83
MonitorElement * h_recHits_EEM_time
Definition: EERecoSummary.h:76
const_iterator end() const
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: Handle.h:74
iterator find(key_type k)
edm::InputTag redRecHitCollection_EE_
Definition: EERecoSummary.h:93
MonitorElement * h_recHits_EEP_energyMax
Definition: EERecoSummary.h:70
MonitorElement * h_superClusters_EE_phi
Definition: EERecoSummary.h:87
const_iterator begin() const
Definition: DDAxes.h:10
void EERecoSummary::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 283 of file EERecoSummary.cc.

284 {
285 }
void EERecoSummary::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 289 of file EERecoSummary.cc.

290 {}

Member Data Documentation

edm::InputTag EERecoSummary::basicClusterCollection_EE_
protected

Definition at line 94 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

DQMStore* EERecoSummary::dqmStore_
private

Definition at line 56 of file EERecoSummary.h.

Referenced by EERecoSummary().

double EERecoSummary::ethrEE_
protected

Definition at line 97 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

MonitorElement* EERecoSummary::h_basicClusters_recHits_EE_recoFlag
private

Definition at line 79 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

MonitorElement* EERecoSummary::h_recHits_EE_recoFlag
private

Definition at line 68 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

MonitorElement* EERecoSummary::h_recHits_EEM_Chi2
private

Definition at line 75 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

MonitorElement* EERecoSummary::h_recHits_EEM_energyMax
private

Definition at line 74 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

MonitorElement* EERecoSummary::h_recHits_EEM_time
private

Definition at line 76 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

MonitorElement* EERecoSummary::h_recHits_EEP_Chi2
private

Definition at line 71 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

MonitorElement* EERecoSummary::h_recHits_EEP_energyMax
private

Definition at line 70 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

MonitorElement* EERecoSummary::h_recHits_EEP_time
private

Definition at line 72 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

MonitorElement* EERecoSummary::h_redRecHits_EE_recoFlag
private

Definition at line 64 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

MonitorElement* EERecoSummary::h_superClusters_EE_phi
private

Definition at line 87 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

MonitorElement* EERecoSummary::h_superClusters_EEM_nBC
private

Definition at line 84 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

MonitorElement* EERecoSummary::h_superClusters_EEP_nBC
private

Definition at line 83 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

MonitorElement* EERecoSummary::h_superClusters_eta
private

Definition at line 86 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

std::string EERecoSummary::prefixME_
private

Definition at line 58 of file EERecoSummary.h.

Referenced by EERecoSummary().

edm::InputTag EERecoSummary::recHitCollection_EE_
protected

Definition at line 92 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

edm::InputTag EERecoSummary::redRecHitCollection_EE_
protected

Definition at line 93 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

double EERecoSummary::scEtThrEE_
protected

Definition at line 99 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().

edm::InputTag EERecoSummary::superClusterCollection_EE_
protected

Definition at line 95 of file EERecoSummary.h.

Referenced by analyze(), and EERecoSummary().