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 Member Functions | Private Attributes | Friends
TtDilepEvtSolution Class Reference

#include <TtDilepEvtSolution.h>

Public Member Functions

bool getBestSol () const
 
pat::Jet getCalJetB () const
 
pat::Jet getCalJetBbar () const
 
pat::Electron getElectronm () const
 
pat::Electron getElectronp () const
 
double getFullResidual () const
 
const reco::GenParticlegetGenB () const
 
const reco::GenParticlegetGenBbar () const
 
const edm::RefProd< TtGenEvent > & getGenEvent () const
 
const reco::GenParticlegetGenLepm () const
 
const reco::GenParticlegetGenLepp () const
 
const reco::GenParticlegetGenN () const
 
const reco::GenParticlegetGenNbar () const
 
const reco::GenParticlegetGenT () const
 
const reco::GenParticlegetGenTbar () const
 
const reco::GenParticlegetGenWm () const
 
const reco::GenParticlegetGenWp () const
 
pat::Jet getJetB () const
 
pat::Jet getJetBbar () const
 
double getJetResidual () const
 
reco::Particle getLeptNeg () const
 
double getLeptonResidual () const
 
reco::Particle getLeptPos () const
 
double getLRSignalEvtLRval () const
 
double getLRSignalEvtObsVal (unsigned int) const
 
double getLRSignalEvtProb () const
 
pat::MET getMET () const
 
pat::Muon getMuonm () const
 
pat::Muon getMuonp () const
 
pat::Jet getRecJetB () const
 
pat::Jet getRecJetBbar () const
 
double getRecTopMass () const
 
double getRecWeightMax () const
 
pat::Tau getTaum () const
 
pat::Tau getTaup () const
 
std::string getWmDecay () const
 
std::string getWpDecay () const
 
 TtDilepEvtSolution ()
 
virtual ~TtDilepEvtSolution ()
 

Protected Member Functions

void setB (const edm::Handle< std::vector< pat::Jet > > &jet, int i)
 
void setBbar (const edm::Handle< std::vector< pat::Jet > > &jet, int i)
 
void setBestSol (bool bs)
 
void setElectronm (const edm::Handle< std::vector< pat::Electron > > &elec, int i)
 
void setElectronp (const edm::Handle< std::vector< pat::Electron > > &elec, int i)
 
void setGenEvt (const edm::Handle< TtGenEvent > &)
 
void setJetCorrectionScheme (int jetCorrScheme)
 
void setLRSignalEvtLRval (double clr)
 
void setLRSignalEvtObservables (const std::vector< std::pair< unsigned int, double > > &)
 
void setLRSignalEvtProb (double plr)
 
void setMET (const edm::Handle< std::vector< pat::MET > > &met, int i)
 
void setMuonm (const edm::Handle< std::vector< pat::Muon > > &muon, int i)
 
void setMuonp (const edm::Handle< std::vector< pat::Muon > > &muon, int i)
 
void setRecTopMass (double mass)
 
void setRecWeightMax (double wgt)
 
void setTaum (const edm::Handle< std::vector< pat::Tau > > &tau, int i)
 
void setTaup (const edm::Handle< std::vector< pat::Tau > > &tau, int i)
 

Private Attributes

bool bestSol_
 
edm::Ref< std::vector
< pat::Electron > > 
elecm_
 
edm::Ref< std::vector
< pat::Electron > > 
elecp_
 
edm::Ref< std::vector< pat::Jet > > jetB_
 
edm::Ref< std::vector< pat::Jet > > jetBbar_
 
int jetCorrScheme_
 
double lrSignalEvtLRval_
 
double lrSignalEvtProb_
 
std::vector< std::pair
< unsigned int, double > > 
lrSignalEvtVarVal_
 
edm::Ref< std::vector< pat::MET > > met_
 
edm::Ref< std::vector
< pat::Muon > > 
muonm_
 
edm::Ref< std::vector
< pat::Muon > > 
muonp_
 
edm::Ref< std::vector< pat::Tau > > taum_
 
edm::Ref< std::vector< pat::Tau > > taup_
 
