CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Static Private Attributes | Friends
reco::LeafRefCandidateT< T > Class Template Reference

#include <LeafRefCandidateT.h>

Inheritance diagram for reco::LeafRefCandidateT< T >:
reco::Candidate reco::RecoChargedRefCandidate reco::RecoPFClusterRefCandidate

Classes

struct  daughter_iterator
 

Public Types

typedef int Charge
 electric charge type More...
 
typedef CandidateCollection daughters
 collection of daughter candidates More...
 
typedef unsigned int index
 
typedef math::XYZTLorentzVector LorentzVector
 Lorentz vector. More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef
math::PtEtaPhiMLorentzVector 
PolarLorentzVector
 Lorentz vector. More...
 
typedef math::XYZVector Vector
 point in the space More...
 
- Public Types inherited from reco::Candidate
enum  { dimension = 3 }
 
enum  { size = dimension * (dimension + 1)/2 }
 matix size More...
 
typedef int Charge
 electric charge type More...
 
typedef candidate::const_iterator const_iterator
 
typedef math::Error< dimension >
::type 
CovarianceMatrix
 covariance error matrix (3x3) More...
 
typedef unsigned int index
 index type More...
 
typedef candidate::iterator iterator
 
typedef math::XYZTLorentzVector LorentzVector
 Lorentz vector. More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef
math::PtEtaPhiMLorentzVector 
PolarLorentzVector
 Lorentz vector. More...
 
typedef size_t size_type
 
typedef math::XYZVector Vector
 point in the space More...
 

Public Member Functions

virtual const_iterator begin () const
 first daughter const_iterator More...
 
virtual iterator begin ()
 first daughter iterator More...
 
template<typename S >
daughter_iterator< S >::type beginFilter (const S &s) const
 
virtual Vector boostToCM () const
 
virtual int charge () const
 electric charge More...
 
virtual LeafRefCandidateT< T > * clone () const
 returns a clone of the Candidate object More...
 
virtual const Candidatedaughter (size_type) const
 return daughter at a given position (throws an exception) More...
 
virtual Candidatedaughter (size_type)
 return daughter at a given position (throws an exception) More...
 
virtual Candidatedaughter (const std::string &s)
 return daughter with a specified role name More...
 
virtual const Candidatedaughter (const std::string &s) const
 return daughter with a specified role name More...
 
virtual const_iterator end () const
 last daughter const_iterator More...
 
virtual iterator end ()
 last daughter iterator More...
 
template<typename S >
daughter_iterator< S >::type endFilter (const S &s) const
 
virtual double energy () const
 energy More...
 
virtual double et () const
 transverse energy More...
 
virtual double eta () const
 momentum pseudorapidity More...
 
template<typename C >
get () const
 get a component More...
 
template<typename C , typename Tag >
get () const
 get a component More...
 
template<typename C >
get (size_type i) const
 get a component More...
 
template<typename C , typename Tag >
get (size_type i) const
 get a component More...
 
virtual bool hasMasterClone () const
 This only happens if the concrete Candidate type is ShallowCloneCandidate. More...
 
virtual bool hasMasterClonePtr () const
 
virtual bool isCaloMuon () const
 
virtual bool isConvertedPhoton () const
 
virtual bool isElectron () const
 
virtual bool isGlobalMuon () const
 
virtual bool isJet () const
 
virtual bool isMuon () const
 
virtual bool isPhoton () const
 
virtual bool isStandAloneMuon () const
 
virtual bool isTrackerMuon () const
 
 LeafRefCandidateT ()
 default constructor More...
 
 LeafRefCandidateT (const T &c, float m)
 
virtual double mass () const
 mass More...
 
virtual double massSqr () const
 mass squared More...
 
virtual const CandidateBaseRefmasterClone () const
 
virtual const CandidatePtrmasterClonePtr () const
 
template<typename Ref >
Ref masterRef () const
 cast master clone reference to a concrete type More...
 
virtual Vector momentum () const
 spatial momentum vector More...
 
virtual const Candidatemother (size_type) const
 return mother at a given position (throws an exception) More...
 
virtual double mt () const
 transverse mass More...
 
virtual double mtSqr () const
 transverse mass squared More...
 
template<typename C >
size_type numberOf () const
 number of components More...
 
template<typename C , typename Tag >
size_type numberOf () const
 number of components More...
 
virtual size_t numberOfDaughters () const
 number of daughters More...
 
virtual size_t numberOfMothers () const
 number of mothers More...
 
virtual size_t numberOfSourceCandidatePtrs () const
 
virtual double p () const
 magnitude of momentum vector More...
 
virtual const LorentzVectorp4 () const
 four-momentum Lorentz vector More...
 
virtual int pdgId () const
 pdg ID: dummy for now More...
 
virtual double phi () const
 momentum azimuthal angle More...
 
virtual const PolarLorentzVectorpolarP4 () const
 four-momentum Lorentz vector More...
 
virtual double pt () const
 transverse momentum More...
 
virtual double px () const
 x coordinate of momentum vector More...
 
virtual double py () const
 y coordinate of momentum vector More...
 
virtual double pz () const
 z coordinate of momentum vector More...
 
virtual double rapidity () const
 rapidity More...
 
virtual void setMass (double m)
 set particle mass More...
 
virtual CandidatePtr sourceCandidatePtr (size_type i) const
 
virtual double theta () const
 momentum polar angle More...
 
virtual const Pointvertex () const
 vertex position More...
 
virtual double vx () const
 x coordinate of vertex position More...
 
