CMS 3D CMS Logo

Public Types | Public Member Functions | Protected Attributes

pat::Tau Class Reference

Analysis-level tau class. More...

#include <DataFormats/PatCandidates/interface/Tau.h>

Inheritance diagram for pat::Tau:
pat::Lepton< reco::BaseTau > pat::PATObject< reco::BaseTau > reco::BaseTau reco::RecoCandidate reco::LeafCandidate reco::Candidate

List of all members.

Public Types

typedef std::pair< std::string,
float > 
IdPair

Public Member Functions

float bremsRecoveryEOverPLead () const
float caloComp () const
const pat::tau::TauCaloSpecificcaloSpecific () const
 return CaloTau info or throw exception 'not CaloTau'
reco::CaloTauTagInfoRef caloTauTagInfoRef () const
virtual Tauclone () const
 required reimplementation of the Candidate's clone method
int decayMode () const
 reconstructed tau decay mode (specific to PFTau)
float ecalStripSumEOverPLead () const
bool electronPreIDDecision () const
float electronPreIDOutput () const
const reco::TrackRefelectronPreIDTrack () const
void embedIsolationPFCands ()
 method to store the isolation candidates internally
void embedIsolationPFChargedHadrCands ()
 method to store the isolation charged hadrons candidates internally
void embedIsolationPFGammaCands ()
 method to store the isolation gamma candidates internally
void embedIsolationPFNeutralHadrCands ()
 method to store the isolation neutral hadrons candidates internally
void embedIsolationTracks ()
 method to store the isolation tracks internally
void embedLeadPFCand ()
 method to store the leading candidate internally
void embedLeadPFChargedHadrCand ()
 method to store the leading charged hadron candidate internally
void embedLeadPFNeutralCand ()
 method to store the leading neutral candidate internally
void embedLeadTrack ()
 method to store the leading track internally
void embedSignalPFCands ()
 method to store the signal candidates internally
void embedSignalPFChargedHadrCands ()
 method to store the signal charged hadrons candidates internally
void embedSignalPFGammaCands ()
 method to store the signal gamma candidates internally
void embedSignalPFNeutralHadrCands ()
 method to store the signal neutral hadrons candidates internally
void embedSignalTracks ()
 method to store the signal tracks internally
float emFraction () const
float etaetaMoment () const
float etaphiMoment () const
const reco::GenJetgenJet () const
 return matched GenJet, built from the visible particles of a generated tau
float hcal3x3OverPLead () const
float hcalMaxOverPLead () const
float hcalTotOverPLead () const
bool isCaloTau () const
 Returns true if this pat::Tau was made from a reco::CaloTau.
float isolationECALhitsEtSum () const
const reco::PFCandidateRefVectorisolationPFCands () const
const reco::PFCandidateRefVectorisolationPFChargedHadrCands () const
float isolationPFChargedHadrCandsPtSum () const
const reco::PFCandidateRefVectorisolationPFGammaCands () const
float isolationPFGammaCandsEtSum () const
const reco::PFCandidateRefVectorisolationPFNeutrHadrCands () const
const reco::TrackRefVectorisolationTracks () const
 override the reco::BaseTau::isolationTracks method, to access the internal storage of the isolation tracks
float isolationTracksPtSum () const
bool isPFTau () const
 Returns true if this pat::Tau was made from a reco::PFTau.
bool isTauIDAvailable (const std::string &name) const
 Returns true if a specific ID is available in this pat::Tau.
const reco::PFCandidateRef leadPFCand () const
const reco::PFCandidateRef leadPFChargedHadrCand () const
float leadPFChargedHadrCandsignedSipt () const
const reco::PFCandidateRef leadPFNeutralCand () const
reco::TrackRef leadTrack () const
 override the reco::BaseTau::leadTrack method, to access the internal storage of the leading track
float leadTrackHCAL3x3hitsEtSum () const
float leadTrackHCAL3x3hottesthitDEta () const
float leadTracksignedSipt () const
float maximumHCALhitEt () const
float maximumHCALPFClusterEt () const
bool muonDecision () const
const pat::tau::TauPFSpecificpfSpecific () const
 return PFTau info or throw exception 'not PFTau'
float phiphiMoment () const
float segComp () const
void setDecayMode (int)
 set decay mode
void setGenJet (const reco::GenJetRef &ref)
 set the matched GenJet
void setTauIDs (const std::vector< IdPair > &ids)
const reco::PFCandidateRefVectorsignalPFCands () const
const reco::PFCandidateRefVectorsignalPFChargedHadrCands () const
const reco::PFCandidateRefVectorsignalPFGammaCands () const
const reco::PFCandidateRefVectorsignalPFNeutrHadrCands () const
const reco::TrackRefVectorsignalTracks () const
 override the reco::BaseTau::signalTracks method, to access the internal storage of the signal tracks
float signalTracksInvariantMass () const
 Tau (const reco::BaseTau &aTau)
 constructor from a reco tau
 Tau ()
 default constructor
 Tau (const edm::RefToBase< reco::BaseTau > &aTauRef)
 constructor from a RefToBase to a reco tau (to be superseded by Ptr counterpart)
 Tau (const edm::Ptr< reco::BaseTau > &aTauRef)
 constructor from a Ptr to a reco tau
float tauID (const std::string &name) const
const std::vector< IdPair > & tauIDs () const
float TracksInvariantMass () const
virtual ~Tau ()
 destructor

Protected Attributes

std::vector
< pat::tau::TauCaloSpecific
caloSpecific_
 holder for CaloTau info, or empty vector if PFTau
