CMS 3D CMS Logo

List of all members | Public Member Functions
TtFullHadronicEvent Class Reference

Class derived from the TtEvent for the full hadronic decay channel. More...

#include "AnalysisDataFormats/TopObjects/interface/TtFullHadronicEvent.h"

Inheritance diagram for TtFullHadronicEvent:
TtEvent

Public Member Functions

const reco::Candidateb (const std::string &key, const unsigned &cmb=0) const
 get b of the given hypothesis More...
 
const reco::Candidateb (const HypoClassKey &key, const unsigned &cmb=0) const
 get b of the given hypothesis More...
 
const reco::GenParticleb () const
 get b of the TtGenEvent More...
 
const reco::CandidatebBar (const std::string &key, const unsigned &cmb=0) const
 get anti-b of the given hypothesis More...
 
const reco::CandidatebBar (const HypoClassKey &key, const unsigned &cmb=0) const
 get anti-b of the given hypothesis More...
 
const reco::GenParticlebBar () const
 get anti-b of the TtGenEvent More...
 
const reco::CandidatelightP (const std::string &key, const unsigned &cmb=0) const
 get light P of the given hypothesis More...
 
const reco::CandidatelightP (const HypoClassKey &key, const unsigned &cmb=0) const
 get light P of the given hypothesis More...
 
const reco::GenParticlelightP () const
 get light P of the TtGenEvent More...
 
const reco::CandidatelightPBar (const std::string &key, const unsigned &cmb=0) const
 get light P bar of the given hypothesis More...
 
const reco::CandidatelightPBar (const HypoClassKey &key, const unsigned &cmb=0) const
 get light P bar of the given hypothesis More...
 
const reco::GenParticlelightPBar () const
 get light P bar of the TtGenEvent More...
 
const reco::CandidatelightQ (const std::string &key, const unsigned &cmb=0) const
 get light Q of the given hypothesis More...
 
const reco::CandidatelightQ (const HypoClassKey &key, const unsigned &cmb=0) const
 get light Q of the given hypothesis More...
 
const reco::GenParticlelightQ () const
 get light Q of the TtGenEvent More...
 
const reco::CandidatelightQBar (const std::string &key, const unsigned &cmb=0) const
 get light Q bar of the given hypothesis More...
 
const reco::CandidatelightQBar (const HypoClassKey &key, const unsigned &cmb=0) const
 get light Q bar of the given hypothesis More...
 
const reco::GenParticlelightQBar () const
 get light Q bar of the TtGenEvent More...
 
void print (const int verbosity=1) const
 
const reco::Candidatetop (const std::string &key, const unsigned &cmb=0) const
 get top of the given hypothesis More...
 
const reco::Candidatetop (const HypoClassKey &key, const unsigned &cmb=0) const
 get top of the given hypothesis More...
 
const reco::GenParticletop () const
 get top of the TtGenEvent More...
 
const reco::CandidatetopBar (const std::string &key, const unsigned &cmb=0) const
 get anti-top of the given hypothesis More...
 
const reco::CandidatetopBar (const HypoClassKey &key, const unsigned &cmb=0) const
 get anti-top of the given hypothesis More...
 
const reco::GenParticletopBar () const
 get anti-top of the TtGenEvent More...
 
 TtFullHadronicEvent ()
 empty constructor More...
 
const reco::CandidatewMinus (const std::string &key, const unsigned &cmb=0) const
 get Wminus of the given hypothesis More...
 
const reco::CandidatewMinus (const HypoClassKey &key, const unsigned &cmb=0) const
 get Wminus of the given hypothesis More...
 
const reco::GenParticlewMinus () const
 get Wminus of the TtGenEvent More...
 
const reco::CandidatewPlus (const std::string &key, const unsigned &cmb=0) const
 get Wplus of the given hypothesis More...
 
const reco::CandidatewPlus (const HypoClassKey &key, const unsigned &cmb=0) const
 get Wplus of the given hypothesis More...
 
const reco::GenParticlewPlus () const
 get Wplus of the TtGenEvent More...
 
 ~TtFullHadronicEvent () override
 default destructor More...
 
- Public Member Functions inherited from TtEvent
void addEventHypo (const HypoClassKey &key, const HypoCombPair &hyp)
 add new hypotheses More...
 
int correspondingHypo (const std::string &key1, const unsigned &hyp1, const std::string &key2) const
 return the hypothesis in hypothesis class 'key2', which corresponds to hypothesis 'hyp1' in hypothesis class 'key1' More...
 
int correspondingHypo (const HypoClassKey &key1, const unsigned &hyp1, const HypoClassKey &key2) const
 return the hypothesis in hypothesis class 'key2', which corresponds to hypothesis 'hyp1' in hypothesis class 'key1' More...
 
const reco::CompositeCandidateeventHypo (const HypoClassKey &key, const unsigned &cmb=0) const
 
double fitChi2 (const unsigned &cmb=0) const
 return the chi2 of the kinematic fit of hypothesis 'cmb' if available; -1 else More...
 
double fitProb (const unsigned &cmb=0) const
 return the fit probability of hypothesis 'cmb' if available; -1 else More...
 
const edm::RefProd< TtGenEvent > & genEvent () const
 get TtGenEvent More...
 
double genMatchSumDR (const unsigned &cmb=0) const
 return the sum dr of the generator match if available; -1 else More...
 
double genMatchSumPt (const unsigned &cmb=0) const
 return the sum pt of the generator match if available; -1 else More...
 
