CMS 3D CMS Logo

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

#include <TopElectronHLTOfflineSource.h>

Classes

struct  EleMESet
 

Public Member Functions

void addMESets (const std::string &name)
 
const std::vector< std::string > & eleIdNames ()
 
const std::vector< std::string > & eleMENames ()
 
 EleMEs ()
 
 EleMEs (DQMStore *dbe, const std::vector< std::string > &eleIdNames, bool addExtraId, const std::string &name)
 
const std::vector< EleMESet > & eleMESets ()
 
void fill (EleMESet &eleMESet, const reco::GsfElectron &ele, float minDeltaR, float sumEt, int n30jets, float dzPV)
 
const std::string fullName (size_t i)
 
EleMESetgetMESet (size_t namePos, size_t idPos)
 
const std::string & idName (size_t i)
 
const std::string & name (size_t i)
 
void setup (DQMStore *dbe, const std::vector< std::string > &, bool addExtraId, const std::string &name)
 
void setupMESet (EleMESet &eleSet, DQMStore *dbe, const std::string &name)
 

Private Attributes

std::vector< std::string > eleIdNames_
 
std::vector< std::string > eleMENames_
 
std::vector< EleMESeteleMESets_
 
std::string name_
 

Detailed Description

Definition at line 41 of file TopElectronHLTOfflineSource.h.

Constructor & Destructor Documentation

TopElectronHLTOfflineSource::EleMEs::EleMEs ( )
inline

Definition at line 67 of file TopElectronHLTOfflineSource.h.

68  {
69  }
TopElectronHLTOfflineSource::EleMEs::EleMEs ( DQMStore dbe,
const std::vector< std::string > &  eleIdNames,
bool  addExtraId,
const std::string &  name 
)
inline

Definition at line 71 of file TopElectronHLTOfflineSource.h.

References setup().

72  {
73  setup(dbe, eleIdNames, addExtraId, name);
74  }
const std::vector< std::string > & eleIdNames()
void setup(DQMStore *dbe, const std::vector< std::string > &, bool addExtraId, const std::string &name)

Member Function Documentation

void TopElectronHLTOfflineSource::EleMEs::addMESets ( const std::string &  name)

Definition at line 256 of file TopElectronHLTOfflineSource.cc.

References i, and mergeVDriftHistosByStation::name.

Referenced by setup().

257 {
258  eleMENames_.push_back("EB");
259  eleMENames_.push_back("EE");
260  name_ = name;
261  for (size_t i=0; i < eleIdNames_.size() * eleMENames_.size(); ++i)
262  {
263  eleMESets_.push_back(EleMESet());
264  }
265 }
int i
Definition: DBlmapReader.cc:9
const std::vector<std::string>& TopElectronHLTOfflineSource::EleMEs::eleIdNames ( )
inline

Definition at line 98 of file TopElectronHLTOfflineSource.h.

References eleIdNames_.

Referenced by TopElectronHLTOfflineSource::fill().

99  {
100  return eleIdNames_;
101  }
const std::vector<std::string>& TopElectronHLTOfflineSource::EleMEs::eleMENames ( )
inline

Definition at line 93 of file TopElectronHLTOfflineSource.h.

References eleMENames_.

Referenced by TopElectronHLTOfflineSource::fill().

94  {
95  return eleMENames_;
96  }
const std::vector<EleMESet>& TopElectronHLTOfflineSource::EleMEs::eleMESets ( )
inline

Definition at line 88 of file TopElectronHLTOfflineSource.h.

References eleMESets_.

89  {
90  return eleMESets_;
91  }
void TopElectronHLTOfflineSource::EleMEs::fill ( EleMESet eleMESet,
const reco::GsfElectron ele,
float  minDeltaR,
float  sumEt,
int  n30jets,
float  dzPV 
)

Definition at line 340 of file TopElectronHLTOfflineSource.cc.

