CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Tau.h
Go to the documentation of this file.
1 //
2 // $Id: Tau.h,v 1.28 2011/03/11 17:45:34 veelken Exp $
3 //
4 
5 #ifndef DataFormats_PatCandidates_Tau_h
6 #define DataFormats_PatCandidates_Tau_h
7 
28 
30 
33 
34 
35 // Define typedefs for convenience
36 namespace pat {
37  class Tau;
38  typedef std::vector<Tau> TauCollection;
41 }
42 
43 namespace reco {
45  std::ostream& operator<<(std::ostream& out, const pat::Tau& obj);
46 }
47 
48 // Class definition
49 namespace pat {
50 
51  class Tau : public Lepton<reco::BaseTau> {
52 
53  public:
54 
55  typedef std::pair<std::string,float> IdPair;
56 
58  Tau();
60  Tau(const reco::BaseTau & aTau);
62  Tau(const edm::RefToBase<reco::BaseTau> & aTauRef);
64  Tau(const edm::Ptr<reco::BaseTau> & aTauRef);
66  virtual ~Tau();
67 
69  virtual Tau * clone() const { return new Tau(*this); }
70 
71  // ---- methods for content embedding ----
73  const reco::TrackRefVector & isolationTracks() const;
75  reco::TrackRef leadTrack() const;
77  const reco::TrackRefVector & signalTracks() const;
79  void embedIsolationTracks();
81  void embedLeadTrack();
83  void embedSignalTracks();
86  void embedLeadPFCand();
92  void embedSignalPFCands();
100  void embedIsolationPFCands();
107 
108  // ---- matched GenJet methods ----
110  const reco::GenJet * genJet() const;
112  void setGenJet(const reco::GenJetRef & ref);
113 
114  // ---- CaloTau accessors (getters only) ----
116  bool isCaloTau() const { return !caloSpecific_.empty(); }
118  const pat::tau::TauCaloSpecific & caloSpecific() const ;
145  float maximumHCALhitEt() const { return caloSpecific().maximumHCALhitEt_; }
146 
147  // ---- PFTau accessors (getters only) ----
149  bool isPFTau() const { return !pfSpecific_.empty(); }
151  const pat::tau::TauPFSpecific & pfSpecific() const ;
154  const reco::PFJetRef & pfJetRef() const { return pfSpecific().pfJetRef_; }
166  const reco::PFCandidateRef leadPFCand() const;
202  float emFraction() const { return pfSpecific().emFraction_; }
205  float hcalTotOverPLead() const { return pfSpecific().hcalTotOverPLead_; }
208  float hcalMaxOverPLead() const { return pfSpecific().hcalMaxOverPLead_; }
211  float hcal3x3OverPLead() const { return pfSpecific().hcal3x3OverPLead_; }
229  float caloComp() const { return pfSpecific().caloComp_; }
232  float segComp() const { return pfSpecific().segComp_; }
235  bool muonDecision() const { return pfSpecific().muonDecision_; }
236 
239  float etaetaMoment() const;
240  float phiphiMoment() const;
241  float etaphiMoment() const;
242 
244  int decayMode() const { return pfSpecific().decayMode_; }
246  void setDecayMode(int);
247 
248  // ---- methods for tau ID ----
254  float tauID(const std::string & name) const;
256  bool isTauIDAvailable(const std::string & name) const;
259  const std::vector<IdPair> & tauIDs() const { return tauIDs_; }
262  void setTauIDs(const std::vector<IdPair> & ids) { tauIDs_ = ids; }
263 
265  friend std::ostream& reco::operator<<(std::ostream& out, const Tau& obj);
266 
267  protected:
268 
269  // ---- for content embedding ----
271  std::vector<reco::Track> isolationTracks_;
275  std::vector<reco::Track> leadTrack_;
277  std::vector<reco::Track> signalTracks_;
280  // specific for PFTau
281  std::vector<reco::PFCandidate> leadPFCand_;
283  std::vector<reco::PFCandidate> leadPFChargedHadrCand_;
285  std::vector<reco::PFCandidate> leadPFNeutralCand_;
287 
288  std::vector<reco::PFCandidate> signalPFCands_;
292  std::vector<reco::PFCandidate> signalPFChargedHadrCands_;
296  std::vector<reco::PFCandidate> signalPFNeutralHadrCands_;
300  std::vector<reco::PFCandidate> signalPFGammaCands_;
304  std::vector<reco::PFCandidate> isolationPFCands_;
308  std::vector<reco::PFCandidate> isolationPFChargedHadrCands_;
312  std::vector<reco::PFCandidate> isolationPFNeutralHadrCands_;
316  std::vector<reco::PFCandidate> isolationPFGammaCands_;
320 
321  // ---- matched GenJet holder ----
322  std::vector<reco::GenJet> genJet_;
323  // ---- tau ID's holder ----
324  std::vector<IdPair> tauIDs_;
325  // ---- CaloTau specific variables ----
327  std::vector<pat::tau::TauCaloSpecific> caloSpecific_;
328  // ---- PFTau specific variables ----
330  std::vector<pat::tau::TauPFSpecific> pfSpecific_;
331  };
332 }
333 
334 #endif
bool embeddedLeadPFNeutralCand_
Definition: Tau.h:286
virtual Tau * clone() const
required reimplementation of the Candidate&#39;s clone method
Definition: Tau.h:69
const reco::PFCandidateRef leadPFChargedHadrCand() const
Definition: Tau.cc:392
const std::vector< IdPair > & tauIDs() const
Definition: Tau.h:259
float hcalTotOverPLead() const
Definition: Tau.h:205
reco::PFCandidateRefVector signalPFCandsTransientRefVector_
Definition: Tau.h:290
reco::CaloTauTagInfoRef CaloTauTagInfoRef_
std::pair< std::string, float > IdPair
Definition: Tau.h:55
float caloComp() const
Definition: Tau.h:229
bool embeddedSignalPFChargedHadrCands_
Definition: Tau.h:293
float isolationTracksPtSum() const
Definition: Tau.h:139
std::vector< reco::PFCandidate > leadPFNeutralCand_
Definition: Tau.h:285
edm::BoolCache isolationPFNeutralHadrCandsRefVectorFixed_
Definition: Tau.h:315
edm::BoolCache isolationPFCandsRefVectorFixed_
Definition: Tau.h:307
reco::TrackRef electronPreIDTrack_
Definition: TauPFSpecific.h:43
const reco::PFCandidateRefVector & isolationPFCands() const
Definition: Tau.cc:473
reco::PFCandidateRefVector signalPFGammaCandsTransientRefVector_
Definition: Tau.h:302
edm::BoolCache signalTracksTransientRefVectorFixed_
Definition: Tau.h:279
std::vector< reco::PFCandidate > signalPFNeutralHadrCands_
Definition: Tau.h:296
const pat::tau::TauCaloSpecific & caloSpecific() const
return CaloTau info or throw exception &#39;not CaloTau&#39;
Definition: Tau.cc:243
std::vector< reco::PFCandidate > signalPFCands_
Definition: Tau.h:288
bool embeddedIsolationPFChargedHadrCands_
Definition: Tau.h:309
reco::TrackRefVector signalTracksTransientRefVector_
Definition: Tau.h:278
bool embeddedIsolationPFCands_
Definition: Tau.h:305
float hcal3x3OverPLead() const
Definition: Tau.h:211
reco::PFCandidateRefVector signalPFChargedHadrCandsTransientRefVector_
Definition: Tau.h:294
reco::PFCandidateRefVector isolationPFCandsTransientRefVector_
Definition: Tau.h:306
const reco::PFCandidateRefVector & signalPFChargedHadrCands() const
Definition: Tau.cc:428
void embedLeadPFChargedHadrCand()
method to store the leading charged hadron candidate internally
Definition: Tau.cc:287
const reco::PFCandidateRefVector & signalPFNeutrHadrCands() const
Definition: Tau.cc:443
reco::CaloTauTagInfoRef caloTauTagInfoRef() const
Definition: Tau.h:121
edm::BoolCache isolationTracksTransientRefVectorFixed_
Definition: Tau.h:273
std::vector< reco::PFCandidate > isolationPFGammaCands_
Definition: Tau.h:316
std::vector< reco::PFCandidate > isolationPFNeutralHadrCands_
Definition: Tau.h:312
float TracksInvariantMass() const
Definition: Tau.h:136
void embedSignalPFGammaCands()
method to store the signal gamma candidates internally
Definition: Tau.cc:339
std::vector< Tau > TauCollection
Definition: Tau.h:37
std::vector< reco::GenJet > genJet_
Definition: Tau.h:322
void embedIsolationPFCands()
method to store the isolation candidates internally
Definition: Tau.cc:350
void embedIsolationPFGammaCands()
method to store the isolation gamma candidates internally
Definition: Tau.cc:381
const reco::GenJet * genJet() const
return matched GenJet, built from the visible particles of a generated tau
Definition: Tau.cc:210
const reco::TrackRef & electronPreIDTrack() const
Definition: Tau.h:220
float leadTrackHCAL3x3hottesthitDEta() const
Definition: Tau.h:130
edm::Ref< TauCollection > TauRef
Definition: Tau.h:39
void setTauIDs(const std::vector< IdPair > &ids)
Definition: Tau.h:262
reco::TrackRef leadTrack() const
override the reco::BaseTau::leadTrack method, to access the internal storage of the leading track ...
Definition: Tau.cc:144
bool embeddedIsolationPFNeutralHadrCands_
Definition: Tau.h:313
void embedSignalTracks()
method to store the signal tracks internally
Definition: Tau.cc:193
float leadPFChargedHadrCandsignedSipt_
Definition: TauPFSpecific.h:28
bool embeddedLeadTrack_
Definition: Tau.h:274
float isolationPFGammaCandsEtSum() const
Definition: Tau.h:196
const pat::tau::TauPFSpecific & pfSpecific() const
return PFTau info or throw exception &#39;not PFTau&#39;
Definition: Tau.cc:238
edm::RefVector< TauCollection > TauRefVector
Definition: Tau.h:40
float maximumHCALPFClusterEt() const
Definition: Tau.h:199
float phiphiMoment() const
Definition: Tau.cc:255
std::vector< reco::PFCandidate > leadPFCand_
Definition: Tau.h:281
bool embeddedSignalPFGammaCands_
Definition: Tau.h:301
float etaetaMoment() const
Definition: Tau.cc:248
float maximumHCALhitEt() const
Definition: Tau.h:145
const reco::PFCandidateRefVector & signalPFCands() const
Definition: Tau.cc:413
reco::PFCandidateRefVector isolationPFNeutralHadrCandsTransientRefVector_
Definition: Tau.h:314
void embedSignalPFChargedHadrCands()
method to store the signal charged hadrons candidates internally
Definition: Tau.cc:319
float hcalMaxOverPLead() const
Definition: Tau.h:208
float isolationPFChargedHadrCandsPtSum() const
Definition: Tau.h:193
void embedSignalPFCands()
method to store the signal candidates internally
Definition: Tau.cc:309
tuple obj
Example code starts here #.
Definition: VarParsing.py:655
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:72
std::vector< reco::Track > signalTracks_
Definition: Tau.h:277
std::vector< IdPair > tauIDs_
Definition: Tau.h:324
float signalTracksInvariantMass() const
Definition: Tau.h:133
edm::BoolCache signalPFNeutralHadrCandsRefVectorFixed_
Definition: Tau.h:299
reco::PFCandidateRefVector isolationPFGammaCandsTransientRefVector_
Definition: Tau.h:318
bool embeddedIsolationPFGammaCands_
Definition: Tau.h:317
std::vector< reco::PFCandidate > signalPFChargedHadrCands_
Definition: Tau.h:292
Tau()
default constructor
Definition: Tau.cc:13
const reco::PFCandidateRefVector & isolationPFNeutrHadrCands() const
Definition: Tau.cc:503
edm::BoolCache isolationPFGammaCandsRefVectorFixed_
Definition: Tau.h:319
void embedLeadTrack()
method to store the leading track internally
Definition: Tau.cc:183
Analysis-level lepton class.
Definition: Lepton.h:32
float isolationECALhitsEtSum() const
Definition: Tau.h:142
Jets made from MC generator particles.
Definition: GenJet.h:25
bool embeddedSignalTracks_
Definition: Tau.h:276
reco::PFCandidateRefVector isolationPFChargedHadrCandsTransientRefVector_
Definition: Tau.h:310
const reco::PFCandidateRefVector & isolationPFChargedHadrCands() const
Definition: Tau.cc:488
bool embeddedLeadPFCand_
Definition: Tau.h:282
Analysis-level tau class.
Definition: Tau.h:51
edm::BoolCache signalPFCandsRefVectorFixed_
Definition: Tau.h:291
edm::BoolCache signalPFGammaCandsRefVectorFixed_
Definition: Tau.h:303
bool embeddedLeadPFChargedHadrCand_
Definition: Tau.h:284
void embedIsolationPFNeutralHadrCands()
method to store the isolation neutral hadrons candidates internally
Definition: Tau.cc:371
bool embeddedSignalPFNeutralHadrCands_
Definition: Tau.h:297
std::vector< reco::PFCandidate > isolationPFCands_
Definition: Tau.h:304
std::vector< reco::Track > isolationTracks_
Definition: Tau.h:271
bool isTauIDAvailable(const std::string &name) const
Returns true if a specific ID is available in this pat::Tau.
Definition: Tau.cc:230
tuple out
Definition: dbtoconf.py:99
float isolationPFChargedHadrCandsPtSum_
Definition: TauPFSpecific.h:33
void embedLeadPFNeutralCand()
method to store the leading neutral candidate internally
Definition: Tau.cc:298
float emFraction() const
Definition: Tau.h:202
std::vector< pat::tau::TauCaloSpecific > caloSpecific_
holder for CaloTau info, or empty vector if PFTau
Definition: Tau.h:327
reco::PFCandidateRefVector signalPFNeutralHadrCandsTransientRefVector_
Definition: Tau.h:298
float ecalStripSumEOverPLead() const
Definition: Tau.h:214
bool isCaloTau() const
Returns true if this pat::Tau was made from a reco::CaloTau.
Definition: Tau.h:116
float leadTrackHCAL3x3hitsEtSum() const
Definition: Tau.h:127
int decayMode() const
reconstructed tau decay mode (specific to PFTau)
Definition: Tau.h:244
const reco::PFJetRef & pfJetRef() const
Definition: Tau.h:154
float bremsRecoveryEOverPLead() const
Definition: Tau.h:217
reco::PFJetRef pfJetRef_
Definition: TauPFSpecific.h:26
std::vector< reco::PFCandidate > signalPFGammaCands_
Definition: Tau.h:300
const reco::PFCandidateRefVector & signalPFGammaCands() const
Definition: Tau.cc:458
float leadPFChargedHadrCandsignedSipt() const
Definition: Tau.h:160
std::vector< reco::Track > leadTrack_
Definition: Tau.h:275
void embedSignalPFNeutralHadrCands()
method to store the signal neutral hadrons candidates internally
Definition: Tau.cc:329
std::vector< reco::PFCandidate > isolationPFChargedHadrCands_
Definition: Tau.h:308
edm::BoolCache signalPFChargedHadrCandsRefVectorFixed_
Definition: Tau.h:295
const reco::PFCandidateRef leadPFNeutralCand() const
Definition: Tau.cc:399
void setDecayMode(int)
set decay mode
Definition: Tau.cc:269
float etaphiMoment() const
Definition: Tau.cc:262
const reco::PFCandidateRef leadPFCand() const
Definition: Tau.cc:406
void embedIsolationPFChargedHadrCands()
method to store the isolation charged hadrons candidates internally
Definition: Tau.cc:361
bool embeddedSignalPFCands_
Definition: Tau.h:289
const reco::PFCandidateRefVector & isolationPFGammaCands() const
Definition: Tau.cc:518
float segComp() const
Definition: Tau.h:232
bool isPFTau() const
Returns true if this pat::Tau was made from a reco::PFTau.
Definition: Tau.h:149
float tauID(const std::string &name) const
Definition: Tau.cc:216
void setGenJet(const reco::GenJetRef &ref)
set the matched GenJet
Definition: Tau.cc:204
bool embeddedIsolationTracks_
Definition: Tau.h:270
float leadTracksignedSipt() const
Definition: Tau.h:124
void embedIsolationTracks()
method to store the isolation tracks internally
Definition: Tau.cc:172
reco::TrackRefVector isolationTracksTransientRefVector_
Definition: Tau.h:272
const reco::TrackRefVector & signalTracks() const
override the reco::BaseTau::signalTracks method, to access the internal storage of the signal tracks ...
Definition: Tau.cc:154
std::vector< reco::PFCandidate > leadPFChargedHadrCand_
Definition: Tau.h:283
virtual ~Tau()
destructor
Definition: Tau.cc:105
void embedLeadPFCand()
method to store the leading candidate internally
Definition: Tau.cc:276
edm::BoolCache isolationPFChargedHadrCandsRefVectorFixed_
Definition: Tau.h:311
std::vector< pat::tau::TauPFSpecific > pfSpecific_
holder for PFTau info, or empty vector if CaloTau
Definition: Tau.h:330
float electronPreIDOutput() const
Definition: Tau.h:223
const reco::TrackRefVector & isolationTracks() const
override the reco::BaseTau::isolationTracks method, to access the internal storage of the isolation t...
Definition: Tau.cc:126
bool electronPreIDDecision() const
Definition: Tau.h:226
bool muonDecision() const
Definition: Tau.h:235