CMS 3D CMS Logo

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,
53  kRareDecayMode
54  };
55 
56  PFTau();
57  PFTau(Charge q,const LorentzVector &,const Point & = Point( 0, 0, 0 ) );
58  ~PFTau() override {};
59  PFTau* clone() const override;
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;
66  void setpfTauTagInfoRef(const PFTauTagInfoRef);
67 
68  PFRecoTauChargedHadronRef leadTauChargedHadronCandidate() const;
69  const PFCandidatePtr& leadPFChargedHadrCand() const;
70  const PFCandidatePtr& leadPFNeutralCand() const;
71  //Can be either the charged or the neutral one
72  const PFCandidatePtr& leadPFCand() const;
73 
74  void setleadPFChargedHadrCand(const PFCandidatePtr&);
75  void setleadPFNeutralCand(const PFCandidatePtr&);
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>);
132  void setSignalPiZeroCandidatesRefs(RecoTauPiZeroRefVector);
133 
135  const std::vector<RecoTauPiZero>& isolationPiZeroCandidates() const;
136  void setisolationPiZeroCandidates(std::vector<RecoTauPiZero>);
137  void setIsolationPiZeroCandidatesRefs(RecoTauPiZeroRefVector);
138 
140  const std::vector<PFRecoTauChargedHadron>& signalTauChargedHadronCandidates() const;
141  void setSignalTauChargedHadronCandidates(std::vector<PFRecoTauChargedHadron>);
142  void setSignalTauChargedHadronCandidatesRefs(PFRecoTauChargedHadronRefVector);
143 
145  const std::vector<PFRecoTauChargedHadron>& isolationTauChargedHadronCandidates() const;
146  void setIsolationTauChargedHadronCandidates(std::vector<PFRecoTauChargedHadron>);
147  void setIsolationTauChargedHadronCandidatesRefs(PFRecoTauChargedHadronRefVector);
148 
152  void setDecayMode(const hadronicDecayMode&);
153 
155  float bendCorrMass() const { return bendCorrMass_; }
156  void setBendCorrMass(float bendCorrMass) { bendCorrMass_ = bendCorrMass; }
157 
159  double signalConeSize() const { return signalConeSize_; }
160  void setSignalConeSize(double signalConeSize) { signalConeSize_ = 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&);
179  void setelectronPreIDTrack(const reco::TrackRef&);
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 
196  size_type numberOfSourceCandidatePtrs() const override {return 1;}
197 
200  CandidatePtr sourceCandidatePtr( size_type i ) const override;
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  bool overlap(const Candidate&) const override;
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
int Charge
electric charge type
Definition: Candidate.h:35
std::vector< reco::PFCandidatePtr > selectedIsolationPFNeutrHadrCands_
Definition: PFTau.h:263
RecoTauPiZeroRefVector signalPiZeroCandidatesRefs_
Definition: PFTau.h:266
std::vector< reco::PFCandidatePtr > selectedSignalPFCands_
Definition: PFTau.h:255
void setBendCorrMass(float bendCorrMass)
Definition: PFTau.h:156
size_t size_type
Definition: Candidate.h:30
edm::AtomicPtrCache< std::vector< reco::RecoTauPiZero > > signalPiZeroCandidates_
Definition: PFTau.h:273
bool electronPreIDDecision_
Definition: PFTau.h:219
float maximumHCALPFClusterEt_
Definition: PFTau.h:226
float isolationPFChargedHadrCandsPtSum_
Definition: PFTau.h:224
reco::PFCandidatePtr leadPFNeutralCand_
Definition: PFTau.h:250
std::vector< reco::PFCandidatePtr > selectedSignalPFGammaCands_
Definition: PFTau.h:258
std::pair< double, double > Point
Definition: CaloEllipse.h:18
edm::AtomicPtrCache< std::vector< reco::RecoTauPiZero > > isolationPiZeroCandidates_
Definition: PFTau.h:274
PFRecoTauChargedHadronRefVector isolationTauChargedHadronCandidatesRefs_
Definition: PFTau.h:270
bool overlap(const reco::Muon &muon1, const reco::Muon &muon2, double pullX=1.0, double pullY=1.0, bool checkAdjacentChambers=false)
reco::PFJetRef jetRef_
Definition: PFTau.h:247
void setSignalConeSize(double signalConeSize)
Definition: PFTau.h:160
size_type numberOfSourceCandidatePtrs() const override
Definition: PFTau.h:196
float segComp_
Definition: PFTau.h:239
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:71
float leadPFChargedHadrCandsignedSipt_
Definition: PFTau.h:222
RecoTauPiZeroRefVector isolationPiZeroCandidatesRefs_
Definition: PFTau.h:267
const unsigned int kNull
float signalConeSize_
Definition: PFTau.h:245
hadronicDecayMode decayMode_
Definition: PFTau.h:241
InputIterator leadPFCand(InputIterator begin, InputIterator end)
bool muonDecision_
Definition: PFTau.h:218
edm::AtomicPtrCache< std::vector< reco::PFRecoTauChargedHadron > > signalTauChargedHadronCandidates_
Definition: PFTau.h:277
reco::PFCandidatePtr leadPFChargedHadrCand_
Definition: PFTau.h:249
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
float bremsRecoveryEOverPLead_
Definition: PFTau.h:234
float hcal3x3OverPLead_
Definition: PFTau.h:232
double signalConeSize() const
Size of signal cone.
Definition: PFTau.h:159
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
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
fixed size matrix
hadronicDecayMode
Definition: PFTau.h:36
std::vector< reco::PFCandidatePtr > selectedSignalPFChargedHadrCands_
Definition: PFTau.h:256
std::vector< reco::PFCandidatePtr > selectedIsolationPFChargedHadrCands_
Definition: PFTau.h:262
std::vector< reco::PFCandidatePtr > selectedIsolationPFCands_
Definition: PFTau.h:261
float bendCorrMass_
Definition: PFTau.h:243
edm::AtomicPtrCache< std::vector< reco::PFRecoTauChargedHadron > > isolationTauChargedHadronCandidates_
Definition: PFTau.h:278
PFRecoTauChargedHadronRefVector signalTauChargedHadronCandidatesRefs_
Definition: PFTau.h:269
math::XYZPoint Point
point in the space
Definition: Candidate.h:41
reco::PFCandidatePtr leadPFCand_
Definition: PFTau.h:251
std::vector< reco::PFCandidatePtr > selectedIsolationPFGammaCands_
Definition: PFTau.h:264
float emFraction_
Definition: PFTau.h:229
reco::TrackRef electronPreIDTrack_
Definition: PFTau.h:252
float isolationPFGammaCandsEtSum_
Definition: PFTau.h:225
float caloComp_
Definition: PFTau.h:238
~PFTau() override
Definition: PFTau.h:58
std::vector< reco::PFCandidatePtr > selectedSignalPFNeutrHadrCands_
Definition: PFTau.h:257
float hcalTotOverPLead_
Definition: PFTau.h:230