CMS 3D CMS Logo

reco::Candidate Class Reference

generic reconstructed particle candidate More...

#include <DataFormats/Candidate/interface/Candidate.h>

Inheritance diagram for reco::Candidate:

reco::Particle reco::CompositeCandidate reco::CompositePtrCandidate reco::CompositeRefBaseCandidate reco::CompositeRefCandidate reco::CompositeRefCandidateT< D > reco::CompositeRefCandidateT< edm::RefVector > reco::LeafCandidate reco::ShallowCloneCandidate reco::ShallowClonePtrCandidate

List of all members.

Public Types

enum  { dimension = 3 }
 error matrix dimension More...
enum  { size = dimension * (dimension + 1)/2 }
 matix size More...
typedef candidate::const_iterator const_iterator
typedef math::Error< dimension >
::type 
CovarianceMatrix
 covariance error matrix (3x3)
typedef unsigned int index
 index type
typedef candidate::iterator iterator
typedef size_t size_type
 size type

Public Member Functions

virtual iterator begin ()=0
 first daughter iterator
virtual const_iterator begin () const =0
 first daughter const_iterator
template<typename S>
daughter_iterator< S >::type beginFilter (const S &s) const
 Candidate (Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values
 Candidate (Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values
 Candidate (const Particle &p)
 constructor from a Particle
 Candidate ()
 default constructor
virtual Candidateclone () const =0
 returns a clone of the Candidate object
virtual const Candidatedaughter (const std::string &s) const
 return daughter with a specified role name
virtual Candidatedaughter (const std::string &s)
 return daughter with a specified role name
virtual Candidatedaughter (size_type i)=0
 return daughter at a given position, i = 0, ... numberOfDaughters() - 1
virtual const Candidatedaughter (size_type i) const =0
 return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode)
virtual iterator end ()=0
 last daughter iterator
virtual const_iterator end () const =0
 last daughter const_iterator
template<typename S>
daughter_iterator< S >::type endFilter (const S &s) const
virtual void fillVertexCovariance (CovarianceMatrix &v) const
 fill SMatrix
template<typename T, typename Tag>
get (size_type i) const
 get a component
template<typename T>
get (size_type i) const
 get a component
template<typename T, typename Tag>
get () const
 get a component
template<typename T>
get () const
 get a component
virtual bool hasMasterClone () const
 returns true if this candidate has a reference to a master clone.
virtual bool hasMasterClonePtr () const
 returns true if this candidate has a ptr to a master clone.
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
virtual const CandidateBaseRefmasterClone () const
 returns ptr to master clone, if existing.
virtual const CandidatePtrmasterClonePtr () const
 returns ptr to master clone, if existing.
template<typename Ref>
Ref masterRef () const
 cast master clone reference to a concrete type
virtual const Candidatemother (size_type i=0) const =0
 return pointer to mother
template<typename T, typename Tag>
size_type numberOf () const
 number of components
template<typename T>
size_type numberOf () const
 number of components
virtual size_type numberOfDaughters () const =0
 number of daughters
virtual size_type numberOfMothers () const =0
 number of mothers (zero or one in most of but not all the cases)
virtual size_t numberOfSourceCandidatePtrs () const
 return the number of source Candidates ( the candidates used to construct this Candidate)
virtual CandidatePtr sourceCandidatePtr (size_type i) const
 return a Ptr to one of the source Candidates ( the candidates used to construct this Candidate)
virtual double vertexChi2 () const
 chi-squares
CovarianceMatrix vertexCovariance () const
 return SMatrix
virtual double vertexCovariance (int i, int j) const
 (i, j)-th element of error matrix, i, j = 0, ... 2
virtual double vertexNdof () const
 Number of degrees of freedom Meant to be Double32_t for soft-assignment fitters: tracks may contribute to the vertex with fractional weights.
virtual double vertexNormalizedChi2 () const
 chi-squared divided by n.d.o.f.
virtual ~Candidate ()
 destructor

Private Member Functions

virtual bool overlap (const Candidate &) const =0
 check overlap with another Candidate

Friends

class ::OverlapChecker
struct component
class ShallowCloneCandidate
class ShallowClonePtrCandidate

Classes

struct  daughter_iterator


Detailed Description

generic reconstructed particle candidate

Author:
Luca Lista, INFN
Version:
Id
Candidate.h,v 1.46 2008/07/22 06:07:44 llista Exp

Definition at line 24 of file Candidate.h.


Member Typedef Documentation

typedef candidate::const_iterator reco::Candidate::const_iterator

Definition at line 28 of file Candidate.h.

typedef math::Error<dimension>::type reco::Candidate::CovarianceMatrix

covariance error matrix (3x3)

Definition at line 33 of file Candidate.h.

typedef unsigned int reco::Candidate::index

index type

Definition at line 37 of file Candidate.h.

typedef candidate::iterator reco::Candidate::iterator

Definition at line 29 of file Candidate.h.

typedef size_t reco::Candidate::size_type

size type

Definition at line 27 of file Candidate.h.


Member Enumeration Documentation

anonymous enum

error matrix dimension

Enumerator:
dimension 

Definition at line 31 of file Candidate.h.

00031 { dimension = 3 };

anonymous enum

matix size

Enumerator:
size 

Definition at line 35 of file Candidate.h.

00035 { size = dimension * (dimension + 1)/2 };


Constructor & Destructor Documentation

reco::Candidate::Candidate (  )  [inline]

default constructor

Definition at line 39 of file Candidate.h.

Referenced by GeneratorTau::computeStableDecayProducts(), GeneratorTau::decayToPDGClassification(), and GeneratorTau::getLeadTrack().

00039 : Particle() { }

reco::Candidate::Candidate ( const Particle p  )  [inline, explicit]

constructor from a Particle

Definition at line 41 of file Candidate.h.

00041 : Particle( p ) { }

reco::Candidate::Candidate ( Charge  q,
const LorentzVector p4,
const Point vtx = Point( 0, 0, 0 ),
int  pdgId = 0,
int  status = 0,
bool  integerCharge = true 
) [inline]

constructor from values

Definition at line 43 of file Candidate.h.

00044                                                                           : 
00045       Particle( q, p4, vtx, pdgId, status, integerCharge ) { }

reco::Candidate::Candidate ( Charge  q,
const PolarLorentzVector p4,
const Point vtx = Point( 0, 0, 0 ),
int  pdgId = 0,
int  status = 0,
bool  integerCharge = true 
) [inline]

constructor from values

Definition at line 47 of file Candidate.h.

00048                                                                           : 
00049       Particle( q, p4, vtx, pdgId, status, integerCharge ) { }

Candidate::~Candidate (  )  [virtual]

destructor

Definition at line 6 of file Candidate.cc.

00006 { }


Member Function Documentation

virtual iterator reco::Candidate::begin (  )  [pure virtual]

first daughter iterator

Implemented in reco::CompositeCandidate, reco::CompositePtrCandidate, reco::CompositeRefBaseCandidate, reco::CompositeRefCandidate, reco::CompositeRefCandidateT< D >, reco::LeafCandidate, reco::ShallowCloneCandidate, reco::ShallowClonePtrCandidate, and reco::CompositeRefCandidateT< edm::RefVector >.

virtual const_iterator reco::Candidate::begin (  )  const [pure virtual]

first daughter const_iterator

Implemented in reco::CompositeCandidate, reco::CompositePtrCandidate, reco::CompositeRefBaseCandidate, reco::CompositeRefCandidate, reco::CompositeRefCandidateT< D >, reco::LeafCandidate, reco::ShallowCloneCandidate, reco::ShallowClonePtrCandidate, and reco::CompositeRefCandidateT< edm::RefVector >.

Referenced by beginFilter(), JetCharge::charge(), TtDecayChannelSelector::countProngs(), JetMCTagUtils::EnergyRatioFromBHadrons(), JetMCTagUtils::EnergyRatioFromCHadrons(), OverlapChecker::operator()(), FastCandMatcher< C >::operator()(), CandMatcherBase< C1, C2 >::operator()(), AddFourMomenta::set(), Booster::set(), and TtDecayChannelSelector::tauDecay().

template<typename S>
daughter_iterator<S>::type reco::Candidate::beginFilter ( const S &  s  )  const [inline]

Definition at line 153 of file Candidate.h.

References begin(), and end().

00153                                                                        {
00154       return boost::make_filter_iterator(s, begin(), end());
00155     }

virtual Candidate* reco::Candidate::clone (  )  const [pure virtual]

returns a clone of the Candidate object

Implemented in reco::CandidateWithRef< Ref >, reco::CompositeCandidate, reco::CompositePtrCandidate, reco::CompositeRefBaseCandidate, reco::CompositeRefCandidate, reco::CompositeRefCandidateT< D >, reco::LeafCandidate, reco::NamedCompositeCandidate, reco::ShallowCloneCandidate, reco::ShallowClonePtrCandidate, reco::VertexCompositeCandidate, reco::Electron, reco::GsfElectron, reco::Photon, reco::SiStripElectron, reco::EcalIsolatedParticleCandidate, reco::IsolatedPixelTrackCandidate, reco::GenParticle, reco::BasicJet, reco::CaloJet, reco::GenJet, reco::PFJet, l1extra::L1EmParticle, l1extra::L1EtMissParticle, l1extra::L1JetParticle, l1extra::L1MuonParticle, reco::Muon, reco::IsolatedPFCandidate, reco::PFCandidate, reco::PileUpPFCandidate, pat::CompositeCandidate, pat::GenericParticle, pat::TriggerPrimitive, reco::CaloRecHitCandidate, reco::RecoCaloTowerCandidate, reco::RecoChargedCandidate, reco::RecoEcalCandidate, reco::RecoStandAloneMuonCandidate, reco::BaseTau, reco::CaloTau, reco::PFTau, reco::PFTauDecayMode, reco::CompositeRefCandidateT< edm::RefVector >, pat::Lepton< reco::BaseTau >, pat::Lepton< reco::GsfElectron >, and pat::Lepton< reco::Muon >.

Referenced by reco::CompositeCandidate::addDaughter(), reco::NamedCompositeCandidate::addDaughter(), and cloneDecayTree().

const Candidate * Candidate::daughter ( const std::string &  s  )  const [virtual]

return daughter with a specified role name

Reimplemented in reco::CompositeCandidate, and reco::NamedCompositeCandidate.

Definition at line 68 of file Candidate.cc.

References edm::errors::UnimplementedFeature.

00068                                                             {
00069   throw edm::Exception(edm::errors::UnimplementedFeature) 
00070     << "This Candidate type does not implement daughter(std::string). "
00071     << "Please use CompositeCandidate or NamedCompositeCandidate.\n";
00072 }

Candidate * Candidate::daughter ( const std::string &  s  )  [virtual]

return daughter with a specified role name

Reimplemented in reco::CompositeCandidate, and reco::NamedCompositeCandidate.

Definition at line 74 of file Candidate.cc.

References edm::errors::UnimplementedFeature.

00074                                                 {
00075   throw edm::Exception(edm::errors::UnimplementedFeature) 
00076     << "This Candidate type does not implement daughter(std::string). "
00077     << "Please use CompositeCandidate or NamedCompositeCandidate.\n";
00078 }

virtual Candidate* reco::Candidate::daughter ( size_type  i  )  [pure virtual]

return daughter at a given position, i = 0, ... numberOfDaughters() - 1

virtual const Candidate* reco::Candidate::daughter ( size_type  i  )  const [pure virtual]

return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode)

