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 44 of file TopElectronHLTOfflineSource.h.

Constructor & Destructor Documentation

TopElectronHLTOfflineSource::EleMEs::EleMEs ( )
inline

Definition at line 70 of file TopElectronHLTOfflineSource.h.

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

Definition at line 74 of file TopElectronHLTOfflineSource.h.

References setup().

75  {
76  setup(dbe, eleIdNames, addExtraId, name);
77  }
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 258 of file TopElectronHLTOfflineSource.cc.

References i, and mergeVDriftHistosByStation::name.

Referenced by setup().

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

Definition at line 101 of file TopElectronHLTOfflineSource.h.

References eleIdNames_.

Referenced by TopElectronHLTOfflineSource::fill().

102  {
103  return eleIdNames_;
104  }
const std::vector<std::string>& TopElectronHLTOfflineSource::EleMEs::eleMENames ( )
inline

Definition at line 96 of file TopElectronHLTOfflineSource.h.

References eleMENames_.

Referenced by TopElectronHLTOfflineSource::fill().

97  {
98  return eleMENames_;
99  }
const std::vector<EleMESet>& TopElectronHLTOfflineSource::EleMEs::eleMESets ( )
inline

Definition at line 91 of file TopElectronHLTOfflineSource.h.

References eleMESets_.

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

Definition at line 342 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().

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

Definition at line 116 of file TopElectronHLTOfflineSource.h.

References idName(), and name().

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

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

Definition at line 86 of file TopElectronHLTOfflineSource.h.

References eleMENames_, and eleMESets_.

Referenced by TopElectronHLTOfflineSource::fill().

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

Definition at line 111 of file TopElectronHLTOfflineSource.h.

References eleIdNames_, and eleMENames_.

Referenced by fullName().

112  {
113  return eleIdNames_[i / eleMENames_.size()];
114  }
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 225 of file TopElectronHLTOfflineSource.cc.

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

Referenced by EleMEs().

226 {
227  for (size_t i = 0; i < eleIdNames.size(); ++i)
228  {
229  eleIdNames_.push_back(eleIdNames[i]);
230  if (addExtraId)
231  eleIdNames_.push_back(eleIdNames[i]+"extraId");
232  }
233 
234  addMESets(name);
235 
236  for (size_t i = 0; i < eleMESets_.size(); ++i)
237  {
238  setupMESet(eleMESets_[i], dbe, name+"_"+fullName(i));
239  LogDebug("TopElectronHLTOfflineSource") << "Booked MonitorElement with name " << name;
240  }
241 }
#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 242 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().

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

Member Data Documentation

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

Definition at line 131 of file TopElectronHLTOfflineSource.h.

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

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

Definition at line 126 of file TopElectronHLTOfflineSource.h.

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

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

Definition at line 124 of file TopElectronHLTOfflineSource.h.

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

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

Definition at line 128 of file TopElectronHLTOfflineSource.h.