CMS 3D CMS Logo

pat::Muon Class Reference

Analysis-level muon class. More...

#include <DataFormats/PatCandidates/interface/Muon.h>

Inheritance diagram for pat::Muon:

pat::Lepton< LeptonType > pat::PATObject< LeptonType > LeptonType

List of all members.

Public Member Functions

virtual Muonclone () const
 required reimplementation of the Candidate's clone method
reco::TrackRef combinedMuon () const
 reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon)
void embedCombinedMuon ()
 set reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon)
void embedPFCandidate ()
 embed the IsolatedPFCandidate pointed to by pfCandidateRef_
void embedPickyMuon ()
 embed reference to the above picky Track
void embedStandAloneMuon ()
 set reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon)
void embedTpfmsMuon ()
 embed reference to the above tpfms Track
void embedTrack ()
 set reference to Track reconstructed in the tracker only (reimplemented from reco::Muon)
reco::TrackRef globalTrack () const
 reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon)
reco::TrackRef innerTrack () const
 reference to Track reconstructed in the tracker only (reimplemented from reco::Muon)
 Muon (const edm::Ptr< MuonType > &aMuonRef)
 constructor from a Ptr to a reco muon
 Muon (const edm::RefToBase< MuonType > &aMuonRef)
 constructor from a RefToBase to a reco muon (to be superseded by Ptr counterpart)
 Muon (const MuonType &aMuon)
 constructor from a reco muon
 Muon ()
 default constructor
reco::TrackRef outerTrack () const
 reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon)
reco::PFCandidateRef pfCandidateRef () const
 reference to the source IsolatedPFCandidates null if this has been built from a standard muon
reco::TrackRef pickyMuon () const
 reference to Track reconstructed using hits in the tracker + "good" muon hits
void setPFCandidateRef (const reco::PFCandidateRef &ref)
 add a reference to the source IsolatedPFCandidate
void setPickyMuon (const reco::TrackRef &t)
void setTpfmsMuon (const reco::TrackRef &t)
reco::TrackRef standAloneMuon () const
 reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon)
reco::TrackRef tpfmsMuon () const
 reference to Track reconstructed using hits in the tracker + info from the first muon station that has hits
reco::TrackRef track () const
 reference to Track reconstructed in the tracker only (reimplemented from reco::Muon)
virtual ~Muon ()
 destructor

Protected Attributes

std::vector< reco::TrackcombinedMuon_
bool embeddedCombinedMuon_
bool embeddedPFCandidate_
 true if the IsolatedPFCandidate is embedded
bool embeddedPickyMuon_
bool embeddedStandAloneMuon_
bool embeddedTpfmsMuon_
bool embeddedTrack_
reco::PFCandidateCollection pfCandidate_
 if embeddedPFCandidate_, a copy of the source IsolatedPFCandidate is stored in this vector
reco::PFCandidateRef pfCandidateRef_
 reference to the IsolatedPFCandidate this has been built from null if this has been built from a standard muon
std::vector< reco::TrackpickyMuon_
reco::TrackRef pickyMuonRef_
std::vector< reco::TrackstandAloneMuon_
std::vector< reco::TracktpfmsMuon_
reco::TrackRef tpfmsMuonRef_
std::vector< reco::Tracktrack_


Detailed Description

Analysis-level muon class.

pat::Muon implements the analysis-level muon class within the 'pat' namespace.

Please post comments and questions to the Physics Tools hypernews: httpss://hypernews.cern.ch/HyperNews/CMS/get/physTools.html

Author:
Steven Lowette, Giovanni Petrucciani, Frederic Ronga, Colin Bernet
Version:
Id
Muon.h,v 1.20.2.3 2009/03/25 12:59:26 lusito Exp

Definition at line 49 of file Muon.h.


Constructor & Destructor Documentation

Muon::Muon (  ) 

default constructor

Definition at line 12 of file Muon.cc.

Referenced by clone().

00012            :
00013     Lepton<MuonType>(),
00014     embeddedTrack_(false),
00015     embeddedStandAloneMuon_(false),
00016     embeddedCombinedMuon_(false),
00017     embeddedPickyMuon_(false),
00018     embeddedTpfmsMuon_(false),
00019     pickyMuonRef_(),
00020     tpfmsMuonRef_(),
00021     embeddedPFCandidate_(false)
00022     //pfCandidateRef_()
00023 {
00024 }

Muon::Muon ( const MuonType aMuon  ) 

constructor from a reco muon

constructor from MuonType

Definition at line 28 of file Muon.cc.