bool embeddedIsolationPFCands_
bool embeddedIsolationPFChargedHadrCands_
bool embeddedIsolationPFGammaCands_
bool embeddedIsolationPFNeutralHadrCands_
bool embeddedIsolationTracks_
bool embeddedLeadPFCand_
bool embeddedLeadPFChargedHadrCand_
bool embeddedLeadPFNeutralCand_
bool embeddedLeadTrack_
bool embeddedSignalPFCands_
bool embeddedSignalPFChargedHadrCands_
bool embeddedSignalPFGammaCands_
bool embeddedSignalPFNeutralHadrCands_
bool embeddedSignalTracks_
std::vector< reco::GenJetgenJet_
std::vector< reco::PFCandidateisolationPFCands_
edm::BoolCache isolationPFCandsRefVectorFixed_
reco::PFCandidateRefVector isolationPFCandsTransientRefVector_
std::vector< reco::PFCandidateisolationPFChargedHadrCands_
edm::BoolCache isolationPFChargedHadrCandsRefVectorFixed_
reco::PFCandidateRefVector isolationPFChargedHadrCandsTransientRefVector_
std::vector< reco::PFCandidateisolationPFGammaCands_
edm::BoolCache isolationPFGammaCandsRefVectorFixed_
reco::PFCandidateRefVector isolationPFGammaCandsTransientRefVector_
std::vector< reco::PFCandidateisolationPFNeutralHadrCands_
edm::BoolCache isolationPFNeutralHadrCandsRefVectorFixed_
reco::PFCandidateRefVector isolationPFNeutralHadrCandsTransientRefVector_
std::vector< reco::TrackisolationTracks_
reco::TrackRefVector isolationTracksTransientRefVector_
edm::BoolCache isolationTracksTransientRefVectorFixed_
std::vector< reco::PFCandidateleadPFCand_
std::vector< reco::PFCandidateleadPFChargedHadrCand_
std::vector< reco::PFCandidateleadPFNeutralCand_
std::vector< reco::TrackleadTrack_
std::vector
< pat::tau::TauPFSpecific
pfSpecific_
 holder for PFTau info, or empty vector if CaloTau
std::vector< reco::PFCandidatesignalPFCands_
edm::BoolCache signalPFCandsRefVectorFixed_
reco::PFCandidateRefVector signalPFCandsTransientRefVector_
std::vector< reco::PFCandidatesignalPFChargedHadrCands_
edm::BoolCache signalPFChargedHadrCandsRefVectorFixed_
reco::PFCandidateRefVector signalPFChargedHadrCandsTransientRefVector_
std::vector< reco::PFCandidatesignalPFGammaCands_
edm::BoolCache signalPFGammaCandsRefVectorFixed_
reco::PFCandidateRefVector signalPFGammaCandsTransientRefVector_
std::vector< reco::PFCandidatesignalPFNeutralHadrCands_
edm::BoolCache signalPFNeutralHadrCandsRefVectorFixed_
reco::PFCandidateRefVector signalPFNeutralHadrCandsTransientRefVector_
std::vector< reco::TracksignalTracks_
reco::TrackRefVector signalTracksTransientRefVector_
edm::BoolCache signalTracksTransientRefVectorFixed_
std::vector< IdPairtauIDs_

Detailed Description

Analysis-level tau class.

pat::Tau implements the analysis-level tau class within the 'pat' namespace. It inherits from reco::BaseTau, copies all the information from the source reco::CaloTau or reco::PFTau, and adds some PAT-specific variable.

Please post comments and questions to the Physics Tools hypernews: https://hypernews.cern.ch/HyperNews/CMS/get/physTools.html

Author:
Steven Lowette, Christophe Delaere, Giovanni Petrucciani, Frederic Ronga, Colin Bernet
Version:
Id:
Tau.h,v 1.27.10.1 2011/03/15 21:19:05 rwolf Exp

Definition at line 47 of file Tau.h.


Member Typedef Documentation

typedef std::pair<std::string,float> pat::Tau::IdPair

Definition at line 51 of file Tau.h.


Constructor & Destructor Documentation

Tau::Tau ( )
Tau::Tau ( const reco::BaseTau aTau)

constructor from a reco tau

constructor from reco::BaseTau

Definition at line 34 of file Tau.cc.

References caloSpecific_, and pfSpecific_.

Tau::Tau ( const edm::RefToBase< reco::BaseTau > &  aTauRef)

constructor from a RefToBase to a reco tau (to be superseded by Ptr counterpart)

constructor from ref to reco::BaseTau

Definition at line 59 of file Tau.cc.

References caloSpecific_, edm::RefToBase< T >::get(), and pfSpecific_.

Tau::Tau ( const edm::Ptr< reco::BaseTau > &  aTauRef)

constructor from a Ptr to a reco tau

constructor from ref to reco::BaseTau

Definition at line 83 of file Tau.cc.

References caloSpecific_, edm::Ptr< T >::get(), and pfSpecific_.

Tau::~Tau ( ) [virtual]

destructor

Definition at line 109 of file Tau.cc.

          {
}

Member Function Documentation

float pat::Tau::bremsRecoveryEOverPLead ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 213 of file Tau.h.

References pat::tau::TauPFSpecific::bremsRecoveryEOverPLead_, and pfSpecific().

float pat::Tau::caloComp ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 225 of file Tau.h.

References pat::tau::TauPFSpecific::caloComp_, and pfSpecific().

{ return pfSpecific().caloComp_; }
const pat::tau::TauCaloSpecific & Tau::caloSpecific ( ) const