double hitFitChi2 (const unsigned &cmb=0) const
 return the hitfit chi2 of hypothesis 'cmb' if available; -1 else More...
 
double hitFitMT (const unsigned &cmb=0) const
 return the hitfit top mass of hypothesis 'cmb' if available; -1 else More...
 
double hitFitProb (const unsigned &cmb=0) const
 return the hitfit probability of hypothesis 'cmb' if available; -1 else More...
 
double hitFitSigMT (const unsigned &cmb=0) const
 return the hitfit top mass uncertainty of hypothesis 'cmb' if available; -1 else More...
 
bool isHypoAvailable (const std::string &key, const unsigned &cmb=0) const
 
bool isHypoAvailable (const HypoClassKey &key, const unsigned &cmb=0) const
 check if hypothesis 'cmb' is available within the hypothesis class More...
 
bool isHypoClassAvailable (const std::string &key) const
 check if hypothesis class 'key' was added to the event structure More...
 
bool isHypoClassAvailable (const HypoClassKey &key) const
 check if hypothesis class 'key' was added to the event structure More...
 
bool isHypoValid (const std::string &key, const unsigned &cmb=0) const
 check if hypothesis 'cmb' within the hypothesis class was valid; if not it lead to an empty CompositeCandidate More...
 
bool isHypoValid (const HypoClassKey &key, const unsigned &cmb=0) const
 check if hypothesis 'cmb' within the hypothesis class was valid; if not it lead to an empty CompositeCandidate More...
 
std::vector< int > jetLeptonCombination (const std::string &key, const unsigned &cmb=0) const
 return the vector of jet lepton combinatorics for a given hypothesis and class More...
 
std::vector< int > jetLeptonCombination (const HypoClassKey &key, const unsigned &cmb=0) const
 return the vector of jet lepton combinatorics for a given hypothesis and class More...
 
std::pair< WDecay::LeptonType, WDecay::LeptonTypelepDecays () const
 get leptonic decay channels More...
 
double mvaDisc (const unsigned &cmb=0) const
 return the mva discriminant value of hypothesis 'cmb' if available; -1 else More...
 
std::string mvaMethod () const
 return the label of the mva method in use for the jet parton association (if kMVADisc is not available the string is empty) More...
 
unsigned int numberOfAvailableHypoClasses () const
 return number of available hypothesis classes More...
 
unsigned int numberOfAvailableHypos (const std::string &key) const
 return number of available hypotheses within a given hypothesis class More...
 
unsigned int numberOfAvailableHypos (const HypoClassKey &key) const
 return number of available hypotheses within a given hypothesis class More...
 
int numberOfConsideredJets (const std::string &key) const
 return number of jets that were considered when building a given hypothesis More...
 
int numberOfConsideredJets (const HypoClassKey &key) const
 return number of jets that were considered when building a given hypothesis More...
 
void setFitChi2 (const std::vector< double > &val)
 set chi2 of kKinFit hypothesis More...
 
void setFitProb (const std::vector< double > &val)
 set fit probability of kKinFit hypothesis More...
 
void setGenEvent (const edm::Handle< TtGenEvent > &evt)
 set TtGenEvent More...
 
void setGenMatchSumDR (const std::vector< double > &val)
 set sum dr of kGenMatch hypothesis More...
 
void setGenMatchSumPt (const std::vector< double > &val)
 set sum pt of kGenMatch hypothesis More...
 
void setHitFitChi2 (const std::vector< double > &val)
 set chi2 of kHitFit hypothesis More...
 
void setHitFitMT (const std::vector< double > &val)
 set fitted top mass of kHitFit hypothesis More...
 
void setHitFitProb (const std::vector< double > &val)
 set fit probability of kHitFit hypothesis More...
 
void setHitFitSigMT (const std::vector< double > &val)
 set fitted top mass uncertainty of kHitFit hypothesis More...
 
void setLepDecays (const WDecay::LeptonType &lepDecTop1, const WDecay::LeptonType &lepDecTop2)
 set leptonic decay channels More...
 
void setMvaDiscriminators (const std::vector< double > &val)
 set mva discriminant values of kMVADisc hypothesis More...
 
void setMvaMethod (const std::string &name)
 set label of mva method for kMVADisc hypothesis More...
 
void setNumberOfConsideredJets (const HypoClassKey &key, const unsigned int nJets)
 set number of jets considered when building a given hypothesis More...
 
const reco::CandidatetopPair (const std::string &key, const unsigned &cmb=0) const
 get combined 4-vector of top and topBar of the given hypothesis More...
 
const reco::CandidatetopPair (const HypoClassKey &key, const unsigned &cmb=0) const
 get combined 4-vector of top and topBar of the given hypothesis More...
 
const math::XYZTLorentzVectortopPair () const
 get combined 4-vector of top and topBar from the TtGenEvent More...
 
 TtEvent ()
 empty constructor More...
 
virtual ~TtEvent ()
 default destructor More...
 

Additional Inherited Members

- Public Types inherited from TtEvent
enum  HypoClassKey {
  kGeom, kWMassMaxSumPt, kMaxSumPtWMass, kGenMatch,
  kMVADisc, kKinFit, kKinSolution, kWMassDeltaTopMass,
  kHitFit
}
 supported classes of event hypotheses More...
 
typedef std::pair< reco::CompositeCandidate, std::vector< int > > HypoCombPair
 pair of hypothesis and lepton jet combinatorics for a given hypothesis More...
 
