CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 > Struct Template Reference

Public Member Functions

void bookHistograms (DQMStore &dqmStore)
 
void fillHistograms (int numJets, const edm::Event &evt, double evtWeight)
 
 leptonL1TriggerEfficiencyT1T2 (int minJets, int maxJets, const edm::InputTag &srcRef, const std::string &cutRef, const edm::InputTag &srcL1, const std::string &cutL1, double dRmatch, const std::string &dqmDirectory)
 
 ~leptonL1TriggerEfficiencyT1T2 ()
 

Public Attributes

StringCutObjectSelector< T2 > * cutL1_
 
StringCutObjectSelector< T1 > * cutRef_
 
std::string dqmDirectory_
 
double dRmatch_
 
MonitorElementhistogramDenominatorEta_
 
MonitorElementhistogramDenominatorPhi_
 
MonitorElementhistogramDenominatorPt_
 
MonitorElementhistogramNumeratorEta_
 
MonitorElementhistogramNumeratorPhi_
 
MonitorElementhistogramNumeratorPt_
 
int maxJets_
 
int minJets_
 
edm::InputTag srcL1_
 
edm::InputTag srcRef_
 

Detailed Description

template<typename T1, typename T2>
struct MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >

Definition at line 1164 of file MCEmbeddingValidationAnalyzer.h.

Constructor & Destructor Documentation

template<typename T1, typename T2>
MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::leptonL1TriggerEfficiencyT1T2 ( int  minJets,
int  maxJets,
const edm::InputTag srcRef,
const std::string &  cutRef,
const edm::InputTag srcL1,
const std::string &  cutL1,
double  dRmatch,
const std::string &  dqmDirectory 
)
inline

Definition at line 1166 of file MCEmbeddingValidationAnalyzer.h.

References MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::cutL1_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::cutRef_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::dqmDirectory_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::maxJets_, and MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::minJets_.

1168  : minJets_(minJets),
1169  maxJets_(maxJets),
1170  srcRef_(srcRef),
1171  cutRef_(0),
1172  srcL1_(srcL1),
1173  cutL1_(0),
1174  dRmatch_(dRmatch)
1175  {
1176  if ( cutRef != "" ) cutRef_ = new StringCutObjectSelector<T1>(cutRef);
1177  if ( cutL1 != "" ) cutL1_ = new StringCutObjectSelector<T2>(cutL1);
1178  dqmDirectory_ = dqmDirectory;
1179  if ( minJets_ < 0 && maxJets_ < 0 ) dqmDirectory_.append("");
1180  else if ( maxJets_ < 0 ) dqmDirectory_.append(Form("_numJetsGe%i", minJets_));
1181  else if ( minJets_ < 0 ) dqmDirectory_.append(Form("_numJetsLe%i", maxJets_));
1182  else if ( maxJets_ == minJets_ ) dqmDirectory_.append(Form("_numJetsEq%i", minJets_));
1183  else dqmDirectory_.append(Form("_numJets%ito%i", minJets_, maxJets_));
1184  }
template<typename T1, typename T2>
MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::~leptonL1TriggerEfficiencyT1T2 ( )
inline

Member Function Documentation

template<typename T1, typename T2>
void MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::bookHistograms ( DQMStore dqmStore)
inline

Definition at line 1190 of file MCEmbeddingValidationAnalyzer.h.

References DQMStore::book1D(), MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::dqmDirectory_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramDenominatorEta_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramDenominatorPhi_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramDenominatorPt_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramNumeratorEta_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramNumeratorPhi_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramNumeratorPt_, Pi, and DQMStore::setCurrentFolder().

