CMS 3D CMS Logo

Public Types | Public Member Functions | Protected Member Functions | Friends

reco::RecoCandidate Class Reference

#include <RecoCandidate.h>

Inheritance diagram for reco::RecoCandidate:
reco::LeafCandidate reco::Candidate pat::PATObject< reco::RecoCandidate > reco::BaseTau reco::Electron reco::GsfElectron reco::IsolatedPixelTrackCandidate reco::MET reco::Muon reco::Photon reco::RecoCaloTowerCandidate reco::RecoChargedCandidate reco::RecoEcalCandidate reco::RecoStandAloneMuonCandidate reco::SiStripElectron

List of all members.

Public Types

enum  TrackType { noTrackType, recoTrackType, gsfTrackType }
 

track type

More...

Public Member Functions

virtual const TrackbestTrack () const
 best track pointer
virtual TrackBaseRef bestTrackRef () const
 best track RefToBase
virtual TrackType bestTrackType () const
 track type
virtual CaloTowerRef caloTower () const
 reference to a CaloTower
virtual RecoCandidateclone () const
 returns a clone of the Candidate object
virtual reco::TrackRef combinedMuon () const
 reference to a stand-alone muon Track
virtual reco::GsfTrackRef gsfTrack () const
 reference to a GsfTrack
virtual size_t numberOfTracks () const
 number of multiple Tracks
virtual bool overlap (const Candidate &) const =0
 check overlap with another candidate
 RecoCandidate ()
 default constructor
 RecoCandidate (Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0)
 constructor from values
 RecoCandidate (Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0)
 constructor from values
virtual reco::TrackRef standAloneMuon () const
 reference to a stand-alone muon Track
virtual reco::SuperClusterRef superCluster () const
 reference to a SuperCluster
virtual reco::TrackRef track () const
 reference to a Track
virtual reco::TrackRef track (size_t) const
 reference to one of multiple Tracks
virtual ~RecoCandidate ()
 destructor

Protected Member Functions

template<typename R >
bool checkOverlap (const R &r1, const R &r2) const
 check if two components overlap

Friends

struct component

Detailed Description

base class for all Reco Candidates

Author:
Luca Lista, INFN
Version:
Id:
RecoCandidate.h,v 1.27 2011/11/01 17:22:43 slava77 Exp

Definition at line 21 of file RecoCandidate.h.


Member Enumeration Documentation

track type

Enumerator:
noTrackType 
recoTrackType 
gsfTrackType 

Definition at line 61 of file RecoCandidate.h.


Constructor & Destructor Documentation

reco::RecoCandidate::RecoCandidate ( ) [inline]

default constructor

Definition at line 24 of file RecoCandidate.h.

: LeafCandidate() { }
reco::RecoCandidate::RecoCandidate ( Charge  q,
const LorentzVector p4,
const Point vtx = Point( 0, 0, 0 ),
int  pdgId = 0,
int  status = 0 
) [inline]

constructor from values

Definition at line 26 of file RecoCandidate.h.

                                                   : 
      LeafCandidate( q, p4, vtx, pdgId, status ) { }
reco::RecoCandidate::RecoCandidate ( Charge  q,
const PolarLorentzVector p4,
const Point vtx = Point( 0, 0, 0 ),
int  pdgId = 0,
int  status = 0 
) [inline]

constructor from values

Definition at line 30 of file RecoCandidate.h.

                                                   : 
      LeafCandidate( q, p4, vtx, pdgId, status ) { }
RecoCandidate::~RecoCandidate ( ) [virtual]

destructor

Definition at line 8 of file RecoCandidate.cc.

{ }

Member Function Documentation

const Track * RecoCandidate::bestTrack ( ) const [virtual]

best track pointer

Reimplemented in reco::Muon.

Definition at line 46 of file RecoCandidate.cc.

References combinedMuon(), edm::Ref< C, T, F >::get(), gsfTrack(), edm::Ref< C, T, F >::isNonnull(), standAloneMuon(), and track().

Referenced by CandIsoDepositProducer::extractTrack().

                                             {
  TrackRef muRef = combinedMuon();
  if( muRef.isNonnull() ) 
    return muRef.get();
  TrackRef trkRef = track();
  if ( trkRef.isNonnull() ) 
    return trkRef.get();
  GsfTrackRef gsfTrkRef = gsfTrack();
  if ( gsfTrkRef.isNonnull() )
    return gsfTrkRef.get();
  TrackRef staRef = standAloneMuon(); 
  if ( staRef.isNonnull() ) 
    return staRef.get(); 
  return 0;
}
TrackBaseRef RecoCandidate::bestTrackRef ( ) const [virtual]

best track RefToBase

Reimplemented in reco::Muon.

Definition at line 62 of file RecoCandidate.cc.

References combinedMuon(), gsfTrack(), edm::Ref< C, T, F >::isNonnull(), standAloneMuon(), and track().

Referenced by pat::helper::VertexingHelper::getTrack_().

                                               {
  TrackRef muRef = combinedMuon();
  if( muRef.isNonnull() ) return TrackBaseRef(muRef);
  TrackRef trkRef = track();
  if ( trkRef.isNonnull() ) return TrackBaseRef(trkRef);
  GsfTrackRef gsfTrkRef = gsfTrack();
  if ( gsfTrkRef.isNonnull() ) return TrackBaseRef(gsfTrkRef);
  TrackRef staRef = standAloneMuon(); 
  if ( staRef.isNonnull() ) return TrackBaseRef(staRef); 
  return TrackBaseRef();
}
RecoCandidate::TrackType RecoCandidate::bestTrackType ( ) const [virtual]

track type

Definition at line 75 of file RecoCandidate.cc.

References combinedMuon(), gsfTrack(), gsfTrackType, noTrackType, recoTrackType, and track().

                                                          {
  if( combinedMuon().isNonnull() ) 
    return recoTrackType;
  if ( track().isNonnull() ) 
    return recoTrackType;
  if ( gsfTrack().isNonnull() ) 
    return gsfTrackType;
  return noTrackType;
}
CaloTowerRef RecoCandidate::caloTower ( ) const [virtual]
template<typename R >
bool reco::RecoCandidate::checkOverlap ( const R &  r1,
const R &  r2 
) const [inline, protected]
RecoCandidate * RecoCandidate::clone ( void  ) const [virtual]
TrackRef RecoCandidate::combinedMuon ( ) const [virtual]
GsfTrackRef RecoCandidate::gsfTrack ( ) const [virtual]
size_t RecoCandidate::numberOfTracks ( ) const [virtual]

number of multiple Tracks

Reimplemented in pat::GenericParticle.

Definition at line 22 of file RecoCandidate.cc.

                                           {
  return 0;
}
virtual bool reco::RecoCandidate::overlap ( const Candidate ) const [pure virtual]
TrackRef RecoCandidate::standAloneMuon ( ) const [virtual]
SuperClusterRef RecoCandidate::superCluster ( ) const [virtual]
TrackRef RecoCandidate::track ( size_t  ) const [virtual]

reference to one of multiple Tracks

Reimplemented in pat::GenericParticle.

Definition at line 18 of file RecoCandidate.cc.

                                            {
  return TrackRef();
}
TrackRef RecoCandidate::track ( void  ) const [virtual]

Friends And Related Function Documentation

friend struct component [friend]

Reimplemented from reco::LeafCandidate.

Definition at line 72 of file RecoCandidate.h.