edm::RefProd< TtGenEventtheGenEvt_
 
double topmass_
 
double weightmax_
 
std::string wmDecay_
 
std::string wpDecay_
 

Friends

class TtDilepEvtSolutionMaker
 
class TtDilepLRSignalSelObservables
 
class TtFullLepKinSolver
 
class TtLRSignalSelCalc
 

Detailed Description

Definition at line 25 of file TtDilepEvtSolution.h.

Constructor & Destructor Documentation

TtDilepEvtSolution::TtDilepEvtSolution ( )

Definition at line 8 of file TtDilepEvtSolution.cc.

References bestSol_, jetCorrScheme_, topmass_, weightmax_, wmDecay_, and wpDecay_.

9 {
10  jetCorrScheme_ = 0;
11  wpDecay_ = "NotDefined";
12  wmDecay_ = "NotDefined";
13  bestSol_ = false;
14  topmass_ = 0.;
15  weightmax_ = 0.;
16 }
TtDilepEvtSolution::~TtDilepEvtSolution ( )
virtual

Definition at line 18 of file TtDilepEvtSolution.cc.

19 {
20 }

Member Function Documentation

bool TtDilepEvtSolution::getBestSol ( ) const
inline

Definition at line 85 of file TtDilepEvtSolution.h.

pat::Jet TtDilepEvtSolution::getCalJetB ( ) const
inline

Definition at line 69 of file TtDilepEvtSolution.h.

Referenced by getJetResidual().

pat::Jet TtDilepEvtSolution::getCalJetBbar ( ) const
inline

Definition at line 71 of file TtDilepEvtSolution.h.

Referenced by getJetResidual().

pat::Electron TtDilepEvtSolution::getElectronm ( ) const
inline

Definition at line 43 of file TtDilepEvtSolution.h.

Referenced by getLeptNeg(), and getLeptonResidual().

pat::Electron TtDilepEvtSolution::getElectronp ( ) const
inline

Definition at line 42 of file TtDilepEvtSolution.h.

Referenced by getLeptonResidual(), and getLeptPos().

double TtDilepEvtSolution::getFullResidual ( ) const
inline

Definition at line 84 of file TtDilepEvtSolution.h.

const reco::GenParticle* TtDilepEvtSolution::getGenB ( ) const
inline

Definition at line 56 of file TtDilepEvtSolution.h.

Referenced by getJetResidual().

const reco::GenParticle* TtDilepEvtSolution::getGenBbar ( ) const
inline

Definition at line 61 of file TtDilepEvtSolution.h.

Referenced by getJetResidual().

const edm::RefProd<TtGenEvent>& TtDilepEvtSolution::getGenEvent ( ) const
inline

Definition at line 53 of file TtDilepEvtSolution.h.

const reco::GenParticle* TtDilepEvtSolution::getGenLepm ( ) const
inline

Definition at line 62 of file TtDilepEvtSolution.h.

Referenced by getLeptonResidual().

const reco::GenParticle* TtDilepEvtSolution::getGenLepp ( ) const
inline

Definition at line 57 of file TtDilepEvtSolution.h.

Referenced by getLeptonResidual().

const reco::GenParticle* TtDilepEvtSolution::getGenN ( ) const
inline

Definition at line 58 of file TtDilepEvtSolution.h.

const reco::GenParticle* TtDilepEvtSolution::getGenNbar ( ) const
inline

Definition at line 63 of file TtDilepEvtSolution.h.

const reco::GenParticle* TtDilepEvtSolution::getGenT ( ) const
inline

Definition at line 54 of file TtDilepEvtSolution.h.

const reco::GenParticle* TtDilepEvtSolution::getGenTbar ( ) const
inline

Definition at line 59 of file TtDilepEvtSolution.h.

const reco::GenParticle* TtDilepEvtSolution::getGenWm ( ) const
inline

Definition at line 60 of file TtDilepEvtSolution.h.

const reco::GenParticle* TtDilepEvtSolution::getGenWp ( ) const
inline

Definition at line 55 of file TtDilepEvtSolution.h.