00028                                  :
00029     Lepton<MuonType>(aMuon),
00030     embeddedTrack_(false),
00031     embeddedStandAloneMuon_(false),
00032     embeddedCombinedMuon_(false),
00033     embeddedPickyMuon_(false),
00034     embeddedTpfmsMuon_(false),
00035     pickyMuonRef_(),
00036     tpfmsMuonRef_(),
00037     embeddedPFCandidate_(false)
00038     //pfCandidateRef_()
00039 {
00040 }

Muon::Muon ( const edm::RefToBase< MuonType > &  aMuonRef  ) 

constructor from a RefToBase to a reco muon (to be superseded by Ptr counterpart)

constructor from ref to MuonType

Definition at line 44 of file Muon.cc.

00044                                                   :
00045     Lepton<MuonType>(aMuonRef),
00046     embeddedTrack_(false),
00047     embeddedStandAloneMuon_(false),
00048     embeddedCombinedMuon_(false),
00049     embeddedPickyMuon_(false),
00050     embeddedTpfmsMuon_(false),
00051     pickyMuonRef_(),
00052     tpfmsMuonRef_(),
00053     embeddedPFCandidate_(false)
00054     //pfCandidateRef_()
00055 {
00056 }

Muon::Muon ( const edm::Ptr< MuonType > &  aMuonRef  ) 

constructor from a Ptr to a reco muon

constructor from ref to MuonType

Definition at line 60 of file Muon.cc.

00060                                             :
00061     Lepton<MuonType>(aMuonRef),
00062     embeddedTrack_(false),
00063     embeddedStandAloneMuon_(false),
00064     embeddedCombinedMuon_(false),
00065     embeddedPickyMuon_(false),
00066     embeddedTpfmsMuon_(false),
00067     pickyMuonRef_(),
00068     tpfmsMuonRef_(),
00069     embeddedPFCandidate_(false)
00070     //pfCandidateRef_()
00071 {
00072 }

Muon::~Muon (  )  [virtual]

destructor

Definition at line 76 of file Muon.cc.

00076             {
00077 }


Member Function Documentation

virtual Muon* pat::Muon::clone ( void   )  const [inline, virtual]

required reimplementation of the Candidate's clone method

Reimplemented from pat::Lepton< LeptonType >.

Definition at line 65 of file Muon.h.

References Muon().

00065 { return new Muon(*this); }

reco::TrackRef Muon::combinedMuon (  )  const

reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon)

Definition at line 101 of file Muon.cc.

References combinedMuon_, embeddedCombinedMuon_, and reco::Muon::globalTrack().

Referenced by pat::HistoMuon::fill(), and globalTrack().

00101                                       {
00102   if (embeddedCombinedMuon_) {
00103     return reco::TrackRef(&combinedMuon_, 0);
00104   } else {
00105     return MuonType::globalTrack();
00106   }
00107 }

void Muon::embedCombinedMuon (  ) 

set reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon)

embed the Track reconstructed in both tracked and muon detector

Definition at line 160 of file Muon.cc.

References combinedMuon_, embeddedCombinedMuon_, and reco::Muon::globalTrack().

Referenced by pat::PATMuonProducer::fillMuon().

00160                              {
00161   combinedMuon_.clear();
00162   if (MuonType::globalTrack().isNonnull()) {
00163       combinedMuon_.push_back(*MuonType::globalTrack());
00164       embeddedCombinedMuon_ = true;
00165   }
00166 }

void Muon::embedPFCandidate (  ) 

embed the IsolatedPFCandidate pointed to by pfCandidateRef_

Definition at line 137 of file Muon.cc.

References embeddedPFCandidate_, edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), pfCandidate_, and pfCandidateRef_.

Referenced by pat::PATMuonProducer::produce().

00137                             {
00138   pfCandidate_.clear();
00139   if ( pfCandidateRef_.isAvailable() && pfCandidateRef_.isNonnull()) {
00140     pfCandidate_.push_back( *pfCandidateRef_ );
00141     embeddedPFCandidate_ = true;
00142   }
00143 }

void Muon::embedPickyMuon (  ) 

embed reference to the above picky Track

embed the picky Track

Definition at line 169 of file Muon.cc.

References embeddedPickyMuon_, edm::Ref< C, T, F >::isNonnull(), pickyMuon_, and pickyMuonRef_.

Referenced by pat::PATMuonProducer::produce().

00169                           {
00170   pickyMuon_.clear();
00171   if (pickyMuonRef_.isNonnull()) {
00172       pickyMuon_.push_back(*pickyMuonRef_);
00173       embeddedPickyMuon_ = true;
00174   }
00175 }

