CMS 3D CMS Logo

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends

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

const std::vector< std::string > availableJECLevels (const int &set=0) const
const std::vector< std::string > availableJECLevels (const std::string &set) const
const std::vector< std::string > availableJECSets () const
 all available label-names of all sets of jet energy corrections
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
const LorentzVectorcorrectedP4 (const std::string &level, const std::string &set="") const
const LorentzVectorcorrectedP4 (const unsigned int &level, const unsigned int &set=0) const
Tau correctedTauJet (const std::string &level, const std::string &set="") const
Tau correctedTauJet (const unsigned int &level, const unsigned int &set=0) const
std::string currentJECLevel () const
 return the name of the current step of jet energy corrections
std::string currentJECSet () const
 returns the label of the current set of jet energy corrections
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 std::vector
< reco::RecoTauPiZero > & 
isolationPiZeroCandidates () 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.
float jecFactor (const std::string &level, const std::string &set="") const
float jecFactor (const unsigned int &level, const unsigned int &set=0) const
bool jecSetAvailable (const std::string &set) const
bool jecSetAvailable (const unsigned int &set) const
bool jecSetsAvailable () const
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
reco::Candidate::LorentzVector
p4Jet () const
const reco::PFJetRefpfJetRef () 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 std::vector
< reco::RecoTauPiZero > & 
signalPiZeroCandidates () 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::Ptr< reco::BaseTau > &aTauRef)
 constructor from a Ptr to a reco tau
 Tau (const edm::RefToBase< reco::BaseTau > &aTauRef)
 constructor from a RefToBase to a reco tau (to be superseded by Ptr counterpart)
float tauID (const std::string &name) const
const std::vector< IdPair > & tauIDs () const
float TracksInvariantMass () const
virtual ~Tau ()
 destructor

Protected Member Functions

void addJECFactors (const TauJetCorrFactors &jec)
 add more sets of energy correction factors
void currentJECLevel (const unsigned int &level)
 update the current JEC level; used by correctedJet
void currentJECSet (const unsigned int &set)
 update the current JEC set; used by correctedJet
void initializeJEC (unsigned int level, const unsigned int set=0)
 initialize the jet to a given JEC level during creation starting from Uncorrected
int jecSet (const std::string &label) const
 return true if this jet carries the jet correction factors of a different set, for systematic studies

Protected Attributes

std::vector
< pat::tau::TauCaloSpecific
caloSpecific_
 holder for CaloTau info, or empty vector if PFTau
unsigned int currentJECLevel_
unsigned int currentJECSet_
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_
bool isolationPFCandsRefVectorFixed_
reco::PFCandidateRefVector isolationPFCandsTransientRefVector_
std::vector< reco::PFCandidateisolationPFChargedHadrCands_
bool isolationPFChargedHadrCandsRefVectorFixed_
reco::PFCandidateRefVector isolationPFChargedHadrCandsTransientRefVector_
std::vector< reco::PFCandidateisolationPFGammaCands_
bool isolationPFGammaCandsRefVectorFixed_
reco::PFCandidateRefVector isolationPFGammaCandsTransientRefVector_
std::vector< reco::PFCandidateisolationPFNeutralHadrCands_
bool isolationPFNeutralHadrCandsRefVectorFixed_
reco::PFCandidateRefVector isolationPFNeutralHadrCandsTransientRefVector_
std::vector< reco::TrackisolationTracks_
reco::TrackRefVector isolationTracksTransientRefVector_
bool isolationTracksTransientRefVectorFixed_
std::vector
< pat::TauJetCorrFactors
jec_
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_
bool signalPFCandsRefVectorFixed_
reco::PFCandidateRefVector signalPFCandsTransientRefVector_
std::vector< reco::PFCandidatesignalPFChargedHadrCands_
bool signalPFChargedHadrCandsRefVectorFixed_
reco::PFCandidateRefVector signalPFChargedHadrCandsTransientRefVector_
std::vector< reco::PFCandidatesignalPFGammaCands_
bool signalPFGammaCandsRefVectorFixed_
reco::PFCandidateRefVector signalPFGammaCandsTransientRefVector_
std::vector< reco::PFCandidatesignalPFNeutralHadrCands_
bool signalPFNeutralHadrCandsRefVectorFixed_
reco::PFCandidateRefVector signalPFNeutralHadrCandsTransientRefVector_
std::vector< reco::TracksignalTracks_
reco::TrackRefVector signalTracksTransientRefVector_
bool signalTracksTransientRefVectorFixed_
std::vector< IdPairtauIDs_