virtual double vy () const
 y coordinate of vertex position More...
 
virtual double vz () const
 z coordinate of vertex position More...
 
virtual double y () const
 rapidity More...
 
virtual ~LeafRefCandidateT ()
 destructor More...
 
- Public Member Functions inherited from reco::Candidate
template<typename S >
daughter_iterator< S >::type beginFilter (const S &s) const
 
 Candidate ()
 default constructor More...
 
template<typename S >
daughter_iterator< S >::type endFilter (const S &s) const
 
template<typename T >
T get () const
 get a component More...
 
template<typename T , typename Tag >
T get () const
 get a component More...
 
template<typename T >
T get (size_type i) const
 get a component More...
 
template<typename T , typename Tag >
T get (size_type i) const
 get a component More...
 
template<typename Ref >
Ref masterRef () const
 cast master clone reference to a concrete type More...
 
template<typename T >
size_type numberOf () const
 number of components More...
 
template<typename T , typename Tag >
size_type numberOf () const
 number of components More...
 
virtual void setSourceCandidatePtr (const CandidatePtr &ptr)
 Set the ptr to the source Candidate. More...
 
virtual ~Candidate ()
 destructor More...
 

Protected Member Functions

void cacheCartesian () const
 set internal cache More...
 
void cachePolar () const
 set internal cache More...
 
void clearCache () const
 clear internal cache More...
 
virtual bool overlap (const Candidate &) const
 check overlap with another Candidate More...
 
virtual bool overlap (const LeafRefCandidateT &) const
 

Protected Attributes

edm::BoolCache cacheCartesianFixed_
 
edm::BoolCache cachePolarFixed_
 has cache been set? More...
 
float mass_
 mass hypothesis More...
 
LorentzVector p4Cartesian_
 internal cache for p4 More...
 
PolarLorentzVector p4Polar_
 internal cache for p4 More...
 
T ref_
 

Private Types

typedef
candidate::const_iterator_imp_specific
< daughters
const_iterator_imp_specific
 
typedef
candidate::iterator_imp_specific
< daughters
iterator_imp_specific
 

Private Member Functions

virtual void fillVertexCovariance (CovarianceMatrix &v) const
 
virtual bool longLived () const
 is long lived? More...
 
virtual bool massConstraint () const
 do mass constraint? More...
 
virtual void setCharge (Charge q)
 
virtual void setLongLived ()
 set long lived flag More...
 
virtual void setMassConstraint ()
 set mass constraint flag More...
 
virtual void setP4 (const LorentzVector &p4)
 set 4-momentum More...
 
virtual void setP4 (const PolarLorentzVector &p4)
 set 4-momentum More...
 
virtual void setPdgId (int pdgId)
 
virtual void setPz (double pz)
 
virtual void setStatus (int status)
 set status word More...
 
virtual void setThreeCharge (Charge qx3)
 set electric charge More...
 
virtual void setVertex (const Point &vertex)
 set vertex More...
 
virtual int status () const
 status word More...
 
virtual int threeCharge () const
 electric charge More...
 
virtual double vertexChi2 () const
 chi-squares More...
 
virtual double vertexCovariance (int i, int j) const
 (i, j)-th element of error matrix, i, j = 0, ... 2 More...
 
CovarianceMatrix vertexCovariance () const
 fill SMatrix More...
 
virtual double vertexNdof () const
 
virtual double vertexNormalizedChi2 () const
 chi-squared divided by n.d.o.f. More...
 

Static Private Attributes

static const unsigned int longLivedTag
 
static const unsigned int massConstraintTag
 

Friends

class ::OverlapChecker
 
template<typename , typename , typename >
struct component
 
class ShallowCloneCandidate
 
class ShallowClonePtrCandidate
 

Detailed Description

template<class T>
class reco::LeafRefCandidateT< T >

particle candidate with no constituent nor daughters, that takes the 3-vector from a constituent T (where T satisfies T->pt(), etc, like a TrackRef), and the mass is set

Author
Luca Lista, INFN
Version
Id:
LeafRefCandidateT.h,v 1.2 2011/10/27 19:54:25 wmtan Exp

Definition at line 22 of file LeafRefCandidateT.h.

Member Typedef Documentation

template<class T>
typedef int reco::LeafRefCandidateT< T >::Charge

electric charge type

Definition at line 27 of file LeafRefCandidateT.h.

Definition at line 268 of file LeafRefCandidateT.h.

template<class T>
typedef CandidateCollection reco::LeafRefCandidateT< T >::daughters

collection of daughter candidates

Definition at line 25 of file LeafRefCandidateT.h.

template<class T>
typedef unsigned int reco::LeafRefCandidateT< T >::index

Definition at line 37 of file LeafRefCandidateT.h.

Definition at line 270 of file LeafRefCandidateT.h.

Lorentz vector.

Definition at line 29 of file LeafRefCandidateT.h.

template<class T>
typedef math::XYZPoint reco::LeafRefCandidateT< T >::Point

point in the space

Definition at line 33 of file LeafRefCandidateT.h.

Lorentz vector.

Definition at line 31 of file LeafRefCandidateT.h.

template<class T>
typedef math::XYZVector reco::LeafRefCandidateT< T >::Vector

point in the space

Definition at line 35 of file LeafRefCandidateT.h.

Constructor & Destructor Documentation

template<class T>
reco::LeafRefCandidateT< T >::LeafRefCandidateT ( )
inline

default constructor

Definition at line 40 of file LeafRefCandidateT.h.