pat::Jet TtDilepEvtSolution::getJetB ( ) const

Definition at line 25 of file TtDilepEvtSolution.cc.

References jetB_, and jetCorrScheme_.

26 {
27  // WARNING this is obsolete and only
28  // kept for backwards compatibility
29  if(jetCorrScheme_==1){
30  //jet calibrated according to MC truth
31  return jetB_->correctedJet("HAD", "B");
32  }
33  else if(jetCorrScheme_==2){
34  return jetB_->correctedJet("HAD", "B");
35  }
36  else{
37  return *jetB_;
38  }
39 }
edm::Ref< std::vector< pat::Jet > > jetB_
pat::Jet TtDilepEvtSolution::getJetBbar ( ) const

Definition at line 41 of file TtDilepEvtSolution.cc.

References jetBbar_, and jetCorrScheme_.

42 {
43  // WARNING this is obsolete and only
44  // kept for backwards compatibility
45  if(jetCorrScheme_==1){
46  //jet calibrated according to MC truth
47  return jetBbar_->correctedJet("HAD", "B");
48  }
49  else if(jetCorrScheme_==2){
50  return jetBbar_->correctedJet("HAD", "B");
51  }
52  else{
53  return *jetBbar_;
54  }
55 }
edm::Ref< std::vector< pat::Jet > > jetBbar_
double TtDilepEvtSolution::getJetResidual ( ) const

Definition at line 82 of file TtDilepEvtSolution.cc.

References reco::deltaR(), HLT_25ns10e33_v2_cff::distance, getCalJetB(), getCalJetBbar(), getGenB(), and getGenBbar().

83 {
84  double distance = 0.;
85  if(!getGenB() || !getGenBbar()) return distance;
86  distance += reco::deltaR(getCalJetB(),*getGenB());
87  distance += reco::deltaR(getCalJetBbar(),*getGenBbar());
88  return distance;
89 }
pat::Jet getCalJetBbar() const
const reco::GenParticle * getGenBbar() const
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:28
pat::Jet getCalJetB() const
const reco::GenParticle * getGenB() const
reco::Particle TtDilepEvtSolution::getLeptNeg ( ) const

Definition at line 114 of file TtDilepEvtSolution.cc.

References getElectronm(), getMuonm(), getTaum(), AlCaHLTBitMon_ParallelJobs::p, p4, reco::Particle::setPdgId(), and wmDecay_.

115 {
117  if(wmDecay_ == "electron"){
118  p = reco::Particle(-1, getElectronm().p4() );
119  p.setPdgId(11);
120  }
121  if(wmDecay_ == "muon"){
122  p = reco::Particle(-1, getMuonm().p4() );
123  p.setPdgId(13);
124  }
125  if(wmDecay_ == "tau"){
126  p = reco::Particle(-1, getTaum().p4() );
127  p.setPdgId(15);
128  }
129  return p;
130 }
pat::Electron getElectronm() const
double p4[4]
Definition: TauolaWrapper.h:92
pat::Muon getMuonm() const
pat::Tau getTaum() const
void setPdgId(int pdgId)
Definition: Particle.h:136
double TtDilepEvtSolution::getLeptonResidual ( ) const

Definition at line 91 of file TtDilepEvtSolution.cc.

References reco::deltaR(), HLT_25ns10e33_v2_cff::distance, getElectronm(), getElectronp(), getGenLepm(), getGenLepp(), getMuonm(), getMuonp(), getTaum(), getTaup(), getWmDecay(), and getWpDecay().