Friends

class PATTauProducer
std::ostream & reco::operator<< (std::ostream &out, const Tau &obj)
 pipe operator (introduced to use pat::Tau with PFTopProjectors)

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.33 2011/10/27 16:35:27 wmtan Exp

Definition at line 50 of file Tau.h.


Member Typedef Documentation

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

Definition at line 58 of file Tau.h.


Constructor & Destructor Documentation

Tau::Tau ( )
Tau::Tau ( const reco::BaseTau aTau)
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 77 of file Tau.cc.

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

Tau::Tau ( const edm::Ptr< reco::BaseTau > &  aTauRef)
Tau::~Tau ( ) [virtual]

destructor

Definition at line 145 of file Tau.cc.

          {
}

Member Function Documentation

void pat::Tau::addJECFactors ( const TauJetCorrFactors jec) [inline, protected]

add more sets of energy correction factors

Definition at line 334 of file Tau.h.

References jec_.

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

{jec_.push_back(jec); };
const std::vector< std::string > Tau::availableJECLevels ( const int &  set = 0) const

Definition at line 620 of file Tau.cc.

References jec_.

{
  return set>=0 ? jec_.at(set).correctionLabels() : std::vector<std::string>();
}
const std::vector<std::string> pat::Tau::availableJECLevels ( const std::string &  set) const [inline]

Definition at line 283 of file Tau.h.

References availableJECLevels(), and jecSet().

Referenced by availableJECLevels().

{ return availableJECLevels(jecSet(set)); };
const std::vector< std::string > Tau::availableJECSets ( ) const

all available label-names of all sets of jet energy corrections

---- methods for jet corrections ---- returns the labels of all available sets of jet energy corrections

Definition at line 610 of file Tau.cc.

References jec_.

{
  std::vector<std::string> sets;
  for ( std::vector<pat::TauJetCorrFactors>::const_iterator corrFactor = jec_.begin(); 
        corrFactor != jec_.end(); ++corrFactor ) {
    sets.push_back(corrFactor->jecSet());
  }
  return sets;
}
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 226 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 238 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 283 of file Tau.cc.

References caloSpecific_, Exception, and isCaloTau().

Referenced by caloTauTagInfoRef(), etaetaMoment(), etaphiMoment(), isolationECALhitsEtSum(), isolationTracksPtSum(), leadTrackHCAL3x3hitsEtSum(), leadTrackHCAL3x3hottesthitDEta(), leadTracksignedSipt(), maximumHCALhitEt(), p4Jet(), 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 124 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 72 of file Tau.h.

References Tau().

{ return new Tau(*this); }
const LorentzVector& pat::Tau::correctedP4 ( const std::string &  level,
const std::string &  set = "" 
) const [inline]

p4 of the jet corrected up to the given level for the set of jet energy correction factors, which is currently in use

Definition at line 315 of file Tau.h.

References correctedTauJet(), and reco::LeafCandidate::p4().

                                                                                                { 
        return correctedTauJet(level, set).p4(); 
      }
const LorentzVector& pat::Tau::correctedP4 ( const unsigned int &  level,
const unsigned int &  set = 0 
) const [inline]

p4 of the jet corrected up to the given level for the set of jet energy correction factors, which is currently in use

Definition at line 320 of file Tau.h.