40  :
41  mass_(0),
42  cachePolarFixed_( false ) { }
edm::BoolCache cachePolarFixed_
has cache been set?
float mass_
mass hypothesis
template<class T>
reco::LeafRefCandidateT< T >::LeafRefCandidateT ( const T c,
float  m 
)
inlineexplicit

Definition at line 44 of file LeafRefCandidateT.h.

44  :
45  ref_(c),
46  mass_( m ),
47  cachePolarFixed_( false ), cacheCartesianFixed_( false ) {}
edm::BoolCache cachePolarFixed_
has cache been set?
float mass_
mass hypothesis
edm::BoolCache cacheCartesianFixed_
template<class T>
virtual reco::LeafRefCandidateT< T >::~LeafRefCandidateT ( )
inlinevirtual

destructor

Definition at line 50 of file LeafRefCandidateT.h.

50 {}

Member Function Documentation

template<class T >
Candidate::const_iterator reco::LeafRefCandidateT< T >::begin ( void  ) const
virtual

first daughter const_iterator

Implements reco::Candidate.

Definition at line 311 of file LeafRefCandidateT.h.

Referenced by reco::LeafRefCandidateT< T >::beginFilter().

311  {
313  }
candidate::const_iterator const_iterator
Definition: Candidate.h:32
candidate::const_iterator_imp_specific< daughters > const_iterator_imp_specific
template<class T >
Candidate::iterator reco::LeafRefCandidateT< T >::begin ( void  )
virtual

first daughter iterator

Implements reco::Candidate.

Definition at line 321 of file LeafRefCandidateT.h.

321  {
322  return iterator( new iterator_imp_specific );
323  }
candidate::iterator_imp_specific< daughters > iterator_imp_specific
candidate::iterator iterator
Definition: Candidate.h:33
template<class T>
template<typename S >
daughter_iterator<S>::type reco::LeafRefCandidateT< T >::beginFilter ( const S &  s) const
inline

Definition at line 209 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::begin(), and reco::LeafRefCandidateT< T >::end().

209  {
210  return boost::make_filter_iterator(s, begin(), end());
211  }
virtual const_iterator begin() const
first daughter const_iterator
virtual const_iterator end() const
last daughter const_iterator
template<class T>
virtual Vector reco::LeafRefCandidateT< T >::boostToCM ( ) const
inlinevirtual

boost vector to boost a Lorentz vector to the particle center of mass system

Implements reco::Candidate.

Definition at line 96 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::cacheCartesian(), and reco::LeafRefCandidateT< T >::p4Cartesian_.

96 { cacheCartesian(); return p4Cartesian_.BoostToCM(); }
LorentzVector p4Cartesian_
internal cache for p4
void cacheCartesian() const
set internal cache
template<class T>
void reco::LeafRefCandidateT< T >::cacheCartesian ( ) const
inlineprotected
template<class T>
void reco::LeafRefCandidateT< T >::cachePolar ( ) const
inlineprotected
template<class T>
virtual int reco::LeafRefCandidateT< T >::charge ( ) const
inlinevirtual

electric charge

Implements reco::Candidate.

Definition at line 84 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::ref_.

84 { return ref_->charge(); }
template<class T>
void reco::LeafRefCandidateT< T >::clearCache ( ) const
inlineprotected

clear internal cache

Definition at line 254 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::cacheCartesianFixed_, and reco::LeafRefCandidateT< T >::cachePolarFixed_.

Referenced by reco::LeafRefCandidateT< T >::setMass().

254  {
255  cachePolarFixed_ = false;
256  cacheCartesianFixed_ = false;
257  }
edm::BoolCache cachePolarFixed_
has cache been set?
edm::BoolCache cacheCartesianFixed_
template<class T>
virtual LeafRefCandidateT<T>* reco::LeafRefCandidateT< T >::clone ( void  ) const
inlinevirtual

returns a clone of the Candidate object

Implements reco::Candidate.

Definition at line 147 of file LeafRefCandidateT.h.

147  {
148  return new LeafRefCandidateT<T>( *this );
149  }
template<class T>
virtual const Candidate* reco::LeafRefCandidateT< T >::daughter ( size_type  ) const
inlinevirtual

return daughter at a given position (throws an exception)

Implements reco::Candidate.

Definition at line 62 of file LeafRefCandidateT.h.

62 { return 0; }
template<class T>
virtual Candidate* reco::LeafRefCandidateT< T >::daughter ( size_type  )
inlinevirtual

return daughter at a given position (throws an exception)

Implements reco::Candidate.

Definition at line 68 of file LeafRefCandidateT.h.

68 { return 0; }
template<class T>
virtual Candidate* reco::LeafRefCandidateT< T >::daughter ( const std::string &  s)
inlinevirtual

return daughter with a specified role name

Implements reco::Candidate.

Definition at line 70 of file LeafRefCandidateT.h.

70 { return 0; }
template<class T>
virtual const Candidate* reco::LeafRefCandidateT< T >::daughter ( const std::string &  s) const
inlinevirtual

return daughter with a specified role name

Implements reco::Candidate.

Definition at line 72 of file LeafRefCandidateT.h.

72 { return 0; }
template<class T >
Candidate::const_iterator reco::LeafRefCandidateT< T >::end ( void  ) const
virtual

last daughter const_iterator

Implements reco::Candidate.

Definition at line 316 of file LeafRefCandidateT.h.

Referenced by reco::LeafRefCandidateT< T >::beginFilter(), Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), and reco::LeafRefCandidateT< T >::endFilter().