return CaloTau info or throw exception 'not CaloTau'

Definition at line 231 of file Tau.cc.

References caloSpecific_, Exception, and isCaloTau().

Referenced by caloTauTagInfoRef(), etaetaMoment(), etaphiMoment(), isolationECALhitsEtSum(), isolationTracksPtSum(), leadTrackHCAL3x3hitsEtSum(), leadTrackHCAL3x3hottesthitDEta(), leadTracksignedSipt(), maximumHCALhitEt(), phiphiMoment(), signalTracksInvariantMass(), and TracksInvariantMass().

                                                      {
  if (!isCaloTau()) throw cms::Exception("Type Error") << "Requesting a CaloTau-specific information from a pat::Tau which wasn't made from a CaloTau.\n";
  return caloSpecific_[0]; 
}
reco::CaloTauTagInfoRef pat::Tau::caloTauTagInfoRef ( ) const [inline]

Method copied from reco::CaloTau. Throws an exception if this pat::Tau was not made from a reco::CaloTau

Definition at line 117 of file Tau.h.

References caloSpecific(), and pat::tau::TauCaloSpecific::CaloTauTagInfoRef_.

virtual Tau* pat::Tau::clone ( void  ) const [inline, virtual]

required reimplementation of the Candidate's clone method

Reimplemented from pat::Lepton< reco::BaseTau >.

Definition at line 65 of file Tau.h.

References Tau().

{ return new Tau(*this); }
int pat::Tau::decayMode ( ) const [inline]

reconstructed tau decay mode (specific to PFTau)

Definition at line 240 of file Tau.h.

References pat::tau::TauPFSpecific::decayMode_, and pfSpecific().

Referenced by setDecayMode().

{ return pfSpecific().decayMode_; }
float pat::Tau::ecalStripSumEOverPLead ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 210 of file Tau.h.

References pat::tau::TauPFSpecific::ecalStripSumEOverPLead_, and pfSpecific().

bool pat::Tau::electronPreIDDecision ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 222 of file Tau.h.

References pat::tau::TauPFSpecific::electronPreIDDecision_, and pfSpecific().

float pat::Tau::electronPreIDOutput ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 219 of file Tau.h.

References pat::tau::TauPFSpecific::electronPreIDOutput_, and pfSpecific().

const reco::TrackRef& pat::Tau::electronPreIDTrack ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 216 of file Tau.h.

References pat::tau::TauPFSpecific::electronPreIDTrack_, and pfSpecific().

void Tau::embedIsolationPFCands ( )

method to store the isolation candidates internally

Definition at line 338 of file Tau.cc.

References edm::RefVector< C, T, F >::at(), embeddedIsolationPFCands_, i, isolationPFCands_, isPFTau(), pfSpecific_, and edm::RefVector< C, T, F >::size().

Referenced by pat::PATTauProducer::produce().

                                {
  if (!isPFTau() ) {//additional check with warning in pat::tau producer
    return;
  }
  reco::PFCandidateRefVector candRefVec = pfSpecific_[0].selectedIsolationPFCands_;
  for (unsigned int i = 0; i < candRefVec.size(); i++) {
    isolationPFCands_.push_back(*candRefVec.at(i));
  }
  embeddedIsolationPFCands_ = true;
}
void Tau::embedIsolationPFChargedHadrCands ( )

method to store the isolation charged hadrons candidates internally

Definition at line 349 of file Tau.cc.

References edm::RefVector< C, T, F >::at(), embeddedIsolationPFChargedHadrCands_, i, isolationPFChargedHadrCands_, isPFTau(), pfSpecific_, and edm::RefVector< C, T, F >::size().

Referenced by pat::PATTauProducer::produce().

                                           {
  if (!isPFTau() ) {//additional check with warning in pat::tau producer
    return;
  }
  reco::PFCandidateRefVector candRefVec = pfSpecific_[0].selectedIsolationPFChargedHadrCands_;
  for (unsigned int i = 0; i < candRefVec.size(); i++) {
    isolationPFChargedHadrCands_.push_back(*candRefVec.at(i));
  }
  embeddedIsolationPFChargedHadrCands_ = true;
}
void Tau::embedIsolationPFGammaCands ( )

method to store the isolation gamma candidates internally

Definition at line 369 of file Tau.cc.

References edm::RefVector< C, T, F >::at(), embeddedIsolationPFGammaCands_, i, isolationPFGammaCands_, isPFTau(), pfSpecific_, and edm::RefVector< C, T, F >::size().

Referenced by pat::PATTauProducer::produce().

                                     {
  if (!isPFTau() ) {//additional check with warning in pat::tau producer
    return;
  }
  reco::PFCandidateRefVector candRefVec = pfSpecific_[0].selectedIsolationPFGammaCands_;
  for (unsigned int i = 0; i < candRefVec.size(); i++) {
    isolationPFGammaCands_.push_back(*candRefVec.at(i));
  }
  embeddedIsolationPFGammaCands_ = true;
}
void Tau::embedIsolationPFNeutralHadrCands ( )

method to store the isolation neutral hadrons candidates internally

Definition at line 359 of file Tau.cc.

References edm::RefVector< C, T, F >::at(), embeddedIsolationPFNeutralHadrCands_, i, isolationPFNeutralHadrCands_, isPFTau(), pfSpecific_, and edm::RefVector< C, T, F >::size().

