CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/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 #include "DataFormats/TauReco/interface/RecoTauPiZeroFwd.h"
00020 
00021 #include <iostream>
00022 #include <limits>
00023 
00024 
00025 namespace reco {
00026 
00027 namespace tau {
00028 // Forward declaration
00029 class RecoTauConstructor;
00030 }
00031 
00032 class PFTau : public BaseTau {
00033   public:
00034     enum hadronicDecayMode {
00035       kNull = -1,
00036       kOneProng0PiZero,
00037       kOneProng1PiZero,
00038       kOneProng2PiZero,
00039       kOneProng3PiZero,
00040       kOneProngNPiZero,
00041       kTwoProng0PiZero,
00042       kTwoProng1PiZero,
00043       kTwoProng2PiZero,
00044       kTwoProng3PiZero,
00045       kTwoProngNPiZero,
00046       kThreeProng0PiZero,
00047       kThreeProng1PiZero,
00048       kThreeProng2PiZero,
00049       kThreeProng3PiZero,
00050       kThreeProngNPiZero,
00051       kRareDecayMode
00052     };
00053 
00054     PFTau();
00055     PFTau(Charge q,const LorentzVector &,const Point & = Point( 0, 0, 0 ) );
00056     virtual ~PFTau() {};
00057     PFTau* clone() const;
00058 
00059     const PFJetRef& jetRef() const;
00060     void setjetRef(const PFJetRef&);
00061 
00062     // DEPRECATED functions to access the PFTauTagInfoRef
00063     const PFTauTagInfoRef& pfTauTagInfoRef() const;
00064     void setpfTauTagInfoRef(const PFTauTagInfoRef);
00065 
00066     const PFCandidateRef& leadPFChargedHadrCand() const;
00067     const PFCandidateRef& leadPFNeutralCand() const;
00068     //Can be either the charged or the neutral one
00069     const PFCandidateRef& leadPFCand() const;
00070 
00071     void setleadPFChargedHadrCand(const PFCandidateRef&);
00072     void setleadPFNeutralCand(const PFCandidateRef&);
00073     void setleadPFCand(const PFCandidateRef&);
00074 
00077     float leadPFChargedHadrCandsignedSipt() const;
00078     void setleadPFChargedHadrCandsignedSipt(const float&);
00079 
00081     const PFCandidateRefVector& signalPFCands() const;
00082     void setsignalPFCands(const PFCandidateRefVector&);
00083 
00085     const PFCandidateRefVector& signalPFChargedHadrCands() const;
00086     void setsignalPFChargedHadrCands(const PFCandidateRefVector&);
00087 
00089     const PFCandidateRefVector& signalPFNeutrHadrCands() const;
00090     void setsignalPFNeutrHadrCands(const PFCandidateRefVector&);
00091 
00093     const PFCandidateRefVector& signalPFGammaCands() const;
00094     void setsignalPFGammaCands(const PFCandidateRefVector&);
00095 
00097     const PFCandidateRefVector& isolationPFCands() const;
00098     void setisolationPFCands(const PFCandidateRefVector&);
00099 
00101     const PFCandidateRefVector& isolationPFChargedHadrCands() const;
00102     void setisolationPFChargedHadrCands(const PFCandidateRefVector&);
00103 
00105     const PFCandidateRefVector& isolationPFNeutrHadrCands() const;
00106     void setisolationPFNeutrHadrCands(const PFCandidateRefVector&);
00107 
00109     const PFCandidateRefVector& isolationPFGammaCands() const;
00110     void setisolationPFGammaCands(const PFCandidateRefVector&);
00111 
00114     float isolationPFChargedHadrCandsPtSum() const;
00115     void setisolationPFChargedHadrCandsPtSum(const float&);
00116 
00119     float isolationPFGammaCandsEtSum() const;
00120     void setisolationPFGammaCandsEtSum(const float&);
00121 
00123     float maximumHCALPFClusterEt() const;
00124     void setmaximumHCALPFClusterEt(const float&);
00125 
00127     const std::vector<RecoTauPiZero>& signalPiZeroCandidates() const;
00128     void setsignalPiZeroCandidates(const std::vector<RecoTauPiZero>&);
00129     void setSignalPiZeroCandidatesRefs(const RecoTauPiZeroRefVector&);
00130 
00132     const std::vector<RecoTauPiZero>& isolationPiZeroCandidates() const;
00133     void setisolationPiZeroCandidates(const std::vector<RecoTauPiZero>&);
00134     void setIsolationPiZeroCandidatesRefs(const RecoTauPiZeroRefVector&);
00135 
00138     hadronicDecayMode decayMode() const;
00139 
00140     //Electron rejection
00141     float emFraction() const; // Ecal/Hcal Cluster Energy
00142     float hcalTotOverPLead() const; // total Hcal Cluster E / leadPFChargedHadron P
00143     float hcalMaxOverPLead() const; // max. Hcal Cluster E / leadPFChargedHadron P
00144     float hcal3x3OverPLead() const; // Hcal Cluster E in R<0.184 around Ecal impact point of leading track / leadPFChargedHadron P
00145     float ecalStripSumEOverPLead() const; // Simple BremsRecovery Sum E / leadPFChargedHadron P
00146     float bremsRecoveryEOverPLead() const; // BremsRecovery Sum E / leadPFChargedHadron P
00147     reco::TrackRef electronPreIDTrack() const; // Ref to KF track from Electron PreID
00148     float electronPreIDOutput() const; // BDT output from Electron PreID
00149     bool electronPreIDDecision() const; // Decision from Electron PreID
00150 
00151     void setemFraction(const float&);
00152     void sethcalTotOverPLead(const float&);
00153     void sethcalMaxOverPLead(const float&);
00154     void sethcal3x3OverPLead(const float&);
00155     void setecalStripSumEOverPLead(const float&);
00156     void setbremsRecoveryEOverPLead(const float&);
00157     void setelectronPreIDTrack(const reco::TrackRef&);
00158     void setelectronPreIDOutput(const float&);
00159     void setelectronPreIDDecision(const bool&);
00160 
00161     // For Muon Rejection
00162     bool hasMuonReference() const; // check if muon ref exists
00163     float caloComp() const;
00164     float segComp() const;
00165     bool muonDecision() const;
00166     void setCaloComp(const float&);
00167     void setSegComp(const float&);
00168     void setMuonDecision(const bool&);
00169 
00174     size_type numberOfSourceCandidatePtrs() const {return 1;}
00175 
00178     CandidatePtr sourceCandidatePtr( size_type i ) const;
00179 
00181     void dump(std::ostream& out=std::cout) const;
00182 
00183   private:
00184     friend class reco::tau::RecoTauConstructor;
00185     // check overlap with another candidate
00186     virtual bool overlap(const Candidate&) const;
00187 
00188     bool muonDecision_;
00189     bool electronPreIDDecision_;
00190     // SIP
00191     float leadPFChargedHadrCandsignedSipt_;
00192     // Isolation variables
00193     float isolationPFChargedHadrCandsPtSum_;
00194     float isolationPFGammaCandsEtSum_;
00195     float maximumHCALPFClusterEt_;
00196 
00197     // Electron rejection variables
00198     float emFraction_;
00199     float hcalTotOverPLead_;
00200     float hcalMaxOverPLead_;
00201     float hcal3x3OverPLead_;
00202     float ecalStripSumEOverPLead_;
00203     float bremsRecoveryEOverPLead_;
00204     float electronPreIDOutput_;
00205 
00206     // Muon rejection variables
00207     float caloComp_;
00208     float segComp_;
00209 
00210     reco::PFJetRef jetRef_;
00211     PFTauTagInfoRef PFTauTagInfoRef_;
00212     PFCandidateRef leadPFChargedHadrCand_;
00213     PFCandidateRef leadPFNeutralCand_, leadPFCand_;
00214     reco::TrackRef electronPreIDTrack_;
00215 
00216     // Signal candidates
00217     PFCandidateRefVector selectedSignalPFCands_,
00218                          selectedSignalPFChargedHadrCands_,
00219                          selectedSignalPFNeutrHadrCands_,
00220                          selectedSignalPFGammaCands_;
00221 
00222     // Isolation candidates
00223     PFCandidateRefVector selectedIsolationPFCands_,
00224                          selectedIsolationPFChargedHadrCands_,
00225                          selectedIsolationPFNeutrHadrCands_,
00226                          selectedIsolationPFGammaCands_;
00227 
00228     RecoTauPiZeroRefVector signalPiZeroCandidatesRefs_;
00229     RecoTauPiZeroRefVector isolationPiZeroCandidatesRefs_;
00230 
00231     // Association of gamma candidates into PiZeros (transient)
00232     mutable std::vector<reco::RecoTauPiZero> signalPiZeroCandidates_;
00233     mutable std::vector<reco::RecoTauPiZero> isolationPiZeroCandidates_;
00234 };
00235 
00236 std::ostream & operator<<(std::ostream& out, const PFTau& c);
00237 
00238 }
00239 #endif