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