316  {
318  }
candidate::const_iterator const_iterator
Definition: Candidate.h:32
candidate::const_iterator_imp_specific< daughters > const_iterator_imp_specific
template<class T >
Candidate::iterator reco::LeafRefCandidateT< T >::end ( void  )
virtual

last daughter iterator

Implements reco::Candidate.

Definition at line 326 of file LeafRefCandidateT.h.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

326  {
327  return iterator( new iterator_imp_specific );
328  }
candidate::iterator_imp_specific< daughters > iterator_imp_specific
candidate::iterator iterator
Definition: Candidate.h:33
template<class T>
template<typename S >
daughter_iterator<S>::type reco::LeafRefCandidateT< T >::endFilter ( const S &  s) const
inline

Definition at line 213 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::end().

213  {
214  return boost::make_filter_iterator(s, end(), end());
215  }
virtual const_iterator end() const
last daughter const_iterator
template<class T>
virtual double reco::LeafRefCandidateT< T >::energy ( ) const
inlinevirtual

energy

Implements reco::Candidate.

Definition at line 100 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::cacheCartesian(), and reco::LeafRefCandidateT< T >::p4Cartesian_.

100 { cacheCartesian(); return p4Cartesian_.E(); }
LorentzVector p4Cartesian_
internal cache for p4
void cacheCartesian() const
set internal cache
template<class T>
virtual double reco::LeafRefCandidateT< T >::et ( ) const
inlinevirtual

transverse energy

Implements reco::Candidate.

Definition at line 102 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::cachePolar(), and reco::LeafRefCandidateT< T >::p4Polar_.

102 { cachePolar(); return p4Polar_.Et(); }
PolarLorentzVector p4Polar_
internal cache for p4
void cachePolar() const
set internal cache
template<class T>
virtual double reco::LeafRefCandidateT< T >::eta ( ) const
inlinevirtual

momentum pseudorapidity

Implements reco::Candidate.

Definition at line 124 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::ref_.

124 { return ref_->eta(); }
template<class T>
virtual void reco::LeafRefCandidateT< T >::fillVertexCovariance ( CovarianceMatrix v) const
inlineprivatevirtual

Implements reco::Candidate.

Definition at line 304 of file LeafRefCandidateT.h.

References hitfit::return.

304 { return ; }
template<class T>
template<typename C >
C reco::LeafRefCandidateT< T >::get ( void  ) const
inline

get a component

Definition at line 173 of file LeafRefCandidateT.h.

References funct::C, edm::RefToBase< T >::get(), reco::LeafRefCandidateT< T >::hasMasterClone(), and reco::LeafRefCandidateT< T >::masterClone().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

173  {
174  if ( hasMasterClone() ) return masterClone()->get<C>();
175  else return reco::get<C>( * this );
176  }
virtual const CandidateBaseRef & masterClone() const
virtual bool hasMasterClone() const
This only happens if the concrete Candidate type is ShallowCloneCandidate.
T get() const
get a component
Definition: Candidate.h:216
template<class T>
template<typename C , typename Tag >
C reco::LeafRefCandidateT< T >::get ( void  ) const
inline

get a component

Definition at line 178 of file LeafRefCandidateT.h.

References funct::C, edm::RefToBase< T >::get(), reco::LeafRefCandidateT< T >::hasMasterClone(), and reco::LeafRefCandidateT< T >::masterClone().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

178  {
179  if ( hasMasterClone() ) return masterClone()->get<C, Tag>();
180  else return reco::get<C, Tag>( * this );
181  }
virtual const CandidateBaseRef & masterClone() const
virtual bool hasMasterClone() const
This only happens if the concrete Candidate type is ShallowCloneCandidate.
T get() const
get a component
Definition: Candidate.h:216
template<class T>
template<typename C >
C reco::LeafRefCandidateT< T >::get ( size_type  i) const
inline

get a component

Definition at line 183 of file LeafRefCandidateT.h.

References funct::C, edm::RefToBase< T >::get(), reco::LeafRefCandidateT< T >::hasMasterClone(), i, and reco::LeafRefCandidateT< T >::masterClone().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

183  {
184  if ( hasMasterClone() ) return masterClone()->get<C>( i );
185  else return reco::get<C>( * this, i );
186  }
virtual const CandidateBaseRef & masterClone() const
int i
Definition: DBlmapReader.cc:9
virtual bool hasMasterClone() const
This only happens if the concrete Candidate type is ShallowCloneCandidate.
T get() const
get a component
Definition: Candidate.h:216
template<class T>
template<typename C , typename Tag >
C reco::LeafRefCandidateT< T >::get ( size_type  i) const
inline

get a component

Definition at line 188 of file LeafRefCandidateT.h.

References funct::C, edm::RefToBase< T >::get(), reco::LeafRefCandidateT< T >::hasMasterClone(), i, and reco::LeafRefCandidateT< T >::masterClone().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

188  {
189  if ( hasMasterClone() ) return masterClone()->get<C, Tag>( i );
190  else return reco::get<C, Tag>( * this, i );
191  }
virtual const CandidateBaseRef & masterClone() const
int i
Definition: DBlmapReader.cc:9
virtual bool hasMasterClone() const
This only happens if the concrete Candidate type is ShallowCloneCandidate.
T get() const
get a component
Definition: Candidate.h:216
template<class T>
virtual bool reco::LeafRefCandidateT< T >::hasMasterClone ( ) const
inlinevirtual

This only happens if the concrete Candidate type is ShallowCloneCandidate.

Implements reco::Candidate.

Definition at line 153 of file LeafRefCandidateT.h.