void Muon::embedStandAloneMuon (  ) 

set reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon)

embed the Track reconstructed in the muon detector only

Definition at line 188 of file Muon.cc.

References embeddedStandAloneMuon_, reco::Muon::outerTrack(), and standAloneMuon_.

Referenced by pat::PATMuonProducer::fillMuon().

00188                                {         
00189   standAloneMuon_.clear();       
00190   if (MuonType::outerTrack().isNonnull()) {      
00191       standAloneMuon_.push_back(*MuonType::outerTrack());        
00192       embeddedStandAloneMuon_ = true;    
00193   }      
00194 }

void Muon::embedTpfmsMuon (  ) 

embed reference to the above tpfms Track

embed the tpfms Track

Definition at line 178 of file Muon.cc.

References embeddedTpfmsMuon_, edm::Ref< C, T, F >::isNonnull(), tpfmsMuon_, and tpfmsMuonRef_.

Referenced by pat::PATMuonProducer::produce().

00178                           {
00179   tpfmsMuon_.clear();
00180   if (tpfmsMuonRef_.isNonnull()) {
00181       tpfmsMuon_.push_back(*tpfmsMuonRef_);
00182       embeddedTpfmsMuon_ = true;
00183   }
00184 }

void Muon::embedTrack (  ) 

set reference to Track reconstructed in the tracker only (reimplemented from reco::Muon)

embed the Track reconstructed in the tracker only

Definition at line 148 of file Muon.cc.

References embeddedTrack_, reco::Muon::innerTrack(), and track_.

Referenced by pat::PATMuonProducer::fillMuon().

00148                       {
00149   track_.clear();
00150   if (MuonType::innerTrack().isNonnull()) {
00151       track_.push_back(*MuonType::innerTrack());
00152       embeddedTrack_ = true;
00153   }
00154 }

reco::TrackRef pat::Muon::globalTrack (  )  const [inline]

reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon)

Definition at line 79 of file Muon.h.

References combinedMuon().

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

00079 { return combinedMuon(); }

reco::TrackRef pat::Muon::innerTrack (  )  const [inline]

reference to Track reconstructed in the tracker only (reimplemented from reco::Muon)

Definition at line 71 of file Muon.h.

References track().

00071 { return track(); }

reco::TrackRef pat::Muon::outerTrack (  )  const [inline]

reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon)

Definition at line 75 of file Muon.h.

References standAloneMuon().

00075 { return standAloneMuon(); }

reco::PFCandidateRef Muon::pfCandidateRef (  )  const

reference to the source IsolatedPFCandidates null if this has been built from a standard muon

reference to the source IsolatedPFCandidates

Definition at line 128 of file Muon.cc.

References embeddedPFCandidate_, pfCandidate_, and pfCandidateRef_.

00128                                               {
00129   if (embeddedPFCandidate_) {
00130     return reco::PFCandidateRef(&pfCandidate_, 0);
00131   } else {
00132     return pfCandidateRef_;
00133   }
00134 }

reco::TrackRef Muon::pickyMuon (  )  const

reference to Track reconstructed using hits in the tracker + "good" muon hits

Definition at line 110 of file Muon.cc.

References embeddedPickyMuon_, pickyMuon_, and pickyMuonRef_.

00110                                    {
00111   if (embeddedPickyMuon_) {
00112     return reco::TrackRef(&pickyMuon_, 0);
00113   } else {
00114     return pickyMuonRef_;
00115   }
00116 }

void pat::Muon::setPFCandidateRef ( const reco::PFCandidateRef ref  )  [inline]

add a reference to the source IsolatedPFCandidate

Definition at line 104 of file Muon.h.

References pfCandidateRef_.

Referenced by pat::PATMuonProducer::produce().

00104                                                             {
00105         pfCandidateRef_ = ref;
00106       } 

void pat::Muon::setPickyMuon ( const reco::TrackRef t  )  [inline]

Definition at line 90 of file Muon.h.

References pickyMuonRef_.

Referenced by pat::PATMuonProducer::produce().

00090 { pickyMuonRef_ = t; }

void pat::Muon::setTpfmsMuon ( const reco::TrackRef t  )  [inline]

Definition at line 93 of file Muon.h.

References tpfmsMuonRef_.

Referenced by pat::PATMuonProducer::produce().

00093 { tpfmsMuonRef_ = t; }

reco::TrackRef Muon::standAloneMuon (  )  const

reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon)

Definition at line 91 of file Muon.cc.