- Protected Member Functions inherited from TtEvent
HypoClassKey hypoClassKeyFromString (const std::string &label) const
 return the corresponding enum value from a string More...
 
- Protected Attributes inherited from TtEvent
std::map< HypoClassKey, std::vector< HypoCombPair > > evtHyp_
 
std::vector< double > fitChi2_
 result of kinematic fit More...
 
std::vector< double > fitProb_
 result of kinematic fit More...
 
edm::RefProd< TtGenEventgenEvt_
 reference to TtGenEvent (has to be kept in the event!) More...
 
std::vector< double > genMatchSumDR_
 result of gen match More...
 
std::vector< double > genMatchSumPt_
 result of gen match More...
 
std::vector< double > hitFitChi2_
 
std::vector< double > hitFitMT_
 result of hitfit More...
 
std::vector< double > hitFitProb_
 
std::vector< double > hitFitSigMT_
 
std::pair< WDecay::LeptonType, WDecay::LeptonTypelepDecays_
 leptonic decay channels More...
 
std::vector< double > mvaDisc_
 MVA discriminants. More...
 
std::string mvaMethod_
 label of the MVA method More...
 
std::map< HypoClassKey, int > nJetsConsidered_
 number of jets considered when building the hypotheses More...
 

Detailed Description

Class derived from the TtEvent for the full hadronic decay channel.

The structure holds information on the hadronic decay channels, all event hypotheses of different classes (user defined during production) and a reference to the TtGenEvent (if available). It provides access and administration.

Definition at line 25 of file TtFullHadronicEvent.h.

Constructor & Destructor Documentation

◆ TtFullHadronicEvent()

TtFullHadronicEvent::TtFullHadronicEvent ( )
inline

empty constructor

Definition at line 28 of file TtFullHadronicEvent.h.

28 {};

◆ ~TtFullHadronicEvent()

TtFullHadronicEvent::~TtFullHadronicEvent ( )
inlineoverride

default destructor

Definition at line 30 of file TtFullHadronicEvent.h.

30 {};

Member Function Documentation

◆ b() [1/3]

const reco::Candidate* TtFullHadronicEvent::b ( const std::string &  key,
const unsigned &  cmb = 0 
) const
inline

get b of the given hypothesis

Definition at line 41 of file TtFullHadronicEvent.h.

References b(), TtEvent::hypoClassKeyFromString(), and crabWrapper::key.

41  {
42  return b(hypoClassKeyFromString(key), cmb);
43  };
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:15
const reco::GenParticle * b() const
get b of the TtGenEvent

◆ b() [2/3]

const reco::Candidate* TtFullHadronicEvent::b ( const HypoClassKey key,
const unsigned &  cmb = 0 
) const
inline

get b of the given hypothesis

Definition at line 45 of file TtFullHadronicEvent.h.

References TtFullHadDaughter::B, reco::CompositeRefCandidateT< D >::daughter(), TtEvent::isHypoValid(), crabWrapper::key, and top().

45  {
46  return !isHypoValid(key, cmb) ? nullptr : top(key, cmb)->daughter(TtFullHadDaughter::B);
47  };
static const std::string B
bool isHypoValid(const std::string &key, const unsigned &cmb=0) const
check if hypothesis &#39;cmb&#39; within the hypothesis class was valid; if not it lead to an empty Composite...
Definition: TtEvent.h:78
const reco::GenParticle * top() const
get top of the TtGenEvent
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...

◆ b() [3/3]

const reco::GenParticle* TtFullHadronicEvent::b ( ) const
inline

get b of the TtGenEvent

Definition at line 123 of file TtFullHadronicEvent.h.

References b(), TtEvent::genEvent(), and TtEvent::genEvt_.

Referenced by b(), and print().

123 { return (!genEvt_ ? nullptr : this->genEvent()->b()); };
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:63
const reco::GenParticle * b() const
get b of the TtGenEvent
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:188

◆ bBar() [1/3]

const reco::Candidate* TtFullHadronicEvent::bBar ( const std::string &  key,
const unsigned &  cmb = 0 
) const
inline

get anti-b of the given hypothesis

Definition at line 85 of file TtFullHadronicEvent.h.

References bBar(), TtEvent::hypoClassKeyFromString(), and crabWrapper::key.

85  {
86  return bBar(hypoClassKeyFromString(key), cmb);
87  };
const reco::GenParticle * bBar() const
get anti-b of the TtGenEvent
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:15

◆ bBar() [2/3]

const reco::Candidate* TtFullHadronicEvent::bBar ( const HypoClassKey key,
const unsigned &  cmb = 0 
) const
inline

get anti-b of the given hypothesis

Definition at line 89 of file TtFullHadronicEvent.h.

References TtFullHadDaughter::BBar, reco::CompositeRefCandidateT< D >::daughter(), TtEvent::isHypoValid(), crabWrapper::key, and topBar().

89  {
90  return !isHypoValid(key, cmb) ? nullptr : topBar(key, cmb)->daughter(TtFullHadDaughter::BBar);
91  };
static const std::string BBar
bool isHypoValid(const std::string &key, const unsigned &cmb=0) const
check if hypothesis &#39;cmb&#39; within the hypothesis class was valid; if not it lead to an empty Composite...
Definition: TtEvent.h:78
const reco::GenParticle * topBar() const
get anti-top of the TtGenEvent
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...

