Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:17

0001 #ifndef DataFormats_TauReco_PFTauDecayMode_h
0002 #define DataFormats_TauReco_PFTauDecayMode_h
0003 
0004 /* class PFTauDecayMode
0005  * 
0006  * Stores information for determing the type of hadronic decay of a tau lepton
0007  *
0008  * Associated to a reco::PFTau object
0009  * Provides functionality for:
0010  *      - merging gamma candidates into candidate PiZeroes
0011  *      - indexing reconstructed hadronic decay mode
0012  *      - computing vertex information for multi-prong
0013  *      - filtering suspected underlying event
0014  *                          
0015  * author: Evan K. Friis, UC Davis (evan.klose.friis@cern.ch)
0016  * created: Mon Jun 30 13:53:59 PDT 2008
0017  */
0018 
0019 #include "DataFormats/Candidate/interface/CompositeCandidate.h"
0020 #include "DataFormats/Candidate/interface/VertexCompositeCandidate.h"
0021 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
0022 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
0023 #include "DataFormats/TauReco/interface/PFTau.h"
0024 #include "DataFormats/TauReco/interface/PFTauDecayModeFwd.h"
0025 
0026 namespace reco {
0027   class PFTauDecayMode : public CompositeCandidate {
0028   public:
0029     //to help with indexing.  changing this value necissitates changing the enum below
0030     const static unsigned char maxNumberOfPiZeroCandidatesAllowed = 4;
0031 
0032     enum hadronicTauDecayModes {
0033       tauDecay1ChargedPion0PiZero,
0034       tauDecay1ChargedPion1PiZero,  // rho (770 MeV) mediated)
0035       tauDecay1ChargedPion2PiZero,  // a1  (1.2 GeV) mediated
0036       tauDecay1ChargedPion3PiZero,  // contaminated or unmerged photo
0037       tauDecay1ChargedPion4PiZero,  // contaminated or unmerged photo
0038       tauDecay2ChargedPion0PiZero,  // extra track or un-recod track
0039       tauDecay2ChargedPion1PiZero,  // extra track or un-recod track
0040       tauDecay2ChargedPion2PiZero,  // extra track or un-recod track
0041       tauDecay2ChargedPion3PiZero,  // extra track or un-recod track
0042       tauDecay2ChargedPion4PiZero,  // extra track or un-recod track
0043       tauDecay3ChargedPion0PiZero,  // a1  (1.2 GeV) mediated
0044       tauDecay3ChargedPion1PiZero,  // a1  (1.2 GeV) mediated
0045       tauDecay3ChargedPion2PiZero,  // a1  (1.2 GeV) mediated
0046       tauDecay3ChargedPion3PiZero,  // a1  (1.2 GeV) mediated
0047       tauDecay3ChargedPion4PiZero,  // a1  (1.2 GeV) mediated
0048       tauDecaysElectron,
0049       tauDecayMuon,
0050       tauDecayOther  // catch-all
0051     };
0052 
0053     PFTauDecayMode() {}
0054     /// constructor from values
0055     PFTauDecayMode(Charge q,
0056                    const LorentzVector& p4,
0057                    const Point& vtx = Point(0, 0, 0),
0058                    int pdgId = 12,
0059                    int status = 2,
0060                    bool integerCharge = true)
0061         : CompositeCandidate(q, p4, vtx, pdgId, status, integerCharge) {}
0062 
0063     /// constructor from candidate content
0064     PFTauDecayMode(const VertexCompositeCandidate& chargedPions,
0065                    const CompositeCandidate& piZeroes,
0066                    const CompositeCandidate& filteredObjects);
0067 
0068     ~PFTauDecayMode() override {}
0069     PFTauDecayMode* clone() const override;
0070 
0071     /// return reference to associated PFTau object
0072     const PFTauRef& pfTauRef() const { return pfTauRef_; }
0073     void setPFTauRef(const PFTauRef& theTau) { pfTauRef_ = theTau; }
0074 
0075     hadronicTauDecayModes getDecayMode() const { return theDecayMode_; }
0076     void setDecayMode(hadronicTauDecayModes theDecayMode) { theDecayMode_ = theDecayMode; }
0077 
0078     /// returns collection of charged pions w/ vertex information (tracks are refit)
0079     const VertexCompositeCandidate& chargedPions() const;
0080     /// returns a collection of merged Pi0s
0081     const CompositeCandidate& neutralPions() const;
0082     /// returns references to PF objects that were filtered
0083     const CompositeCandidate& filteredObjects() const;
0084 
0085     /// returns pointers to charged pions
0086     std::vector<const Candidate*> chargedPionCandidates() const;
0087     /// returns pointers to neutral pions
0088     std::vector<const Candidate*> neutralPionCandidates() const;
0089     /// returns pointers to non-filtered objects
0090     std::vector<const Candidate*> decayProductCandidates() const;
0091     /// returns pointers to filtered objects (i.e. those not included in signal objects)
0092     std::vector<const Candidate*> filteredObjectCandidates(int absCharge = -2) const;
0093     /// returns only netural filtered objects
0094     std::vector<const Candidate*> neutralFilteredObjectCandidates() const;
0095     /// returns only charged filtered objects
0096     std::vector<const Candidate*> chargedFilteredObjectCandidates() const;
0097 
0098     /// fills master clones to PF objects (utility function)
0099     void pfMasterClones(const Candidate* input, PFCandidateRefVector& toFill) const;
0100 
0101     /// returns the PFCandidates associated to the charged signal objects
0102     PFCandidateRefVector associatedChargedPFCandidates() const;
0103     /// returns the PFCandidates associated to the PiZero signal objects (i.e., the unmerged photons)
0104     PFCandidateRefVector associatedNeutralPFCandidates() const;
0105     /// returns the PFCandidates that were filtered
0106     PFCandidateRefVector filteredPFCandidates() const;
0107 
0108   protected:
0109     PFTauRef pfTauRef_;
0110     VertexCompositeCandidate chargedPions_;
0111     CompositeCandidate piZeroes_;
0112     CompositeCandidate filteredObjects_;  // stores objects considered UE
0113     hadronicTauDecayModes theDecayMode_;
0114   };
0115 }  // namespace reco
0116 
0117 #endif