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  */
23 
24 #include <iostream>
25 #include <limits>
26 
27 namespace reco { namespace tau {
28  class RecoTauConstructor;
29  class PFRecoTauEnergyAlgorithmPlugin;
30 }}
31 
32 namespace reco {
33 
34 class PFTau : public BaseTau {
35  public:
37  kNull = -1,
54  };
55 
56  PFTau();
57  PFTau(Charge q,const LorentzVector &,const Point & = Point( 0, 0, 0 ) );
58  virtual ~PFTau() {};
59  PFTau* clone() const;
60 
61  const PFJetRef& jetRef() const;
62  void setjetRef(const PFJetRef&);
63 
64  // functions to access the PFTauTagInfoRef used by HLT
65  const PFTauTagInfoRef& pfTauTagInfoRef() const;
67 
70  const PFCandidatePtr& leadPFNeutralCand() const;
71  //Can be either the charged or the neutral one
72  const PFCandidatePtr& leadPFCand() const;
73 
76  void setleadPFCand(const PFCandidatePtr&);
77 
80  float leadPFChargedHadrCandsignedSipt() const;
81  void setleadPFChargedHadrCandsignedSipt(const float&);
82 
84  const std::vector<reco::PFCandidatePtr>& signalPFCands() const;
85  void setsignalPFCands(const std::vector<reco::PFCandidatePtr>&);
86 
88  const std::vector<reco::PFCandidatePtr>& signalPFChargedHadrCands() const;
89  void setsignalPFChargedHadrCands(const std::vector<reco::PFCandidatePtr>&);
90 
92  const std::vector<reco::PFCandidatePtr>& signalPFNeutrHadrCands() const;
93  void setsignalPFNeutrHadrCands(const std::vector<reco::PFCandidatePtr>&);
94 
96  const std::vector<reco::PFCandidatePtr>& signalPFGammaCands() const;
97  void setsignalPFGammaCands(const std::vector<reco::PFCandidatePtr>&);
98 
100  const std::vector<reco::PFCandidatePtr>& isolationPFCands() const;
101  void setisolationPFCands(const std::vector<reco::PFCandidatePtr>&);
102 
104  const std::vector<reco::PFCandidatePtr>& isolationPFChargedHadrCands() const;
105  void setisolationPFChargedHadrCands(const std::vector<reco::PFCandidatePtr>&);
106 
108  const std::vector<reco::PFCandidatePtr>& isolationPFNeutrHadrCands() const;
109  void setisolationPFNeutrHadrCands(const std::vector<reco::PFCandidatePtr>&);
110 
112  const std::vector<reco::PFCandidatePtr>& isolationPFGammaCands() const;
113  void setisolationPFGammaCands(const std::vector<reco::PFCandidatePtr>&);
114 
117  float isolationPFChargedHadrCandsPtSum() const;
118  void setisolationPFChargedHadrCandsPtSum(const float&);
119 
122  float isolationPFGammaCandsEtSum() const;
123  void setisolationPFGammaCandsEtSum(const float&);
124 
126  float maximumHCALPFClusterEt() const;
127  void setmaximumHCALPFClusterEt(const float&);
128 
130  const std::vector<RecoTauPiZero>& signalPiZeroCandidates() const;
131  void setsignalPiZeroCandidates(std::vector<RecoTauPiZero>);
133 
135  const std::vector<RecoTauPiZero>& isolationPiZeroCandidates() const;
136  void setisolationPiZeroCandidates(std::vector<RecoTauPiZero>);
138 
140  const std::vector<PFRecoTauChargedHadron>& signalTauChargedHadronCandidates() const;
141  void setSignalTauChargedHadronCandidates(std::vector<PFRecoTauChargedHadron>);
143 
145  const std::vector<PFRecoTauChargedHadron>& isolationTauChargedHadronCandidates() const;
146  void setIsolationTauChargedHadronCandidates(std::vector<PFRecoTauChargedHadron>);
148 
152  void setDecayMode(const hadronicDecayMode&);
153 
155  float bendCorrMass() const { return bendCorrMass_; }
157 
159  double signalConeSize() const { return signalConeSize_; }
161 
162  //Electron rejection
163  float emFraction() const; // Ecal/Hcal Cluster Energy
164  float hcalTotOverPLead() const; // total Hcal Cluster E / leadPFChargedHadron P
165  float hcalMaxOverPLead() const; // max. Hcal Cluster E / leadPFChargedHadron P
166  float hcal3x3OverPLead() const; // Hcal Cluster E in R<0.184 around Ecal impact point of leading track / leadPFChargedHadron P
167  float ecalStripSumEOverPLead() const; // Simple BremsRecovery Sum E / leadPFChargedHadron P
168  float bremsRecoveryEOverPLead() const; // BremsRecovery Sum E / leadPFChargedHadron P
169  reco::TrackRef electronPreIDTrack() const; // Ref to KF track from Electron PreID
170  float electronPreIDOutput() const; // BDT output from Electron PreID
171  bool electronPreIDDecision() const; // Decision from Electron PreID
172 
173  void setemFraction(const float&);
174  void sethcalTotOverPLead(const float&);
175  void sethcalMaxOverPLead(const float&);
176  void sethcal3x3OverPLead(const float&);
177  void setecalStripSumEOverPLead(const float&);
178  void setbremsRecoveryEOverPLead(const float&);
180  void setelectronPreIDOutput(const float&);
181  void setelectronPreIDDecision(const bool&);
182 
183  // For Muon Rejection
184  bool hasMuonReference() const; // check if muon ref exists
185  float caloComp() const;
186  float segComp() const;
187  bool muonDecision() const;
188  void setCaloComp(const float&);
189  void setSegComp(const float&);
190  void setMuonDecision(const bool&);
191 
197 
201 
203  void dump(std::ostream& out = std::cout) const;
204 
205  private:
208 
209  //These are used by the friends
210  std::vector<RecoTauPiZero>& signalPiZeroCandidatesRestricted();
211  std::vector<RecoTauPiZero>& isolationPiZeroCandidatesRestricted();
212  std::vector<PFRecoTauChargedHadron>& signalTauChargedHadronCandidatesRestricted();
213  std::vector<PFRecoTauChargedHadron>& isolationTauChargedHadronCandidatesRestricted();
214 
215  // check overlap with another candidate
216  virtual bool overlap(const Candidate&) const;
217 
220 
221  // SIP
223  // Isolation variables
227 
228  // Electron rejection variables
229  float emFraction_;
236 
237  // Muon rejection variables
238  float caloComp_;
239  float segComp_;
240 
242 
244 
246 
253 
254  // Signal candidates
255  std::vector<reco::PFCandidatePtr> selectedSignalPFCands_;
256  std::vector<reco::PFCandidatePtr> selectedSignalPFChargedHadrCands_;
257  std::vector<reco::PFCandidatePtr> selectedSignalPFNeutrHadrCands_;
258  std::vector<reco::PFCandidatePtr> selectedSignalPFGammaCands_;
259 
260  // Isolation candidates
261  std::vector<reco::PFCandidatePtr> selectedIsolationPFCands_;
262  std::vector<reco::PFCandidatePtr> selectedIsolationPFChargedHadrCands_;
263  std::vector<reco::PFCandidatePtr> selectedIsolationPFNeutrHadrCands_;
264  std::vector<reco::PFCandidatePtr> selectedIsolationPFGammaCands_;
265 
268 
271 
272  // Association of gamma candidates into PiZeros (transient)
275 
276  // Association of PF candidates into PFRecoTauChargedHadrons (transient)
279 };
280 
281 std::ostream & operator<<(std::ostream& out, const PFTau& c);
282 
283 } // end namespace reco
284 
285 #endif
float ecalStripSumEOverPLead_
Definition: PFTau.h:233
bool hasMuonReference() const
Definition: PFTau.cc:248
float maximumHCALPFClusterEt() const
Et of the highest Et HCAL PFCluster.
Definition: PFTau.cc:223
void setisolationPiZeroCandidates(std::vector< RecoTauPiZero >)
Definition: PFTau.cc:161
void setSignalTauChargedHadronCandidatesRefs(PFRecoTauChargedHadronRefVector)
Definition: PFTau.cc:189
int i
Definition: DBlmapReader.cc:9
std::vector< reco::PFCandidatePtr > selectedIsolationPFNeutrHadrCands_
Definition: PFTau.h:263
RecoTauPiZeroRefVector signalPiZeroCandidatesRefs_
Definition: PFTau.h:266
void setMuonDecision(const bool &)
Definition: PFTau.cc:263
void setelectronPreIDOutput(const float &)
Definition: PFTau.cc:244
float isolationPFGammaCandsEtSum() const
Definition: PFTau.cc:220
std::vector< reco::PFCandidatePtr > selectedSignalPFCands_
Definition: PFTau.h:255
void setBendCorrMass(float bendCorrMass)
Definition: PFTau.h:156
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:217
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:245
size_t size_type
Definition: Candidate.h:30
edm::AtomicPtrCache< std::vector< reco::RecoTauPiZero > > signalPiZeroCandidates_
Definition: PFTau.h:273
float segComp() const
Definition: PFTau.cc:259
float hcalTotOverPLead() const
Definition: PFTau.cc:228
bool electronPreIDDecision_
Definition: PFTau.h:219
float maximumHCALPFClusterEt_
Definition: PFTau.h:226
void setisolationPFCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:88
void setIsolationTauChargedHadronCandidates(std::vector< PFRecoTauChargedHadron >)
Definition: PFTau.cc:204
bool electronPreIDDecision() const
Definition: PFTau.cc:235
const std::vector< reco::PFCandidatePtr > & signalPFGammaCands() const
Gamma candidates in signal region.
Definition: PFTau.cc:84
math::XYZTLorentzVector LorentzVector
float isolationPFChargedHadrCandsPtSum_
Definition: PFTau.h:224
float hcal3x3OverPLead() const
Definition: PFTau.cc:230
reco::PFCandidatePtr leadPFNeutralCand_
Definition: PFTau.h:250
float emFraction() const
Definition: PFTau.cc:227
std::vector< reco::PFCandidatePtr > selectedSignalPFGammaCands_
Definition: PFTau.h:258
void setsignalPiZeroCandidates(std::vector< RecoTauPiZero >)
Definition: PFTau.cc:138
void sethcal3x3OverPLead(const float &)
Definition: PFTau.cc:240
void setisolationPFGammaCandsEtSum(const float &)
Definition: PFTau.cc:221
edm::AtomicPtrCache< std::vector< reco::RecoTauPiZero > > isolationPiZeroCandidates_
Definition: PFTau.h:274
void setemFraction(const float &)
Definition: PFTau.cc:237
PFRecoTauChargedHadronRefVector isolationTauChargedHadronCandidatesRefs_
Definition: PFTau.h:270
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
std::vector< RecoTauPiZero > & signalPiZeroCandidatesRestricted()
Definition: PFTau.cc:133
bool muonDecision() const
Definition: PFTau.cc:260
reco::PFJetRef jetRef_
Definition: PFTau.h:247
void setSignalConeSize(double signalConeSize)
Definition: PFTau.h:160
hadronicDecayMode decayMode() const
Definition: PFTau.cc:212
void setsignalPFChargedHadrCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:81
float segComp_
Definition: PFTau.h:239
void dump(std::ostream &out=std::cout) const
prints information on this PFTau
Definition: PFTau.cc:276
void setjetRef(const PFJetRef &)
Definition: PFTau.cc:59
CandidatePtr sourceCandidatePtr(size_type i) const
Definition: PFTau.cc:265
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:71
float leadPFChargedHadrCandsignedSipt_
Definition: PFTau.h:222
PFRecoTauChargedHadronRef leadTauChargedHadronCandidate() const
Definition: PFTau.cc:166
float caloComp() const
Definition: PFTau.cc:258
const std::vector< RecoTauPiZero > & signalPiZeroCandidates() const
Retrieve the association of signal region gamma candidates into candidate PiZeros.
Definition: PFTau.cc:127
RecoTauPiZeroRefVector isolationPiZeroCandidatesRefs_
Definition: PFTau.h:267
void setDecayMode(const hadronicDecayMode &)
Definition: PFTau.cc:214
void setleadPFCand(const PFCandidatePtr &)
Definition: PFTau.cc:73
void setCaloComp(const float &)
Definition: PFTau.cc:261
math::XYZPoint Point
void setisolationPFChargedHadrCandsPtSum(const float &)
Definition: PFTau.cc:218
void setleadPFChargedHadrCandsignedSipt(const float &)
Definition: PFTau.cc:76
float signalConeSize_
Definition: PFTau.h:245
void setsignalPFCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:79
hadronicDecayMode decayMode_
Definition: PFTau.h:241
const std::vector< reco::PFCandidatePtr > & isolationPFNeutrHadrCands() const
Definition: PFTau.cc:91
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:242
tuple out
Definition: dbtoconf.py:99
bool muonDecision_
Definition: PFTau.h:218
const std::vector< RecoTauPiZero > & isolationPiZeroCandidates() const
Retrieve the association of isolation region gamma candidates into candidate PiZeros.
Definition: PFTau.cc:146
const PFTauTagInfoRef & pfTauTagInfoRef() const
Definition: PFTau.cc:61
const PFCandidatePtr & leadPFNeutralCand() const
Definition: PFTau.cc:68
std::vector< PFRecoTauChargedHadron > & isolationTauChargedHadronCandidatesRestricted()
Definition: PFTau.cc:199
std::vector< RecoTauPiZero > & isolationPiZeroCandidatesRestricted()
Definition: PFTau.cc:152
void sethcalMaxOverPLead(const float &)
Definition: PFTau.cc:239
virtual ~PFTau()
Definition: PFTau.h:58
edm::AtomicPtrCache< std::vector< reco::PFRecoTauChargedHadron > > signalTauChargedHadronCandidates_
Definition: PFTau.h:277
void setisolationPFGammaCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:94
void setSegComp(const float &)
Definition: PFTau.cc:262
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:249
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:232
float bremsRecoveryEOverPLead_
Definition: PFTau.h:234
float hcal3x3OverPLead_
Definition: PFTau.h:232
double signalConeSize() const
Size of signal cone.
Definition: PFTau.h:159
float hcalMaxOverPLead_
Definition: PFTau.h:231
float bendCorrMass() const
Effect of eta and phi correction of strip on mass of tau candidate.
Definition: PFTau.h:155
PFTauTagInfoRef PFTauTagInfoRef_
Definition: PFTau.h:248
float electronPreIDOutput_
Definition: PFTau.h:235
hadronicDecayMode
Definition: PFTau.h:36
const std::vector< reco::PFCandidatePtr > & signalPFNeutrHadrCands() const
Neutral hadrons in signal region.
Definition: PFTau.cc:82
size_type numberOfSourceCandidatePtrs() const
Definition: PFTau.h:196
virtual bool overlap(const Candidate &) const
check overlap with another candidate
Definition: PFTau.cc:271
std::vector< reco::PFCandidatePtr > selectedSignalPFChargedHadrCands_
Definition: PFTau.h:256
void setmaximumHCALPFClusterEt(const float &)
Definition: PFTau.cc:224
void setSignalTauChargedHadronCandidates(std::vector< PFRecoTauChargedHadron >)
Definition: PFTau.cc:185
std::vector< reco::PFCandidatePtr > selectedIsolationPFChargedHadrCands_
Definition: PFTau.h:262
std::vector< reco::PFCandidatePtr > selectedIsolationPFCands_
Definition: PFTau.h:261
void setecalStripSumEOverPLead(const float &)
Definition: PFTau.cc:241
float bendCorrMass_
Definition: PFTau.h:243
edm::AtomicPtrCache< std::vector< reco::PFRecoTauChargedHadron > > isolationTauChargedHadronCandidates_
Definition: PFTau.h:278
PFRecoTauChargedHadronRefVector signalTauChargedHadronCandidatesRefs_
Definition: PFTau.h:269
const std::vector< PFRecoTauChargedHadron > & signalTauChargedHadronCandidates() const
Retrieve the association of signal region PF candidates into candidate PFRecoTauChargedHadrons.
Definition: PFTau.cc:174
tuple cout
Definition: gather_cfg.py:121
void setIsolationPiZeroCandidatesRefs(RecoTauPiZeroRefVector)
Definition: PFTau.cc:157
void sethcalTotOverPLead(const float &)
Definition: PFTau.cc:238
reco::PFCandidatePtr leadPFCand_
Definition: PFTau.h:251
std::vector< PFRecoTauChargedHadron > & signalTauChargedHadronCandidatesRestricted()
Definition: PFTau.cc:180
std::vector< reco::PFCandidatePtr > selectedIsolationPFGammaCands_
Definition: PFTau.h:264
float emFraction_
Definition: PFTau.h:229
const std::vector< PFRecoTauChargedHadron > & isolationTauChargedHadronCandidates() const
Retrieve the association of isolation region PF candidates into candidate PFRecoTauChargedHadron.
Definition: PFTau.cc:193
void setelectronPreIDTrack(const reco::TrackRef &)
Definition: PFTau.cc:243
float hcalMaxOverPLead() const
Definition: PFTau.cc:229
void setIsolationTauChargedHadronCandidatesRefs(PFRecoTauChargedHadronRefVector)
Definition: PFTau.cc:208
float electronPreIDOutput() const
Definition: PFTau.cc:234
reco::TrackRef electronPreIDTrack() const
Definition: PFTau.cc:233
void setsignalPFNeutrHadrCands(const std::vector< reco::PFCandidatePtr > &)
Definition: PFTau.cc:83
reco::TrackRef electronPreIDTrack_
Definition: PFTau.h:252
PFTau()
Definition: PFTau.cc:8
int Charge
electric charge type
Definition: LeafCandidate.h:21
float isolationPFGammaCandsEtSum_
Definition: PFTau.h:225
float caloComp_
Definition: PFTau.h:238
const std::vector< reco::PFCandidatePtr > & signalPFChargedHadrCands() const
Charged hadrons in signal region.
Definition: PFTau.cc:80
float ecalStripSumEOverPLead() const
Definition: PFTau.cc:231
std::vector< reco::PFCandidatePtr > selectedSignalPFNeutrHadrCands_
Definition: PFTau.h:257
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:27
void setpfTauTagInfoRef(const PFTauTagInfoRef)
Definition: PFTau.cc:65
void setSignalPiZeroCandidatesRefs(RecoTauPiZeroRefVector)
Definition: PFTau.cc:142
float hcalTotOverPLead_
Definition: PFTau.h:230