Referenced by ZHistogrammer::analyze(), ZMuMuAnalyzer_cynematics::analyze(), ZMuMuEfficiency::analyze(), MCEfficiencyAnalyzer::analyze(), ZToMuMuHistogrammer::analyze(), ZMuMuAnalyzer::analyze(), HLTMCtruth::analyze(), ZMassHistogrammer::analyze(), TtFullLeptonicEvent::b(), TtFullLeptonicEvent::bBar(), cloneDecayTree(), reco::CompositeCandidate::CompositeCandidate(), JetPartonMatcher::fillAlgoritDefinition(), JetPartonMatcher::fillPhysicsDefinition(), ZToMuMuFilter::filter(), findHerwigPPME(), TtSemiLeptonicEvent::hadronicB(), TtSemiLeptonicEvent::hadronicW(), ParticleDecayDrawer::hasValidDaughters(), ParticleTreeDrawer::hasValidDaughters(), helicityAngle(), ZMuMuAnalyzer_cynematics::isContained(), TtFullLeptonicEvent::lepton(), TtSemiLeptonicEvent::lepton(), TtFullLeptonicEvent::leptonBar(), TtSemiLeptonicEvent::leptonicB(), TtSemiLeptonicEvent::leptonicW(), TtSemiLeptonicEvent::lightQuarkP(), TtSemiLeptonicEvent::lightQuarkQ(), TtSemiLeptonicEvent::neutrino(), TtFullLeptonicEvent::neutrino(), TtFullLeptonicEvent::neutrinoBar(), ZToMuMuIsolationSelector< Isolator >::operator()(), ZMuMuOverlap::operator()(), GenJetParticleSelector::operator()(), CompositeCandSelector< Selector, T1, T2, nDau >::operator()(), reco::utilsNew::CandMatcher< C >::operator[](), reco::PFTauDecayMode::pfMasterClones(), FlavorHistoryProducer::produce(), ZToLLEdmNtupleDumper::produce(), CandMassKinFitter::set(), TtFullLeptonicEvent::wMinus(), TtFullLeptonicEvent::wPlus(), and zMCLeptonDaughters().