Referenced by pat::PATTauProducer::produce().

                                           {
  if (!isPFTau() ) {//additional check with warning in pat::tau producer
    return;
  }
  reco::PFCandidateRefVector candRefVec = pfSpecific_[0].selectedIsolationPFNeutrHadrCands_;
  for (unsigned int i = 0; i < candRefVec.size(); i++) {
    isolationPFNeutralHadrCands_.push_back(*candRefVec.at(i));
  }
  embeddedIsolationPFNeutralHadrCands_ = true;
}
void Tau::embedIsolationTracks ( )

method to store the isolation tracks internally

Definition at line 160 of file Tau.cc.

References edm::RefVector< C, T, F >::at(), embeddedIsolationTracks_, i, isolationTracks(), isolationTracks_, and edm::RefVector< C, T, F >::size().

Referenced by pat::PATTauProducer::produce().

                               {
  isolationTracks_.clear();
  reco::TrackRefVector trackRefVec = reco::BaseTau::isolationTracks();
  for (unsigned int i = 0; i < trackRefVec.size(); i++) {
    isolationTracks_.push_back(*trackRefVec.at(i));
  }
  embeddedIsolationTracks_ = true;
}
void Tau::embedLeadPFCand ( )

method to store the leading candidate internally

  • PFTau specific content - method to store the leading candidate internally

Definition at line 264 of file Tau.cc.

References embeddedLeadPFCand_, isPFTau(), leadPFCand_, and pfSpecific_.

Referenced by pat::PATTauProducer::produce().

                          {
  if (!isPFTau() ) {//additional check with warning in pat::tau producer
    return;
  }
  leadPFCand_.clear();
  if (pfSpecific_[0].leadPFCand_.isNonnull() ) {
    leadPFCand_.push_back(*pfSpecific_[0].leadPFCand_); //already set in C-tor
    embeddedLeadPFCand_ = true;
  }
}
void Tau::embedLeadPFChargedHadrCand ( )

method to store the leading charged hadron candidate internally

method to store the leading candidate internally

Definition at line 275 of file Tau.cc.

References embeddedLeadPFChargedHadrCand_, isPFTau(), leadPFChargedHadrCand_, and pfSpecific_.

Referenced by pat::PATTauProducer::produce().

                                     {
  if (!isPFTau() ) {//additional check with warning in pat::tau producer
    return;
  }
  leadPFChargedHadrCand_.clear();
  if (pfSpecific_[0].leadPFChargedHadrCand_.isNonnull() ) {
    leadPFChargedHadrCand_.push_back(*pfSpecific_[0].leadPFChargedHadrCand_); //already set in C-tor
    embeddedLeadPFChargedHadrCand_ = true;
  }
}
void Tau::embedLeadPFNeutralCand ( )

method to store the leading neutral candidate internally

method to store the leading candidate internally

Definition at line 286 of file Tau.cc.

References embeddedLeadPFNeutralCand_, isPFTau(), leadPFNeutralCand_, and pfSpecific_.

Referenced by pat::PATTauProducer::produce().

                                 {
  if (!isPFTau() ) {//additional check with warning in pat::tau producer
    return;
  }
  leadPFNeutralCand_.clear();
  if (pfSpecific_[0].leadPFNeutralCand_.isNonnull() ) {
    leadPFNeutralCand_.push_back(*pfSpecific_[0].leadPFNeutralCand_); //already set in C-tor
    embeddedLeadPFNeutralCand_ = true;
  }
}
void Tau::embedLeadTrack ( )

method to store the leading track internally

method to store the isolation tracks internally

Definition at line 171 of file Tau.cc.

References embeddedLeadTrack_, reco::BaseTau::leadTrack(), and leadTrack_.

Referenced by pat::PATTauProducer::produce().

                         {
  leadTrack_.clear();
  if (reco::BaseTau::leadTrack().isNonnull()) {
      leadTrack_.push_back(*reco::BaseTau::leadTrack());
      embeddedLeadTrack_ = true;
  }
}
void Tau::embedSignalPFCands ( )

method to store the signal candidates internally

Definition at line 297 of file Tau.cc.

References edm::RefVector< C, T, F >::at(), embeddedSignalPFCands_, i, isPFTau(), pfSpecific_, signalPFCands_, and edm::RefVector< C, T, F >::size().

Referenced by pat::PATTauProducer::produce().

                             {
  if (!isPFTau() ) {//additional check with warning in pat::tau producer
    return;
  }
  reco::PFCandidateRefVector candRefVec = pfSpecific_[0].selectedSignalPFCands_;
  for (unsigned int i = 0; i < candRefVec.size(); i++) {
    signalPFCands_.push_back(*candRefVec.at(i));
  }
  embeddedSignalPFCands_ = true;
}
void Tau::embedSignalPFChargedHadrCands ( )

method to store the signal charged hadrons candidates internally

Definition at line 307 of file Tau.cc.

References edm::RefVector< C, T, F >::at(), embeddedSignalPFChargedHadrCands_, i, isPFTau(), pfSpecific_, signalPFChargedHadrCands_, and edm::RefVector< C, T, F >::size().

Referenced by pat::PATTauProducer::produce().

                                        {
  if (!isPFTau() ) {//additional check with warning in pat::tau producer
    return;
  }
  reco::PFCandidateRefVector candRefVec = pfSpecific_[0].selectedSignalPFChargedHadrCands_;
  for (unsigned int i = 0; i < candRefVec.size(); i++) {
    signalPFChargedHadrCands_.push_back(*candRefVec.at(i));
  }
  embeddedSignalPFChargedHadrCands_ = true;
}
void Tau::embedSignalPFGammaCands ( )

method to store the signal gamma candidates internally

Definition at line 327 of file Tau.cc.

