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, 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)
 
 FlavorHistory (FLAVOR_T flavorSource, reco::CandidatePtr const &parton, reco::CandidatePtr const &progenitor, reco::CandidatePtr const &sister, 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 ( )

Definition at line 7 of file FlavorHistory.cc.

◆ 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.

◆ 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()),

◆ 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()),

◆ ~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.

85 { return flavorSource_; }

References flavorSource_.

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

◆ hasMatchedJet()

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

◆ hasParton()

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

Definition at line 86 of file FlavorHistory.h.

86 { return parton_.isNonnull(); }

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

◆ hasProgenitor()

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

Definition at line 88 of file FlavorHistory.h.

88 { return progenitor_.isNonnull(); }

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

◆ hasSister()

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

Definition at line 87 of file FlavorHistory.h.

87 { return sister_.isNonnull(); }

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

◆ hasSisterJet()

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

◆ matchedJet()

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

Definition at line 94 of file FlavorHistory.h.

94 { return matchedJet_; }

References matchedJet_.

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

◆ operator<()

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

Definition at line 98 of file FlavorHistory.h.

98 { return parton_.key() < right.parton_.key(); }

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

◆ operator==()

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

Definition at line 100 of file FlavorHistory.h.

100 { return parton_.key() == right.parton_.key(); }

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

◆ operator>()

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

Definition at line 99 of file FlavorHistory.h.

99 { return parton_.key() > right.parton_.key(); }

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

◆ parton()

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

Definition at line 91 of file FlavorHistory.h.

91 { return parton_; }

References parton_.

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

◆ progenitor()

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

Definition at line 93 of file FlavorHistory.h.

93 { return progenitor_; }

References progenitor_.

◆ sister()

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

Definition at line 92 of file FlavorHistory.h.

92 { return sister_; }

References sister_.

◆ sisterJet()

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

Definition at line 95 of file FlavorHistory.h.

95 { return sisterJet_; }

References 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.

reco::FlavorHistory::FLAVOR_GS
Definition: FlavorHistory.h:49
reco::FlavorHistory::FLAVOR_DECAY
Definition: FlavorHistory.h:52
reco::FlavorHistory::N_FLAVOR_TYPES
Definition: FlavorHistory.h:53
reco::FlavorHistory::FLAVOR_EXC
Definition: FlavorHistory.h:50
reco::FlavorHistory::flavorSource
FLAVOR_T flavorSource() const
Definition: FlavorHistory.h:85
reco::FlavorHistory::progenitor
const reco::CandidatePtr & progenitor() const
Definition: FlavorHistory.h:93
reco::FlavorHistory::sisterJet
const reco::ShallowClonePtrCandidate & sisterJet() const
Definition: FlavorHistory.h:95
reco::FlavorHistory::sister
const reco::CandidatePtr & sister() const
Definition: FlavorHistory.h:92
edm::Ptr::key
key_type key() const
Definition: Ptr.h:163
reco::FlavorHistory::flavorSource_
FLAVOR_T flavorSource_
Definition: FlavorHistory.h:103
reco::FlavorHistory::parton_
reco::CandidatePtr parton_
Definition: FlavorHistory.h:104
reco::FlavorHistory::sisterJet_
reco::ShallowClonePtrCandidate sisterJet_
Definition: FlavorHistory.h:108
reco::FlavorHistory::FLAVOR_ME
Definition: FlavorHistory.h:51
reco::FlavorHistory::parton
const reco::CandidatePtr & parton() const
Definition: FlavorHistory.h:91
reco::FlavorHistory::matchedJet_
reco::ShallowClonePtrCandidate matchedJet_
Definition: FlavorHistory.h:107
createfilelist.int
int
Definition: createfilelist.py:10
reco::FlavorHistory::FLAVOR_NULL
Definition: FlavorHistory.h:48
edm::Ptr< Candidate >
edm::Ptr::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:146
reco::CandidatePtr
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
reco::FlavorHistory::progenitor_
reco::CandidatePtr progenitor_
Definition: FlavorHistory.h:105
reco::ShallowClonePtrCandidate::masterClonePtr
const CandidatePtr & masterClonePtr() const override
returns reference to master clone pointer
Definition: ShallowClonePtrCandidate.cc:20
edm::OwnVector::size
size_type size() const
Definition: OwnVector.h:300
reco::FlavorHistory::matchedJet
const reco::ShallowClonePtrCandidate & matchedJet() const
Definition: FlavorHistory.h:94
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
reco::FlavorHistory::sister_
reco::CandidatePtr sister_
Definition: FlavorHistory.h:106