References reco::GsfElectron::dr03EcalRecHitSumEt(), reco::GsfElectron::dr03HcalTowerSumEt(), TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_et, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_eta, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_gsftrack_dzPV, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_gsftrack_etaError, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_gsftrack_numberOfValidHits, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_gsftrack_phiError, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_isolEm, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_isolHad, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_minDeltaR, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_phi, reco::LeafCandidate::et(), reco::LeafCandidate::eta(), MonitorElement::Fill(), TopElectronHLTOfflineSource::EleMEs::EleMESet::global_n30jets, TopElectronHLTOfflineSource::EleMEs::EleMESet::global_sumEt, reco::GsfElectron::gsfTrack(), LogDebug, and reco::LeafCandidate::phi().

Referenced by TopElectronHLTOfflineSource::fill().

341 {
342  LogDebug("TopElectronHLTOfflineSource") << "filling the histos with " << ele.et();
343 
344  eleMESet.ele_et->Fill(ele.et());
345  eleMESet.ele_eta->Fill(ele.eta());
346  eleMESet.ele_phi->Fill(ele.phi());
347  eleMESet.ele_isolEm->Fill(ele.dr03EcalRecHitSumEt());
348  eleMESet.ele_isolHad->Fill(ele.dr03HcalTowerSumEt());
349  eleMESet.ele_minDeltaR->Fill(minDeltaR);
350  eleMESet.global_n30jets->Fill(n30jets);
351  eleMESet.global_sumEt->Fill(sumEt);
352  eleMESet.ele_gsftrack_etaError->Fill(ele.gsfTrack()->etaError());
353  eleMESet.ele_gsftrack_phiError->Fill(ele.gsfTrack()->phiError());
354  eleMESet.ele_gsftrack_numberOfValidHits->Fill(ele.gsfTrack()->numberOfValidHits());
355  eleMESet.ele_gsftrack_dzPV->Fill(dzPV);
356 }
#define LogDebug(id)
virtual double et() const GCC11_FINAL
transverse energy
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:437
float dr03HcalTowerSumEt() const
Definition: GsfElectron.h:440
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: GsfElectron.h:169
const std::string TopElectronHLTOfflineSource::EleMEs::fullName ( size_t  i)
inline

Definition at line 113 of file TopElectronHLTOfflineSource.h.

References idName(), and name().

Referenced by valtools.benchmark::benchmarkOnWebSite(), and setup().

114  {
115  return name(i)+"_"+idName(i);
116  }
int i
Definition: DBlmapReader.cc:9
EleMESet& TopElectronHLTOfflineSource::EleMEs::getMESet ( size_t  namePos,
size_t  idPos 
)
inline

Definition at line 83 of file TopElectronHLTOfflineSource.h.

References eleMENames_, and eleMESets_.

Referenced by TopElectronHLTOfflineSource::fill().

84  {
85  return eleMESets_[namePos+idPos*eleMENames_.size()];
86  }
const std::string& TopElectronHLTOfflineSource::EleMEs::idName ( size_t  i)
inline

Definition at line 108 of file TopElectronHLTOfflineSource.h.

References eleIdNames_, and eleMENames_.

Referenced by fullName().

109  {
110  return eleIdNames_[i / eleMENames_.size()];
111  }
int i
Definition: DBlmapReader.cc:9
const std::string& TopElectronHLTOfflineSource::EleMEs::name ( size_t  i)
inline
void TopElectronHLTOfflineSource::EleMEs::setup ( DQMStore dbe,
const std::vector< std::string > &  eleIdNames,
bool  addExtraId,
const std::string &  name 
)

Definition at line 223 of file TopElectronHLTOfflineSource.cc.

References addMESets(), eleIdNames_, eleMESets_, fullName(), i, LogDebug, name(), and setupMESet().

Referenced by EleMEs().

