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 JetBaseRef& jetRef() const;
62  void setjetRef(const JetBaseRef&);
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 CandidatePtr& leadChargedHadrCand() const;
70  const CandidatePtr& leadNeutralCand() const;
71  //Can be either the charged or the neutral one
72  const CandidatePtr& leadCand() const;
73 
74  void setleadChargedHadrCand(const CandidatePtr&);
75  void setleadNeutralCand(const CandidatePtr&);
76  void setleadCand(const CandidatePtr&);
77 
80  float leadPFChargedHadrCandsignedSipt() const;
81  void setleadPFChargedHadrCandsignedSipt(const float&);
82 
84  const std::vector<reco::CandidatePtr>& signalCands() const;
85  void setsignalCands(const std::vector<reco::CandidatePtr>&);
86 
88  const std::vector<reco::CandidatePtr>& signalChargedHadrCands() const;
89  void setsignalChargedHadrCands(const std::vector<reco::CandidatePtr>&);
90 
92  const std::vector<reco::CandidatePtr>& signalNeutrHadrCands() const;
93  void setsignalNeutrHadrCands(const std::vector<reco::CandidatePtr>&);
94 
96  const std::vector<reco::CandidatePtr>& signalGammaCands() const;
97  void setsignalGammaCands(const std::vector<reco::CandidatePtr>&);
98 
100  const std::vector<reco::CandidatePtr>& isolationCands() const;
101  void setisolationCands(const std::vector<reco::CandidatePtr>&);
102 
104  const std::vector<reco::CandidatePtr>& isolationChargedHadrCands() const;
105  void setisolationChargedHadrCands(const std::vector<reco::CandidatePtr>&);
106 
108  const std::vector<reco::CandidatePtr>& isolationNeutrHadrCands() const;
109  void setisolationNeutrHadrCands(const std::vector<reco::CandidatePtr>&);
110 
112  const std::vector<reco::CandidatePtr>& isolationGammaCands() const;
113  void setisolationGammaCands(const std::vector<reco::CandidatePtr>&);
114 
116  const PFCandidatePtr leadPFChargedHadrCand() const;
117  const PFCandidatePtr leadPFNeutralCand() const;
118  const PFCandidatePtr leadPFCand() const;
119  const std::vector<reco::PFCandidatePtr>& signalPFCands() const;
120  const std::vector<reco::PFCandidatePtr>& signalPFChargedHadrCands() const;
121  const std::vector<reco::PFCandidatePtr>& signalPFNeutrHadrCands() const;
122  const std::vector<reco::PFCandidatePtr>& signalPFGammaCands() const;
123  const std::vector<reco::PFCandidatePtr>& isolationPFCands() const;
124  const std::vector<reco::PFCandidatePtr>& isolationPFChargedHadrCands() const;
125  const std::vector<reco::PFCandidatePtr>& isolationPFNeutrHadrCands() const;
126  const std::vector<reco::PFCandidatePtr>& isolationPFGammaCands() const;
127 
130  float isolationPFChargedHadrCandsPtSum() const;
131  void setisolationPFChargedHadrCandsPtSum(const float&);
132 
135  float isolationPFGammaCandsEtSum() const;
136  void setisolationPFGammaCandsEtSum(const float&);
137 
139  float maximumHCALPFClusterEt() const;
140  void setmaximumHCALPFClusterEt(const float&);
141 
143  const std::vector<RecoTauPiZero>& signalPiZeroCandidates() const;
144  void setsignalPiZeroCandidates(std::vector<RecoTauPiZero>);
145  void setSignalPiZeroCandidatesRefs(RecoTauPiZeroRefVector);
146 
148  const std::vector<RecoTauPiZero>& isolationPiZeroCandidates() const;
149  void setisolationPiZeroCandidates(std::vector<RecoTauPiZero>);
150  void setIsolationPiZeroCandidatesRefs(RecoTauPiZeroRefVector);
151 
153  const std::vector<PFRecoTauChargedHadron>& signalTauChargedHadronCandidates() const;
154  void setSignalTauChargedHadronCandidates(std::vector<PFRecoTauChargedHadron>);
155  void setSignalTauChargedHadronCandidatesRefs(PFRecoTauChargedHadronRefVector);
156 
158  const std::vector<PFRecoTauChargedHadron>& isolationTauChargedHadronCandidates() const;
159  void setIsolationTauChargedHadronCandidates(std::vector<PFRecoTauChargedHadron>);
160  void setIsolationTauChargedHadronCandidatesRefs(PFRecoTauChargedHadronRefVector);
161 
165  void setDecayMode(const hadronicDecayMode&);
166 
168  float bendCorrMass() const { return bendCorrMass_; }
169  void setBendCorrMass(float bendCorrMass) { bendCorrMass_ = bendCorrMass; }
170 
172  double signalConeSize() const { return signalConeSize_; }
173  void setSignalConeSize(double signalConeSize) { signalConeSize_ = signalConeSize; }
174 
175  //Electron rejection
176  float emFraction() const; // Ecal/Hcal Cluster Energy
177  float hcalTotOverPLead() const; // total Hcal Cluster E / leadPFChargedHadron P
178  float hcalMaxOverPLead() const; // max. Hcal Cluster E / leadPFChargedHadron P
179  float hcal3x3OverPLead() const; // Hcal Cluster E in R<0.184 around Ecal impact point of leading track / leadPFChargedHadron P
180  float ecalStripSumEOverPLead() const; // Simple BremsRecovery Sum E / leadPFChargedHadron P
181  float bremsRecoveryEOverPLead() const; // BremsRecovery Sum E / leadPFChargedHadron P
182  reco::TrackRef electronPreIDTrack() const; // Ref to KF track from Electron PreID
183  float electronPreIDOutput() const; // BDT output from Electron PreID
184  bool electronPreIDDecision() const; // Decision from Electron PreID
185 
186  void setemFraction(const float&);
187  void sethcalTotOverPLead(const float&);
188  void sethcalMaxOverPLead(const float&);
189  void sethcal3x3OverPLead(const float&);
190  void setecalStripSumEOverPLead(const float&);
191  void setbremsRecoveryEOverPLead(const float&);
192  void setelectronPreIDTrack(const reco::TrackRef&);
193  void setelectronPreIDOutput(const float&);
194  void setelectronPreIDDecision(const bool&);
195 
196  // For Muon Rejection
197  bool hasMuonReference() const; // check if muon ref exists
198  float caloComp() const;
199  float segComp() const;
200  bool muonDecision() const;
201  void setCaloComp(const float&);
202  void setSegComp(const float&);
203  void setMuonDecision(const bool&);
204 
209  size_type numberOfSourceCandidatePtrs() const override {return 1;}
210 
213  CandidatePtr sourceCandidatePtr( size_type i ) const override;
214 
216  void dump(std::ostream& out = std::cout) const;
217 
218  private:
221 
222  //These are used by the friends
223  std::vector<RecoTauPiZero>& signalPiZeroCandidatesRestricted();
224  std::vector<RecoTauPiZero>& isolationPiZeroCandidatesRestricted();
225  std::vector<PFRecoTauChargedHadron>& signalTauChargedHadronCandidatesRestricted();
226  std::vector<PFRecoTauChargedHadron>& isolationTauChargedHadronCandidatesRestricted();
227 
228  // check overlap with another candidate
229  bool overlap(const Candidate&) const override;
230 
233 
234  // SIP
236  // Isolation variables
240 
241  // Electron rejection variables
242  float emFraction_;
249 
250  // Muon rejection variables
251  float caloComp_;
252  float segComp_;
253 
255 
257 
259 
266 
267  // Signal candidates
268  std::vector<reco::CandidatePtr> selectedSignalCands_;
269  std::vector<reco::CandidatePtr> selectedSignalChargedHadrCands_;
270  std::vector<reco::CandidatePtr> selectedSignalNeutrHadrCands_;
271  std::vector<reco::CandidatePtr> selectedSignalGammaCands_;
272 
273  // Isolation candidates
274  std::vector<reco::CandidatePtr> selectedIsolationCands_;
275  std::vector<reco::CandidatePtr> selectedIsolationChargedHadrCands_;
276  std::vector<reco::CandidatePtr> selectedIsolationNeutrHadrCands_;
277  std::vector<reco::CandidatePtr> selectedIsolationGammaCands_;
278 
279  // Transient caches for PFCandidate-based accessors
283 
288 
293 
296 
299 
300  // Association of gamma candidates into PiZeros (transient)
303 
304  // Association of PF candidates into PFRecoTauChargedHadrons (transient)
307 };
308 
309 std::ostream & operator<<(std::ostream& out, const PFTau& c);
310 
311 } // end namespace reco
312 
313 #endif
float ecalStripSumEOverPLead_
Definition: PFTau.h:246
int Charge
electric charge type
Definition: Candidate.h:35
RecoTauPiZeroRefVector signalPiZeroCandidatesRefs_
Definition: PFTau.h:294
void setBendCorrMass(float bendCorrMass)
Definition: PFTau.h:169
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientSignalPFCands_
Definition: PFTau.h:284
size_t size_type
Definition: Candidate.h:30
reco::CandidatePtr leadCand_
Definition: PFTau.h:264
edm::AtomicPtrCache< std::vector< reco::RecoTauPiZero > > signalPiZeroCandidates_
Definition: PFTau.h:301
bool electronPreIDDecision_
Definition: PFTau.h:232
float maximumHCALPFClusterEt_
Definition: PFTau.h:239
reco::CandidatePtr leadChargedHadrCand_
Definition: PFTau.h:262
reco::JetBaseRef jetRef_
Definition: PFTau.h:260
float isolationPFChargedHadrCandsPtSum_
Definition: PFTau.h:237
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientIsolationPFNeutrHadrCands_
Definition: PFTau.h:291
std::pair< double, double > Point
Definition: CaloEllipse.h:18
reco::CandidatePtr leadNeutralCand_
Definition: PFTau.h:263
edm::AtomicPtrCache< std::vector< reco::RecoTauPiZero > > isolationPiZeroCandidates_
Definition: PFTau.h:302
PFRecoTauChargedHadronRefVector isolationTauChargedHadronCandidatesRefs_
Definition: PFTau.h:298
InputIterator leadCand(InputIterator begin, InputIterator end)
edm::AtomicPtrCache< reco::PFCandidatePtr > leadPFCand_
Definition: PFTau.h:282
bool overlap(const reco::Muon &muon1, const reco::Muon &muon2, double pullX=1.0, double pullY=1.0, bool checkAdjacentChambers=false)
void setSignalConeSize(double signalConeSize)
Definition: PFTau.h:173
size_type numberOfSourceCandidatePtrs() const override
Definition: PFTau.h:209
float segComp_
Definition: PFTau.h:252
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:71
float leadPFChargedHadrCandsignedSipt_
Definition: PFTau.h:235
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientIsolationPFChargedHadrCands_
Definition: PFTau.h:290
std::vector< reco::CandidatePtr > selectedSignalGammaCands_
Definition: PFTau.h:271
RecoTauPiZeroRefVector isolationPiZeroCandidatesRefs_
Definition: PFTau.h:295
const unsigned int kNull
std::vector< reco::CandidatePtr > selectedSignalNeutrHadrCands_
Definition: PFTau.h:270
std::vector< reco::CandidatePtr > selectedIsolationGammaCands_
Definition: PFTau.h:277
float signalConeSize_
Definition: PFTau.h:258
edm::AtomicPtrCache< reco::PFCandidatePtr > leadPFNeutralCand_
Definition: PFTau.h:281
hadronicDecayMode decayMode_
Definition: PFTau.h:254
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientSignalPFNeutrHadrCands_
Definition: PFTau.h:286
std::vector< reco::CandidatePtr > selectedSignalCands_
Definition: PFTau.h:268
std::vector< reco::CandidatePtr > selectedIsolationCands_
Definition: PFTau.h:274
bool muonDecision_
Definition: PFTau.h:231
std::vector< reco::CandidatePtr > selectedIsolationNeutrHadrCands_
Definition: PFTau.h:276
edm::AtomicPtrCache< reco::PFCandidatePtr > leadPFChargedHadrCand_
Definition: PFTau.h:280
edm::AtomicPtrCache< std::vector< reco::PFRecoTauChargedHadron > > signalTauChargedHadronCandidates_
Definition: PFTau.h:305
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientSignalPFChargedHadrCands_
Definition: PFTau.h:285
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
float bremsRecoveryEOverPLead_
Definition: PFTau.h:247
float hcal3x3OverPLead_
Definition: PFTau.h:245
double signalConeSize() const
Size of signal cone.
Definition: PFTau.h:172
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
float hcalMaxOverPLead_
Definition: PFTau.h:244
float bendCorrMass() const
Effect of eta and phi correction of strip on mass of tau candidate.
Definition: PFTau.h:168
std::vector< reco::CandidatePtr > selectedIsolationChargedHadrCands_
Definition: PFTau.h:275
PFTauTagInfoRef PFTauTagInfoRef_
Definition: PFTau.h:261
float electronPreIDOutput_
Definition: PFTau.h:248
fixed size matrix
hadronicDecayMode
Definition: PFTau.h:36
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:55
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientIsolationPFCands_
Definition: PFTau.h:289
float bendCorrMass_
Definition: PFTau.h:256
edm::AtomicPtrCache< std::vector< reco::PFRecoTauChargedHadron > > isolationTauChargedHadronCandidates_
Definition: PFTau.h:306
PFRecoTauChargedHadronRefVector signalTauChargedHadronCandidatesRefs_
Definition: PFTau.h:297
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientIsolationPFGammaCands_
Definition: PFTau.h:292
std::vector< reco::CandidatePtr > selectedSignalChargedHadrCands_
Definition: PFTau.h:269
float emFraction_
Definition: PFTau.h:242
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > selectedTransientSignalPFGammaCands_
Definition: PFTau.h:287
reco::TrackRef electronPreIDTrack_
Definition: PFTau.h:265
float isolationPFGammaCandsEtSum_
Definition: PFTau.h:238
float caloComp_
Definition: PFTau.h:251
~PFTau() override
Definition: PFTau.h:58
float hcalTotOverPLead_
Definition: PFTau.h:243