92 {
93  double distance = 0.;
94  if(!getGenLepp() || !getGenLepm()) return distance;
95  if(getWpDecay()=="electron")
96  distance += reco::deltaR(getElectronp(),*getGenLepp());
97  else if(getWpDecay()=="muon")
98  distance += reco::deltaR(getMuonp(),*getGenLepp());
99  else if(getWpDecay()=="tau")
100  distance += reco::deltaR(getTaup(),*getGenLepp());
101  if(getWmDecay()=="electron")
102  distance += reco::deltaR(getElectronm(),*getGenLepm());
103  else if(getWmDecay()=="muon")
104  distance += reco::deltaR(getMuonm(),*getGenLepm());
105  else if(getWmDecay()=="tau")
106  distance += reco::deltaR(getTaum(),*getGenLepm());
107  return distance;
108 }
const reco::GenParticle * getGenLepm() const
pat::Electron getElectronm() const
std::string getWmDecay() const
std::string getWpDecay() const
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:28
pat::Electron getElectronp() const
pat::Tau getTaup() const
pat::Muon getMuonm() const
pat::Tau getTaum() const
const reco::GenParticle * getGenLepp() const
pat::Muon getMuonp() const
reco::Particle TtDilepEvtSolution::getLeptPos ( ) const

Definition at line 61 of file TtDilepEvtSolution.cc.

References getElectronp(), getMuonp(), getTaup(), AlCaHLTBitMon_ParallelJobs::p, p4, reco::Particle::setPdgId(), wmDecay_, and wpDecay_.

62 {
64  if(wpDecay_ == "muon"){
65  p = reco::Particle(+1, getMuonp().p4() );
66  p.setPdgId(-11);
67  }
68  if(wpDecay_ == "electron"){
69  p = reco::Particle(+1, getElectronp().p4() );
70  p.setPdgId(-13);
71  }
72  if(wmDecay_ == "tau"){
73  p = reco::Particle(+1, getTaup().p4() );
74  p.setPdgId(-15);
75  }
76  return p;
77 }
double p4[4]
Definition: TauolaWrapper.h:92
pat::Electron getElectronp() const
pat::Tau getTaup() const
void setPdgId(int pdgId)
Definition: Particle.h:136
pat::Muon getMuonp() const
double TtDilepEvtSolution::getLRSignalEvtLRval ( ) const
inline

Definition at line 106 of file TtDilepEvtSolution.h.

double TtDilepEvtSolution::getLRSignalEvtObsVal ( unsigned int  selObs) const

Definition at line 136 of file TtDilepEvtSolution.cc.

References plotBeamSpotDB::first, i, and lrSignalEvtVarVal_.

137 {
138  double val = -999.;
139  for(size_t i=0; i<lrSignalEvtVarVal_.size(); i++){
140  if(lrSignalEvtVarVal_[i].first == selObs) val = lrSignalEvtVarVal_[i].second;
141  }
142  return val;
143 }
int i
Definition: DBlmapReader.cc:9
std::vector< std::pair< unsigned int, double > > lrSignalEvtVarVal_
double TtDilepEvtSolution::getLRSignalEvtProb ( ) const
inline

Definition at line 107 of file TtDilepEvtSolution.h.

pat::MET TtDilepEvtSolution::getMET ( ) const
inline

Definition at line 48 of file TtDilepEvtSolution.h.

pat::Muon TtDilepEvtSolution::getMuonm ( ) const
inline

Definition at line 45 of file TtDilepEvtSolution.h.

Referenced by getLeptNeg(), and getLeptonResidual().

pat::Muon TtDilepEvtSolution::getMuonp ( ) const
inline

Definition at line 44 of file TtDilepEvtSolution.h.

Referenced by getLeptonResidual(), and getLeptPos().

pat::Jet TtDilepEvtSolution::getRecJetB ( ) const
inline

Definition at line 68 of file TtDilepEvtSolution.h.

pat::Jet TtDilepEvtSolution::getRecJetBbar ( ) const
inline

Definition at line 70 of file TtDilepEvtSolution.h.

double TtDilepEvtSolution::getRecTopMass ( ) const
inline

Definition at line 86 of file TtDilepEvtSolution.h.

double TtDilepEvtSolution::getRecWeightMax ( ) const
inline

Definition at line 87 of file TtDilepEvtSolution.h.

pat::Tau TtDilepEvtSolution::getTaum ( ) const
inline

Definition at line 47 of file TtDilepEvtSolution.h.

Referenced by getLeptNeg(), and getLeptonResidual().

pat::Tau TtDilepEvtSolution::getTaup ( ) const
inline

Definition at line 46 of file TtDilepEvtSolution.h.

