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  void setDecayMode(const hadronicDecayMode&);
152 
154  float bendCorrMass() const { return bendCorrMass_; }
156 
158  double signalConeSize() const { return signalConeSize_; }
160 
161  //Electron rejection
162  float emFraction() const; // Ecal/Hcal Cluster Energy
163  float hcalTotOverPLead() const; // total Hcal Cluster E / leadPFChargedHadron P
164  float hcalMaxOverPLead() const; // max. Hcal Cluster E / leadPFChargedHadron P
165  float hcal3x3OverPLead() const; // Hcal Cluster E in R<0.184 around Ecal impact point of leading track / leadPFChargedHadron P
166  float ecalStripSumEOverPLead() const; // Simple BremsRecovery Sum E / leadPFChargedHadron P
167  float bremsRecoveryEOverPLead() const; // BremsRecovery Sum E / leadPFChargedHadron P
168  reco::TrackRef electronPreIDTrack() const; // Ref to KF track from Electron PreID
169  float electronPreIDOutput() const; // BDT output from Electron PreID
170  bool electronPreIDDecision() const; // Decision from Electron PreID
171 
172  void setemFraction(const float&);
173  void sethcalTotOverPLead(const float&);
174  void sethcalMaxOverPLead(const float&);
175  void sethcal3x3OverPLead(const float&);
176  void setecalStripSumEOverPLead(const float&);
177  void setbremsRecoveryEOverPLead(const float&);
179  void setelectronPreIDOutput(const float&);
180  void setelectronPreIDDecision(const bool&);
181 
182  // For Muon Rejection
183  bool hasMuonReference() const; // check if muon ref exists
184  float caloComp() const;
185  float segComp() const;
186  bool muonDecision() const;
187  void setCaloComp(const float&);
188  void setSegComp(const float&);
189  void setMuonDecision(const bool&);
190 
196 
200 
202  void dump(std::ostream& out = std::cout) const;
203 
204  private:
207 
208  // check overlap with another candidate
209  virtual bool overlap(const Candidate&) const;
210 
213 
214  // SIP
216  // Isolation variables
220 
221  // Electron rejection variables
222  float emFraction_;
229 
230  // Muon rejection variables
231  float caloComp_;
232  float segComp_;
233 
235 
237 
239 
246 
247  // Signal candidates
248  std::vector<reco::PFCandidatePtr> selectedSignalPFCands_;
249  std::vector<reco::PFCandidatePtr> selectedSignalPFChargedHadrCands_;
250  std::vector<reco::PFCandidatePtr> selectedSignalPFNeutrHadrCands_;
251  std::vector<reco::PFCandidatePtr> selectedSignalPFGammaCands_;
252 
253  // Isolation candidates
254  std::vector<reco::PFCandidatePtr> selectedIsolationPFCands_;
255  std::vector<reco::PFCandidatePtr> selectedIsolationPFChargedHadrCands_;
256  std::vector<reco::PFCandidatePtr> selectedIsolationPFNeutrHadrCands_;
257  std::vector<reco::PFCandidatePtr> selectedIsolationPFGammaCands_;
258 
261 
264 
265  // Association of gamma candidates into PiZeros (transient)
266  mutable std::vector<reco::RecoTauPiZero> signalPiZeroCandidates_;
267  mutable std::vector<reco::RecoTauPiZero> isolationPiZeroCandidates_;
268 
269  // Association of PF candidates into PFRecoTauChargedHadrons (transient)
270  mutable std::vector<reco::PFRecoTauChargedHadron> signalTauChargedHadronCandidates_;
271  mutable std::vector<reco::PFRecoTauChargedHadron> isolationTauChargedHadronCandidates_;
272 };
273 
274 std::ostream & operator<<(std::ostream& out, const PFTau& c);
275 
276 } // end namespace reco
277 
278 #endif
float ecalStripSumEOverPLead_
Definition: PFTau.h:226
bool hasMuonReference() const
Definition: PFTau.cc:218
float maximumHCALPFClusterEt() const
Et of the highest Et HCAL PFCluster.
Definition: PFTau.cc:193
int i
Definition: DBlmapReader.cc:9
std::vector< reco::PFCandidatePtr > selectedIsolationPFNeutrHadrCands_
Definition: PFTau.h:256
RecoTauPiZeroRefVector signalPiZeroCandidatesRefs_
Definition: PFTau.h:259
void setMuonDecision(const bool &)
Definition: PFTau.cc:233
std::vector< reco::RecoTauPiZero > isolationPiZeroCandidates_
Definition: PFTau.h:267
void setelectronPreIDOutput(const float &)
Definition: PFTau.cc:214
float isolationPFGammaCandsEtSum() const
Definition: PFTau.cc:190
std::vector< reco::PFCandidatePtr > selectedSignalPFCands_
Definition: PFTau.h:248
void setBendCorrMass(float bendCorrMass)
Definition: PFTau.h:155
const PFJetRef & jetRef() const
Definition: PFTau.cc:58
const std::vector< reco::PFCandidatePtr > & isolationPFCands() const
PFCandidates in isolation region.
Definition: PFTau.cc:87
float isolationPFChargedHadrCandsPtSum() const
Definition: PFTau.cc:187
void setleadPFChargedHadrCand(const PFCandidatePtr &)
Definition: PFTau.cc:71
void setleadPFNeutralCand(const PFCandidatePtr &)
Definition: PFTau.cc:72
const PFCandidatePtr & leadPFChargedHadrCand() const
Definition: PFTau.cc:67
void setelectronPreIDDecision(const bool &)
Definition: PFTau.cc:215
size_t size_type
Definition: Candidate.h:30
float segComp() const
Definition: PFTau.cc:229
std::vector< reco::PFRecoTauChargedHadron > signalTauChargedHadronCandidates_
Definition: PFTau.h:270
float hcalTotOverPLead() const
Definition: PFTau.cc:198
bool electronPreIDDecision_
Definition: PFTau.h:212
float maximumHCALPFClusterEt_
Definition: PFTau.h:219
void setisolationPFCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:88
bool electronPreIDDecision() const
Definition: PFTau.cc:205
const std::vector< reco::PFCandidatePtr > & signalPFGammaCands() const
Gamma candidates in signal region.
Definition: PFTau.cc:84
math::XYZTLorentzVector LorentzVector
float isolationPFChargedHadrCandsPtSum_
Definition: PFTau.h:217
std::vector< reco::PFRecoTauChargedHadron > isolationTauChargedHadronCandidates_
Definition: PFTau.h:271
float hcal3x3OverPLead() const
Definition: PFTau.cc:200
std::vector< reco::RecoTauPiZero > signalPiZeroCandidates_
Definition: PFTau.h:266
reco::PFCandidatePtr leadPFNeutralCand_
Definition: PFTau.h:243
float emFraction() const
Definition: PFTau.cc:197
std::vector< reco::PFCandidatePtr > selectedSignalPFGammaCands_
Definition: PFTau.h:251
void sethcal3x3OverPLead(const float &)
Definition: PFTau.cc:210
void setisolationPFGammaCandsEtSum(const float &)
Definition: PFTau.cc:191
void setIsolationTauChargedHadronCandidates(const std::vector< PFRecoTauChargedHadron > &)
Definition: PFTau.cc:174
void setemFraction(const float &)
Definition: PFTau.cc:207
PFRecoTauChargedHadronRefVector isolationTauChargedHadronCandidatesRefs_
Definition: PFTau.h:263
const std::vector< reco::PFCandidatePtr > & signalPFCands() const
PFCandidates in signal region.
Definition: PFTau.cc:78
const std::vector< reco::PFCandidatePtr > & isolationPFGammaCands() const
Gamma candidates in isolation region.
Definition: PFTau.cc:93
void setisolationPFNeutrHadrCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:92
bool muonDecision() const
Definition: PFTau.cc:230
reco::PFJetRef jetRef_
Definition: PFTau.h:240
void setSignalConeSize(double signalConeSize)
Definition: PFTau.h:159
hadronicDecayMode decayMode() const
Definition: PFTau.cc:182
void setsignalPFChargedHadrCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:81
float segComp_
Definition: PFTau.h:232
void dump(std::ostream &out=std::cout) const
prints information on this PFTau
Definition: PFTau.cc:246
void setjetRef(const PFJetRef &)
Definition: PFTau.cc:59
CandidatePtr sourceCandidatePtr(size_type i) const
Definition: PFTau.cc:235
void setsignalPiZeroCandidates(const std::vector< RecoTauPiZero > &)
Definition: PFTau.cc:108
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:71
float leadPFChargedHadrCandsignedSipt_
Definition: PFTau.h:215
PFRecoTauChargedHadronRef leadTauChargedHadronCandidate() const
Definition: PFTau.cc:136
float caloComp() const
Definition: PFTau.cc:228
const std::vector< RecoTauPiZero > & signalPiZeroCandidates() const
Retrieve the association of signal region gamma candidates into candidate PiZeros.
Definition: PFTau.cc:97
RecoTauPiZeroRefVector isolationPiZeroCandidatesRefs_
Definition: PFTau.h:260
void setIsolationPiZeroCandidatesRefs(const RecoTauPiZeroRefVector &)
Definition: PFTau.cc:116
void setDecayMode(const hadronicDecayMode &)
Definition: PFTau.cc:184
void setleadPFCand(const PFCandidatePtr &)
Definition: PFTau.cc:73
void setCaloComp(const float &)
Definition: PFTau.cc:231
math::XYZPoint Point
void setSignalTauChargedHadronCandidatesRefs(const PFRecoTauChargedHadronRefVector &)
Definition: PFTau.cc:159
void setisolationPFChargedHadrCandsPtSum(const float &)
Definition: PFTau.cc:188
void setleadPFChargedHadrCandsignedSipt(const float &)
Definition: PFTau.cc:76
float signalConeSize_
Definition: PFTau.h:238
void setsignalPFCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:79
hadronicDecayMode decayMode_
Definition: PFTau.h:234
const std::vector< reco::PFCandidatePtr > & isolationPFNeutrHadrCands() const
Definition: PFTau.cc:91
void setisolationPiZeroCandidates(const std::vector< RecoTauPiZero > &)
Definition: PFTau.cc:131
const std::vector< reco::PFCandidatePtr > & isolationPFChargedHadrCands() const
Charged candidates in isolation region.
Definition: PFTau.cc:89
float leadPFChargedHadrCandsignedSipt() const
Definition: PFTau.cc:75
void setbremsRecoveryEOverPLead(const float &)
Definition: PFTau.cc:212
tuple out
Definition: dbtoconf.py:99
bool muonDecision_
Definition: PFTau.h:211
const std::vector< RecoTauPiZero > & isolationPiZeroCandidates() const
Retrieve the association of isolation region gamma candidates into candidate PiZeros.
Definition: PFTau.cc:120
const PFTauTagInfoRef & pfTauTagInfoRef() const
Definition: PFTau.cc:61
const PFCandidatePtr & leadPFNeutralCand() const
Definition: PFTau.cc:68
void sethcalMaxOverPLead(const float &)
Definition: PFTau.cc:209
virtual ~PFTau()
Definition: PFTau.h:57
void setIsolationTauChargedHadronCandidatesRefs(const PFRecoTauChargedHadronRefVector &)
Definition: PFTau.cc:178
void setisolationPFGammaCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:94
void setSegComp(const float &)
Definition: PFTau.cc:232
PFTau * clone() const
returns a clone of the Candidate object
Definition: PFTau.cc:55
void setsignalPFGammaCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:85
reco::PFCandidatePtr leadPFChargedHadrCand_
Definition: PFTau.h:242
void setSignalTauChargedHadronCandidates(const std::vector< PFRecoTauChargedHadron > &)
Definition: PFTau.cc:155
const PFCandidatePtr & leadPFCand() const
Definition: PFTau.cc:69
void setisolationPFChargedHadrCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:90
float bremsRecoveryEOverPLead() const
Definition: PFTau.cc:202
float bremsRecoveryEOverPLead_
Definition: PFTau.h:227
float hcal3x3OverPLead_
Definition: PFTau.h:225
double signalConeSize() const
Size of signal cone.
Definition: PFTau.h:158
float hcalMaxOverPLead_
Definition: PFTau.h:224
float bendCorrMass() const
Effect of eta and phi correction of strip on mass of tau candidate.
Definition: PFTau.h:154
PFTauTagInfoRef PFTauTagInfoRef_
Definition: PFTau.h:241
float electronPreIDOutput_
Definition: PFTau.h:228
hadronicDecayMode
Definition: PFTau.h:35
const std::vector< reco::PFCandidatePtr > & signalPFNeutrHadrCands() const
Neutral hadrons in signal region.
Definition: PFTau.cc:82
size_type numberOfSourceCandidatePtrs() const
Definition: PFTau.h:195
virtual bool overlap(const Candidate &) const
check overlap with another candidate
Definition: PFTau.cc:241
std::vector< reco::PFCandidatePtr > selectedSignalPFChargedHadrCands_
Definition: PFTau.h:249
void setSignalPiZeroCandidatesRefs(const RecoTauPiZeroRefVector &)
Definition: PFTau.cc:112
void setmaximumHCALPFClusterEt(const float &)
Definition: PFTau.cc:194
std::vector< reco::PFCandidatePtr > selectedIsolationPFChargedHadrCands_
Definition: PFTau.h:255
std::vector< reco::PFCandidatePtr > selectedIsolationPFCands_
Definition: PFTau.h:254
void setecalStripSumEOverPLead(const float &)
Definition: PFTau.cc:211
float bendCorrMass_
Definition: PFTau.h:236
PFRecoTauChargedHadronRefVector signalTauChargedHadronCandidatesRefs_
Definition: PFTau.h:262
const std::vector< PFRecoTauChargedHadron > & signalTauChargedHadronCandidates() const
Retrieve the association of signal region PF candidates into candidate PFRecoTauChargedHadrons.
Definition: PFTau.cc:144
tuple cout
Definition: gather_cfg.py:121
void sethcalTotOverPLead(const float &)
Definition: PFTau.cc:208
reco::PFCandidatePtr leadPFCand_
Definition: PFTau.h:244
std::vector< reco::PFCandidatePtr > selectedIsolationPFGammaCands_
Definition: PFTau.h:257
float emFraction_
Definition: PFTau.h:222
const std::vector< PFRecoTauChargedHadron > & isolationTauChargedHadronCandidates() const
Retrieve the association of isolation region PF candidates into candidate PFRecoTauChargedHadron.
Definition: PFTau.cc:163
void setelectronPreIDTrack(const reco::TrackRef &)
Definition: PFTau.cc:213
float hcalMaxOverPLead() const
Definition: PFTau.cc:199
float electronPreIDOutput() const
Definition: PFTau.cc:204
reco::TrackRef electronPreIDTrack() const
Definition: PFTau.cc:203
void setsignalPFNeutrHadrCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:83
reco::TrackRef electronPreIDTrack_
Definition: PFTau.h:245
PFTau()
Definition: PFTau.cc:8
int Charge
electric charge type
Definition: LeafCandidate.h:21
float isolationPFGammaCandsEtSum_
Definition: PFTau.h:218
float caloComp_
Definition: PFTau.h:231
const std::vector< reco::PFCandidatePtr > & signalPFChargedHadrCands() const
Charged hadrons in signal region.
Definition: PFTau.cc:80
float ecalStripSumEOverPLead() const
Definition: PFTau.cc:201
std::vector< reco::PFCandidatePtr > selectedSignalPFNeutrHadrCands_
Definition: PFTau.h:250
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:27
void setpfTauTagInfoRef(const PFTauTagInfoRef)
Definition: PFTau.cc:65
float hcalTotOverPLead_
Definition: PFTau.h:223