Referenced by reco::LeafRefCandidateT< T >::get(), and reco::LeafRefCandidateT< T >::numberOf().

153 { return false; }
template<class T>
virtual bool reco::LeafRefCandidateT< T >::hasMasterClonePtr ( ) const
inlinevirtual

returns true if this candidate has a ptr to a master clone. This only happens if the concrete Candidate type is ShallowClonePtrCandidate

Implements reco::Candidate.

Definition at line 161 of file LeafRefCandidateT.h.

161 { return false; }
template<class T>
virtual bool reco::LeafRefCandidateT< T >::isCaloMuon ( ) const
inlinevirtual

Implements reco::Candidate.

Definition at line 223 of file LeafRefCandidateT.h.

223 { return false; }
template<class T>
virtual bool reco::LeafRefCandidateT< T >::isConvertedPhoton ( ) const
inlinevirtual

Implements reco::Candidate.

Definition at line 225 of file LeafRefCandidateT.h.

225 { return false; }
template<class T>
virtual bool reco::LeafRefCandidateT< T >::isElectron ( ) const
inlinevirtual

Implements reco::Candidate.

Definition at line 218 of file LeafRefCandidateT.h.

218 { return false; }
template<class T>
virtual bool reco::LeafRefCandidateT< T >::isGlobalMuon ( ) const
inlinevirtual

Implements reco::Candidate.

Definition at line 221 of file LeafRefCandidateT.h.

221 { return false; }
template<class T>
virtual bool reco::LeafRefCandidateT< T >::isJet ( ) const
inlinevirtual

Implements reco::Candidate.

Definition at line 226 of file LeafRefCandidateT.h.

226 { return false; }
template<class T>
virtual bool reco::LeafRefCandidateT< T >::isMuon ( ) const
inlinevirtual

Implements reco::Candidate.

Definition at line 219 of file LeafRefCandidateT.h.

219 { return false; }
template<class T>
virtual bool reco::LeafRefCandidateT< T >::isPhoton ( ) const
inlinevirtual

Implements reco::Candidate.

Definition at line 224 of file LeafRefCandidateT.h.

224 { return false; }
template<class T>
virtual bool reco::LeafRefCandidateT< T >::isStandAloneMuon ( ) const
inlinevirtual

Implements reco::Candidate.

Definition at line 220 of file LeafRefCandidateT.h.

220 { return false; }
template<class T>
virtual bool reco::LeafRefCandidateT< T >::isTrackerMuon ( ) const
inlinevirtual

Implements reco::Candidate.

Definition at line 222 of file LeafRefCandidateT.h.

222 { return false; }
template<class T>
virtual bool reco::LeafRefCandidateT< T >::longLived ( ) const
inlineprivatevirtual

is long lived?

Implements reco::Candidate.

Definition at line 295 of file LeafRefCandidateT.h.

295 { return false; }
template<class T>
virtual double reco::LeafRefCandidateT< T >::mass ( ) const
inlinevirtual

mass

Implements reco::Candidate.

Definition at line 104 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::mass_.

104 { return mass_; }
float mass_
mass hypothesis
template<class T>
virtual bool reco::LeafRefCandidateT< T >::massConstraint ( ) const
inlineprivatevirtual

do mass constraint?

Implements reco::Candidate.

Definition at line 298 of file LeafRefCandidateT.h.

298 { return false; }
template<class T>
virtual double reco::LeafRefCandidateT< T >::massSqr ( ) const
inlinevirtual

mass squared

Implements reco::Candidate.

Definition at line 106 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::mass_.

106 { return mass_ * mass_; }
float mass_
mass hypothesis
template<class T>
virtual const CandidateBaseRef& reco::LeafRefCandidateT< T >::masterClone ( ) const
inlinevirtual

returns ptr to master clone, if existing. Throws an exception unless the concrete Candidate type is ShallowCloneCandidate

Implements reco::Candidate.

Definition at line 156 of file LeafRefCandidateT.h.

Referenced by reco::LeafRefCandidateT< T >::get(), and reco::LeafRefCandidateT< T >::numberOf().

156  {
157  static CandidateBaseRef dummyRef; return dummyRef;
158  }
edm::RefToBase< Candidate > CandidateBaseRef
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:31
template<class T>
virtual const CandidatePtr& reco::LeafRefCandidateT< T >::masterClonePtr ( ) const
inlinevirtual

returns ptr to master clone, if existing. Throws an exception unless the concrete Candidate type is ShallowClonePtrCandidate

Implements reco::Candidate.

Definition at line 164 of file LeafRefCandidateT.h.

164  {
165  static CandidatePtr dummyPtr; return dummyPtr;
166  }
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
template<class T>
template<typename Ref >
Ref reco::LeafRefCandidateT< T >::masterRef ( ) const
inline

cast master clone reference to a concrete type

Definition at line 170 of file LeafRefCandidateT.h.

170 { Ref dummyRef; return dummyRef; }
template<class T>
virtual Vector reco::LeafRefCandidateT< T >::momentum ( ) const
inlinevirtual

spatial momentum vector

Implements reco::Candidate.

Definition at line 93 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::cacheCartesian(), and reco::LeafRefCandidateT< T >::p4Cartesian_.

93 { cacheCartesian(); return p4Cartesian_.Vect(); }
LorentzVector p4Cartesian_
internal cache for p4
void cacheCartesian() const
set internal cache
template<class T>
virtual const Candidate* reco::LeafRefCandidateT< T >::mother ( size_type  ) const
inlinevirtual

return mother at a given position (throws an exception)

Implements reco::Candidate.