References edm::RefVector< C, T, F >::at(), embeddedSignalPFGammaCands_, i, isPFTau(), pfSpecific_, signalPFGammaCands_, and edm::RefVector< C, T, F >::size().

Referenced by pat::PATTauProducer::produce().

                                  {
  if (!isPFTau() ) {//additional check with warning in pat::tau producer
    return;
  }
  reco::PFCandidateRefVector candRefVec = pfSpecific_[0].selectedSignalPFGammaCands_;
  for (unsigned int i = 0; i < candRefVec.size(); i++) {
    signalPFGammaCands_.push_back(*candRefVec.at(i));
  }
  embeddedSignalPFGammaCands_ = true;
}
void Tau::embedSignalPFNeutralHadrCands ( )

method to store the signal neutral hadrons candidates internally

Definition at line 317 of file Tau.cc.

References edm::RefVector< C, T, F >::at(), embeddedSignalPFNeutralHadrCands_, i, isPFTau(), pfSpecific_, signalPFNeutralHadrCands_, and edm::RefVector< C, T, F >::size().

Referenced by pat::PATTauProducer::produce().

                                        {
  if (!isPFTau() ) {//additional check with warning in pat::tau producer
    return;
  }
  reco::PFCandidateRefVector candRefVec = pfSpecific_[0].selectedSignalPFNeutrHadrCands_;
  for (unsigned int i = 0; i < candRefVec.size(); i++) {
    signalPFNeutralHadrCands_.push_back(*candRefVec.at(i));
  }
  embeddedSignalPFNeutralHadrCands_ = true;
}
void Tau::embedSignalTracks ( )

method to store the signal tracks internally

method to store the isolation tracks internally

Definition at line 181 of file Tau.cc.

References edm::RefVector< C, T, F >::at(), embeddedSignalTracks_, i, signalTracks(), signalTracks_, and edm::RefVector< C, T, F >::size().

Referenced by pat::PATTauProducer::produce().

                           {
  signalTracks_.clear();
  reco::TrackRefVector trackRefVec = reco::BaseTau::signalTracks();
  for (unsigned int i = 0; i < trackRefVec.size(); i++) {
    signalTracks_.push_back(*trackRefVec.at(i));
  }
  embeddedSignalTracks_ = true;
}
float pat::Tau::emFraction ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 198 of file Tau.h.

References pat::tau::TauPFSpecific::emFraction_, and pfSpecific().

{ return pfSpecific().emFraction_; }
float Tau::etaetaMoment ( ) const

Methods copied from reco::Jet. (accessible from reco::CaloTau/reco::PFTau via reco::CaloTauTagInfo/reco::PFTauTagInfo)

Definition at line 236 of file Tau.cc.

References caloSpecific(), pat::tau::TauPFSpecific::etaetaMoment_, pat::tau::TauCaloSpecific::etaetaMoment_, Exception, isCaloTau(), isPFTau(), and pfSpecific().

{
  if ( isCaloTau() ) return caloSpecific().etaetaMoment_;
  if ( isPFTau()   ) return pfSpecific().etaetaMoment_;
  throw cms::Exception("Type Error") << "Requesting a CaloTau/PFTau-specific information from a pat::Tau which wasn't made from either a CaloTau or a PFTau.\n";
}
float Tau::etaphiMoment ( ) const

Definition at line 250 of file Tau.cc.

References caloSpecific(), pat::tau::TauPFSpecific::etaphiMoment_, pat::tau::TauCaloSpecific::etaphiMoment_, Exception, isCaloTau(), isPFTau(), and pfSpecific().

{
  if ( isCaloTau() ) return caloSpecific().etaphiMoment_;
  if ( isPFTau()   ) return pfSpecific().etaphiMoment_;
  throw cms::Exception("Type Error") << "Requesting a CaloTau/PFTau-specific information from a pat::Tau which wasn't made from either a CaloTau or a PFTau.\n";
}
const reco::GenJet * Tau::genJet ( ) const

return matched GenJet, built from the visible particles of a generated tau

return the matched generated jet

Definition at line 198 of file Tau.cc.

References genJet_.

                                     {
  return (genJet_.size() > 0 ? &genJet_.front() : 0);
}
float pat::Tau::hcal3x3OverPLead ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 207 of file Tau.h.

References pat::tau::TauPFSpecific::hcal3x3OverPLead_, and pfSpecific().

float pat::Tau::hcalMaxOverPLead ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 204 of file Tau.h.

References pat::tau::TauPFSpecific::hcalMaxOverPLead_, and pfSpecific().

float pat::Tau::hcalTotOverPLead ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 201 of file Tau.h.

References pat::tau::TauPFSpecific::hcalTotOverPLead_, and pfSpecific().

bool pat::Tau::isCaloTau ( ) const [inline]

Returns true if this pat::Tau was made from a reco::CaloTau.

Definition at line 112 of file Tau.h.

References caloSpecific_.

Referenced by caloSpecific(), etaetaMoment(), etaphiMoment(), and phiphiMoment().

{ return !caloSpecific_.empty(); }
float pat::Tau::isolationECALhitsEtSum ( ) const [inline]

Method copied from reco::CaloTau. Throws an exception if this pat::Tau was not made from a reco::CaloTau

Definition at line 138 of file Tau.h.

References caloSpecific(), and pat::tau::TauCaloSpecific::isolationECALhitsEtSum_.

const reco::PFCandidateRefVector & Tau::isolationPFCands ( ) const
const reco::PFCandidateRefVector & Tau::isolationPFChargedHadrCands ( ) const
float pat::Tau::isolationPFChargedHadrCandsPtSum ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 189 of file Tau.h.