◆ bBar() [3/3]

const reco::GenParticle* TtFullHadronicEvent::bBar ( ) const
inline

get anti-b of the TtGenEvent

Definition at line 136 of file TtFullHadronicEvent.h.

References bBar(), TtEvent::genEvent(), and TtEvent::genEvt_.

Referenced by bBar(), and print().

136 { return (!genEvt_ ? nullptr : this->genEvent()->bBar()); };
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:63
const reco::GenParticle * bBar() const
get anti-b of the TtGenEvent
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:188

◆ lightP() [1/3]

const reco::Candidate* TtFullHadronicEvent::lightP ( const std::string &  key,
const unsigned &  cmb = 0 
) const
inline

get light P of the given hypothesis

Definition at line 59 of file TtFullHadronicEvent.h.

References TtEvent::hypoClassKeyFromString(), crabWrapper::key, and lightP().

59  {
60  return lightP(hypoClassKeyFromString(key), cmb);
61  };
const reco::GenParticle * lightP() const
get light P of the TtGenEvent
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:15

◆ lightP() [2/3]

const reco::Candidate* TtFullHadronicEvent::lightP ( const HypoClassKey key,
const unsigned &  cmb = 0 
) const
inline

get light P of the given hypothesis

Definition at line 63 of file TtFullHadronicEvent.h.

References reco::CompositeRefCandidateT< D >::daughter(), TtEvent::isHypoValid(), crabWrapper::key, TtFullHadDaughter::LightP, and wMinus().

63  {
64  return !isHypoValid(key, cmb) ? nullptr : wMinus(key, cmb)->daughter(TtFullHadDaughter::LightP);
65  };
static const std::string LightP
const reco::GenParticle * wMinus() const
get Wminus of the TtGenEvent
bool isHypoValid(const std::string &key, const unsigned &cmb=0) const
check if hypothesis &#39;cmb&#39; within the hypothesis class was valid; if not it lead to an empty Composite...
Definition: TtEvent.h:78
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...

◆ lightP() [3/3]

const reco::GenParticle* TtFullHadronicEvent::lightP ( ) const
inline

get light P of the TtGenEvent

Definition at line 128 of file TtFullHadronicEvent.h.

References TtEvent::genEvent(), and TtEvent::genEvt_.

Referenced by lightP(), and print().

128 { return (!genEvt_ ? nullptr : this->genEvent()->daughterQuarkOfWMinus()); };
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:63
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:188

◆ lightPBar() [1/3]

const reco::Candidate* TtFullHadronicEvent::lightPBar ( const std::string &  key,
const unsigned &  cmb = 0 
) const
inline

get light P bar of the given hypothesis

Definition at line 103 of file TtFullHadronicEvent.h.

References TtEvent::hypoClassKeyFromString(), crabWrapper::key, and lightPBar().

103  {
104  return lightPBar(hypoClassKeyFromString(key), cmb);
105  };
const reco::GenParticle * lightPBar() const
get light P bar of the TtGenEvent
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:15

◆ lightPBar() [2/3]

const reco::Candidate* TtFullHadronicEvent::lightPBar ( const HypoClassKey key,
const unsigned &  cmb = 0 
) const
inline

get light P bar of the given hypothesis

Definition at line 107 of file TtFullHadronicEvent.h.

References reco::CompositeRefCandidateT< D >::daughter(), TtEvent::isHypoValid(), crabWrapper::key, TtFullHadDaughter::LightPBar, and wMinus().

107  {
108  return !isHypoValid(key, cmb) ? nullptr : wMinus(key, cmb)->daughter(TtFullHadDaughter::LightPBar);
109  };
static const std::string LightPBar
const reco::GenParticle * wMinus() const
get Wminus of the TtGenEvent
bool isHypoValid(const std::string &key, const unsigned &cmb=0) const
check if hypothesis &#39;cmb&#39; within the hypothesis class was valid; if not it lead to an empty Composite...
Definition: TtEvent.h:78
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...

◆ lightPBar() [3/3]

const reco::GenParticle* TtFullHadronicEvent::lightPBar ( ) const
inline

get light P bar of the TtGenEvent

Definition at line 143 of file TtFullHadronicEvent.h.

References TtEvent::genEvent(), and TtEvent::genEvt_.

Referenced by lightPBar(), and print().

143  {
144  return (!genEvt_ ? nullptr : this->genEvent()->daughterQuarkBarOfWMinus());
145  };
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:63
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:188

◆ lightQ() [1/3]

const reco::Candidate* TtFullHadronicEvent::lightQ ( const std::string &  key,
const unsigned &  cmb = 0 
) const
inline

get light Q of the given hypothesis

Definition at line 50 of file TtFullHadronicEvent.h.

References TtEvent::hypoClassKeyFromString(), crabWrapper::key, and lightQ().

50  {
51  return lightQ(hypoClassKeyFromString(key), cmb);
52  };
const reco::GenParticle * lightQ() const
get light Q of the TtGenEvent
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:15

◆ lightQ() [2/3]

const reco::Candidate* TtFullHadronicEvent::lightQ ( const HypoClassKey key,
const unsigned &  cmb = 0 
) const
inline

get light Q of the given hypothesis

Definition at line 54 of file TtFullHadronicEvent.h.

References reco::CompositeRefCandidateT< D >::daughter(), TtEvent::isHypoValid(), crabWrapper::key, TtFullHadDaughter::LightQ, and wPlus().