Definition at line 66 of file LeafRefCandidateT.h.

66 { return 0; }
template<class T>
virtual double reco::LeafRefCandidateT< T >::mt ( ) const
inlinevirtual

transverse mass

Implements reco::Candidate.

Definition at line 108 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::cachePolar(), and reco::LeafRefCandidateT< T >::p4Polar_.

108 { cachePolar(); return p4Polar_.Mt(); }
PolarLorentzVector p4Polar_
internal cache for p4
void cachePolar() const
set internal cache
template<class T>
virtual double reco::LeafRefCandidateT< T >::mtSqr ( ) const
inlinevirtual

transverse mass squared

Implements reco::Candidate.

Definition at line 110 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::cachePolar(), and reco::LeafRefCandidateT< T >::p4Polar_.

110 { cachePolar(); return p4Polar_.Mt2(); }
PolarLorentzVector p4Polar_
internal cache for p4
void cachePolar() const
set internal cache
template<class T>
template<typename C >
size_type reco::LeafRefCandidateT< T >::numberOf ( ) const
inline

number of components

Definition at line 193 of file LeafRefCandidateT.h.

References funct::C, reco::LeafRefCandidateT< T >::hasMasterClone(), and reco::LeafRefCandidateT< T >::masterClone().

193  {
194  if ( hasMasterClone() ) return masterClone()->numberOf<C>();
195  else return reco::numberOf<C>( * this );
196  }
virtual const CandidateBaseRef & masterClone() const
size_type numberOf() const
number of components
Definition: Candidate.h:236
virtual bool hasMasterClone() const
This only happens if the concrete Candidate type is ShallowCloneCandidate.
template<class T>
template<typename C , typename Tag >
size_type reco::LeafRefCandidateT< T >::numberOf ( ) const
inline

number of components

Definition at line 198 of file LeafRefCandidateT.h.

References funct::C, reco::LeafRefCandidateT< T >::hasMasterClone(), and reco::LeafRefCandidateT< T >::masterClone().

198  {
199  if ( hasMasterClone() ) return masterClone()->numberOf<C, Tag>();
200  else return reco::numberOf<C, Tag>( * this );
201  }
virtual const CandidateBaseRef & masterClone() const
size_type numberOf() const
number of components
Definition: Candidate.h:236
virtual bool hasMasterClone() const
This only happens if the concrete Candidate type is ShallowCloneCandidate.
template<class T>
virtual size_t reco::LeafRefCandidateT< T >::numberOfDaughters ( ) const
inlinevirtual

number of daughters

Implements reco::Candidate.

Definition at line 60 of file LeafRefCandidateT.h.

60 { return 0; }
template<class T>
virtual size_t reco::LeafRefCandidateT< T >::numberOfMothers ( ) const
inlinevirtual

number of mothers

Implements reco::Candidate.

Definition at line 64 of file LeafRefCandidateT.h.

64 { return 0; }
template<class T>
virtual size_t reco::LeafRefCandidateT< T >::numberOfSourceCandidatePtrs ( ) const
inlinevirtual

return the number of source Candidates ( the candidates used to construct this Candidate)

Implements reco::Candidate.

Definition at line 75 of file LeafRefCandidateT.h.

75 { return 0;}
template<class T >
bool reco::LeafRefCandidateT< T >::overlap ( const Candidate o) const
protectedvirtual

check overlap with another Candidate

Implements reco::Candidate.

Definition at line 332 of file LeafRefCandidateT.h.

References DeDxDiscriminatorTools::charge(), reco::Candidate::charge(), reco::Candidate::p4(), p4, and reco::Candidate::vertex().

332  {
333  return p4() == o.p4() && vertex() == o.vertex() && charge() == o.charge();
334  }
virtual int charge() const
electric charge
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
virtual const Point & vertex() const
vertex position
template<class T >
bool reco::LeafRefCandidateT< T >::overlap ( const LeafRefCandidateT< T > &  o) const
protectedvirtual

Definition at line 338 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::ref_.

338  {
339  return ref_ == o.ref_;
340  }
template<class T>
virtual double reco::LeafRefCandidateT< T >::p ( ) const
inlinevirtual

magnitude of momentum vector

Implements reco::Candidate.

Definition at line 98 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::cacheCartesian(), and reco::LeafRefCandidateT< T >::p4Cartesian_.

98 { cacheCartesian(); return p4Cartesian_.P(); }
LorentzVector p4Cartesian_
internal cache for p4
void cacheCartesian() const
set internal cache
template<class T>
virtual const LorentzVector& reco::LeafRefCandidateT< T >::p4 ( ) const
inlinevirtual

four-momentum Lorentz vector

Implements reco::Candidate.

Definition at line 89 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::cacheCartesian(), and reco::LeafRefCandidateT< T >::p4Cartesian_.

89 { cacheCartesian(); return p4Cartesian_; }
LorentzVector p4Cartesian_
internal cache for p4
void cacheCartesian() const
set internal cache
template<class T>
virtual int reco::LeafRefCandidateT< T >::pdgId ( ) const
inlinevirtual

pdg ID: dummy for now

Implements reco::Candidate.

Definition at line 86 of file LeafRefCandidateT.h.

86 { return 0; }
template<class T>
virtual double reco::LeafRefCandidateT< T >::phi ( ) const
inlinevirtual

momentum azimuthal angle

Implements reco::Candidate.

Definition at line 120 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::ref_.

120 { return ref_->phi(); }
template<class T>
virtual const PolarLorentzVector& reco::LeafRefCandidateT< T >::polarP4 ( ) const
inlinevirtual