1191  {
1192  dqmStore.setCurrentFolder(dqmDirectory_.data());
1193  histogramNumeratorPt_ = dqmStore.book1D("numeratorPt", "numeratorPt", 250, 0., 250.);
1194  histogramDenominatorPt_ = dqmStore.book1D("denominatorPt", "denominatorPt", 250, 0., 250.);
1195  histogramNumeratorEta_ = dqmStore.book1D("numeratorEta", "numeratorEta", 198, -9.9, +9.9);
1196  histogramDenominatorEta_ = dqmStore.book1D("denominatorEta", "denominatorEta", 198, -9.9, +9.9);
1197  histogramNumeratorPhi_ = dqmStore.book1D("numeratorPhi", "numeratorPhi", 72, -TMath::Pi(), +TMath::Pi());
1198  histogramDenominatorPhi_ = dqmStore.book1D("denominatorPhi", "denominatorPhi", 72, -TMath::Pi(), +TMath::Pi());
1199  }
const double Pi
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
template<typename T1, typename T2>
void MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::fillHistograms ( int  numJets,
const edm::Event evt,
double  evtWeight 
)
inline

Definition at line 1200 of file MCEmbeddingValidationAnalyzer.h.

References MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::cutL1_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::cutRef_, deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::dRmatch_, MonitorElement::Fill(), edm::Event::getByLabel(), MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramDenominatorEta_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramDenominatorPhi_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramDenominatorPt_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramNumeratorEta_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramNumeratorPhi_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramNumeratorPt_, trackerHitRTTI::isMatched(), MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::maxJets_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::minJets_, MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::srcL1_, and MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::srcRef_.

1202  {
1203  if ( (minJets_ == -1 || numJets >= minJets_) &&
1204  (maxJets_ == -1 || numJets <= maxJets_) ) {
1205  typedef std::vector<T1> refLeptonCollection;
1207  evt.getByLabel(srcRef_, refLeptons);
1208  typedef std::vector<T2> l1LeptonCollection;
1210  evt.getByLabel(srcL1_, l1Leptons);
1211  for ( typename refLeptonCollection::const_iterator refLepton = refLeptons->begin();
1212  refLepton != refLeptons->end(); ++refLepton ) {
1213  if ( cutRef_ && !(*cutRef_)(*refLepton) ) continue;
1214  bool isMatched = false;
1215  for ( typename l1LeptonCollection::const_iterator l1Lepton = l1Leptons->begin();
1216  l1Lepton != l1Leptons->end(); ++l1Lepton ) {
1217  if ( cutL1_ && !(*cutL1_)(*l1Lepton) ) continue;
1218  double dR = deltaR(refLepton->p4(), l1Lepton->p4());
1219  if ( dR < dRmatch_ ) isMatched = true;
1220  }
1221  histogramDenominatorPt_->Fill(refLepton->pt(), evtWeight);
1222  histogramDenominatorEta_->Fill(refLepton->eta(), evtWeight);
1223  histogramDenominatorPhi_->Fill(refLepton->phi(), evtWeight);
1224  if ( isMatched ) {
1225  histogramNumeratorPt_->Fill(refLepton->pt(), evtWeight);
1226  histogramNumeratorEta_->Fill(refLepton->eta(), evtWeight);
1227  histogramNumeratorPhi_->Fill(refLepton->phi(), evtWeight);
1228  }
1229  }
1230  }
1231  }
void Fill(long long x)
bool isMatched(TrackingRecHit const &hit)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17

Member Data Documentation

template<typename T1, typename T2>
StringCutObjectSelector<T2>* MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::cutL1_
template<typename T1, typename T2>
StringCutObjectSelector<T1>* MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::cutRef_
template<typename T1, typename T2>
std::string MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::dqmDirectory_
template<typename T1, typename T2>
double MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::dRmatch_
template<typename T1, typename T2>
MonitorElement* MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramDenominatorEta_
template<typename T1, typename T2>
MonitorElement* MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramDenominatorPhi_
template<typename T1, typename T2>
MonitorElement* MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramDenominatorPt_
template<typename T1, typename T2>
MonitorElement* MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramNumeratorEta_
template<typename T1, typename T2>
MonitorElement* MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramNumeratorPhi_
template<typename T1, typename T2>
MonitorElement* MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::histogramNumeratorPt_
template<typename T1, typename T2>
int MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::maxJets_
template<typename T1, typename T2>
int MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::minJets_
template<typename T1, typename T2>
edm::InputTag MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::srcL1_
template<typename T1, typename T2>
edm::InputTag MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::srcRef_