virtual iterator reco::Candidate::end (  )  [pure virtual]

last daughter iterator

Implemented in reco::CompositeCandidate, reco::CompositePtrCandidate, reco::CompositeRefBaseCandidate, reco::CompositeRefCandidate, reco::CompositeRefCandidateT< D >, reco::LeafCandidate, reco::ShallowCloneCandidate, reco::ShallowClonePtrCandidate, and reco::CompositeRefCandidateT< edm::RefVector >.

virtual const_iterator reco::Candidate::end (  )  const [pure virtual]

last daughter const_iterator

Implemented in reco::CompositeCandidate, reco::CompositePtrCandidate, reco::CompositeRefBaseCandidate, reco::CompositeRefCandidate, reco::CompositeRefCandidateT< D >, reco::LeafCandidate, reco::ShallowCloneCandidate, reco::ShallowClonePtrCandidate, and reco::CompositeRefCandidateT< edm::RefVector >.

Referenced by FBaseSimEvent::addParticles(), beginFilter(), JetCharge::charge(), TtDecayChannelSelector::countProngs(), endFilter(), JetMCTagUtils::EnergyRatioFromBHadrons(), JetMCTagUtils::EnergyRatioFromCHadrons(), OverlapChecker::operator()(), FastCandMatcher< C >::operator()(), CandMatcherBase< C1, C2 >::operator()(), GenEventKTValueProducer::produce(), AddFourMomenta::set(), Booster::set(), and TtDecayChannelSelector::tauDecay().

