CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/DataFormats/Candidate/src/LeafCandidate.cc

Go to the documentation of this file.
00001 // $Id: LeafCandidate.cc,v 1.14 2009/06/30 11:07:10 elmer Exp $
00002 #include "DataFormats/Candidate/interface/LeafCandidate.h"
00003 #include "FWCore/Utilities/interface/EDMException.h"
00004 using namespace reco;
00005 
00006 LeafCandidate::~LeafCandidate() { }
00007 
00008 Candidate::const_iterator LeafCandidate::begin() const { 
00009   return const_iterator( new const_iterator_imp_specific ); 
00010 }
00011 
00012 Candidate::const_iterator LeafCandidate::end() const { 
00013   return  const_iterator( new const_iterator_imp_specific ); 
00014 }
00015 
00016 Candidate::iterator LeafCandidate::begin() { 
00017   return iterator( new iterator_imp_specific ); 
00018 }
00019 
00020 Candidate::iterator LeafCandidate::end() { 
00021   return iterator( new iterator_imp_specific ); 
00022 }
00023 
00024 const CandidateBaseRef & LeafCandidate::masterClone() const {
00025   throw cms::Exception("Invalid Reference")
00026     << "this Candidate has no master clone reference."
00027     << "Can't call masterClone() method.\n";
00028 }
00029 
00030 bool LeafCandidate::hasMasterClone() const {
00031   return false;
00032 }
00033 
00034 bool LeafCandidate::hasMasterClonePtr() const {
00035   return false;
00036 }
00037 
00038 
00039 const CandidatePtr & LeafCandidate::masterClonePtr() const {
00040   throw cms::Exception("Invalid Reference")
00041     << "this Candidate has no master clone ptr."
00042     << "Can't call masterClonePtr() method.\n";
00043 }
00044 
00045 size_t LeafCandidate::numberOfDaughters() const { 
00046   return 0; 
00047 }
00048 
00049 size_t LeafCandidate::numberOfMothers() const { 
00050   return 0; 
00051 }
00052 
00053 bool LeafCandidate::overlap( const Candidate & o ) const { 
00054   return  p4() == o.p4() && vertex() == o.vertex() && charge() == o.charge();
00055 }
00056 
00057 const Candidate * LeafCandidate::daughter( size_type ) const {
00058   return 0;
00059 }
00060 
00061 const Candidate * LeafCandidate::mother( size_type ) const {
00062   return 0;
00063 }
00064 
00065 const Candidate * LeafCandidate::daughter(const std::string&) const {
00066   throw edm::Exception(edm::errors::UnimplementedFeature)
00067     << "This Candidate type does not implement daughter(std::string). "
00068     << "Please use CompositeCandidate or NamedCompositeCandidate.\n";
00069 }
00070 
00071 Candidate * LeafCandidate::daughter(const std::string&) {
00072   throw edm::Exception(edm::errors::UnimplementedFeature)
00073     << "This Candidate type does not implement daughter(std::string). "
00074     << "Please use CompositeCandidate or NamedCompositeCandidate.\n";
00075 }
00076 
00077 
00078 
00079 Candidate * LeafCandidate::daughter( size_type ) {
00080   return 0;
00081 }
00082 
00083 double LeafCandidate::vertexChi2() const {
00084   return 0;
00085 }
00086 
00087 double LeafCandidate::vertexNdof() const {
00088   return 0;
00089 }
00090 
00091 double LeafCandidate::vertexNormalizedChi2() const {
00092   return 0;
00093 }
00094 
00095 double LeafCandidate::vertexCovariance(int i, int j) const {
00096   throw edm::Exception(edm::errors::UnimplementedFeature)
00097     << "reco::ConcreteCandidate does not implement vertex covariant matrix.\n";
00098 }
00099 
00100 void LeafCandidate::fillVertexCovariance(CovarianceMatrix & err) const {
00101   throw edm::Exception(edm::errors::UnimplementedFeature)
00102     << "reco::ConcreteCandidate does not implement vertex covariant matrix.\n";
00103 }
00104 
00105 bool LeafCandidate::isElectron() const { return false; }
00106 
00107 bool LeafCandidate::isMuon() const { return false; }
00108 
00109 bool LeafCandidate::isGlobalMuon() const { return false; }
00110 
00111 bool LeafCandidate::isStandAloneMuon() const { return false; }
00112 
00113 bool LeafCandidate::isTrackerMuon() const { return false; }
00114 
00115 bool LeafCandidate::isCaloMuon() const { return false; }
00116 
00117 bool LeafCandidate::isPhoton() const { return false; }
00118 
00119 bool LeafCandidate::isConvertedPhoton() const { return false; }
00120 
00121 bool LeafCandidate::isJet() const { return false; }
00122 
00123 const unsigned int reco::LeafCandidate::longLivedTag = 65536;
00124 
00125 const unsigned int reco::LeafCandidate::massConstraintTag = 131072;
00126 
00127 double LeafCandidate::pt() const { return pt_; }
00128