Referenced by getLeptonResidual(), and getLeptPos().

std::string TtDilepEvtSolution::getWmDecay ( ) const
inline

Definition at line 77 of file TtDilepEvtSolution.h.

Referenced by getLeptonResidual().

std::string TtDilepEvtSolution::getWpDecay ( ) const
inline

Definition at line 76 of file TtDilepEvtSolution.h.

Referenced by getLeptonResidual().

void TtDilepEvtSolution::setB ( const edm::Handle< std::vector< pat::Jet > > &  jet,
int  i 
)
inlineprotected

Definition at line 121 of file TtDilepEvtSolution.h.

void TtDilepEvtSolution::setBbar ( const edm::Handle< std::vector< pat::Jet > > &  jet,
int  i 
)
inlineprotected

Definition at line 123 of file TtDilepEvtSolution.h.

void TtDilepEvtSolution::setBestSol ( bool  bs)
inlineprotected

Definition at line 143 of file TtDilepEvtSolution.h.

void TtDilepEvtSolution::setElectronm ( const edm::Handle< std::vector< pat::Electron > > &  elec,
int  i 
)
inlineprotected

Definition at line 135 of file TtDilepEvtSolution.h.

void TtDilepEvtSolution::setElectronp ( const edm::Handle< std::vector< pat::Electron > > &  elec,
int  i 
)
inlineprotected

Definition at line 133 of file TtDilepEvtSolution.h.

void TtDilepEvtSolution::setGenEvt ( const edm::Handle< TtGenEvent > &  aGenEvt)
protected

Definition at line 148 of file TtDilepEvtSolution.cc.

References theGenEvt_.

148  {
149  if( !aGenEvt->isFullLeptonic() ){
150  edm::LogInfo( "TtGenEventNotFilled" ) << "genEvt is not di-leptonic; TtGenEvent is not filled";
151  return;
152  }
154 }
edm::RefProd< TtGenEvent > theGenEvt_
void TtDilepEvtSolution::setJetCorrectionScheme ( int  jetCorrScheme)
inlineprotected

Definition at line 119 of file TtDilepEvtSolution.h.

void TtDilepEvtSolution::setLRSignalEvtLRval ( double  clr)
inlineprotected

Definition at line 151 of file TtDilepEvtSolution.h.

void TtDilepEvtSolution::setLRSignalEvtObservables ( const std::vector< std::pair< unsigned int, double > > &  varval)
protected

Definition at line 159 of file TtDilepEvtSolution.cc.

References lrSignalEvtVarVal_.

160 {
161  lrSignalEvtVarVal_.clear();
162  for(size_t ise = 0; ise<varval.size(); ise++) lrSignalEvtVarVal_.push_back(varval[ise]);
163 }
std::vector< std::pair< unsigned int, double > > lrSignalEvtVarVal_
void TtDilepEvtSolution::setLRSignalEvtProb ( double  plr)
inlineprotected

Definition at line 152 of file TtDilepEvtSolution.h.

void TtDilepEvtSolution::setMET ( const edm::Handle< std::vector< pat::MET > > &  met,
int  i 
)
inlineprotected

Definition at line 137 of file TtDilepEvtSolution.h.

void TtDilepEvtSolution::setMuonm ( const edm::Handle< std::vector< pat::Muon > > &  muon,
int  i 
)
inlineprotected

Definition at line 127 of file TtDilepEvtSolution.h.

void TtDilepEvtSolution::setMuonp ( const edm::Handle< std::vector< pat::Muon > > &  muon,
int  i 
)
inlineprotected

Definition at line 125 of file TtDilepEvtSolution.h.

void TtDilepEvtSolution::setRecTopMass ( double  mass)
inlineprotected

Definition at line 144 of file TtDilepEvtSolution.h.

void TtDilepEvtSolution::setRecWeightMax ( double  wgt)
inlineprotected

Definition at line 145 of file TtDilepEvtSolution.h.

void TtDilepEvtSolution::setTaum ( const edm::Handle< std::vector< pat::Tau > > &  tau,
int  i 
)
inlineprotected

Definition at line 131 of file TtDilepEvtSolution.h.