template<typename S>
daughter_iterator<S>::type reco::Candidate::endFilter ( const S &  s  )  const [inline]

Definition at line 157 of file Candidate.h.

References end().

00157                                                                      {
00158       return boost::make_filter_iterator(s, end(), end());
00159     }

void Candidate::fillVertexCovariance ( CovarianceMatrix v  )  const [virtual]

fill SMatrix

Definition at line 45 of file Candidate.cc.

References edm::errors::UnimplementedFeature.

Referenced by vertexCovariance().

00045                                                                  {
00046   throw edm::Exception(edm::errors::UnimplementedFeature) 
00047     << "reco::Candidate does not implement vertex covariant matrix.\n";
00048 }

template<typename T, typename Tag>
T reco::Candidate::get ( size_type  i  )  const [inline]

get a component

Definition at line 132 of file Candidate.h.

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

00132                                                                   { 
00133       if ( hasMasterClone() ) return masterClone()->get<T, Tag>( i );
00134       else return reco::get<T, Tag>( * this, i ); 
00135     }

template<typename T>
T reco::Candidate::get ( size_type  i  )  const [inline]

get a component

Definition at line 127 of file Candidate.h.

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

00127                                                     { 
00128       if ( hasMasterClone() ) return masterClone()->get<T>( i );
00129       else return reco::get<T>( * this, i ); 
00130     }