References embeddedStandAloneMuon_, reco::Muon::outerTrack(), and standAloneMuon_.

Referenced by pat::HistoMuon::fill(), and outerTrack().

00091                                         {
00092   if (embeddedStandAloneMuon_) {
00093     return reco::TrackRef(&standAloneMuon_, 0);
00094   } else {
00095     return MuonType::outerTrack();
00096   }
00097 }

reco::TrackRef Muon::tpfmsMuon (  )  const

reference to Track reconstructed using hits in the tracker + info from the first muon station that has hits

Definition at line 119 of file Muon.cc.

References embeddedTpfmsMuon_, tpfmsMuon_, and tpfmsMuonRef_.

00119                                    {
00120   if (embeddedTpfmsMuon_) {
00121     return reco::TrackRef(&tpfmsMuon_, 0);
00122   } else {
00123     return tpfmsMuonRef_;
00124   }
00125 }

reco::TrackRef Muon::track ( void   )  const

reference to Track reconstructed in the tracker only (reimplemented from reco::Muon)

Definition at line 81 of file Muon.cc.

References embeddedTrack_, reco::Muon::innerTrack(), and track_.

Referenced by pat::CaloIsolationEnergy::calculate(), pat::LeptonVertexSignificance::calculate(), pat::TrackerIsolationPt::calculate(), pat::HistoMuon::fill(), and innerTrack().

00081                                {
00082   if (embeddedTrack_) {
00083     return reco::TrackRef(&track_, 0);
00084   } else {
00085     return MuonType::innerTrack();
00086   }
00087 }


Member Data Documentation

std::vector<reco::Track> pat::Muon::combinedMuon_ [protected]

Definition at line 118 of file Muon.h.

Referenced by combinedMuon(), and embedCombinedMuon().

bool pat::Muon::embeddedCombinedMuon_ [protected]

Definition at line 117 of file Muon.h.

Referenced by combinedMuon(), and embedCombinedMuon().

bool pat::Muon::embeddedPFCandidate_ [protected]

true if the IsolatedPFCandidate is embedded

Definition at line 132 of file Muon.h.

Referenced by embedPFCandidate(), and pfCandidateRef().

bool pat::Muon::embeddedPickyMuon_ [protected]

Definition at line 123 of file Muon.h.

Referenced by embedPickyMuon(), and pickyMuon().

bool pat::Muon::embeddedStandAloneMuon_ [protected]

Definition at line 115 of file Muon.h.

Referenced by embedStandAloneMuon(), and standAloneMuon().

bool pat::Muon::embeddedTpfmsMuon_ [protected]

Definition at line 124 of file Muon.h.

Referenced by embedTpfmsMuon(), and tpfmsMuon().

bool pat::Muon::embeddedTrack_ [protected]

Definition at line 113 of file Muon.h.

Referenced by embedTrack(), and track().

reco::PFCandidateCollection pat::Muon::pfCandidate_ [protected]

if embeddedPFCandidate_, a copy of the source IsolatedPFCandidate is stored in this vector

Definition at line 135 of file Muon.h.

Referenced by embedPFCandidate(), and pfCandidateRef().

reco::PFCandidateRef pat::Muon::pfCandidateRef_ [protected]

reference to the IsolatedPFCandidate this has been built from null if this has been built from a standard muon

Definition at line 138 of file Muon.h.

Referenced by embedPFCandidate(), pfCandidateRef(), and setPFCandidateRef().

std::vector<reco::Track> pat::Muon::pickyMuon_ [protected]

Definition at line 127 of file Muon.h.

Referenced by embedPickyMuon(), and pickyMuon().

reco::TrackRef pat::Muon::pickyMuonRef_ [protected]

Definition at line 125 of file Muon.h.

Referenced by embedPickyMuon(), pickyMuon(), and setPickyMuon().

std::vector<reco::Track> pat::Muon::standAloneMuon_ [protected]

Definition at line 116 of file Muon.h.

Referenced by embedStandAloneMuon(), and standAloneMuon().

std::vector<reco::Track> pat::Muon::tpfmsMuon_ [protected]

Definition at line 128 of file Muon.h.

Referenced by embedTpfmsMuon(), and tpfmsMuon().

reco::TrackRef pat::Muon::tpfmsMuonRef_ [protected]

Definition at line 126 of file Muon.h.

Referenced by embedTpfmsMuon(), setTpfmsMuon(), and tpfmsMuon().

std::vector<reco::Track> pat::Muon::track_ [protected]

Definition at line 114 of file Muon.h.

Referenced by embedTrack(), and track().


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