void TtDilepEvtSolution::setTaup ( const edm::Handle< std::vector< pat::Tau > > &  tau,
int  i 
)
inlineprotected

Definition at line 129 of file TtDilepEvtSolution.h.

Friends And Related Function Documentation

friend class TtDilepEvtSolutionMaker
friend

Definition at line 28 of file TtDilepEvtSolution.h.

friend class TtDilepLRSignalSelObservables
friend

Definition at line 29 of file TtDilepEvtSolution.h.

friend class TtFullLepKinSolver
friend

Definition at line 27 of file TtDilepEvtSolution.h.

friend class TtLRSignalSelCalc
friend

Definition at line 30 of file TtDilepEvtSolution.h.

Member Data Documentation

bool TtDilepEvtSolution::bestSol_
private

Definition at line 172 of file TtDilepEvtSolution.h.

Referenced by TtDilepEvtSolution().

edm::Ref<std::vector<pat::Electron> > TtDilepEvtSolution::elecm_
private

Definition at line 160 of file TtDilepEvtSolution.h.

edm::Ref<std::vector<pat::Electron> > TtDilepEvtSolution::elecp_
private

Definition at line 160 of file TtDilepEvtSolution.h.

edm::Ref<std::vector<pat::Jet> > TtDilepEvtSolution::jetB_
private

Definition at line 163 of file TtDilepEvtSolution.h.

Referenced by getJetB().

edm::Ref<std::vector<pat::Jet> > TtDilepEvtSolution::jetBbar_
private

Definition at line 163 of file TtDilepEvtSolution.h.

Referenced by getJetBbar().

int TtDilepEvtSolution::jetCorrScheme_
private

Definition at line 169 of file TtDilepEvtSolution.h.

Referenced by getJetB(), getJetBbar(), and TtDilepEvtSolution().

double TtDilepEvtSolution::lrSignalEvtLRval_
private

Definition at line 176 of file TtDilepEvtSolution.h.

double TtDilepEvtSolution::lrSignalEvtProb_
private

Definition at line 176 of file TtDilepEvtSolution.h.

std::vector<std::pair<unsigned int, double> > TtDilepEvtSolution::lrSignalEvtVarVal_
private

Definition at line 177 of file TtDilepEvtSolution.h.

Referenced by getLRSignalEvtObsVal(), and setLRSignalEvtObservables().

edm::Ref<std::vector<pat::MET> > TtDilepEvtSolution::met_
private

Definition at line 164 of file TtDilepEvtSolution.h.

edm::Ref<std::vector<pat::Muon> > TtDilepEvtSolution::muonm_
private

Definition at line 161 of file TtDilepEvtSolution.h.

edm::Ref<std::vector<pat::Muon> > TtDilepEvtSolution::muonp_
private

Definition at line 161 of file TtDilepEvtSolution.h.

edm::Ref<std::vector<pat::Tau> > TtDilepEvtSolution::taum_
private

Definition at line 162 of file TtDilepEvtSolution.h.

edm::Ref<std::vector<pat::Tau> > TtDilepEvtSolution::taup_
private

Definition at line 162 of file TtDilepEvtSolution.h.

edm::RefProd<TtGenEvent> TtDilepEvtSolution::theGenEvt_
private

Definition at line 152 of file TtDilepEvtSolution.h.

Referenced by setGenEvt().

double TtDilepEvtSolution::topmass_
private

Definition at line 173 of file TtDilepEvtSolution.h.

Referenced by TtDilepEvtSolution().

double TtDilepEvtSolution::weightmax_
private

Definition at line 174 of file TtDilepEvtSolution.h.

Referenced by TtDilepEvtSolution().

std::string TtDilepEvtSolution::wmDecay_
private

Definition at line 171 of file TtDilepEvtSolution.h.

Referenced by getLeptNeg(), getLeptPos(), and TtDilepEvtSolution().

std::string TtDilepEvtSolution::wpDecay_
private

Definition at line 170 of file TtDilepEvtSolution.h.

Referenced by getLeptPos(), and TtDilepEvtSolution().