CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Protected Attributes
reco::FlavorHistory Class Reference

#include <FlavorHistory.h>

Public Types

enum  FLAVOR_T {
  FLAVOR_NULL = 0, FLAVOR_GS, FLAVOR_EXC, FLAVOR_ME,
  FLAVOR_DECAY, N_FLAVOR_TYPES
}
 

Public Member Functions

 FlavorHistory ()
 
 FlavorHistory (FLAVOR_T flavorSource, reco::CandidatePtr const &parton, reco::CandidatePtr const &progenitor, reco::CandidatePtr const &sister, reco::ShallowClonePtrCandidate const &matchedJet, reco::ShallowClonePtrCandidate const &sisterJet)
 
 FlavorHistory (FLAVOR_T flavorSource, edm::Handle< edm::View< reco::Candidate > > h_partons, int iparton, int iprogenitor, int isister, reco::ShallowClonePtrCandidate const &matchedJet, reco::ShallowClonePtrCandidate const &sisterJet)
 
 FlavorHistory (FLAVOR_T flavorSource, edm::Handle< reco::CandidateCollection > h_partons, int iparton, int iprogenitor, int isister, reco::ShallowClonePtrCandidate const &matchedJet, reco::ShallowClonePtrCandidate const &sisterJet)
 
FLAVOR_T flavorSource () const
 
bool hasMatchedJet () const
 
bool hasParton () const
 
bool hasProgenitor () const
 
bool hasSister () const
 
bool hasSisterJet () const
 
const reco::ShallowClonePtrCandidatematchedJet () const
 
bool operator< (FlavorHistory const &right) const
 
bool operator== (FlavorHistory const &right) const
 
bool operator> (FlavorHistory const &right) const
 
const reco::CandidatePtrparton () const
 
const reco::CandidatePtrprogenitor () const
 
const reco::CandidatePtrsister () const
 
const reco::ShallowClonePtrCandidatesisterJet () const
 
 ~FlavorHistory ()
 

Static Public Attributes

static const int bQuarkId = 5
 
static const int cQuarkId = 4
 
static const int gluonId = 21
 
static const int tQuarkId = 6
 

Protected Attributes

FLAVOR_T flavorSource_
 
reco::ShallowClonePtrCandidate matchedJet_
 
reco::CandidatePtr parton_
 
reco::CandidatePtr progenitor_
 
reco::CandidatePtr sister_
 
reco::ShallowClonePtrCandidate sisterJet_
 

Detailed Description

Stores information about the flavor history of a parton

Author
: Stephen Mrenna (FNAL), Salvatore Rappoccio (JHU)

Definition at line 45 of file FlavorHistory.h.

Member Enumeration Documentation

◆ FLAVOR_T

Enumerator
FLAVOR_NULL 
FLAVOR_GS 
FLAVOR_EXC 
FLAVOR_ME 
FLAVOR_DECAY 
N_FLAVOR_TYPES 

Definition at line 47 of file FlavorHistory.h.

47  {
48  FLAVOR_NULL = 0, // No flavor, unset
49  FLAVOR_GS, // gluon splitting
50  FLAVOR_EXC, // flavor excitation
51  FLAVOR_ME, // matrix element
52  FLAVOR_DECAY, // flavor decay
54  }; // total number

Constructor & Destructor Documentation

◆ FlavorHistory() [1/4]

FlavorHistory::FlavorHistory ( )

◆ FlavorHistory() [2/4]

FlavorHistory::FlavorHistory ( FLAVOR_T  flavorSource,
reco::CandidatePtr const &  parton,
reco::CandidatePtr const &  progenitor,
reco::CandidatePtr const &  sister,
reco::ShallowClonePtrCandidate const &  matchedJet,
reco::ShallowClonePtrCandidate const &  sisterJet 
)

Definition at line 9 of file FlavorHistory.cc.

16  parton_(parton),
18  sister_(sister),
const reco::ShallowClonePtrCandidate & matchedJet() const
Definition: FlavorHistory.h:94
reco::CandidatePtr progenitor_
reco::ShallowClonePtrCandidate sisterJet_
reco::CandidatePtr sister_
const reco::CandidatePtr & parton() const
Definition: FlavorHistory.h:91
reco::ShallowClonePtrCandidate matchedJet_
FLAVOR_T flavorSource() const
Definition: FlavorHistory.h:85
const reco::ShallowClonePtrCandidate & sisterJet() const
Definition: FlavorHistory.h:95
reco::CandidatePtr parton_
const reco::CandidatePtr & progenitor() const
Definition: FlavorHistory.h:93
const reco::CandidatePtr & sister() const
Definition: FlavorHistory.h:92

◆ FlavorHistory() [3/4]

FlavorHistory::FlavorHistory ( FLAVOR_T  flavorSource,
edm::Handle< edm::View< reco::Candidate > >  h_partons,
int  iparton,
int  iprogenitor,
int  isister,
reco::ShallowClonePtrCandidate const &  matchedJet,
reco::ShallowClonePtrCandidate const &  sisterJet 
)

