Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:46

0001 #ifndef DataFormats_TauReco_RecoTauPiZero_h
0002 #define DataFormats_TauReco_RecoTauPiZero_h
0003 
0004 #include "DataFormats/Candidate/interface/CompositePtrCandidate.h"
0005 
0006 namespace reco {
0007   class RecoTauPiZero : public CompositePtrCandidate {
0008   public:
0009     enum PiZeroAlgorithm {
0010       // Algorithm where each photon becomes a pi zero
0011       kUndefined = 0,
0012       kTrivial = 1,
0013       kCombinatoric = 2,
0014       kStrips = 3
0015     };
0016 
0017     RecoTauPiZero() : CompositePtrCandidate(), algoName_(kUndefined), bendCorrEta_(0.), bendCorrPhi_(0.) {
0018       this->setPdgId(111);
0019     }
0020 
0021     RecoTauPiZero(PiZeroAlgorithm algoName)
0022         : CompositePtrCandidate(), algoName_(algoName), bendCorrEta_(0.), bendCorrPhi_(0.) {
0023       this->setPdgId(111);
0024     }
0025 
0026     /// constructor from values
0027     RecoTauPiZero(Charge q,
0028                   const LorentzVector& p4,
0029                   const Point& vtx = Point(0, 0, 0),
0030                   int pdgId = 111,
0031                   int status = 0,
0032                   bool integerCharge = true,
0033                   PiZeroAlgorithm algoName = kUndefined)
0034         : CompositePtrCandidate(q, p4, vtx, pdgId, status, integerCharge),
0035           algoName_(algoName),
0036           bendCorrEta_(0.),
0037           bendCorrPhi_(0.) {}
0038 
0039     /// constructor from values
0040     RecoTauPiZero(Charge q,
0041                   const PolarLorentzVector& p4,
0042                   const Point& vtx = Point(0, 0, 0),
0043                   int pdgId = 111,
0044                   int status = 0,
0045                   bool integerCharge = true,
0046                   PiZeroAlgorithm algoName = kUndefined)
0047         : CompositePtrCandidate(q, p4, vtx, pdgId, status, integerCharge),
0048           algoName_(algoName),
0049           bendCorrEta_(0.),
0050           bendCorrPhi_(0.) {}
0051 
0052     /// constructor from a Candidate
0053     explicit RecoTauPiZero(const Candidate& p, PiZeroAlgorithm algoName = kUndefined)
0054         : CompositePtrCandidate(p), algoName_(algoName), bendCorrEta_(0.), bendCorrPhi_(0.) {
0055       this->setPdgId(111);
0056     }
0057 
0058     /// destructor
0059     ~RecoTauPiZero() override{};
0060 
0061     /// Number of PFGamma constituents
0062     size_t numberOfGammas() const;
0063 
0064     /// Number of electron constituents
0065     size_t numberOfElectrons() const;
0066 
0067     /// Maximum DeltaPhi between a constituent and the four vector
0068     double maxDeltaPhi() const;
0069 
0070     /// Maxmum DeltaEta between a constituent and the four vector
0071     double maxDeltaEta() const;
0072 
0073     /// Algorithm that built this piZero
0074     PiZeroAlgorithm algo() const;
0075 
0076     /// Check whether a given algo produced this pi zero
0077     bool algoIs(PiZeroAlgorithm algo) const;
0078 
0079     /// Size of correction to account for spread of photon energy in eta and phi
0080     /// in case charged pions make nuclear interactions or photons convert within the tracking detector
0081     float bendCorrEta() const { return bendCorrEta_; }
0082     float bendCorrPhi() const { return bendCorrPhi_; }
0083     void setBendCorrEta(float bendCorrEta) { bendCorrEta_ = bendCorrEta; }
0084     void setBendCorrPhi(float bendCorrPhi) { bendCorrPhi_ = bendCorrPhi; }
0085 
0086     void print(std::ostream& out = std::cout) const;
0087 
0088   private:
0089     PiZeroAlgorithm algoName_;
0090 
0091     float bendCorrEta_;
0092     float bendCorrPhi_;
0093   };
0094 
0095   std::ostream& operator<<(std::ostream& out, const RecoTauPiZero& c);
0096 
0097 }  // namespace reco
0098 
0099 #endif