template<typename T, typename Tag>
T reco::Candidate::get ( void   )  const [inline]

get a component

Definition at line 122 of file Candidate.h.

References edm::RefToBase< T >::get(), hasMasterClone(), and masterClone().

00122                                                      { 
00123       if ( hasMasterClone() ) return masterClone()->get<T, Tag>();
00124       else return reco::get<T, Tag>( * this ); 
00125     }

template<typename T>
T reco::Candidate::get ( void   )  const [inline]

get a component

Definition at line 117 of file Candidate.h.

References edm::RefToBase< T >::get(), hasMasterClone(), and masterClone().

Referenced by egammaisolation::EgammaRecHitExtractor::deposit(), egammaisolation::EgammaHcalExtractor::deposit(), egammaisolation::EgammaTowerExtractor::deposit(), egammaisolation::EgammaEcalExtractor::deposit(), cms::HICFTSfromL1orL2::FTSfromL2(), EgammaEcalIsolation::getEcalEtSum(), EgammaHcalIsolation::getHcalEtSum(), PhotonTkIsolation::getIso(), EgammaRecHitIsolation::getSum_(), EgammaTowerIsolation::getTowerEtSum(), ZMuMuAnalyzer_cynematics::isContained(), and CandMassKinFitter::set().

00117                                        { 
00118       if ( hasMasterClone() ) return masterClone()->get<T>();
00119       else return reco::get<T>( * this ); 
00120     }

bool Candidate::hasMasterClone (  )  const [virtual]

returns true if this candidate has a reference to a master clone.

This only happens if the concrete Candidate type is ShallowCloneCandidate

Reimplemented in reco::ShallowCloneCandidate.

Definition at line 14 of file Candidate.cc.

Referenced by pat::HistoComposite::fill(), reco::GenJet::genParticle(), get(), reco::PFJet::getPFCandidate(), pat::Jet::getPFCandidate(), JetMaker::makeSpecific(), numberOf(), OverlapChecker::operator()(), FastCandMatcher< C >::operator()(), CandMatcherBase< C1, C2 >::operator()(), reco::utilsNew::CandMatcher< C >::operator[](), and reco::PFTauDecayMode::pfMasterClones().

00014                                      { 
00015   return false;
00016 }

bool Candidate::hasMasterClonePtr (  )  const [virtual]

returns true if this candidate has a ptr to a master clone.

This only happens if the concrete Candidate type is ShallowClonePtrCandidate

Reimplemented in reco::ShallowClonePtrCandidate.

Definition at line 24 of file Candidate.cc.

Referenced by pat::HistoComposite::fill().

00024                                         { 
00025   return false;
00026 }

bool Candidate::isCaloMuon (  )  const [virtual]

Reimplemented in reco::ShallowCloneCandidate, reco::ShallowClonePtrCandidate, and reco::Muon.

Definition at line 60 of file Candidate.cc.

00060 { return false; }