54  {
55  return !isHypoValid(key, cmb) ? nullptr : wPlus(key, cmb)->daughter(TtFullHadDaughter::LightQ);
56  };
static const std::string LightQ
bool isHypoValid(const std::string &key, const unsigned &cmb=0) const
check if hypothesis &#39;cmb&#39; within the hypothesis class was valid; if not it lead to an empty Composite...
Definition: TtEvent.h:78
const reco::GenParticle * wPlus() const
get Wplus of the TtGenEvent
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...

◆ lightQ() [3/3]

const reco::GenParticle* TtFullHadronicEvent::lightQ ( ) const
inline

get light Q of the TtGenEvent

Definition at line 126 of file TtFullHadronicEvent.h.

References TtEvent::genEvent(), and TtEvent::genEvt_.

Referenced by lightQ(), and print().

126 { return (!genEvt_ ? nullptr : this->genEvent()->daughterQuarkOfWPlus()); };
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:63
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:188

◆ lightQBar() [1/3]

const reco::Candidate* TtFullHadronicEvent::lightQBar ( const std::string &  key,
const unsigned &  cmb = 0 
) const
inline

get light Q bar of the given hypothesis

Definition at line 94 of file TtFullHadronicEvent.h.

References TtEvent::hypoClassKeyFromString(), crabWrapper::key, and lightQBar().

94  {
95  return lightQBar(hypoClassKeyFromString(key), cmb);
96  };
const reco::GenParticle * lightQBar() const
get light Q bar of the TtGenEvent
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:15

◆ lightQBar() [2/3]

const reco::Candidate* TtFullHadronicEvent::lightQBar ( const HypoClassKey key,
const unsigned &  cmb = 0 
) const
inline

get light Q bar of the given hypothesis

Definition at line 98 of file TtFullHadronicEvent.h.

References reco::CompositeRefCandidateT< D >::daughter(), TtEvent::isHypoValid(), crabWrapper::key, TtFullHadDaughter::LightQBar, and wPlus().

98  {
99  return !isHypoValid(key, cmb) ? nullptr : wPlus(key, cmb)->daughter(TtFullHadDaughter::LightQBar);
100  };
bool isHypoValid(const std::string &key, const unsigned &cmb=0) const
check if hypothesis &#39;cmb&#39; within the hypothesis class was valid; if not it lead to an empty Composite...
Definition: TtEvent.h:78
static const std::string LightQBar
const reco::GenParticle * wPlus() const
get Wplus of the TtGenEvent
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...

◆ lightQBar() [3/3]

const reco::GenParticle* TtFullHadronicEvent::lightQBar ( ) const
inline

get light Q bar of the TtGenEvent

Definition at line 139 of file TtFullHadronicEvent.h.

References TtEvent::genEvent(), and TtEvent::genEvt_.

Referenced by lightQBar(), and print().

139  {
140  return (!genEvt_ ? nullptr : this->genEvent()->daughterQuarkBarOfWPlus());
141  };
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:63
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:188

◆ print()

void TtFullHadronicEvent::print ( const int  verbosity = 1) const

print full content of the structure as formated LogInfo to the MessageLogger output for debugging

Definition at line 9 of file TtFullHadronicEvent.cc.

References TtFullHadEvtPartons::B, b(), TtFullHadEvtPartons::BBar, bBar(), TtEvent::evtHyp_, TtEvent::fitChi2(), TtEvent::fitProb(), TtEvent::genEvent(), TtEvent::genEvt_, TtEvent::genMatchSumDR(), TtEvent::genMatchSumPt(), heavyIonCSV_trainingSettings::idx, TtEvent::isHypoValid(), TtEvent::jetLeptonCombination(), PDWG_EXODelayedJetMET_cff::jets, TtEvent::kGenMatch, TtEvent::kGeom, TtEvent::kHitFit, TtEvent::kKinFit, TtEvent::kKinSolution, TtEvent::kMaxSumPtWMass, TtEvent::kMVADisc, TtEvent::kWMassDeltaTopMass, TtEvent::kWMassMaxSumPt, TtFullHadEvtPartons::LightP, lightP(), TtFullHadEvtPartons::LightPBar, lightPBar(), TtFullHadEvtPartons::LightQ, lightQ(), TtFullHadEvtPartons::LightQBar, lightQBar(), dqm-mbProfile::log, TtEvent::numberOfAvailableHypoClasses(), TtEvent::numberOfAvailableHypos(), ttevent::printParticle(), top(), topBar(), TtEvent::topPair(), ctppsCommonDQMSource_cfi::verbosity, wMinus(), and wPlus().