224 {
225  for (size_t i = 0; i < eleIdNames.size(); ++i)
226  {
227  eleIdNames_.push_back(eleIdNames[i]);
228  if (addExtraId)
229  eleIdNames_.push_back(eleIdNames[i]+"extraId");
230  }
231 
232  addMESets(name);
233 
234  for (size_t i = 0; i < eleMESets_.size(); ++i)
235  {
236  setupMESet(eleMESets_[i], dbe, name+"_"+fullName(i));
237  LogDebug("TopElectronHLTOfflineSource") << "Booked MonitorElement with name " << name;
238  }
239 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
const std::vector< std::string > & eleIdNames()
void setupMESet(EleMESet &eleSet, DQMStore *dbe, const std::string &name)
void TopElectronHLTOfflineSource::EleMEs::setupMESet ( EleMESet eleSet,
DQMStore dbe,
const std::string &  name 
)

Definition at line 240 of file TopElectronHLTOfflineSource.cc.

References DQMStore::book1D(), TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_et, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_eta, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_gsftrack_dzPV, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_gsftrack_etaError, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_gsftrack_numberOfValidHits, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_gsftrack_phiError, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_isolEm, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_isolHad, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_minDeltaR, TopElectronHLTOfflineSource::EleMEs::EleMESet::ele_phi, TopElectronHLTOfflineSource::EleMEs::EleMESet::global_n30jets, and TopElectronHLTOfflineSource::EleMEs::EleMESet::global_sumEt.

Referenced by setup().

241 {
242  eleSet.ele_et = dbe->book1D("ele_"+name+"_et", "ele_"+name+"_et", 50, 0., 500.);
243  eleSet.ele_eta = dbe->book1D("ele_"+name+"_eta", "ele_"+name+"_eta", 50, -2.5, 2.5);
244  eleSet.ele_phi = dbe->book1D("ele_"+name+"_phi","ele_"+name+"_phi", 50, -3.1416, 3.1416);
245  eleSet.ele_isolEm = dbe->book1D("ele_"+name+"_isolEm", "ele_"+name+"_isolEm", 50, -0.05, 3.);
246  eleSet.ele_isolHad = dbe->book1D("ele_"+name+"_isolHad", "ele_"+name+"_isolHad", 50, -0.05, 5.);
247  eleSet.ele_minDeltaR = dbe->book1D("ele_"+name+"_minDeltaR", "ele_"+name+"_minDeltaR", 50, 0., 1.);
248  eleSet.global_n30jets = dbe->book1D("ele_"+name+"_global_n30jets", "ele_"+name+"_global_n30jets", 10, -0.5, 9.5);
249  eleSet.global_sumEt = dbe->book1D("ele_"+name+"_global_sumEt", "ele_"+name+"_global_sumEt", 50, 0., 1000.);
250  eleSet.ele_gsftrack_etaError = dbe->book1D("ele_"+name+"_gsftrack_etaError", "ele_"+name+"_gsftrack_etaError", 50, 0., 0.005);
251  eleSet.ele_gsftrack_phiError = dbe->book1D("ele_"+name+"_gsftrack_phiError", "ele_"+name+"_gsftrack_phiError", 50, 0., 0.005);
252  eleSet.ele_gsftrack_numberOfValidHits = dbe->book1D("ele_"+name+"_gsftrack_numberOfValidHits", "ele_"+name+"_gsftrack_numberOfValidHits", 25, -0.5, 24.5);
253  eleSet.ele_gsftrack_dzPV = dbe->book1D("ele_"+name+"_gsftrack_dzPV", "ele_"+name+"_gsftrack_dzPV", 50, 0., 0.2);
254 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:873

Member Data Documentation

std::vector<std::string> TopElectronHLTOfflineSource::EleMEs::eleIdNames_
private

Definition at line 128 of file TopElectronHLTOfflineSource.h.

Referenced by eleIdNames(), idName(), and setup().

std::vector<std::string> TopElectronHLTOfflineSource::EleMEs::eleMENames_
private

Definition at line 123 of file TopElectronHLTOfflineSource.h.

Referenced by eleMENames(), getMESet(), idName(), and name().

std::vector<EleMESet> TopElectronHLTOfflineSource::EleMEs::eleMESets_
private

Definition at line 121 of file TopElectronHLTOfflineSource.h.

Referenced by eleMESets(), getMESet(), and setup().

std::string TopElectronHLTOfflineSource::EleMEs::name_
private

Definition at line 125 of file TopElectronHLTOfflineSource.h.