Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:55

0001 #include "DataFormats/Candidate/interface/LeafCandidate.h"
0002 #include "FWCore/Utilities/interface/EDMException.h"
0003 using namespace reco;
0004 
0005 LeafCandidate::~LeafCandidate() {}
0006 
0007 const CandidateBaseRef& LeafCandidate::masterClone() const {
0008   throw cms::Exception("Invalid Reference") << "this Candidate has no master clone reference."
0009                                             << "Can't call masterClone() method.\n";
0010 }
0011 
0012 bool LeafCandidate::hasMasterClone() const { return false; }
0013 
0014 bool LeafCandidate::hasMasterClonePtr() const { return false; }
0015 
0016 const CandidatePtr& LeafCandidate::masterClonePtr() const {
0017   throw cms::Exception("Invalid Reference") << "this Candidate has no master clone ptr."
0018                                             << "Can't call masterClonePtr() method.\n";
0019 }
0020 
0021 size_t LeafCandidate::numberOfDaughters() const { return 0; }
0022 
0023 size_t LeafCandidate::numberOfMothers() const { return 0; }
0024 
0025 bool LeafCandidate::overlap(const Candidate& o) const {
0026   return p4() == o.p4() && vertex() == o.vertex() && charge() == o.charge();
0027 }
0028 
0029 const Candidate* LeafCandidate::daughter(size_type) const { return nullptr; }
0030 
0031 const Candidate* LeafCandidate::mother(size_type) const { return nullptr; }
0032 
0033 const Candidate* LeafCandidate::daughter(const std::string&) const {
0034   throw edm::Exception(edm::errors::UnimplementedFeature)
0035       << "This Candidate type does not implement daughter(std::string). "
0036       << "Please use CompositeCandidate or NamedCompositeCandidate.\n";
0037 }
0038 
0039 Candidate* LeafCandidate::daughter(const std::string&) {
0040   throw edm::Exception(edm::errors::UnimplementedFeature)
0041       << "This Candidate type does not implement daughter(std::string). "
0042       << "Please use CompositeCandidate or NamedCompositeCandidate.\n";
0043 }
0044 
0045 Candidate* LeafCandidate::daughter(size_type) { return nullptr; }
0046 
0047 double LeafCandidate::vertexChi2() const { return 0; }
0048 
0049 double LeafCandidate::vertexNdof() const { return 0; }
0050 
0051 double LeafCandidate::vertexNormalizedChi2() const { return 0; }
0052 
0053 double LeafCandidate::vertexCovariance(int i, int j) const {
0054   throw edm::Exception(edm::errors::UnimplementedFeature)
0055       << "reco::ConcreteCandidate does not implement vertex covariant matrix.\n";
0056 }
0057 
0058 void LeafCandidate::fillVertexCovariance(CovarianceMatrix& err) const {
0059   throw edm::Exception(edm::errors::UnimplementedFeature)
0060       << "reco::ConcreteCandidate does not implement vertex covariant matrix.\n";
0061 }
0062 
0063 bool LeafCandidate::isElectron() const { return false; }
0064 
0065 bool LeafCandidate::isMuon() const { return false; }
0066 
0067 bool LeafCandidate::isGlobalMuon() const { return false; }
0068 
0069 bool LeafCandidate::isStandAloneMuon() const { return false; }
0070 
0071 bool LeafCandidate::isTrackerMuon() const { return false; }
0072 
0073 bool LeafCandidate::isCaloMuon() const { return false; }
0074 
0075 bool LeafCandidate::isPhoton() const { return false; }
0076 
0077 bool LeafCandidate::isConvertedPhoton() const { return false; }
0078 
0079 bool LeafCandidate::isJet() const { return false; }