9  {
10  if (verbosity % 10 <= 0)
11  return;
12 
13  edm::LogInfo log("TtFullHadronicEvent");
14 
15  log << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \n";
16 
17  // get some information from the genEvent
18  if (!genEvt_)
19  log << " TtGenEvent not available! \n";
20  else {
21  log << " TtGenEvent says: ";
22  if (!this->genEvent()->isTtBar())
23  log << "Not TtBar";
24  else if (this->genEvent()->isFullHadronic())
25  log << "Fully Hadronic TtBar";
26  else if (this->genEvent()->isSemiLeptonic())
27  log << "Semi-leptonic TtBar";
28  else if (this->genEvent()->isFullLeptonic())
29  log << "Fully Leptonic TtBar";
30  log << "\n";
31  }
32  // get number of available hypothesis classes
33  log << " Number of available event hypothesis classes: " << this->numberOfAvailableHypoClasses() << " \n";
34 
35  // create a legend for the jetLepComb
36  log << " - JetCombi : ";
37  for (unsigned idx = 0; idx < 6; idx++) {
38  switch (idx) {
40  log << " LightQ ";
41  break;
43  log << " LightQBar";
44  break;
46  log << " B ";
47  break;
49  log << " LightP ";
50  break;
52  log << " LightPBar";
53  break;
55  log << " BBar ";
56  break;
57  }
58  }
59  log << "\n";
60 
61  // get details from the hypotheses
62  typedef std::map<HypoClassKey, std::vector<HypoCombPair> >::const_iterator EventHypo;
63  for (EventHypo hyp = evtHyp_.begin(); hyp != evtHyp_.end(); ++hyp) {
64  HypoClassKey hypKey = (*hyp).first;
65  // header for each hypothesis
66  log << "---------------------------------------------------------------------------- \n";
67  switch (hypKey) {
68  case kGeom:
69  log << " Geom not (yet) applicable to TtFullHadronicEvent --> skipping";
70  continue;
71  case kWMassMaxSumPt:
72  log << " WMassMaxSumPt not (yet) applicable to TtFullHadronicEvent --> skipping";
73  continue;
74  case kMaxSumPtWMass:
75  log << " MaxSumPtWMass not (yet) applicable to TtFullHadronicEvent --> skipping";
76  continue;
77  case kGenMatch:
78  log << " GenMatch";
79  break;
80  case kMVADisc:
81  log << " MVADisc not (yet) applicable to TtFullHadronicEvent --> skipping";
82  continue;
83  case kKinFit:
84  log << " KinFit";
85  break;
86  case kKinSolution:
87  log << " KinSolution not (yet) applicable to TtFullHadronicEvent --> skipping";
88  continue;
89  case kWMassDeltaTopMass:
90  log << " WMassDeltaTopMass not (yet) applicable to TtFullHadronicEvent --> skipping";
91  continue;
92  case kHitFit:
93  log << " HitFit not (yet) applicable to TtFullHadronicEvent --> skipping";
94  continue;
95  default:
96  log << " Unknown TtEvent::HypoClassKey provided --> skipping";
97  continue;
98  }
99  log << "-Hypothesis: \n";
100  unsigned nOfHyp = this->numberOfAvailableHypos(hypKey);
101  if (nOfHyp > 1) {
102  log << " * Number of available jet combinations: " << nOfHyp << " \n";
103  if (verbosity < 10)
104  log << " The following was found to be the best one: \n";
105  }
106  // if verbosity level is smaller than 10, never show more than the best jet combination
107  if (verbosity < 10)
108  nOfHyp = 1;
109  for (unsigned cmb = 0; cmb < nOfHyp; ++cmb) {
110  // check if hypothesis is valid
111  if (!this->isHypoValid(hypKey, cmb))
112  log << " * Not valid! \n";
113  // get meta information for valid hypothesis
114  else {
115  // jetLepComb
116  log << " * JetCombi :";
117  std::vector<int> jets = this->jetLeptonCombination(hypKey, cmb);
118  for (unsigned int iJet = 0; iJet < jets.size(); iJet++) {
119  log << " " << jets[iJet] << " ";
120  }
121  log << "\n";
122  // specialties for some hypotheses
123  switch (hypKey) {
124  case kGenMatch:
125  log << " * Sum(DeltaR) : " << this->genMatchSumDR(cmb) << " \n"
126  << " * Sum(DeltaPt): " << this->genMatchSumPt(cmb) << " \n";
127  break;
128  case kKinFit:
129  log << " * Chi^2 : " << this->fitChi2(cmb) << " \n"
130  << " * Prob(Chi^2) : " << this->fitProb(cmb) << " \n";
131  break;
132  default:
133  break;
134  }
135  // kinematic quantities of particles (if last digit of verbosity level > 1)
136  if (verbosity % 10 >= 2) {
137  log << " * Candidates (pt; eta; phi; mass) :\n";
138  if (verbosity % 10 >= 3)
139  printParticle(log, "top pair", this->topPair(hypKey, cmb));
140  printParticle(log, "top ", this->top(hypKey, cmb));
141  printParticle(log, "W plus ", this->wPlus(hypKey, cmb));
142  if (verbosity % 10 >= 3) {
143  printParticle(log, "b ", this->b(hypKey, cmb));
144  printParticle(log, "lightQ ", this->lightQ(hypKey, cmb));
145  printParticle(log, "lightQBar ", this->lightQBar(hypKey, cmb));
146  }
147  printParticle(log, "topBar ", this->topBar(hypKey, cmb));
148  printParticle(log, "W minus ", this->wMinus(hypKey, cmb));
149  if (verbosity % 10 >= 3) {
150  printParticle(log, "bBar ", this->bBar(hypKey, cmb));
151  printParticle(log, "lightP ", this->lightP(hypKey, cmb));
152  printParticle(log, "lightPBar ", this->lightPBar(hypKey, cmb));
153  }
154  }
155  }
156  }
157  }
158  log << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";
159 }
unsigned int numberOfAvailableHypoClasses() const
return number of available hypothesis classes
Definition: TtEvent.h:86
unsigned int numberOfAvailableHypos(const std::string &key) const
return number of available hypotheses within a given hypothesis class
Definition: TtEvent.h:88
HypoClassKey
supported classes of event hypotheses
Definition: TtEvent.h:26
double fitChi2(const unsigned &cmb=0) const
return the chi2 of the kinematic fit of hypothesis &#39;cmb&#39; if available; -1 else
Definition: TtEvent.h:124
const reco::GenParticle * lightQBar() const
get light Q bar of the TtGenEvent
const math::XYZTLorentzVector * topPair() const
get combined 4-vector of top and topBar from the TtGenEvent
Definition: TtEvent.h:151
const reco::GenParticle * lightQ() const
get light Q of the TtGenEvent
void printParticle(edm::LogInfo &log, const char *name, const reco::Candidate *cand)
print pt, eta, phi, mass of a given candidate into an existing LogInfo
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:63
const reco::GenParticle * bBar() const
get anti-b of the TtGenEvent
const reco::GenParticle * lightP() const
get light P of the TtGenEvent
double genMatchSumDR(const unsigned &cmb=0) const
return the sum dr of the generator match if available; -1 else
Definition: TtEvent.h:116
const reco::GenParticle * lightPBar() const
get light P bar of the TtGenEvent
const reco::GenParticle * wMinus() const
get Wminus of the TtGenEvent
const reco::GenParticle * b() const
get b of the TtGenEvent
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:188
double fitProb(const unsigned &cmb=0) const
return the fit probability of hypothesis &#39;cmb&#39; if available; -1 else
Definition: TtEvent.h:128
std::vector< int > jetLeptonCombination(const std::string &key, const unsigned &cmb=0) const
return the vector of jet lepton combinatorics for a given hypothesis and class
Definition: TtEvent.h:104
bool isHypoValid(const std::string &key, const unsigned &cmb=0) const
check if hypothesis &#39;cmb&#39; within the hypothesis class was valid; if not it lead to an empty Composite...
Definition: TtEvent.h:78
const reco::GenParticle * top() const
get top of the TtGenEvent
std::map< HypoClassKey, std::vector< HypoCombPair > > evtHyp_
Definition: TtEvent.h:191
double genMatchSumPt(const unsigned &cmb=0) const
return the sum pt of the generator match if available; -1 else
Definition: TtEvent.h:112
const reco::GenParticle * topBar() const
get anti-top of the TtGenEvent
const reco::GenParticle * wPlus() const
get Wplus of the TtGenEvent