bool Candidate::isConvertedPhoton (  )  const [virtual]

Reimplemented in reco::ShallowCloneCandidate, and reco::ShallowClonePtrCandidate.

Definition at line 64 of file Candidate.cc.

00064 { return false; }

bool Candidate::isElectron (  )  const [virtual]

Reimplemented in reco::ShallowCloneCandidate, reco::ShallowClonePtrCandidate, reco::Electron, reco::GsfElectron, and reco::SiStripElectron.

Definition at line 50 of file Candidate.cc.

00050 { return false; }

bool Candidate::isGlobalMuon (  )  const [virtual]

Reimplemented in reco::ShallowCloneCandidate, reco::ShallowClonePtrCandidate, and reco::Muon.

Definition at line 54 of file Candidate.cc.

00054 { return false; }

bool Candidate::isJet (  )  const [virtual]

Reimplemented in reco::ShallowCloneCandidate, reco::ShallowClonePtrCandidate, and reco::Jet.

Definition at line 66 of file Candidate.cc.

00066 { return false; }

bool Candidate::isMuon (  )  const [virtual]

Reimplemented in reco::ShallowCloneCandidate, reco::ShallowClonePtrCandidate, and reco::Muon.

Definition at line 52 of file Candidate.cc.

00052 { return false; }

bool Candidate::isPhoton (  )  const [virtual]

Reimplemented in reco::ShallowCloneCandidate, and reco::ShallowClonePtrCandidate.

Definition at line 62 of file Candidate.cc.

00062 { return false; }

bool Candidate::isStandAloneMuon (  )  const [virtual]

Reimplemented in reco::ShallowCloneCandidate, reco::ShallowClonePtrCandidate, and reco::Muon.

Definition at line 56 of file Candidate.cc.

00056 { return false; }

bool Candidate::isTrackerMuon (  )  const [virtual]

Reimplemented in reco::ShallowCloneCandidate, reco::ShallowClonePtrCandidate, and reco::Muon.

Definition at line 58 of file Candidate.cc.

00058 { return false; }

const CandidateBaseRef & Candidate::masterClone (  )  const [virtual]

returns ptr to master clone, if existing.

Throws an exception unless the concrete Candidate type is ShallowCloneCandidate

Reimplemented in reco::ShallowCloneCandidate.

Definition at line 8 of file Candidate.cc.

References Exception.

Referenced by ZMuMuAnalyzer_cynematics::analyze(), ZMuMuEfficiency::analyze(), ZToMuMuHistogrammer::analyze(), ZMuMuAnalyzer::analyze(), ZToMuMuFilter::filter(), reco::GenJet::genParticle(), get(), reco::PFJet::getPFCandidate(), pat::Jet::getPFCandidate(), JetMaker::makeSpecific(), masterRef(), numberOf(), OverlapChecker::operator()(), FastCandMatcher< C >::operator()(), ZToMuMuIsolationSelector< Isolator >::operator()(), CandMatcherBase< C1, C2 >::operator()(), reco::utilsNew::CandMatcher< C >::operator[](), reco::PFTauDecayMode::pfMasterClones(), and ZToLLEdmNtupleDumper::produce().

00008                                                       {
00009   throw cms::Exception("Invalid Reference") 
00010     << "this Candidate has no master clone reference."
00011     << "Can't call masterClone() method.\n";
00012 }

const CandidatePtr & Candidate::masterClonePtr (  )  const [virtual]

returns ptr to master clone, if existing.

Throws an exception unless the concrete Candidate type is ShallowClonePtrCandidate

Reimplemented in reco::ShallowClonePtrCandidate.

Definition at line 18 of file Candidate.cc.

References Exception.

Referenced by pat::HistoComposite::fill().

00018                                                      {
00019   throw cms::Exception("Invalid Reference") 
00020     << "this Candidate has no master clone ptr."
00021     << "Can't call masterClonePtr() method.\n";
00022 }

template<typename Ref>
Ref reco::Candidate::masterRef (  )  const [inline]