References correctedTauJet(), and reco::LeafCandidate::p4().

                                                                                                     { 
        return correctedTauJet(level, set).p4(); 
      }
Tau Tau::correctedTauJet ( const std::string &  level,
const std::string &  set = "" 
) const

copy of the jet corrected up to the given level for the set of jet energy correction factors, which is currently in use

copy of the jet with correction factor to target step for the set of correction factors, which is currently in use

Definition at line 659 of file Tau.cc.

References relativeConstraints::empty, Exception, UserOptions_cff::idx, and jec_.

Referenced by correctedP4(), and correctedTauJet().

{
  // rescale p4 of the jet; the update of current values is
  // done within the called jecFactor function
  for ( unsigned int idx = 0; idx < jec_.size(); ++idx ) {
    if ( set.empty() || jec_.at(idx).jecSet() == set ) {
      if ( jec_[idx].jecLevel(level) >= 0 ) 
        return correctedTauJet(jec_[idx].jecLevel(level), idx);
      else
        throw cms::Exception("InvalidRequest") 
          << "This JEC level " << level << " does not exist. \n";
    }
  }
  throw cms::Exception("InvalidRequest") 
    << "This JEC set " << set << " does not exist. \n";
}
Tau Tau::correctedTauJet ( const unsigned int &  level,
const unsigned int &  set = 0 
) const

copy of the jet corrected up to the given level for the set of jet energy correction factors, which is currently in use

copy of the jet with correction factor to target step for the set of correction factors, which is currently in use

Definition at line 678 of file Tau.cc.

References correctedTauJet(), currentJECLevel(), currentJECSet(), jecFactor(), reco::LeafCandidate::p4(), and reco::LeafCandidate::setP4().

{
  Tau correctedTauJet(*this);
  //rescale p4 of the jet
  correctedTauJet.setP4(jecFactor(level, set)*p4());
  // update current level and set
  correctedTauJet.currentJECSet(set); 
  correctedTauJet.currentJECLevel(level); 
  return correctedTauJet;
}
std::string pat::Tau::currentJECLevel ( ) const [inline]

return the name of the current step of jet energy corrections

Definition at line 298 of file Tau.h.

References currentJECLevel_, currentJECSet_, and jec_.

Referenced by correctedTauJet(), and initializeJEC().

                                        { 
        return currentJECSet_<jec_.size() ? jec_.at(currentJECSet_).jecLevel(currentJECLevel_) : std::string("ERROR"); 
      }
void pat::Tau::currentJECLevel ( const unsigned int &  level) [inline, protected]

update the current JEC level; used by correctedJet

Definition at line 332 of file Tau.h.

References currentJECLevel_, and testEve_cfg::level.

std::string pat::Tau::currentJECSet ( ) const [inline]

returns the label of the current set of jet energy corrections

Definition at line 294 of file Tau.h.

References currentJECSet_, and jec_.

Referenced by correctedTauJet(), and initializeJEC().

                                      { 
        return currentJECSet_<jec_.size() ? jec_.at(currentJECSet_).jecSet() : std::string("ERROR"); 
      }
void pat::Tau::currentJECSet ( const unsigned int &  set) [inline, protected]

update the current JEC set; used by correctedJet

Definition at line 330 of file Tau.h.

References currentJECSet_.

{ currentJECSet_=set; };
int pat::Tau::decayMode ( ) const [inline]

reconstructed tau decay mode (specific to PFTau)

Definition at line 254 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 223 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 235 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 232 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 229 of file Tau.h.

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

void Tau::embedIsolationPFCands ( )

method to store the isolation candidates internally

Definition at line 397 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 408 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 428 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 418 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 212 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 323 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 334 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 345 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 223 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 356 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 366 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 386 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 376 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 233 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 211 of file Tau.h.

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

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

Definition at line 295 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 309 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 250 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 220 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 217 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 214 of file Tau.h.

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

void Tau::initializeJEC ( unsigned int  level,
const unsigned int  set = 0 
) [protected]