four-momentum Lorentz vector

Implements reco::Candidate.

Definition at line 91 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::cachePolar(), and reco::LeafRefCandidateT< T >::p4Polar_.

91 { cachePolar(); return p4Polar_; }
PolarLorentzVector p4Polar_
internal cache for p4
void cachePolar() const
set internal cache
template<class T>
virtual double reco::LeafRefCandidateT< T >::pt ( ) const
inlinevirtual

transverse momentum

Implements reco::Candidate.

Definition at line 118 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::ref_.

118 { return ref_->pt(); }
template<class T>
virtual double reco::LeafRefCandidateT< T >::px ( ) const
inlinevirtual

x coordinate of momentum vector

Implements reco::Candidate.

Definition at line 112 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::cacheCartesian(), and reco::LeafRefCandidateT< T >::p4Cartesian_.

112 { cacheCartesian(); return p4Cartesian_.Px(); }
LorentzVector p4Cartesian_
internal cache for p4
void cacheCartesian() const
set internal cache
template<class T>
virtual double reco::LeafRefCandidateT< T >::py ( ) const
inlinevirtual

y coordinate of momentum vector

Implements reco::Candidate.

Definition at line 114 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::cacheCartesian(), and reco::LeafRefCandidateT< T >::p4Cartesian_.

114 { cacheCartesian(); return p4Cartesian_.Py(); }
LorentzVector p4Cartesian_
internal cache for p4
void cacheCartesian() const
set internal cache
template<class T>
virtual double reco::LeafRefCandidateT< T >::pz ( ) const
inlinevirtual

z coordinate of momentum vector

Implements reco::Candidate.

Definition at line 116 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::cacheCartesian(), and reco::LeafRefCandidateT< T >::p4Cartesian_.

116 { cacheCartesian(); return p4Cartesian_.Pz(); }
LorentzVector p4Cartesian_
internal cache for p4
void cacheCartesian() const
set internal cache
template<class T>
virtual double reco::LeafRefCandidateT< T >::rapidity ( ) const
inlinevirtual

rapidity

Implements reco::Candidate.

Definition at line 126 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::cachePolar(), and reco::LeafRefCandidateT< T >::p4Polar_.

Referenced by reco::LeafRefCandidateT< T >::y().

126 { cachePolar(); return p4Polar_.Rapidity(); }
PolarLorentzVector p4Polar_
internal cache for p4
void cachePolar() const
set internal cache
template<class T>
virtual void reco::LeafRefCandidateT< T >::setCharge ( Charge  q)
inlineprivatevirtual

Hide these from all users:

Implements reco::Candidate.

Definition at line 277 of file LeafRefCandidateT.h.

277 { return; }
template<class T>
virtual void reco::LeafRefCandidateT< T >::setLongLived ( )
inlineprivatevirtual

set long lived flag

Implements reco::Candidate.

Definition at line 294 of file LeafRefCandidateT.h.

294 { return; }
template<class T>
virtual void reco::LeafRefCandidateT< T >::setMass ( double  m)
inlinevirtual

set particle mass

Implements reco::Candidate.

Definition at line 131 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::clearCache(), m, and reco::LeafRefCandidateT< T >::mass_.

131  {
132  mass_ = m;
133  clearCache();
134  }
void clearCache() const
clear internal cache
float mass_
mass hypothesis
template<class T>
virtual void reco::LeafRefCandidateT< T >::setMassConstraint ( )
inlineprivatevirtual

set mass constraint flag

Implements reco::Candidate.

Definition at line 297 of file LeafRefCandidateT.h.

297 { return;}
template<class T>
virtual void reco::LeafRefCandidateT< T >::setP4 ( const LorentzVector p4)
inlineprivatevirtual

set 4-momentum

Implements reco::Candidate.

Definition at line 280 of file LeafRefCandidateT.h.

280  {
281  return;
282  }
template<class T>
virtual void reco::LeafRefCandidateT< T >::setP4 ( const PolarLorentzVector p4)
inlineprivatevirtual

set 4-momentum

Implements reco::Candidate.

Definition at line 283 of file LeafRefCandidateT.h.

283  {
284  return;
285  }
template<class T>
virtual void reco::LeafRefCandidateT< T >::setPdgId ( int  pdgId)
inlineprivatevirtual

Implements reco::Candidate.

Definition at line 290 of file LeafRefCandidateT.h.

290 { return; }
template<class T>
virtual void reco::LeafRefCandidateT< T >::setPz ( double  pz)
inlineprivatevirtual

Implements reco::Candidate.

Definition at line 286 of file LeafRefCandidateT.h.

286  {
287  return;
288  }
template<class T>
virtual void reco::LeafRefCandidateT< T >::setStatus ( int  status)
inlineprivatevirtual

set status word

Implements reco::Candidate.

Definition at line 292 of file LeafRefCandidateT.h.

292 { return; }
template<class T>
virtual void reco::LeafRefCandidateT< T >::setThreeCharge ( Charge  qx3)
inlineprivatevirtual

set electric charge

Implements reco::Candidate.

Definition at line 279 of file LeafRefCandidateT.h.

279 { return; }
template<class T>
virtual void reco::LeafRefCandidateT< T >::setVertex ( const Point vertex)
inlineprivatevirtual

set vertex

Implements reco::Candidate.

Definition at line 289 of file LeafRefCandidateT.h.

289 { return; }
template<class T>
virtual CandidatePtr reco::LeafRefCandidateT< T >::sourceCandidatePtr ( size_type  i) const
inlinevirtual