Definition at line 22 of file FlavorHistory.cc.

30  parton_(parton >= 0 && static_cast<unsigned int>(parton) < h_partons->size() ? CandidatePtr(h_partons, parton)
31  : CandidatePtr()),
32  progenitor_(progenitor >= 0 && static_cast<unsigned int>(progenitor) < h_partons->size()
33  ? CandidatePtr(h_partons, progenitor)
34  : CandidatePtr()),
35  sister_(sister >= 0 && static_cast<unsigned int>(sister) < h_partons->size() ? CandidatePtr(h_partons, sister)
36  : CandidatePtr()),
size
Write out results.
const reco::ShallowClonePtrCandidate & matchedJet() const
Definition: FlavorHistory.h:94
reco::CandidatePtr progenitor_
reco::ShallowClonePtrCandidate sisterJet_
reco::CandidatePtr sister_
const reco::CandidatePtr & parton() const
Definition: FlavorHistory.h:91
reco::ShallowClonePtrCandidate matchedJet_
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
FLAVOR_T flavorSource() const
Definition: FlavorHistory.h:85
const reco::ShallowClonePtrCandidate & sisterJet() const
Definition: FlavorHistory.h:95
reco::CandidatePtr parton_
const reco::CandidatePtr & progenitor() const
Definition: FlavorHistory.h:93
const reco::CandidatePtr & sister() const
Definition: FlavorHistory.h:92

◆ FlavorHistory() [4/4]

FlavorHistory::FlavorHistory ( FLAVOR_T  flavorSource,
edm::Handle< reco::CandidateCollection h_partons,
int  iparton,
int  iprogenitor,
int  isister,
reco::ShallowClonePtrCandidate const &  matchedJet,
reco::ShallowClonePtrCandidate const &  sisterJet 
)

Definition at line 40 of file FlavorHistory.cc.

48  parton_(parton >= 0 && static_cast<unsigned int>(parton) < h_partons->size() ? CandidatePtr(h_partons, parton)
49  : CandidatePtr()),
50  progenitor_(progenitor >= 0 && static_cast<unsigned int>(progenitor) < h_partons->size()
51  ? CandidatePtr(h_partons, progenitor)
52  : CandidatePtr()),
53  sister_(sister >= 0 && static_cast<unsigned int>(sister) < h_partons->size() ? CandidatePtr(h_partons, sister)
54  : CandidatePtr()),
size
Write out results.
const reco::ShallowClonePtrCandidate & matchedJet() const
Definition: FlavorHistory.h:94
reco::CandidatePtr progenitor_
reco::ShallowClonePtrCandidate sisterJet_
size_type size() const
Definition: OwnVector.h:300
reco::CandidatePtr sister_
const reco::CandidatePtr & parton() const
Definition: FlavorHistory.h:91
reco::ShallowClonePtrCandidate matchedJet_
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
FLAVOR_T flavorSource() const
Definition: FlavorHistory.h:85
const reco::ShallowClonePtrCandidate & sisterJet() const
Definition: FlavorHistory.h:95
reco::CandidatePtr parton_
const reco::CandidatePtr & progenitor() const
Definition: FlavorHistory.h:93
const reco::CandidatePtr & sister() const
Definition: FlavorHistory.h:92

◆ ~FlavorHistory()

reco::FlavorHistory::~FlavorHistory ( )
inline

Definition at line 82 of file FlavorHistory.h.

82 {}

Member Function Documentation

◆ flavorSource()

FLAVOR_T reco::FlavorHistory::flavorSource ( ) const
inline

Definition at line 85 of file FlavorHistory.h.

References flavorSource_.

Referenced by reco::FlavorHistoryEvent::cache().

85 { return flavorSource_; }

◆ hasMatchedJet()

bool reco::FlavorHistory::hasMatchedJet ( ) const
inline

Definition at line 89 of file FlavorHistory.h.

References edm::Ptr< T >::isNonnull(), reco::ShallowClonePtrCandidate::masterClonePtr(), and matchedJet_.

89 { return matchedJet_.masterClonePtr().isNonnull(); }
const CandidatePtr & masterClonePtr() const override
returns reference to master clone pointer
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:146
reco::ShallowClonePtrCandidate matchedJet_

◆ hasParton()

bool reco::FlavorHistory::hasParton ( ) const
inline

Definition at line 86 of file FlavorHistory.h.

References edm::Ptr< T >::isNonnull(), and parton_.

86 { return parton_.isNonnull(); }
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:146
reco::CandidatePtr parton_

◆ hasProgenitor()

bool reco::FlavorHistory::hasProgenitor ( ) const
inline

Definition at line 88 of file FlavorHistory.h.

References edm::Ptr< T >::isNonnull(), and progenitor_.

88 { return progenitor_.isNonnull(); }
reco::CandidatePtr progenitor_
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:146

◆ hasSister()

bool reco::FlavorHistory::hasSister ( ) const
inline

Definition at line 87 of file FlavorHistory.h.

References edm::Ptr< T >::isNonnull(), and sister_.

