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 48 of file FlavorHistory.h.

Member Enumeration Documentation

Enumerator
FLAVOR_NULL 
FLAVOR_GS 
FLAVOR_EXC 
FLAVOR_ME 
FLAVOR_DECAY 
N_FLAVOR_TYPES 

Definition at line 51 of file FlavorHistory.h.

Constructor & Destructor Documentation

FlavorHistory::FlavorHistory ( )

Definition at line 7 of file FlavorHistory.cc.

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 12 of file FlavorHistory.cc.

17  :
19  parton_(parton),
21  sister_(sister),
24 {
25 
26 }
const reco::ShallowClonePtrCandidate & matchedJet() const
Definition: FlavorHistory.h:99
reco::CandidatePtr progenitor_
FLAVOR_T flavorSource() const
Definition: FlavorHistory.h:89
reco::ShallowClonePtrCandidate sisterJet_
reco::CandidatePtr sister_
reco::ShallowClonePtrCandidate matchedJet_
const reco::CandidatePtr & sister() const
Definition: FlavorHistory.h:96
const reco::CandidatePtr & progenitor() const
Definition: FlavorHistory.h:97
const reco::ShallowClonePtrCandidate & sisterJet() const
reco::CandidatePtr parton_
const reco::CandidatePtr & parton() const
Definition: FlavorHistory.h:95
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 28 of file FlavorHistory.cc.

34  :
36  parton_ ( parton >= 0 && static_cast<unsigned int>(parton) < h_partons->size() ? CandidatePtr(h_partons,parton) : CandidatePtr()),
37  progenitor_( progenitor >= 0 && static_cast<unsigned int>(progenitor) < h_partons->size() ? CandidatePtr(h_partons,progenitor) : CandidatePtr()),
38  sister_ ( sister >= 0 && static_cast<unsigned int>(sister) < h_partons->size() ? CandidatePtr(h_partons,sister) : CandidatePtr()),
41 {
42 
43 }
size
Write out results.
const reco::ShallowClonePtrCandidate & matchedJet() const
Definition: FlavorHistory.h:99
reco::CandidatePtr progenitor_
FLAVOR_T flavorSource() const
Definition: FlavorHistory.h:89
reco::ShallowClonePtrCandidate sisterJet_
reco::CandidatePtr sister_
reco::ShallowClonePtrCandidate matchedJet_
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
const reco::CandidatePtr & sister() const
Definition: FlavorHistory.h:96
const reco::CandidatePtr & progenitor() const
Definition: FlavorHistory.h:97
const reco::ShallowClonePtrCandidate & sisterJet() const
reco::CandidatePtr parton_
const reco::CandidatePtr & parton() const
Definition: FlavorHistory.h:95
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 45 of file FlavorHistory.cc.

51  :
53  parton_ ( parton >= 0 && static_cast<unsigned int>(parton) < h_partons->size() ? CandidatePtr(h_partons,parton) : CandidatePtr()),
54  progenitor_( progenitor >= 0 && static_cast<unsigned int>(progenitor) < h_partons->size() ? CandidatePtr(h_partons,progenitor) : CandidatePtr()),
55  sister_ ( sister >= 0 && static_cast<unsigned int>(sister) < h_partons->size() ? CandidatePtr(h_partons,sister) : CandidatePtr()),
58 {
59 
60 }
size
Write out results.
const reco::ShallowClonePtrCandidate & matchedJet() const
Definition: FlavorHistory.h:99
size_type size() const
Definition: OwnVector.h:264
reco::CandidatePtr progenitor_
FLAVOR_T flavorSource() const
Definition: FlavorHistory.h:89
reco::ShallowClonePtrCandidate sisterJet_
reco::CandidatePtr sister_
reco::ShallowClonePtrCandidate matchedJet_
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
const reco::CandidatePtr & sister() const
Definition: FlavorHistory.h:96
const reco::CandidatePtr & progenitor() const
Definition: FlavorHistory.h:97
const reco::ShallowClonePtrCandidate & sisterJet() const
reco::CandidatePtr parton_
const reco::CandidatePtr & parton() const
Definition: FlavorHistory.h:95
reco::FlavorHistory::~FlavorHistory ( )
inline

Definition at line 85 of file FlavorHistory.h.

85 {}

Member Function Documentation

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

Definition at line 89 of file FlavorHistory.h.