◆ top() [1/3]

const reco::Candidate* TtFullHadronicEvent::top ( const std::string &  key,
const unsigned &  cmb = 0 
) const
inline

get top of the given hypothesis

Definition at line 33 of file TtFullHadronicEvent.h.

References TtEvent::hypoClassKeyFromString(), crabWrapper::key, and top().

33  {
34  return top(hypoClassKeyFromString(key), cmb);
35  };
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:15
const reco::GenParticle * top() const
get top of the TtGenEvent

◆ top() [2/3]

const reco::Candidate* TtFullHadronicEvent::top ( const HypoClassKey key,
const unsigned &  cmb = 0 
) const
inline

get top of the given hypothesis

Definition at line 37 of file TtFullHadronicEvent.h.

References reco::CompositeCandidate::daughter(), TtEvent::eventHypo(), TtEvent::isHypoValid(), crabWrapper::key, and TtFullHadDaughter::Top.

37  {
38  return !isHypoValid(key, cmb) ? nullptr : eventHypo(key, cmb).daughter(TtFullHadDaughter::Top);
39  };
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
static const std::string Top
const reco::CompositeCandidate & eventHypo(const HypoClassKey &key, const unsigned &cmb=0) const
Definition: TtEvent.h:59
bool isHypoValid(const std::string &key, const unsigned &cmb=0) const
check if hypothesis &#39;cmb&#39; within the hypothesis class was valid; if not it lead to an empty Composite...
Definition: TtEvent.h:78

◆ top() [3/3]

const reco::GenParticle* TtFullHadronicEvent::top ( ) const
inline

get top of the TtGenEvent

Definition at line 121 of file TtFullHadronicEvent.h.

References TtEvent::genEvent(), TtEvent::genEvt_, and top().

Referenced by b(), print(), top(), and wPlus().

121 { return (!genEvt_ ? nullptr : this->genEvent()->top()); };
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:63
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:188
const reco::GenParticle * top() const
get top of the TtGenEvent

◆ topBar() [1/3]

const reco::Candidate* TtFullHadronicEvent::topBar ( const std::string &  key,
const unsigned &  cmb = 0 
) const
inline

get anti-top of the given hypothesis

Definition at line 77 of file TtFullHadronicEvent.h.

References TtEvent::hypoClassKeyFromString(), crabWrapper::key, and topBar().

77  {
78  return topBar(hypoClassKeyFromString(key), cmb);
79  };
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:15
const reco::GenParticle * topBar() const
get anti-top of the TtGenEvent

◆ topBar() [2/3]

const reco::Candidate* TtFullHadronicEvent::topBar ( const HypoClassKey key,
const unsigned &  cmb = 0 
) const
inline

get anti-top of the given hypothesis

Definition at line 81 of file TtFullHadronicEvent.h.

References reco::CompositeCandidate::daughter(), TtEvent::eventHypo(), TtEvent::isHypoValid(), crabWrapper::key, and TtFullHadDaughter::TopBar.