87 { return sister_.isNonnull(); }
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:146
reco::CandidatePtr sister_

◆ hasSisterJet()

bool reco::FlavorHistory::hasSisterJet ( ) const
inline

Definition at line 90 of file FlavorHistory.h.

References edm::Ptr< T >::isNonnull(), reco::ShallowClonePtrCandidate::masterClonePtr(), and sisterJet_.

90 { return sisterJet_.masterClonePtr().isNonnull(); }
reco::ShallowClonePtrCandidate sisterJet_
const CandidatePtr & masterClonePtr() const override
returns reference to master clone pointer
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:146

◆ matchedJet()

const reco::ShallowClonePtrCandidate& reco::FlavorHistory::matchedJet ( ) const
inline

Definition at line 94 of file FlavorHistory.h.

References matchedJet_.

Referenced by reco::FlavorHistoryEvent::cache().

94 { return matchedJet_; }
reco::ShallowClonePtrCandidate matchedJet_

◆ operator<()

bool reco::FlavorHistory::operator< ( FlavorHistory const &  right) const
inline

Definition at line 98 of file FlavorHistory.h.

References edm::Ptr< T >::key(), and parton_.

98 { return parton_.key() < right.parton_.key(); }
key_type key() const
Definition: Ptr.h:163
reco::CandidatePtr parton_

◆ operator==()

bool reco::FlavorHistory::operator== ( FlavorHistory const &  right) const
inline

Definition at line 100 of file FlavorHistory.h.

References edm::Ptr< T >::key(), and parton_.

100 { return parton_.key() == right.parton_.key(); }
key_type key() const
Definition: Ptr.h:163
reco::CandidatePtr parton_

◆ operator>()

bool reco::FlavorHistory::operator> ( FlavorHistory const &  right) const
inline

Definition at line 99 of file FlavorHistory.h.

References edm::Ptr< T >::key(), and parton_.

99 { return parton_.key() > right.parton_.key(); }
key_type key() const
Definition: Ptr.h:163
reco::CandidatePtr parton_

◆ parton()

const reco::CandidatePtr& reco::FlavorHistory::parton ( ) const
inline

Definition at line 91 of file FlavorHistory.h.

References parton_.

Referenced by reco::FlavorHistoryEvent::cache().

91 { return parton_; }
reco::CandidatePtr parton_

◆ progenitor()

const reco::CandidatePtr& reco::FlavorHistory::progenitor ( ) const
inline

Definition at line 93 of file FlavorHistory.h.

References progenitor_.

93 { return progenitor_; }
reco::CandidatePtr progenitor_

◆ sister()

const reco::CandidatePtr& reco::FlavorHistory::sister ( ) const
inline

Definition at line 92 of file FlavorHistory.h.

References sister_.

92 { return sister_; }
reco::CandidatePtr sister_

◆ sisterJet()

const reco::ShallowClonePtrCandidate& reco::FlavorHistory::sisterJet ( ) const
inline

Definition at line 95 of file FlavorHistory.h.

References sisterJet_.

95 { return sisterJet_; }
reco::ShallowClonePtrCandidate sisterJet_

Member Data Documentation

◆ bQuarkId

const int reco::FlavorHistory::bQuarkId = 5
static

Definition at line 58 of file FlavorHistory.h.

Referenced by reco::FlavorHistorySelectorUtil::select().

◆ cQuarkId

const int reco::FlavorHistory::cQuarkId = 4
static

Definition at line 59 of file FlavorHistory.h.

Referenced by reco::FlavorHistorySelectorUtil::select().

◆ flavorSource_

FLAVOR_T reco::FlavorHistory::flavorSource_
protected

Definition at line 103 of file FlavorHistory.h.

Referenced by flavorSource().

◆ gluonId

const int reco::FlavorHistory::gluonId = 21
static

Definition at line 56 of file FlavorHistory.h.

◆ matchedJet_

reco::ShallowClonePtrCandidate reco::FlavorHistory::matchedJet_
protected

Definition at line 107 of file FlavorHistory.h.

Referenced by hasMatchedJet(), and matchedJet().

◆ parton_

reco::CandidatePtr reco::FlavorHistory::parton_
protected

Definition at line 104 of file FlavorHistory.h.

Referenced by hasParton(), operator<(), operator==(), operator>(), and parton().

◆ progenitor_

reco::CandidatePtr reco::FlavorHistory::progenitor_
protected

Definition at line 105 of file FlavorHistory.h.

Referenced by hasProgenitor(), and progenitor().

◆ sister_

reco::CandidatePtr reco::FlavorHistory::sister_
protected

Definition at line 106 of file FlavorHistory.h.

Referenced by hasSister(), and sister().

◆ sisterJet_

reco::ShallowClonePtrCandidate reco::FlavorHistory::sisterJet_
protected

Definition at line 108 of file FlavorHistory.h.

Referenced by hasSisterJet(), and sisterJet().

◆ tQuarkId

const int reco::FlavorHistory::tQuarkId = 6
static

Definition at line 57 of file FlavorHistory.h.