CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFTau.h
Go to the documentation of this file.
1 #ifndef DataFormats_TauReco_PFTau_h
2 #define DataFormats_TauReco_PFTau_h
3 
4 /* class PFTau
5  * the object of this class is created by RecoTauTag/RecoTau PFRecoTauProducer EDProducer starting from the PFTauTagInfo object,
6  * is a hadronic tau-jet candidate -built from a jet made employing a particle flow technique- that analysts manipulate;
7  * authors: Simone Gennai (simone.gennai@cern.ch), Ludovic Houchu (Ludovic.Houchu@cern.ch), Evan Friis (evan.klose.friis@ucdavis.edu)
8  * created: Jun 21 2007,
9  * revised: Tue Aug 31 13:34:40 CEST 2010
10  */
22 
23 #include <iostream>
24 #include <limits>
25 
26 namespace reco { namespace tau {
27  class RecoTauConstructor;
28  class PFRecoTauEnergyAlgorithmPlugin;
29 }}
30 
31 namespace reco {
32 
33 class PFTau : public BaseTau {
34  public:
36  kNull = -1,
53  };
54 
55  PFTau();
56  PFTau(Charge q,const LorentzVector &,const Point & = Point( 0, 0, 0 ) );
57  virtual ~PFTau() {};
58  PFTau* clone() const;
59 
60  const PFJetRef& jetRef() const;
61  void setjetRef(const PFJetRef&);
62 
63  // functions to access the PFTauTagInfoRef used by HLT
64  const PFTauTagInfoRef& pfTauTagInfoRef() const;
66 
69  const PFCandidatePtr& leadPFNeutralCand() const;
70  //Can be either the charged or the neutral one
71  const PFCandidatePtr& leadPFCand() const;
72 
75  void setleadPFCand(const PFCandidatePtr&);
76 
79  float leadPFChargedHadrCandsignedSipt() const;
80  void setleadPFChargedHadrCandsignedSipt(const float&);
81 
83  const std::vector<reco::PFCandidatePtr>& signalPFCands() const;
84  void setsignalPFCands(const std::vector<reco::PFCandidatePtr>&);
85 
87  const std::vector<reco::PFCandidatePtr>& signalPFChargedHadrCands() const;
88  void setsignalPFChargedHadrCands(const std::vector<reco::PFCandidatePtr>&);
89 
91  const std::vector<reco::PFCandidatePtr>& signalPFNeutrHadrCands() const;
92  void setsignalPFNeutrHadrCands(const std::vector<reco::PFCandidatePtr>&);
93 
95  const std::vector<reco::PFCandidatePtr>& signalPFGammaCands() const;
96  void setsignalPFGammaCands(const std::vector<reco::PFCandidatePtr>&);
97 
99  const std::vector<reco::PFCandidatePtr>& isolationPFCands() const;
100  void setisolationPFCands(const std::vector<reco::PFCandidatePtr>&);
101 
103  const std::vector<reco::PFCandidatePtr>& isolationPFChargedHadrCands() const;
104  void setisolationPFChargedHadrCands(const std::vector<reco::PFCandidatePtr>&);
105 
107  const std::vector<reco::PFCandidatePtr>& isolationPFNeutrHadrCands() const;
108  void setisolationPFNeutrHadrCands(const std::vector<reco::PFCandidatePtr>&);
109 
111  const std::vector<reco::PFCandidatePtr>& isolationPFGammaCands() const;
112  void setisolationPFGammaCands(const std::vector<reco::PFCandidatePtr>&);
113 
116  float isolationPFChargedHadrCandsPtSum() const;
117  void setisolationPFChargedHadrCandsPtSum(const float&);
118 
121  float isolationPFGammaCandsEtSum() const;
122  void setisolationPFGammaCandsEtSum(const float&);
123 
125  float maximumHCALPFClusterEt() const;
126  void setmaximumHCALPFClusterEt(const float&);
127 
129  const std::vector<RecoTauPiZero>& signalPiZeroCandidates() const;
130  void setsignalPiZeroCandidates(const std::vector<RecoTauPiZero>&);
132 
134  const std::vector<RecoTauPiZero>& isolationPiZeroCandidates() const;
135  void setisolationPiZeroCandidates(const std::vector<RecoTauPiZero>&);
137 
139  const std::vector<PFRecoTauChargedHadron>& signalTauChargedHadronCandidates() const;
140  void setSignalTauChargedHadronCandidates(const std::vector<PFRecoTauChargedHadron>&);
142 
144  const std::vector<PFRecoTauChargedHadron>& isolationTauChargedHadronCandidates() const;
145  void setIsolationTauChargedHadronCandidates(const std::vector<PFRecoTauChargedHadron>&);
147 
151 
152  //Electron rejection
153  float emFraction() const; // Ecal/Hcal Cluster Energy
154  float hcalTotOverPLead() const; // total Hcal Cluster E / leadPFChargedHadron P
155  float hcalMaxOverPLead() const; // max. Hcal Cluster E / leadPFChargedHadron P
156  float hcal3x3OverPLead() const; // Hcal Cluster E in R<0.184 around Ecal impact point of leading track / leadPFChargedHadron P
157  float ecalStripSumEOverPLead() const; // Simple BremsRecovery Sum E / leadPFChargedHadron P
158  float bremsRecoveryEOverPLead() const; // BremsRecovery Sum E / leadPFChargedHadron P
159  reco::TrackRef electronPreIDTrack() const; // Ref to KF track from Electron PreID
160  float electronPreIDOutput() const; // BDT output from Electron PreID
161  bool electronPreIDDecision() const; // Decision from Electron PreID
162 
163  void setemFraction(const float&);
164  void sethcalTotOverPLead(const float&);
165  void sethcalMaxOverPLead(const float&);
166  void sethcal3x3OverPLead(const float&);
167  void setecalStripSumEOverPLead(const float&);
168  void setbremsRecoveryEOverPLead(const float&);
170  void setelectronPreIDOutput(const float&);
171  void setelectronPreIDDecision(const bool&);
172 
173  // For Muon Rejection
174  bool hasMuonReference() const; // check if muon ref exists
175  float caloComp() const;
176  float segComp() const;
177  bool muonDecision() const;
178  void setCaloComp(const float&);
179  void setSegComp(const float&);
180  void setMuonDecision(const bool&);
181 
187 
191 
193  void dump(std::ostream& out=std::cout) const;
194 
195  private:
198 
199  // check overlap with another candidate
200  virtual bool overlap(const Candidate&) const;
201 
204 
205  // SIP
207  // Isolation variables
211 
212  // Electron rejection variables
213  float emFraction_;
220 
221  // Muon rejection variables
222  float caloComp_;
223  float segComp_;
224 
231 
232  // Signal candidates
233  std::vector<reco::PFCandidatePtr> selectedSignalPFCands_;
234  std::vector<reco::PFCandidatePtr> selectedSignalPFChargedHadrCands_;
235  std::vector<reco::PFCandidatePtr> selectedSignalPFNeutrHadrCands_;
236  std::vector<reco::PFCandidatePtr> selectedSignalPFGammaCands_;
237 
238  // Isolation candidates
239  std::vector<reco::PFCandidatePtr> selectedIsolationPFCands_;
240  std::vector<reco::PFCandidatePtr> selectedIsolationPFChargedHadrCands_;
241  std::vector<reco::PFCandidatePtr> selectedIsolationPFNeutrHadrCands_;
242  std::vector<reco::PFCandidatePtr> selectedIsolationPFGammaCands_;
243 
246 
249 
250  // Association of gamma candidates into PiZeros (transient)
251  mutable std::vector<reco::RecoTauPiZero> signalPiZeroCandidates_;
252  mutable std::vector<reco::RecoTauPiZero> isolationPiZeroCandidates_;
253 
254  // Association of PF candidates into PFRecoTauChargedHadrons (transient)
255  mutable std::vector<reco::PFRecoTauChargedHadron> signalTauChargedHadronCandidates_;
256  mutable std::vector<reco::PFRecoTauChargedHadron> isolationTauChargedHadronCandidates_;
257 };
258 
259 std::ostream & operator<<(std::ostream& out, const PFTau& c);
260 
261 } // end namespace reco
262 
263 #endif
float ecalStripSumEOverPLead_
Definition: PFTau.h:217
bool hasMuonReference() const
Definition: PFTau.cc:224
float maximumHCALPFClusterEt() const
Et of the highest Et HCAL PFCluster.
Definition: PFTau.cc:199
int i
Definition: DBlmapReader.cc:9
std::vector< reco::PFCandidatePtr > selectedIsolationPFNeutrHadrCands_
Definition: PFTau.h:241
RecoTauPiZeroRefVector signalPiZeroCandidatesRefs_
Definition: PFTau.h:244
void setMuonDecision(const bool &)
Definition: PFTau.cc:239
std::vector< reco::RecoTauPiZero > isolationPiZeroCandidates_
Definition: PFTau.h:252
void setelectronPreIDOutput(const float &)
Definition: PFTau.cc:220
float isolationPFGammaCandsEtSum() const
Definition: PFTau.cc:196
std::vector< reco::PFCandidatePtr > selectedSignalPFCands_
Definition: PFTau.h:233
const PFJetRef & jetRef() const
Definition: PFTau.cc:52
const std::vector< reco::PFCandidatePtr > & isolationPFCands() const
PFCandidates in isolation region.
Definition: PFTau.cc:81
float isolationPFChargedHadrCandsPtSum() const
Definition: PFTau.cc:193
void setleadPFChargedHadrCand(const PFCandidatePtr &)
Definition: PFTau.cc:65
void setleadPFNeutralCand(const PFCandidatePtr &)
Definition: PFTau.cc:66
const PFCandidatePtr & leadPFChargedHadrCand() const
Definition: PFTau.cc:61
void setelectronPreIDDecision(const bool &)
Definition: PFTau.cc:221
size_t size_type
Definition: Candidate.h:34
float segComp() const
Definition: PFTau.cc:235
std::vector< reco::PFRecoTauChargedHadron > signalTauChargedHadronCandidates_
Definition: PFTau.h:255
float hcalTotOverPLead() const
Definition: PFTau.cc:204
bool electronPreIDDecision_
Definition: PFTau.h:203
float maximumHCALPFClusterEt_
Definition: PFTau.h:210
void setisolationPFCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:82
bool electronPreIDDecision() const
Definition: PFTau.cc:211
const std::vector< reco::PFCandidatePtr > & signalPFGammaCands() const
Gamma candidates in signal region.
Definition: PFTau.cc:78
float isolationPFChargedHadrCandsPtSum_
Definition: PFTau.h:208
std::vector< reco::PFRecoTauChargedHadron > isolationTauChargedHadronCandidates_
Definition: PFTau.h:256
float hcal3x3OverPLead() const
Definition: PFTau.cc:206
std::vector< reco::RecoTauPiZero > signalPiZeroCandidates_
Definition: PFTau.h:251
reco::PFCandidatePtr leadPFNeutralCand_
Definition: PFTau.h:228
float emFraction() const
Definition: PFTau.cc:203
std::vector< reco::PFCandidatePtr > selectedSignalPFGammaCands_
Definition: PFTau.h:236
void sethcal3x3OverPLead(const float &)
Definition: PFTau.cc:216
void setisolationPFGammaCandsEtSum(const float &)
Definition: PFTau.cc:197
void setIsolationTauChargedHadronCandidates(const std::vector< PFRecoTauChargedHadron > &)
Definition: PFTau.cc:168
void setemFraction(const float &)
Definition: PFTau.cc:213
PFRecoTauChargedHadronRefVector isolationTauChargedHadronCandidatesRefs_
Definition: PFTau.h:248
const std::vector< reco::PFCandidatePtr > & signalPFCands() const
PFCandidates in signal region.
Definition: PFTau.cc:72
const std::vector< reco::PFCandidatePtr > & isolationPFGammaCands() const
Gamma candidates in isolation region.
Definition: PFTau.cc:87
void setisolationPFNeutrHadrCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:86
bool muonDecision() const
Definition: PFTau.cc:236
reco::PFJetRef jetRef_
Definition: PFTau.h:225
hadronicDecayMode decayMode() const
Definition: PFTau.cc:176
void setsignalPFChargedHadrCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:75
float segComp_
Definition: PFTau.h:223
void dump(std::ostream &out=std::cout) const
prints information on this PFTau
Definition: PFTau.cc:252
void setjetRef(const PFJetRef &)
Definition: PFTau.cc:53
CandidatePtr sourceCandidatePtr(size_type i) const
Definition: PFTau.cc:241
void setsignalPiZeroCandidates(const std::vector< RecoTauPiZero > &)
Definition: PFTau.cc:102
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:71
float leadPFChargedHadrCandsignedSipt_
Definition: PFTau.h:206
PFRecoTauChargedHadronRef leadTauChargedHadronCandidate() const
Definition: PFTau.cc:130
float caloComp() const
Definition: PFTau.cc:234
const std::vector< RecoTauPiZero > & signalPiZeroCandidates() const
Retrieve the association of signal region gamma candidates into candidate PiZeros.
Definition: PFTau.cc:91
RecoTauPiZeroRefVector isolationPiZeroCandidatesRefs_
Definition: PFTau.h:245
void setIsolationPiZeroCandidatesRefs(const RecoTauPiZeroRefVector &)
Definition: PFTau.cc:110
void setleadPFCand(const PFCandidatePtr &)
Definition: PFTau.cc:67
void setCaloComp(const float &)
Definition: PFTau.cc:237
math::XYZPoint Point
void setSignalTauChargedHadronCandidatesRefs(const PFRecoTauChargedHadronRefVector &)
Definition: PFTau.cc:153
void setisolationPFChargedHadrCandsPtSum(const float &)
Definition: PFTau.cc:194
void setleadPFChargedHadrCandsignedSipt(const float &)
Definition: PFTau.cc:70
void setsignalPFCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:73
const std::vector< reco::PFCandidatePtr > & isolationPFNeutrHadrCands() const
Definition: PFTau.cc:85
void setisolationPiZeroCandidates(const std::vector< RecoTauPiZero > &)
Definition: PFTau.cc:125
const std::vector< reco::PFCandidatePtr > & isolationPFChargedHadrCands() const
Charged candidates in isolation region.
Definition: PFTau.cc:83
float leadPFChargedHadrCandsignedSipt() const
Definition: PFTau.cc:69
void setbremsRecoveryEOverPLead(const float &)
Definition: PFTau.cc:218
tuple out
Definition: dbtoconf.py:99
bool muonDecision_
Definition: PFTau.h:202
const std::vector< RecoTauPiZero > & isolationPiZeroCandidates() const
Retrieve the association of isolation region gamma candidates into candidate PiZeros.
Definition: PFTau.cc:114
const PFTauTagInfoRef & pfTauTagInfoRef() const
Definition: PFTau.cc:55
const PFCandidatePtr & leadPFNeutralCand() const
Definition: PFTau.cc:62
void sethcalMaxOverPLead(const float &)
Definition: PFTau.cc:215
virtual ~PFTau()
Definition: PFTau.h:57
void setIsolationTauChargedHadronCandidatesRefs(const PFRecoTauChargedHadronRefVector &)
Definition: PFTau.cc:172
void setisolationPFGammaCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:88
void setSegComp(const float &)
Definition: PFTau.cc:238
PFTau * clone() const
returns a clone of the Candidate object
Definition: PFTau.cc:49
void setsignalPFGammaCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:79
reco::PFCandidatePtr leadPFChargedHadrCand_
Definition: PFTau.h:227
void setSignalTauChargedHadronCandidates(const std::vector< PFRecoTauChargedHadron > &)
Definition: PFTau.cc:149
const PFCandidatePtr & leadPFCand() const
Definition: PFTau.cc:63
void setisolationPFChargedHadrCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:84
float bremsRecoveryEOverPLead() const
Definition: PFTau.cc:208
float bremsRecoveryEOverPLead_
Definition: PFTau.h:218
float hcal3x3OverPLead_
Definition: PFTau.h:216
float hcalMaxOverPLead_
Definition: PFTau.h:215
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > LorentzVector
Definition: analysisEnums.h:9
PFTauTagInfoRef PFTauTagInfoRef_
Definition: PFTau.h:226
float electronPreIDOutput_
Definition: PFTau.h:219
hadronicDecayMode
Definition: PFTau.h:35
const std::vector< reco::PFCandidatePtr > & signalPFNeutrHadrCands() const
Neutral hadrons in signal region.
Definition: PFTau.cc:76
size_type numberOfSourceCandidatePtrs() const
Definition: PFTau.h:186
virtual bool overlap(const Candidate &) const
check overlap with another candidate
Definition: PFTau.cc:247
std::vector< reco::PFCandidatePtr > selectedSignalPFChargedHadrCands_
Definition: PFTau.h:234
void setSignalPiZeroCandidatesRefs(const RecoTauPiZeroRefVector &)
Definition: PFTau.cc:106
void setmaximumHCALPFClusterEt(const float &)
Definition: PFTau.cc:200
std::vector< reco::PFCandidatePtr > selectedIsolationPFChargedHadrCands_
Definition: PFTau.h:240
std::vector< reco::PFCandidatePtr > selectedIsolationPFCands_
Definition: PFTau.h:239
void setecalStripSumEOverPLead(const float &)
Definition: PFTau.cc:217
PFRecoTauChargedHadronRefVector signalTauChargedHadronCandidatesRefs_
Definition: PFTau.h:247
const std::vector< PFRecoTauChargedHadron > & signalTauChargedHadronCandidates() const
Retrieve the association of signal region PF candidates into candidate PFRecoTauChargedHadrons.
Definition: PFTau.cc:138
tuple cout
Definition: gather_cfg.py:121
void sethcalTotOverPLead(const float &)
Definition: PFTau.cc:214
reco::PFCandidatePtr leadPFCand_
Definition: PFTau.h:229
std::vector< reco::PFCandidatePtr > selectedIsolationPFGammaCands_
Definition: PFTau.h:242
float emFraction_
Definition: PFTau.h:213
const std::vector< PFRecoTauChargedHadron > & isolationTauChargedHadronCandidates() const
Retrieve the association of isolation region PF candidates into candidate PFRecoTauChargedHadron.
Definition: PFTau.cc:157
void setelectronPreIDTrack(const reco::TrackRef &)
Definition: PFTau.cc:219
float hcalMaxOverPLead() const
Definition: PFTau.cc:205
float electronPreIDOutput() const
Definition: PFTau.cc:210
reco::TrackRef electronPreIDTrack() const
Definition: PFTau.cc:209
void setsignalPFNeutrHadrCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:77
reco::TrackRef electronPreIDTrack_
Definition: PFTau.h:230
PFTau()
Definition: PFTau.cc:8
int Charge
electric charge type
Definition: LeafCandidate.h:26
float isolationPFGammaCandsEtSum_
Definition: PFTau.h:209
float caloComp_
Definition: PFTau.h:222
const std::vector< reco::PFCandidatePtr > & signalPFChargedHadrCands() const
Charged hadrons in signal region.
Definition: PFTau.cc:74
float ecalStripSumEOverPLead() const
Definition: PFTau.cc:207
std::vector< reco::PFCandidatePtr > selectedSignalPFNeutrHadrCands_
Definition: PFTau.h:235
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:32
void setpfTauTagInfoRef(const PFTauTagInfoRef)
Definition: PFTau.cc:59
float hcalTotOverPLead_
Definition: PFTau.h:214