81  {
82  return !isHypoValid(key, cmb) ? nullptr : eventHypo(key, cmb).daughter(TtFullHadDaughter::TopBar);
83  };
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
const reco::CompositeCandidate & eventHypo(const HypoClassKey &key, const unsigned &cmb=0) const
Definition: TtEvent.h:59
static const std::string TopBar
bool isHypoValid(const std::string &key, const unsigned &cmb=0) const
check if hypothesis &#39;cmb&#39; within the hypothesis class was valid; if not it lead to an empty Composite...
Definition: TtEvent.h:78

◆ topBar() [3/3]

const reco::GenParticle* TtFullHadronicEvent::topBar ( ) const
inline

get anti-top of the TtGenEvent

Definition at line 134 of file TtFullHadronicEvent.h.

References TtEvent::genEvent(), TtEvent::genEvt_, and topBar().

Referenced by bBar(), print(), topBar(), and wMinus().

134 { return (!genEvt_ ? nullptr : this->genEvent()->topBar()); };
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:63
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:188
const reco::GenParticle * topBar() const
get anti-top of the TtGenEvent

◆ wMinus() [1/3]

const reco::Candidate* TtFullHadronicEvent::wMinus ( const std::string &  key,
const unsigned &  cmb = 0 
) const
inline

get Wminus of the given hypothesis

Definition at line 112 of file TtFullHadronicEvent.h.

References TtEvent::hypoClassKeyFromString(), crabWrapper::key, and wMinus().

112  {
113  return wMinus(hypoClassKeyFromString(key), cmb);
114  };
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:15
const reco::GenParticle * wMinus() const
get Wminus of the TtGenEvent

◆ wMinus() [2/3]

const reco::Candidate* TtFullHadronicEvent::wMinus ( const HypoClassKey key,
const unsigned &  cmb = 0 
) const
inline

get Wminus of the given hypothesis

Definition at line 116 of file TtFullHadronicEvent.h.

References reco::CompositeRefCandidateT< D >::daughter(), TtEvent::isHypoValid(), crabWrapper::key, topBar(), and TtFullHadDaughter::WMinus.

116  {
117  return !isHypoValid(key, cmb) ? nullptr : topBar(key, cmb)->daughter(TtFullHadDaughter::WMinus);
118  };
static const std::string WMinus
bool isHypoValid(const std::string &key, const unsigned &cmb=0) const
check if hypothesis &#39;cmb&#39; within the hypothesis class was valid; if not it lead to an empty Composite...
Definition: TtEvent.h:78
const reco::GenParticle * topBar() const
get anti-top of the TtGenEvent
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...

◆ wMinus() [3/3]

const reco::GenParticle* TtFullHadronicEvent::wMinus ( ) const
inline

get Wminus of the TtGenEvent

Definition at line 148 of file TtFullHadronicEvent.h.

References TtEvent::genEvent(), TtEvent::genEvt_, and wMinus().

Referenced by lightP(), lightPBar(), print(), and wMinus().

148 { return (!genEvt_ ? nullptr : this->genEvent()->wMinus()); };
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:63
const reco::GenParticle * wMinus() const
get Wminus of the TtGenEvent
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:188

◆ wPlus() [1/3]

const reco::Candidate* TtFullHadronicEvent::wPlus ( const std::string &  key,
const unsigned &  cmb = 0 
) const
inline

get Wplus of the given hypothesis

Definition at line 68 of file TtFullHadronicEvent.h.

References TtEvent::hypoClassKeyFromString(), crabWrapper::key, and wPlus().

68  {
69  return wPlus(hypoClassKeyFromString(key), cmb);
70  };
HypoClassKey hypoClassKeyFromString(const std::string &label) const
return the corresponding enum value from a string
Definition: TtEvent.cc:15
const reco::GenParticle * wPlus() const
get Wplus of the TtGenEvent

◆ wPlus() [2/3]

const reco::Candidate* TtFullHadronicEvent::wPlus ( const HypoClassKey key,
const unsigned &  cmb = 0 
) const
inline

get Wplus of the given hypothesis

Definition at line 72 of file TtFullHadronicEvent.h.

References reco::CompositeRefCandidateT< D >::daughter(), TtEvent::isHypoValid(), crabWrapper::key, top(), and TtFullHadDaughter::WPlus.

72  {
73  return !isHypoValid(key, cmb) ? nullptr : top(key, cmb)->daughter(TtFullHadDaughter::WPlus);
74  };
static const std::string WPlus
bool isHypoValid(const std::string &key, const unsigned &cmb=0) const
check if hypothesis &#39;cmb&#39; within the hypothesis class was valid; if not it lead to an empty Composite...
Definition: TtEvent.h:78
const reco::GenParticle * top() const
get top of the TtGenEvent
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...

◆ wPlus() [3/3]

const reco::GenParticle* TtFullHadronicEvent::wPlus ( ) const
inline

get Wplus of the TtGenEvent

Definition at line 131 of file TtFullHadronicEvent.h.

References TtEvent::genEvent(), TtEvent::genEvt_, and wPlus().

Referenced by lightQ(), lightQBar(), print(), and wPlus().

131 { return (!genEvt_ ? nullptr : this->genEvent()->wPlus()); };
const edm::RefProd< TtGenEvent > & genEvent() const
get TtGenEvent
Definition: TtEvent.h:63
edm::RefProd< TtGenEvent > genEvt_
reference to TtGenEvent (has to be kept in the event!)
Definition: TtEvent.h:188
const reco::GenParticle * wPlus() const
get Wplus of the TtGenEvent