References pat::tau::TauPFSpecific::isolationPFChargedHadrCandsPtSum_, and pfSpecific().

const reco::PFCandidateRefVector & Tau::isolationPFGammaCands ( ) const
float pat::Tau::isolationPFGammaCandsEtSum ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 192 of file Tau.h.

References pat::tau::TauPFSpecific::isolationPFGammaCandsEtSum_, and pfSpecific().

const reco::PFCandidateRefVector & Tau::isolationPFNeutrHadrCands ( ) const
const reco::TrackRefVector & Tau::isolationTracks ( ) const [virtual]

override the reco::BaseTau::isolationTracks method, to access the internal storage of the isolation tracks

override the reco::BaseTau::isolationTracks method, to access the internal storage of the track

Reimplemented from reco::BaseTau.

Definition at line 114 of file Tau.cc.

References embeddedIsolationTracks_, i, isolationTracks_, isolationTracksTransientRefVector_, isolationTracksTransientRefVectorFixed_, edm::RefVector< C, T, F >::push_back(), and edm::RefVector< C, T, F >::swap().

Referenced by embedIsolationTracks().

float pat::Tau::isolationTracksPtSum ( ) const [inline]

Method copied from reco::CaloTau. Throws an exception if this pat::Tau was not made from a reco::CaloTau

Definition at line 135 of file Tau.h.

References caloSpecific(), and pat::tau::TauCaloSpecific::isolationTracksPtSum_.

bool pat::Tau::isPFTau ( ) const [inline]
bool Tau::isTauIDAvailable ( const std::string &  name) const

Returns true if a specific ID is available in this pat::Tau.

Definition at line 218 of file Tau.cc.

References tauIDs_.

                                                       {
  for (std::vector<IdPair>::const_iterator it = tauIDs_.begin(), ed = tauIDs_.end(); it != ed; ++it) {
    if (it->first == name) return true;
  }
  return false;
}
const reco::PFCandidateRef Tau::leadPFCand ( ) const

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 394 of file Tau.cc.

References embeddedLeadPFCand_, leadPFCand_, pat::tau::TauPFSpecific::leadPFCand_, and pfSpecific().

const reco::PFCandidateRef Tau::leadPFChargedHadrCand ( ) const

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau const reco::PFTauTagInfoRef & pfTauTagInfoRef() const { return pfSpecific().PFTauTagInfoRef_; } Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 380 of file Tau.cc.

References embeddedLeadPFChargedHadrCand_, pat::tau::TauPFSpecific::leadPFChargedHadrCand_, leadPFChargedHadrCand_, and pfSpecific().

float pat::Tau::leadPFChargedHadrCandsignedSipt ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 156 of file Tau.h.

References pat::tau::TauPFSpecific::leadPFChargedHadrCandsignedSipt_, and pfSpecific().

const reco::PFCandidateRef Tau::leadPFNeutralCand ( ) const

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 387 of file Tau.cc.

References embeddedLeadPFNeutralCand_, pat::tau::TauPFSpecific::leadPFNeutralCand_, leadPFNeutralCand_, and pfSpecific().

reco::TrackRef Tau::leadTrack ( ) const [virtual]

override the reco::BaseTau::leadTrack method, to access the internal storage of the leading track

override the reco::BaseTau::track method, to access the internal storage of the track

Reimplemented from reco::BaseTau.

Definition at line 132 of file Tau.cc.

References embeddedLeadTrack_, and leadTrack_.

                                  {
  if (embeddedLeadTrack_) {
    return reco::TrackRef(&leadTrack_, 0);
  } else {
    return reco::BaseTau::leadTrack();
  }
}
float pat::Tau::leadTrackHCAL3x3hitsEtSum ( ) const [inline]

Method copied from reco::CaloTau. Throws an exception if this pat::Tau was not made from a reco::CaloTau

Definition at line 123 of file Tau.h.

References caloSpecific(), and pat::tau::TauCaloSpecific::leadTrackHCAL3x3hitsEtSum_.

float pat::Tau::leadTrackHCAL3x3hottesthitDEta ( ) const [inline]

Method copied from reco::CaloTau. Throws an exception if this pat::Tau was not made from a reco::CaloTau

Definition at line 126 of file Tau.h.

References caloSpecific(), and pat::tau::TauCaloSpecific::leadTrackHCAL3x3hottesthitDEta_.

float pat::Tau::leadTracksignedSipt ( ) const [inline]

Method copied from reco::CaloTau. Throws an exception if this pat::Tau was not made from a reco::CaloTau

Definition at line 120 of file Tau.h.

References caloSpecific(), and pat::tau::TauCaloSpecific::leadTracksignedSipt_.

float pat::Tau::maximumHCALhitEt ( ) const [inline]

Method copied from reco::CaloTau. Throws an exception if this pat::Tau was not made from a reco::CaloTau

Definition at line 141 of file Tau.h.

References caloSpecific(), and pat::tau::TauCaloSpecific::maximumHCALhitEt_.

float pat::Tau::maximumHCALPFClusterEt ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 195 of file Tau.h.

References pat::tau::TauPFSpecific::maximumHCALPFClusterEt_, and pfSpecific().

bool pat::Tau::muonDecision ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 231 of file Tau.h.

References pat::tau::TauPFSpecific::muonDecision_, and pfSpecific().

{ return pfSpecific().muonDecision_; }
const pat::tau::TauPFSpecific & Tau::pfSpecific ( ) const
float Tau::phiphiMoment ( ) const