References flavorSource_.

Referenced by reco::FlavorHistoryEvent::cache(), and operator<<().

89 { return flavorSource_; }
bool reco::FlavorHistory::hasMatchedJet ( ) const
inline

Definition at line 93 of file FlavorHistory.h.

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

Referenced by operator<<().

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

Definition at line 90 of file FlavorHistory.h.

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

Referenced by operator<<().

90 { return parton_.isNonnull(); }
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:168
reco::CandidatePtr parton_
bool reco::FlavorHistory::hasProgenitor ( ) const
inline

Definition at line 92 of file FlavorHistory.h.

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

Referenced by operator<<().

92 { return progenitor_.isNonnull();}
reco::CandidatePtr progenitor_
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:168
bool reco::FlavorHistory::hasSister ( ) const
inline

Definition at line 91 of file FlavorHistory.h.

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

Referenced by operator<<().

91 { return sister_.isNonnull(); }
reco::CandidatePtr sister_
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:168
bool reco::FlavorHistory::hasSisterJet ( ) const
inline

Definition at line 94 of file FlavorHistory.h.

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

Referenced by operator<<().

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

Definition at line 99 of file FlavorHistory.h.

References matchedJet_.

Referenced by reco::FlavorHistoryEvent::cache(), and operator<<().

99 { return matchedJet_; }
reco::ShallowClonePtrCandidate matchedJet_
bool reco::FlavorHistory::operator< ( FlavorHistory const &  right) const
inline

Definition at line 104 of file FlavorHistory.h.

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

104  {
105  return parton_.key() < right.parton_.key();
106  }
key_type key() const
Definition: Ptr.h:185
reco::CandidatePtr parton_
bool reco::FlavorHistory::operator== ( FlavorHistory const &  right) const
inline

Definition at line 110 of file FlavorHistory.h.

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

110  {
111  return parton_.key() == right.parton_.key();
112  }
key_type key() const
Definition: Ptr.h:185
reco::CandidatePtr parton_
bool reco::FlavorHistory::operator> ( FlavorHistory const &  right) const
inline

Definition at line 107 of file FlavorHistory.h.

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

107  {
108  return parton_.key() > right.parton_.key();
109  }
key_type key() const
Definition: Ptr.h:185
reco::CandidatePtr parton_
const reco::CandidatePtr& reco::FlavorHistory::parton ( ) const
inline

Definition at line 95 of file FlavorHistory.h.

References parton_.

Referenced by reco::FlavorHistoryEvent::cache(), and operator<<().

95 { return parton_; }
reco::CandidatePtr parton_
const reco::CandidatePtr& reco::FlavorHistory::progenitor ( ) const
inline

Definition at line 97 of file FlavorHistory.h.

References progenitor_.

Referenced by operator<<().

97 { return progenitor_; }
reco::CandidatePtr progenitor_
const reco::CandidatePtr& reco::FlavorHistory::sister ( ) const
inline

Definition at line 96 of file FlavorHistory.h.

References sister_.

Referenced by operator<<().

96 { return sister_; }
reco::CandidatePtr sister_
const reco::ShallowClonePtrCandidate& reco::FlavorHistory::sisterJet ( ) const
inline

Definition at line 101 of file FlavorHistory.h.

References sisterJet_.

Referenced by operator<<().

101 { return sisterJet_; }
reco::ShallowClonePtrCandidate sisterJet_

Member Data Documentation

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

Definition at line 60 of file FlavorHistory.h.

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

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

Definition at line 61 of file FlavorHistory.h.

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

FLAVOR_T reco::FlavorHistory::flavorSource_
protected

Definition at line 117 of file FlavorHistory.h.

Referenced by flavorSource().

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

Definition at line 58 of file FlavorHistory.h.

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

Definition at line 121 of file FlavorHistory.h.

Referenced by hasMatchedJet(), and matchedJet().

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

Definition at line 118 of file FlavorHistory.h.

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

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

Definition at line 119 of file FlavorHistory.h.

Referenced by hasProgenitor(), and progenitor().

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

Definition at line 120 of file FlavorHistory.h.

Referenced by hasSister(), and sister().

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

Definition at line 122 of file FlavorHistory.h.

Referenced by hasSisterJet(), and sisterJet().

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

Definition at line 59 of file FlavorHistory.h.