initialize the jet to a given JEC level during creation starting from Uncorrected

============= -Tau-jet Energy Correction methods ============ (copied from DataFormats/PatCandidates/src/Jet.cc)

Definition at line 592 of file Tau.cc.

References currentJECLevel(), currentJECSet(), jec_, reco::LeafCandidate::p4(), and reco::LeafCandidate::setP4().

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

{
  currentJECSet(set);
  currentJECLevel(level);
  setP4(jec_[set].correction(level)*p4());
}
bool pat::Tau::isCaloTau ( ) const [inline]

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

Definition at line 119 of file Tau.h.

References caloSpecific_.

Referenced by caloSpecific(), etaetaMoment(), etaphiMoment(), p4Jet(), 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 145 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 202 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 205 of file Tau.h.

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

const reco::PFCandidateRefVector & Tau::isolationPFNeutrHadrCands ( ) const
const std::vector< reco::RecoTauPiZero > & Tau::isolationPiZeroCandidates ( ) const

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

Definition at line 584 of file Tau.cc.

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

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 166 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 142 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 270 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;
}
float Tau::jecFactor ( const unsigned int &  level,
const unsigned int &  set = 0 
) const

correction factor to the given level for a specific set of correction factors, starting from the current level

Definition at line 645 of file Tau.cc.

References currentJECLevel_, currentJECSet_, Exception, jec_, jecSetAvailable(), and jecSetsAvailable().

{
  if ( !jecSetsAvailable() )
    throw cms::Exception("InvalidRequest") 
      << "This jet does not carry any jet energy correction factor information \n";
  if ( !jecSetAvailable(set) )
    throw cms::Exception("InvalidRequest") 
      << "This jet does not carry any jet energy correction factor information \n"
      << "for a jet energy correction set with index " << set << "\n";
  return jec_.at(set).correction(level)/jec_.at(currentJECSet_).correction(currentJECLevel_);
}
float Tau::jecFactor ( const std::string &  level,
const std::string &  set = "" 
) const

correction factor to the given level for a specific set of correction factors, starting from the current level

Definition at line 627 of file Tau.cc.

References relativeConstraints::empty, Exception, UserOptions_cff::idx, and jec_.

Referenced by correctedTauJet().

{
  for ( unsigned int idx = 0; idx < jec_.size(); ++idx ) {
    if ( set.empty() || jec_.at(idx).jecSet() == set ){
      if ( jec_[idx].jecLevel(level) >= 0 ) 
        return jecFactor(jec_[idx].jecLevel(level), idx);
      else
        throw cms::Exception("InvalidRequest") 
          << "This JEC level " << level << " does not exist. \n";
    }
  }
  throw cms::Exception("InvalidRequest") 
    << "This jet does not carry any jet energy correction factor information \n"
    << "for a jet energy correction set with label " << set << "\n";
}
int Tau::jecSet ( const std::string &  label) const [protected]

return true if this jet carries the jet correction factors of a different set, for systematic studies

index of the set of jec factors with given label; returns -1 if no set of jec factors exists with the given label

Definition at line 600 of file Tau.cc.

References jec_.

Referenced by availableJECLevels(), and jecSetAvailable().

{
  for ( std::vector<pat::TauJetCorrFactors>::const_iterator corrFactor = jec_.begin(); 
        corrFactor != jec_.end(); ++corrFactor ) {
    if ( corrFactor->jecSet() == set ) return corrFactor-jec_.begin(); 
  }
  return -1;
}
bool pat::Tau::jecSetAvailable ( const std::string &  set) const [inline]

returns true if the jet carries a set of jet energy correction factors with the given label

Definition at line 289 of file Tau.h.

References jecSet().

Referenced by jecFactor().

{return (jecSet(set) >= 0); };
bool pat::Tau::jecSetAvailable ( const unsigned int &  set) const [inline]

returns true if the jet carries a set of jet energy correction factors with the given label