Definition at line 243 of file Tau.cc.

References caloSpecific(), Exception, isCaloTau(), isPFTau(), pfSpecific(), pat::tau::TauPFSpecific::phiphiMoment_, and pat::tau::TauCaloSpecific::phiphiMoment_.

{
  if ( isCaloTau() ) return caloSpecific().phiphiMoment_;
  if ( isPFTau()   ) return pfSpecific().phiphiMoment_;
  throw cms::Exception("Type Error") << "Requesting a CaloTau/PFTau-specific information from a pat::Tau which wasn't made from either a CaloTau or a PFTau.\n";
}
float pat::Tau::segComp ( ) const [inline]

Method copied from reco::PFTau. Throws an exception if this pat::Tau was not made from a reco::PFTau

Definition at line 228 of file Tau.h.

References pfSpecific(), and pat::tau::TauPFSpecific::segComp_.

{ return pfSpecific().segComp_; }
void Tau::setDecayMode ( int  decayMode)

set decay mode

Definition at line 257 of file Tau.cc.

References decayMode(), Exception, isPFTau(), and pfSpecific_.

Referenced by pat::PATTauProducer::produce().

{
  if (!isPFTau()) throw cms::Exception("Type Error") << "Requesting a PFTau-specific information from a pat::Tau which wasn't made from a PFTau.\n";
  pfSpecific_[0].decayMode_ = decayMode;
} 
void Tau::setGenJet ( const reco::GenJetRef ref)

set the matched GenJet

method to set the matched generated jet

Definition at line 192 of file Tau.cc.

References genJet_.

Referenced by pat::PATTauProducer::produce().

                                           {
  genJet_.clear();
  genJet_.push_back(*gj);
}
void pat::Tau::setTauIDs ( const std::vector< IdPair > &  ids) [inline]

Store multiple tau ID values, discarding existing ones The first one in the list becomes the 'default' tau id

Definition at line 258 of file Tau.h.

References tauIDs_.

Referenced by pat::PATTauProducer::produce().

{ tauIDs_ = ids; }
const reco::PFCandidateRefVector & Tau::signalPFCands ( ) const
const reco::PFCandidateRefVector & Tau::signalPFChargedHadrCands ( ) const
const reco::PFCandidateRefVector & Tau::signalPFGammaCands ( ) const
const reco::PFCandidateRefVector & Tau::signalPFNeutrHadrCands ( ) const
const reco::TrackRefVector & Tau::signalTracks ( ) const [virtual]

override the reco::BaseTau::signalTracks method, to access the internal storage of the signal tracks

override the reco::BaseTau::track method, to access the internal storage of the track

Reimplemented from reco::BaseTau.

Definition at line 142 of file Tau.cc.

References embeddedSignalTracks_, i, edm::RefVector< C, T, F >::push_back(), signalTracks_, signalTracksTransientRefVector_, signalTracksTransientRefVectorFixed_, and edm::RefVector< C, T, F >::swap().

Referenced by embedSignalTracks().

float pat::Tau::signalTracksInvariantMass ( ) const [inline]

Method copied from reco::CaloTau. Throws an exception if this pat::Tau was not made from a reco::CaloTau

Definition at line 129 of file Tau.h.

References caloSpecific(), and pat::tau::TauCaloSpecific::signalTracksInvariantMass_.

float Tau::tauID ( const std::string &  name) const

Returns a specific tau ID associated to the pat::Tau given its name For cut-based IDs, the value is 1.0 for good, 0.0 for bad. The names are defined within the configuration parameterset "tauIDSources" in PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py . Note: an exception is thrown if the specified ID is not available

Definition at line 204 of file Tau.cc.

References tauIDs_.

                                             {
  for (std::vector<IdPair>::const_iterator it = tauIDs_.begin(), ed = tauIDs_.end(); it != ed; ++it) {
    if (it->first == name) return it->second;
  }
  cms::Exception ex("Key not found");
  ex << "pat::Tau: the ID " << name << " can't be found in this pat::Tau.\n";
  ex << "The available IDs are: ";
  for (std::vector<IdPair>::const_iterator it = tauIDs_.begin(), ed = tauIDs_.end(); it != ed; ++it) {
    ex << "'" << it->first << "' ";
  }
  ex << ".\n";
  throw ex;
}
const std::vector<IdPair>& pat::Tau::tauIDs ( ) const [inline]

Returns all the tau IDs in the form of <name,value> pairs The 'default' ID is the first in the list

Definition at line 255 of file Tau.h.

References tauIDs_.

{ return tauIDs_; }
float pat::Tau::TracksInvariantMass ( ) const [inline]

Method copied from reco::CaloTau. Throws an exception if this pat::Tau was not made from a reco::CaloTau

Definition at line 132 of file Tau.h.

References caloSpecific(), and pat::tau::TauCaloSpecific::TracksInvariantMass_.


Member Data Documentation

holder for CaloTau info, or empty vector if PFTau

Definition at line 320 of file Tau.h.

Referenced by caloSpecific(), isCaloTau(), and Tau().

Definition at line 298 of file Tau.h.

Referenced by embedIsolationPFCands(), and isolationPFCands().

Definition at line 302 of file Tau.h.

Referenced by embedIsolationPFChargedHadrCands(), and isolationPFChargedHadrCands().

Definition at line 310 of file Tau.h.

Referenced by embedIsolationPFGammaCands(), and isolationPFGammaCands().

Definition at line 306 of file Tau.h.

Referenced by embedIsolationPFNeutralHadrCands(), and isolationPFNeutrHadrCands().

