File indexing completed on 2024-04-06 12:05:16
0001 #ifndef DataFormats_TauReco_PFRecoTauChargedHadron_h
0002 #define DataFormats_TauReco_PFRecoTauChargedHadron_h
0003
0004 #include "DataFormats/Candidate/interface/CompositePtrCandidate.h"
0005 #include "DataFormats/Candidate/interface/CandidateFwd.h"
0006 #include "DataFormats/TrackReco/interface/Track.h"
0007 #include "DataFormats/Common/interface/Ptr.h"
0008 #include "DataFormats/Math/interface/Point3D.h"
0009
0010 namespace reco {
0011 namespace tau {
0012 template <class TrackClass>
0013 class PFRecoTauChargedHadronFromGenericTrackPlugin;
0014 class PFRecoTauChargedHadronFromPFCandidatePlugin;
0015 class RecoTauConstructor;
0016 class PFRecoTauEnergyAlgorithmPlugin;
0017 }
0018 }
0019 class PFRecoTauChargedHadronProducer;
0020
0021 namespace reco {
0022
0023 class PFRecoTauChargedHadron : public CompositePtrCandidate {
0024 public:
0025 typedef edm::Ptr<Track> TrackPtr;
0026
0027 enum PFRecoTauChargedHadronAlgorithm {
0028
0029 kUndefined = 0,
0030 kChargedPFCandidate = 1,
0031 kTrack = 2,
0032 kPFNeutralHadron = 3
0033 };
0034
0035 PFRecoTauChargedHadron();
0036 PFRecoTauChargedHadron(PFRecoTauChargedHadronAlgorithm algo, Charge q);
0037
0038
0039 PFRecoTauChargedHadron(const Candidate& c, PFRecoTauChargedHadronAlgorithm algo = kUndefined);
0040
0041
0042 PFRecoTauChargedHadron(Charge q,
0043 const LorentzVector& p4,
0044 const Point& vtx = Point(0, 0, 0),
0045 int status = 0,
0046 bool integerCharge = true,
0047 PFRecoTauChargedHadronAlgorithm algo = kUndefined);
0048
0049
0050 ~PFRecoTauChargedHadron() override;
0051
0052
0053 const CandidatePtr& getChargedPFCandidate() const;
0054
0055
0056 const TrackPtr& getTrack() const;
0057
0058
0059 const CandidatePtr& getLostTrackCandidate() const;
0060
0061
0062 const std::vector<CandidatePtr>& getNeutralPFCandidates() const;
0063
0064
0065 const math::XYZPointF& positionAtECALEntrance() const;
0066
0067
0068 PFRecoTauChargedHadronAlgorithm algo() const;
0069
0070
0071 bool algoIs(PFRecoTauChargedHadronAlgorithm algo) const;
0072
0073 void print(std::ostream& stream = std::cout) const;
0074
0075 private:
0076 friend class tau::PFRecoTauChargedHadronFromPFCandidatePlugin;
0077 template <class TrackClass>
0078 friend class tau::PFRecoTauChargedHadronFromGenericTrackPlugin;
0079 friend class tau::RecoTauConstructor;
0080 friend class tau::PFRecoTauEnergyAlgorithmPlugin;
0081 friend class ::PFRecoTauChargedHadronProducer;
0082
0083 PFRecoTauChargedHadronAlgorithm algo_;
0084
0085 CandidatePtr chargedPFCandidate_;
0086 CandidatePtr lostTrackCandidate_;
0087 TrackPtr track_;
0088 std::vector<CandidatePtr> neutralPFCandidates_;
0089
0090 math::XYZPointF positionAtECALEntrance_;
0091 };
0092
0093 std::ostream& operator<<(std::ostream& stream, const PFRecoTauChargedHadron& c);
0094
0095 }
0096
0097 #endif