cast master clone reference to a concrete type

Definition at line 115 of file Candidate.h.

References masterClone().

00115 { return masterClone().template castTo<Ref>(); }

virtual const Candidate* reco::Candidate::mother ( size_type  i = 0  )  const [pure virtual]

return pointer to mother

Implemented in reco::CompositePtrCandidate, and reco::CompositeRefCandidate.

Referenced by ParticleDecayDrawer::analyze(), findHerwigPPME(), HLTMuonGenericRate::findMother(), CandMCTagUtils::getAncestors(), JetAnalyzer::GetParentPartons(), FastCandMatcher< C >::operator()(), operator<<(), FlavorHistoryProducer::produce(), GenEventKTValueProducer::produce(), and CSA07EventWeightProducer::produce().

template<typename T, typename Tag>
size_type reco::Candidate::numberOf (  )  const [inline]

number of components

Definition at line 142 of file Candidate.h.

References hasMasterClone(), and masterClone().

00142                                                                   { 
00143       if ( hasMasterClone() ) return masterClone()->numberOf<T, Tag>();
00144       else return reco::numberOf<T, Tag>( * this ); 
00145     }

template<typename T>
size_type reco::Candidate::numberOf (  )  const [inline]

number of components

Definition at line 137 of file Candidate.h.

References hasMasterClone(), and masterClone().

00137                                                     { 
00138       if ( hasMasterClone() ) return masterClone()->numberOf<T>();
00139       else return reco::numberOf<T>( * this ); 
00140     }

virtual size_type reco::Candidate::numberOfDaughters (  )  const [pure virtual]

number of daughters

Implemented in reco::CompositeCandidate, reco::CompositePtrCandidate, reco::CompositeRefBaseCandidate, reco::CompositeRefCandidate, reco::CompositeRefCandidateT< D >, reco::LeafCandidate, reco::ShallowCloneCandidate, reco::ShallowClonePtrCandidate, and reco::CompositeRefCandidateT< edm::RefVector >.

Referenced by ZHistogrammer::analyze(), MCEfficiencyAnalyzer::analyze(), HLTMCtruth::analyze(), ZMassHistogrammer::analyze(), cloneDecayTree(), reco::CompositeCandidate::CompositeCandidate(), CandMatcher< C1, C2 >::compositePreselect(), JetPartonMatcher::fillAlgoritDefinition(), JetPartonMatcher::fillPhysicsDefinition(), ZToMuMuFilter::filter(), pat::PATSingleVertexSelector::filter_(), findHerwigPPME(), ParticleDecayDrawer::hasValidDaughters(), ParticleTreeDrawer::hasValidDaughters(), helicityAngle(), ZMuMuAnalyzer_cynematics::isContained(), OverlapChecker::operator()(), ZToMuMuIsolationSelector< Isolator >::operator()(), FastCandMatcher< C >::operator()(), ZMuMuOverlap::operator()(), CandMatcherBase< C1, C2 >::operator()(), GenJetParticleSelector::operator()(), CompositeCandSelector< Selector, T1, T2, nDau >::operator()(), operator<<(), reco::utilsNew::CandMatcher< C >::operator[](), reco::PFTauDecayMode::pfMasterClones(), FlavorHistoryProducer::produce(), CandMassKinFitter::set(), and zMCLeptonDaughters().

virtual size_type reco::Candidate::numberOfMothers (  )  const [pure virtual]

number of mothers (zero or one in most of but not all the cases)

Implemented in reco::CompositeCandidate, reco::CompositePtrCandidate, reco::CompositeRefBaseCandidate, reco::CompositeRefCandidate, reco::CompositeRefCandidateT< D >, reco::LeafCandidate, reco::ShallowCloneCandidate, reco::ShallowClonePtrCandidate, and reco::CompositeRefCandidateT< edm::RefVector >.