Definition at line 263 of file Tau.h.

Referenced by embedIsolationTracks(), and isolationTracks().

Definition at line 275 of file Tau.h.

Referenced by embedLeadPFCand(), and leadPFCand().

Definition at line 277 of file Tau.h.

Referenced by embedLeadPFChargedHadrCand(), and leadPFChargedHadrCand().

Definition at line 279 of file Tau.h.

Referenced by embedLeadPFNeutralCand(), and leadPFNeutralCand().

bool pat::Tau::embeddedLeadTrack_ [protected]

Definition at line 267 of file Tau.h.

Referenced by embedLeadTrack(), and leadTrack().

Definition at line 282 of file Tau.h.

Referenced by embedSignalPFCands(), and signalPFCands().

Definition at line 286 of file Tau.h.

Referenced by embedSignalPFChargedHadrCands(), and signalPFChargedHadrCands().

Definition at line 294 of file Tau.h.

Referenced by embedSignalPFGammaCands(), and signalPFGammaCands().

Definition at line 290 of file Tau.h.

Referenced by embedSignalPFNeutralHadrCands(), and signalPFNeutrHadrCands().

Definition at line 269 of file Tau.h.

Referenced by embedSignalTracks(), and signalTracks().

std::vector<reco::GenJet> pat::Tau::genJet_ [protected]

Definition at line 315 of file Tau.h.

Referenced by genJet(), and setGenJet().

Definition at line 297 of file Tau.h.

Referenced by embedIsolationPFCands(), and isolationPFCands().

Definition at line 300 of file Tau.h.

Referenced by isolationPFCands().

Definition at line 299 of file Tau.h.

Referenced by isolationPFCands().

Definition at line 301 of file Tau.h.

Referenced by embedIsolationPFChargedHadrCands(), and isolationPFChargedHadrCands().

Definition at line 304 of file Tau.h.

Referenced by isolationPFChargedHadrCands().

Definition at line 303 of file Tau.h.

Referenced by isolationPFChargedHadrCands().

Definition at line 309 of file Tau.h.

Referenced by embedIsolationPFGammaCands(), and isolationPFGammaCands().

Definition at line 312 of file Tau.h.

Referenced by isolationPFGammaCands().

Definition at line 311 of file Tau.h.

Referenced by isolationPFGammaCands().

Definition at line 305 of file Tau.h.

Referenced by embedIsolationPFNeutralHadrCands(), and isolationPFNeutrHadrCands().

Definition at line 308 of file Tau.h.

Referenced by isolationPFNeutrHadrCands().

Definition at line 307 of file Tau.h.

Referenced by isolationPFNeutrHadrCands().

std::vector<reco::Track> pat::Tau::isolationTracks_ [protected]

Reimplemented from reco::BaseTau.

Definition at line 264 of file Tau.h.

Referenced by embedIsolationTracks(), and isolationTracks().

Definition at line 265 of file Tau.h.

Referenced by isolationTracks().

Definition at line 266 of file Tau.h.

Referenced by isolationTracks().

std::vector<reco::PFCandidate> pat::Tau::leadPFCand_ [protected]

Definition at line 274 of file Tau.h.

Referenced by embedLeadPFCand(), and leadPFCand().

Definition at line 276 of file Tau.h.

Referenced by embedLeadPFChargedHadrCand(), and leadPFChargedHadrCand().

Definition at line 278 of file Tau.h.

Referenced by embedLeadPFNeutralCand(), and leadPFNeutralCand().

std::vector<reco::Track> pat::Tau::leadTrack_ [protected]

Reimplemented from reco::BaseTau.

Definition at line 268 of file Tau.h.

Referenced by embedLeadTrack(), and leadTrack().

std::vector<reco::PFCandidate> pat::Tau::signalPFCands_ [protected]

Definition at line 281 of file Tau.h.

Referenced by embedSignalPFCands(), and signalPFCands().

Definition at line 284 of file Tau.h.

Referenced by signalPFCands().

Definition at line 283 of file Tau.h.

Referenced by signalPFCands().

Definition at line 285 of file Tau.h.

Referenced by embedSignalPFChargedHadrCands(), and signalPFChargedHadrCands().

Definition at line 288 of file Tau.h.

Referenced by signalPFChargedHadrCands().

Definition at line 287 of file Tau.h.

Referenced by signalPFChargedHadrCands().

Definition at line 293 of file Tau.h.

Referenced by embedSignalPFGammaCands(), and signalPFGammaCands().

Definition at line 296 of file Tau.h.

Referenced by signalPFGammaCands().

Definition at line 295 of file Tau.h.

Referenced by signalPFGammaCands().

Definition at line 289 of file Tau.h.

Referenced by embedSignalPFNeutralHadrCands(), and signalPFNeutrHadrCands().

Definition at line 292 of file Tau.h.

Referenced by signalPFNeutrHadrCands().

Definition at line 291 of file Tau.h.

Referenced by signalPFNeutrHadrCands().

std::vector<reco::Track> pat::Tau::signalTracks_ [protected]

Reimplemented from reco::BaseTau.

Definition at line 270 of file Tau.h.

Referenced by embedSignalTracks(), and signalTracks().

Definition at line 271 of file Tau.h.

Referenced by signalTracks().

Definition at line 272 of file Tau.h.

Referenced by signalTracks().

std::vector<IdPair> pat::Tau::tauIDs_ [protected]

Definition at line 317 of file Tau.h.

Referenced by isTauIDAvailable(), setTauIDs(), tauID(), and tauIDs().