CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/DataFormats/TauReco/interface/PFTau.h

Go to the documentation of this file.
00001 #ifndef DataFormats_TauReco_PFTau_h
00002 #define DataFormats_TauReco_PFTau_h
00003 
00004 /* class PFTau
00005  * the object of this class is created by RecoTauTag/RecoTau PFRecoTauProducer EDProducer starting from the PFTauTagInfo object,
00006  *                          is a hadronic tau-jet candidate -built from a jet made employing a particle flow technique- that analysts manipulate;
00007  * authors: Simone Gennai (simone.gennai@cern.ch), Ludovic Houchu (Ludovic.Houchu@cern.ch), Evan Friis (evan.klose.friis@ucdavis.edu)
00008  * created: Jun 21 2007,
00009  * revised: Tue Aug 31 13:34:40 CEST 2010
00010  */
00011 #include "DataFormats/Math/interface/LorentzVector.h"
00012 #include "DataFormats/TauReco/interface/BaseTau.h"
00013 #include "DataFormats/TauReco/interface/PFTauFwd.h"
00014 #include "DataFormats/TauReco/interface/PFTauTagInfo.h"
00015 #include "DataFormats/JetReco/interface/PFJetCollection.h"
00016 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
00017 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
00018 #include "DataFormats/TauReco/interface/RecoTauPiZero.h"
00019 
00020 #include <iostream>
00021 #include <limits>
00022 
00023 
00024 namespace reco {
00025 
00026 namespace tau {
00027 // Forward declaration
00028 class RecoTauConstructor;
00029 }
00030 
00031 class PFTau : public BaseTau {
00032   public:
00033     enum hadronicDecayMode {
00034       kNull = -1,
00035       kOneProng0PiZero,
00036       kOneProng1PiZero,
00037       kOneProng2PiZero,
00038       kOneProng3PiZero,
00039       kOneProngNPiZero,
00040       kTwoProng0PiZero,
00041       kTwoProng1PiZero,
00042       kTwoProng2PiZero,
00043       kTwoProng3PiZero,
00044       kTwoProngNPiZero,
00045       kThreeProng0PiZero,
00046       kThreeProng1PiZero,
00047       kThreeProng2PiZero,
00048       kThreeProng3PiZero,
00049       kThreeProngNPiZero,
00050       kRareDecayMode
00051     };
00052 
00053     PFTau();
00054     PFTau(Charge q,const LorentzVector &,const Point & = Point( 0, 0, 0 ) );
00055     virtual ~PFTau() {};
00056     PFTau* clone() const;
00057 
00058     const PFJetRef& jetRef() const;
00059     void setjetRef(const PFJetRef&);
00060 
00061     // DEPRECATED functions to access the PFTauTagInfoRef
00062     const PFTauTagInfoRef& pfTauTagInfoRef() const;
00063     void setpfTauTagInfoRef(const PFTauTagInfoRef);
00064 
00065     const PFCandidateRef& leadPFChargedHadrCand() const;
00066     const PFCandidateRef& leadPFNeutralCand() const;
00067     //Can be either the charged or the neutral one
00068     const PFCandidateRef& leadPFCand() const;
00069 
00070     void setleadPFChargedHadrCand(const PFCandidateRef&);
00071     void setleadPFNeutralCand(const PFCandidateRef&);
00072     void setleadPFCand(const PFCandidateRef&);
00073 
00076     float leadPFChargedHadrCandsignedSipt() const;
00077     void setleadPFChargedHadrCandsignedSipt(const float&);
00078 
00080     const PFCandidateRefVector& signalPFCands() const;
00081     void setsignalPFCands(const PFCandidateRefVector&);
00082 
00084     const PFCandidateRefVector& signalPFChargedHadrCands() const;
00085     void setsignalPFChargedHadrCands(const PFCandidateRefVector&);
00086 
00088     const PFCandidateRefVector& signalPFNeutrHadrCands() const;
00089     void setsignalPFNeutrHadrCands(const PFCandidateRefVector&);
00090 
00092     const PFCandidateRefVector& signalPFGammaCands() const;
00093     void setsignalPFGammaCands(const PFCandidateRefVector&);
00094 
00096     const PFCandidateRefVector& isolationPFCands() const;
00097     void setisolationPFCands(const PFCandidateRefVector&);
00098 
00100     const PFCandidateRefVector& isolationPFChargedHadrCands() const;
00101     void setisolationPFChargedHadrCands(const PFCandidateRefVector&);
00102 
00104     const PFCandidateRefVector& isolationPFNeutrHadrCands() const;
00105     void setisolationPFNeutrHadrCands(const PFCandidateRefVector&);
00106 
00108     const PFCandidateRefVector& isolationPFGammaCands() const;
00109     void setisolationPFGammaCands(const PFCandidateRefVector&);
00110 
00113     float isolationPFChargedHadrCandsPtSum() const;
00114     void setisolationPFChargedHadrCandsPtSum(const float&);
00115 
00118     float isolationPFGammaCandsEtSum() const;
00119     void setisolationPFGammaCandsEtSum(const float&);
00120 
00122     float maximumHCALPFClusterEt() const;
00123     void setmaximumHCALPFClusterEt(const float&);
00124 
00126     const std::vector<RecoTauPiZero>& signalPiZeroCandidates() const;
00127     void setsignalPiZeroCandidates(const std::vector<RecoTauPiZero>&);
00128 
00130     const std::vector<RecoTauPiZero>& isolationPiZeroCandidates() const;
00131     void setisolationPiZeroCandidates(const std::vector<RecoTauPiZero>&);
00132 
00135     hadronicDecayMode decayMode() const;
00136 
00137     //Electron rejection
00138     float emFraction() const; // Ecal/Hcal Cluster Energy
00139     float hcalTotOverPLead() const; // total Hcal Cluster E / leadPFChargedHadron P
00140     float hcalMaxOverPLead() const; // max. Hcal Cluster E / leadPFChargedHadron P
00141     float hcal3x3OverPLead() const; // Hcal Cluster E in R<0.184 around Ecal impact point of leading track / leadPFChargedHadron P
00142     float ecalStripSumEOverPLead() const; // Simple BremsRecovery Sum E / leadPFChargedHadron P
00143     float bremsRecoveryEOverPLead() const; // BremsRecovery Sum E / leadPFChargedHadron P
00144     reco::TrackRef electronPreIDTrack() const; // Ref to KF track from Electron PreID
00145     float electronPreIDOutput() const; // BDT output from Electron PreID
00146     bool electronPreIDDecision() const; // Decision from Electron PreID
00147 
00148     void setemFraction(const float&);
00149     void sethcalTotOverPLead(const float&);
00150     void sethcalMaxOverPLead(const float&);
00151     void sethcal3x3OverPLead(const float&);
00152     void setecalStripSumEOverPLead(const float&);
00153     void setbremsRecoveryEOverPLead(const float&);
00154     void setelectronPreIDTrack(const reco::TrackRef&);
00155     void setelectronPreIDOutput(const float&);
00156     void setelectronPreIDDecision(const bool&);
00157 
00158     // For Muon Rejection
00159     bool hasMuonReference() const; // check if muon ref exists
00160     float caloComp() const;
00161     float segComp() const;
00162     bool muonDecision() const;
00163     void setCaloComp(const float&);
00164     void setSegComp(const float&);
00165     void setMuonDecision(const bool&);
00166 
00171     size_type numberOfSourceCandidatePtrs() const {return 1;}
00172 
00175     CandidatePtr sourceCandidatePtr( size_type i ) const;
00176 
00178     void dump(std::ostream& out=std::cout) const;
00179 
00180   private:
00181     friend class reco::tau::RecoTauConstructor;
00182     // check overlap with another candidate
00183     virtual bool overlap(const Candidate&) const;
00184 
00185     reco::PFJetRef jetRef_;
00186 
00187     PFTauTagInfoRef PFTauTagInfoRef_;
00188     PFCandidateRef leadPFChargedHadrCand_;
00189     PFCandidateRef leadPFNeutralCand_, leadPFCand_;
00190 
00191     // SIP
00192     float leadPFChargedHadrCandsignedSipt_;
00193 
00194     // Signal candidates
00195     PFCandidateRefVector selectedSignalPFCands_,
00196                          selectedSignalPFChargedHadrCands_,
00197                          selectedSignalPFNeutrHadrCands_,
00198                          selectedSignalPFGammaCands_;
00199 
00200     // Isolation candidates
00201     PFCandidateRefVector selectedIsolationPFCands_,
00202                          selectedIsolationPFChargedHadrCands_,
00203                          selectedIsolationPFNeutrHadrCands_,
00204                          selectedIsolationPFGammaCands_;
00205 
00206     // Isolation variables
00207     float isolationPFChargedHadrCandsPtSum_;
00208     float isolationPFGammaCandsEtSum_;
00209     float maximumHCALPFClusterEt_;
00210 
00211     // Electron rejection variables
00212     float emFraction_;
00213     float hcalTotOverPLead_;
00214     float hcalMaxOverPLead_;
00215     float hcal3x3OverPLead_;
00216     float ecalStripSumEOverPLead_;
00217     float bremsRecoveryEOverPLead_;
00218     reco::TrackRef electronPreIDTrack_;
00219     float electronPreIDOutput_;
00220     bool electronPreIDDecision_;
00221 
00222     // Muon rejection variables
00223     float caloComp_;
00224     float segComp_;
00225     bool muonDecision_;
00226 
00227     // Association of gamma candidates into PiZeros
00228     std::vector<reco::RecoTauPiZero> signalPiZeroCandidates_;
00229     std::vector<reco::RecoTauPiZero> isolationPiZeroCandidates_;
00230 };
00231 
00232 std::ostream & operator<<(std::ostream& out, const PFTau& c);
00233 
00234 }
00235 #endif