Referenced by findHerwigPPME(), CandMCTagUtils::getAncestors(), JetAnalyzer::GetParentPartons(), operator<<(), and FlavorHistoryProducer::produce().

virtual size_t reco::Candidate::numberOfSourceCandidatePtrs (  )  const [inline, virtual]

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

Reimplemented in reco::CompositePtrCandidate, reco::PFCandidate, and reco::PFTau.

Definition at line 78 of file Candidate.h.

00078 { return 0;}

virtual bool reco::Candidate::overlap ( const Candidate  )  const [private, pure virtual]

check overlap with another Candidate

Implemented in reco::CandidateWithRef< Ref >, reco::CompositeCandidate, reco::CompositePtrCandidate, reco::CompositeRefBaseCandidate, reco::CompositeRefCandidate, reco::CompositeRefCandidateT< D >, reco::LeafCandidate, reco::ShallowCloneCandidate, reco::ShallowClonePtrCandidate, reco::Electron, reco::GsfElectron, reco::Photon, reco::SiStripElectron, reco::IsolatedPixelTrackCandidate, reco::GenParticle, reco::BasicJet, reco::CaloJet, reco::GenJet, reco::PFJet, reco::CaloMET, reco::GenMET, reco::MET, reco::Muon, reco::CaloRecHitCandidate, reco::RecoCaloTowerCandidate, reco::RecoCandidate, reco::RecoChargedCandidate, reco::RecoEcalCandidate, reco::RecoStandAloneMuonCandidate, reco::BaseTau, reco::CaloTau, reco::PFTau, and reco::CompositeRefCandidateT< edm::RefVector >.

Referenced by OverlapChecker::operator()().

virtual CandidatePtr reco::Candidate::sourceCandidatePtr ( size_type  i  )  const [inline, virtual]

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

Definition at line 81 of file Candidate.h.

00081                                                                  {
00082       return CandidatePtr();
00083     }

double Candidate::vertexChi2 (  )  const [virtual]

chi-squares

Reimplemented in reco::VertexCompositeCandidate.

Definition at line 28 of file Candidate.cc.

Referenced by pat::PATSingleVertexSelector::filter_().

00028                                    { 
00029   return 0; 
00030 }

CovarianceMatrix reco::Candidate::vertexCovariance (  )  const [inline]

return SMatrix

Definition at line 98 of file Candidate.h.

References fillVertexCovariance(), and m.

00098 { CovarianceMatrix m; fillVertexCovariance(m); return m; }

double Candidate::vertexCovariance ( int  i,
int  j 
) const [virtual]

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

Reimplemented in reco::VertexCompositeCandidate.

Definition at line 40 of file Candidate.cc.

References edm::errors::UnimplementedFeature.

Referenced by pat::PATSingleVertexSelector::filter_().

00040                                                      { 
00041   throw edm::Exception(edm::errors::UnimplementedFeature) 
00042     << "reco::Candidate does not implement vertex covariant matrix.\n";
00043 }

double Candidate::vertexNdof (  )  const [virtual]

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

Reimplemented in reco::VertexCompositeCandidate.

Definition at line 32 of file Candidate.cc.

Referenced by pat::PATSingleVertexSelector::filter_().

00032                                    { 
00033   return 0; 
00034 }

double Candidate::vertexNormalizedChi2 (  )  const [virtual]

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

Reimplemented in reco::VertexCompositeCandidate.

Definition at line 36 of file Candidate.cc.

00036                                              {
00037   return 0;
00038 }


Friends And Related Function Documentation

friend class ::OverlapChecker [friend]

Definition at line 175 of file Candidate.h.

friend struct component [friend]

Reimplemented in reco::RecoCandidate.

Definition at line 174 of file Candidate.h.

friend class ShallowCloneCandidate [friend]

Definition at line 176 of file Candidate.h.

friend class ShallowClonePtrCandidate [friend]

Definition at line 177 of file Candidate.h.


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:51:00 2009 for CMSSW by  doxygen 1.5.4