Definition at line 292 of file Tau.h.

References jec_.

{return (set < jec_.size()); };
bool pat::Tau::jecSetsAvailable ( ) const [inline]

returns true if the jet carries jet energy correction information at all

Definition at line 286 of file Tau.h.

References jec_.

Referenced by jecFactor().

{ return !jec_.empty(); }
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 453 of file Tau.cc.

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

const reco::PFCandidateRef Tau::leadPFChargedHadrCand ( ) const
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 163 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 446 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 184 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 130 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 133 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 127 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 148 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 208 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 244 of file Tau.h.

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

{ return pfSpecific().muonDecision_; }
const reco::Candidate::LorentzVector & Tau::p4Jet ( ) const

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

Definition at line 288 of file Tau.cc.

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

{
  if ( isCaloTau() ) return caloSpecific().p4Jet_;
  if ( isPFTau()   ) return pfSpecific().p4Jet_;
  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::PFJetRef& pat::Tau::pfJetRef ( ) const [inline]

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

Definition at line 157 of file Tau.h.

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

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

Definition at line 302 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 241 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 316 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 244 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 272 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 std::vector< reco::RecoTauPiZero > & Tau::signalPiZeroCandidates ( ) const

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

Definition at line 520 of file Tau.cc.

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

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 194 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 136 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 256 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 269 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 139 of file Tau.h.

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


Friends And Related Function Documentation

friend class PATTauProducer [friend]

make friends with PATTauProducer so that it can set the initial jet energy scale unequal to raw calling the private initializeJEC function, which should be non accessible to any other user

Definition at line 54 of file Tau.h.

std::ostream& reco::operator<< ( std::ostream &  out,
const Tau obj 
) [friend]

pipe operator (introduced to use pat::Tau with PFTopProjectors)


Member Data Documentation

holder for CaloTau info, or empty vector if PFTau

Definition at line 398 of file Tau.h.

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

unsigned int pat::Tau::currentJECLevel_ [protected]

Definition at line 413 of file Tau.h.

Referenced by currentJECLevel(), and jecFactor().

unsigned int pat::Tau::currentJECSet_ [protected]

Definition at line 411 of file Tau.h.

Referenced by currentJECLevel(), currentJECSet(), and jecFactor().

Definition at line 374 of file Tau.h.

Referenced by embedIsolationPFCands(), and isolationPFCands().

Definition at line 378 of file Tau.h.

Referenced by embedIsolationPFChargedHadrCands(), and isolationPFChargedHadrCands().

Definition at line 386 of file Tau.h.

Referenced by embedIsolationPFGammaCands(), and isolationPFGammaCands().

Definition at line 382 of file Tau.h.

Referenced by embedIsolationPFNeutralHadrCands(), and isolationPFNeutrHadrCands().

Definition at line 339 of file Tau.h.

Referenced by embedIsolationTracks(), and isolationTracks().

Definition at line 351 of file Tau.h.

Referenced by embedLeadPFCand(), and leadPFCand().

Definition at line 353 of file Tau.h.

Referenced by embedLeadPFChargedHadrCand(), and leadPFChargedHadrCand().

Definition at line 355 of file Tau.h.

Referenced by embedLeadPFNeutralCand(), and leadPFNeutralCand().

bool pat::Tau::embeddedLeadTrack_ [protected]

Definition at line 343 of file Tau.h.

Referenced by embedLeadTrack(), and leadTrack().

Definition at line 358 of file Tau.h.

Referenced by embedSignalPFCands(), and signalPFCands().

Definition at line 362 of file Tau.h.

Referenced by embedSignalPFChargedHadrCands(), and signalPFChargedHadrCands().

Definition at line 370 of file Tau.h.

Referenced by embedSignalPFGammaCands(), and signalPFGammaCands().

Definition at line 366 of file Tau.h.

Referenced by embedSignalPFNeutralHadrCands(), and signalPFNeutrHadrCands().

Definition at line 345 of file Tau.h.

Referenced by embedSignalTracks(), and signalTracks().

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

Definition at line 391 of file Tau.h.

Referenced by genJet(), and setGenJet().

Definition at line 373 of file Tau.h.

Referenced by embedIsolationPFCands(), and isolationPFCands().

bool pat::Tau::isolationPFCandsRefVectorFixed_ [mutable, protected]

Definition at line 376 of file Tau.h.

Referenced by isolationPFCands().

Definition at line 375 of file Tau.h.

Referenced by isolationPFCands().

Definition at line 377 of file Tau.h.

Referenced by embedIsolationPFChargedHadrCands(), and isolationPFChargedHadrCands().

Definition at line 380 of file Tau.h.

Referenced by isolationPFChargedHadrCands().

Definition at line 379 of file Tau.h.

Referenced by isolationPFChargedHadrCands().

Definition at line 385 of file Tau.h.

Referenced by embedIsolationPFGammaCands(), and isolationPFGammaCands().

Definition at line 388 of file Tau.h.

Referenced by isolationPFGammaCands().

Definition at line 387 of file Tau.h.

Referenced by isolationPFGammaCands().

Definition at line 381 of file Tau.h.

Referenced by embedIsolationPFNeutralHadrCands(), and isolationPFNeutrHadrCands().

Definition at line 384 of file Tau.h.

Referenced by isolationPFNeutrHadrCands().

Definition at line 383 of file Tau.h.

Referenced by isolationPFNeutrHadrCands().

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

Reimplemented from reco::BaseTau.

Definition at line 340 of file Tau.h.

Referenced by embedIsolationTracks(), and isolationTracks().

Definition at line 341 of file Tau.h.

Referenced by isolationTracks().

Definition at line 342 of file Tau.h.

Referenced by isolationTracks().

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

Definition at line 350 of file Tau.h.

Referenced by embedLeadPFCand(), and leadPFCand().

Definition at line 352 of file Tau.h.

Referenced by embedLeadPFChargedHadrCand(), and leadPFChargedHadrCand().

Definition at line 354 of file Tau.h.

Referenced by embedLeadPFNeutralCand(), and leadPFNeutralCand().

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

Reimplemented from reco::BaseTau.

Definition at line 344 of file Tau.h.

Referenced by embedLeadTrack(), and leadTrack().

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

Definition at line 357 of file Tau.h.

Referenced by embedSignalPFCands(), and signalPFCands().

bool pat::Tau::signalPFCandsRefVectorFixed_ [mutable, protected]

Definition at line 360 of file Tau.h.

Referenced by signalPFCands().

Definition at line 359 of file Tau.h.

Referenced by signalPFCands().

Definition at line 361 of file Tau.h.

Referenced by embedSignalPFChargedHadrCands(), and signalPFChargedHadrCands().

Definition at line 364 of file Tau.h.

Referenced by signalPFChargedHadrCands().

Definition at line 363 of file Tau.h.

Referenced by signalPFChargedHadrCands().

Definition at line 369 of file Tau.h.

Referenced by embedSignalPFGammaCands(), and signalPFGammaCands().

Definition at line 372 of file Tau.h.

Referenced by signalPFGammaCands().

Definition at line 371 of file Tau.h.

Referenced by signalPFGammaCands().

Definition at line 365 of file Tau.h.

Referenced by embedSignalPFNeutralHadrCands(), and signalPFNeutrHadrCands().

Definition at line 368 of file Tau.h.

Referenced by signalPFNeutrHadrCands().

Definition at line 367 of file Tau.h.

Referenced by signalPFNeutrHadrCands().

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

Reimplemented from reco::BaseTau.

Definition at line 346 of file Tau.h.

Referenced by embedSignalTracks(), and signalTracks().

Definition at line 347 of file Tau.h.

Referenced by signalTracks().

Definition at line 348 of file Tau.h.

Referenced by signalTracks().

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

Definition at line 394 of file Tau.h.

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