return a Ptr to one of the source Candidates ( the candidates used to construct this Candidate)

Reimplemented from reco::Candidate.

Definition at line 78 of file LeafRefCandidateT.h.

78  {
79  static CandidatePtr dummyPtr;
80  return dummyPtr;
81  }
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
template<class T>
virtual int reco::LeafRefCandidateT< T >::status ( ) const
inlineprivatevirtual

status word

Implements reco::Candidate.

Definition at line 291 of file LeafRefCandidateT.h.

291 { return 0; }
template<class T>
virtual double reco::LeafRefCandidateT< T >::theta ( ) const
inlinevirtual

momentum polar angle

Implements reco::Candidate.

Definition at line 122 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::ref_.

122 { return ref_->theta(); }
template<class T>
virtual int reco::LeafRefCandidateT< T >::threeCharge ( ) const
inlineprivatevirtual

electric charge

Implements reco::Candidate.

Definition at line 278 of file LeafRefCandidateT.h.

278 { return 0; }
template<class T>
virtual const Point& reco::LeafRefCandidateT< T >::vertex ( ) const
inlinevirtual

vertex position

Implements reco::Candidate.

Definition at line 137 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::ref_.

137 { return ref_->vertex(); }
template<class T>
virtual double reco::LeafRefCandidateT< T >::vertexChi2 ( ) const
inlineprivatevirtual

chi-squares

Implements reco::Candidate.

Definition at line 299 of file LeafRefCandidateT.h.

299 { return 0.; }
template<class T>
virtual double reco::LeafRefCandidateT< T >::vertexCovariance ( int  i,
int  j 
) const
inlineprivatevirtual

(i, j)-th element of error matrix, i, j = 0, ... 2

Implements reco::Candidate.

Definition at line 302 of file LeafRefCandidateT.h.

302 { return 0.; }
template<class T>
CovarianceMatrix reco::LeafRefCandidateT< T >::vertexCovariance ( ) const
inlineprivatevirtual

fill SMatrix

Reimplemented from reco::Candidate.

Definition at line 303 of file LeafRefCandidateT.h.

References m.

template<class T>
virtual double reco::LeafRefCandidateT< T >::vertexNdof ( ) const
inlineprivatevirtual

Number of degrees of freedom Meant to be Double32_t for soft-assignment fitters: tracks may contribute to the vertex with fractional weights. The ndof is then = to the sum of the track weights. see e.g. CMS NOTE-2006/032, CMS NOTE-2004/002

Implements reco::Candidate.

Definition at line 300 of file LeafRefCandidateT.h.

300 { return 0.; }
template<class T>
virtual double reco::LeafRefCandidateT< T >::vertexNormalizedChi2 ( ) const
inlineprivatevirtual

chi-squared divided by n.d.o.f.

Implements reco::Candidate.

Definition at line 301 of file LeafRefCandidateT.h.

301 { return 0.; }
template<class T>
virtual double reco::LeafRefCandidateT< T >::vx ( ) const
inlinevirtual

x coordinate of vertex position

Implements reco::Candidate.

Definition at line 139 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::ref_.

139 { return ref_->vx(); }
template<class T>
virtual double reco::LeafRefCandidateT< T >::vy ( ) const
inlinevirtual

y coordinate of vertex position

Implements reco::Candidate.

Definition at line 141 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::ref_.

141 { return ref_->vy(); }
template<class T>
virtual double reco::LeafRefCandidateT< T >::vz ( ) const
inlinevirtual

z coordinate of vertex position

Implements reco::Candidate.

Definition at line 143 of file LeafRefCandidateT.h.

References reco::LeafRefCandidateT< T >::ref_.

143 { return ref_->vz(); }
template<class T>
virtual double reco::LeafRefCandidateT< T >::y ( ) const
inlinevirtual

Friends And Related Function Documentation

template<class T>
friend class ::OverlapChecker
friend

Definition at line 262 of file LeafRefCandidateT.h.

template<class T>
template<typename , typename , typename >
friend struct component
friend

Definition at line 261 of file LeafRefCandidateT.h.

template<class T>
friend class ShallowCloneCandidate
friend

Definition at line 263 of file LeafRefCandidateT.h.

template<class T>
friend class ShallowClonePtrCandidate
friend

Definition at line 264 of file LeafRefCandidateT.h.

Member Data Documentation

template<class T>
edm::BoolCache reco::LeafRefCandidateT< T >::cacheCartesianFixed_
mutableprotected
template<class T>
edm::BoolCache reco::LeafRefCandidateT< T >::cachePolarFixed_
mutableprotected

has cache been set?

Definition at line 239 of file LeafRefCandidateT.h.

Referenced by reco::LeafRefCandidateT< T >::cachePolar(), and reco::LeafRefCandidateT< T >::clearCache().

template<class T>
const unsigned int reco::LeafRefCandidateT< T >::longLivedTag
staticprivate

Definition at line 293 of file LeafRefCandidateT.h.

template<class T>
float reco::LeafRefCandidateT< T >::mass_
protected
template<class T>
const unsigned int reco::LeafRefCandidateT< T >::massConstraintTag
staticprivate

Definition at line 296 of file LeafRefCandidateT.h.

template<class T>
LorentzVector reco::LeafRefCandidateT< T >::p4Cartesian_
mutableprotected
template<class T>
PolarLorentzVector reco::LeafRefCandidateT< T >::p4Polar_
mutableprotected
template<class T>
T reco::LeafRefCandidateT< T >::ref_
protected