Analysis-level calorimeter jet class. More...
#include <DataFormats/PatCandidates/interface/Jet.h>
Public Member Functions | |
void | addBDiscriminatorPair (const std::pair< std::string, float > &thePair) |
method to add a algolabel-discriminator pair | |
void | addTagInfo (const std::string &label, const TagInfoFwdPtrCollection::value_type &info) |
const reco::TrackRefVector & | associatedTracks () const |
method to return a vector of refs to the tracks associated to this jet | |
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 |
---- methods for jet corrections ---- | |
float | bDiscriminator (const std::string &theLabel) const |
---- methods for accessing b-tagging info ---- | |
const CaloSpecific & | caloSpecific () const |
retrieve the calo specific part of the jet | |
CaloTowerFwdPtrVector const & | caloTowersFwdPtr () const |
Access to bare FwdPtr collections. | |
float | chargedEmEnergy () const |
chargedEmEnergy | |
float | chargedEmEnergyFraction () const |
chargedEmEnergyFraction (relative to uncorrected jet energy) | |
float | chargedHadronEnergy () const |
chargedHadronEnergy | |
float | chargedHadronEnergyFraction () const |
chargedHadronEnergyFraction (relative to uncorrected jet energy) | |
int | chargedHadronMultiplicity () const |
chargedHadronMultiplicity | |
float | chargedMuEnergy () const |
chargedMuEnergy | |
float | chargedMuEnergyFraction () const |
chargedMuEnergyFraction | |
int | chargedMultiplicity () const |
chargedMultiplicity | |
virtual Jet * | clone () const |
required reimplementation of the Candidate's clone method | |
Jet | correctedJet (const std::string &level, const std::string &flavor="none", const std::string &set="") const |
Jet | correctedJet (const unsigned int &level, const JetCorrFactors::Flavor &flavor=JetCorrFactors::NONE, const unsigned int &set=0) const |
const LorentzVector & | correctedP4 (const std::string &level, const std::string &flavor="none", const std::string &set="") const |
const LorentzVector & | correctedP4 (const unsigned int &level, const JetCorrFactors::Flavor &flavor=JetCorrFactors::NONE, const unsigned int &set=0) const |
JetCorrFactors::Flavor | currentJECFlavor () const |
return flavour of the current step of jet energy corrections | |
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 | |
virtual const reco::Candidate * | daughter (size_t i) const |
float | elecMultiplicity () const |
chargedMultiplicity | |
const reco::TrackRefVector & | elecsInVertexInCalo () const |
electrons fully contained in cone | |
const reco::TrackRefVector & | elecsInVertexOutCalo () const |
electrons that curled out | |
const reco::TrackRefVector & | elecsOutVertexInCalo () const |
electrons that curled in | |
float | electronEnergy () const |
electronEnergy | |
float | electronEnergyFraction () const |
electronEnergyFraction (relative to corrected jet energy) | |
int | electronMultiplicity () const |
electronMultiplicity | |
float | emEnergyFraction () const |
returns the jet electromagnetic energy fraction | |
float | emEnergyInEB () const |
returns the jet electromagnetic energy in EB | |
float | emEnergyInEE () const |
returns the jet electromagnetic energy in EE | |
float | emEnergyInHF () const |
returns the jet electromagnetic energy extracted from HF | |
float | energyFractionHadronic () const |
returns the jet hadronic energy fraction | |
const reco::GenJet * | genJet () const |
return the matched generated jet | |
edm::FwdRef < reco::GenJetCollection > const & | genJetFwdRef () const |
const reco::GenParticle * | genParton () const |
---- methods for MC matching ---- | |
CaloTowerPtr | getCaloConstituent (unsigned fIndex) const |
convert generic constituent to specific type | |
std::vector< CaloTowerPtr > const & | getCaloConstituents () const |
const std::vector< std::pair < std::string, float > > & | getPairDiscri () const |
get vector of paire labelname-disciValue | |
reco::PFCandidatePtr | getPFConstituent (unsigned fIndex) const |
convert generic constituent to specific type | |
std::vector < reco::PFCandidatePtr > const & | getPFConstituents () const |
float | hadEnergyInHB () const |
returns the jet hadronic energy in HB | |
float | hadEnergyInHE () const |
returns the jet hadronic energy in HE | |
float | hadEnergyInHF () const |
returns the jet hadronic energy in HF | |
float | hadEnergyInHO () const |
returns the jet hadronic energy in HO | |
bool | hasTagInfo (const std::string label) const |
check to see if the given tag info is nonzero | |
float | HFEMEnergy () const |
HFEMEnergy. | |
float | HFEMEnergyFraction () const |
HFEMEnergyFraction (relative to corrected jet energy) | |
int | HFEMMultiplicity () const |
HFEMMultiplicity. | |
float | HFHadronEnergy () const |
HFHadronEnergy. | |
float | HFHadronEnergyFraction () const |
HFHadronEnergyFraction (relative to corrected jet energy) | |
int | HFHadronMultiplicity () const |
HFHadronMultiplicity. | |
bool | isBasicJet () const |
check to see if the jet is no more than a reco::BasicJet | |
bool | isCaloJet () const |
check to see if the jet is a reco::CaloJet | |
bool | isJPTJet () const |
check to see if the jet is a reco::JPTJet | |
bool | isPFJet () const |
check to see if the jet is a reco::PFJet | |
float | jecFactor (const std::string &level, const std::string &flavor="none", const std::string &set="") const |
float | jecFactor (const unsigned int &level, const JetCorrFactors::Flavor &flavor=JetCorrFactors::NONE, const unsigned int &set=0) const |
bool | jecSetAvailable (const std::string &set) const |
bool | jecSetAvailable (const unsigned int &set) const |
bool | jecSetsAvailable () const |
Jet (const edm::Ptr< reco::Jet > &aJetRef) | |
constructor from ref to reco::Jet | |
Jet (const reco::Jet &aJet) | |
constructor from a reco::Jet | |
Jet (const edm::RefToBase< reco::Jet > &aJetRef) | |
constructor from ref to reco::Jet | |
Jet () | |
default constructor | |
float | jetCharge () const |
method to return the JetCharge computed when creating the Jet | |
reco::JetID const & | jetID () const |
accessing Jet ID information | |
const JPTSpecific & | jptSpecific () const |
retrieve the jpt specific part of the jet | |
float | maxEInEmTowers () const |
returns the maximum energy deposited in ECAL towers | |
float | maxEInHadTowers () const |
returns the maximum energy deposited in HCAL towers | |
float | muonEnergy () const |
muonEnergy | |
float | muonEnergyFraction () const |
muonEnergyFraction (relative to corrected jet energy) | |
int | muonMultiplicity () const |
muonMultiplicity | |
const reco::TrackRefVector & | muonsInVertexInCalo () const |
muons fully contained in cone | |
const reco::TrackRefVector & | muonsInVertexOutCalo () const |
muons that curled out | |
const reco::TrackRefVector & | muonsOutVertexInCalo () const |
muons that curled in | |
int | n60 () const |
returns the number of constituents carrying a 60% of the total Jet energy*/ | |
int | n90 () const |
returns the number of constituents carrying a 90% of the total Jet energy*/ | |
float | neutralEmEnergy () const |
neutralEmEnergy | |
float | neutralEmEnergyFraction () const |
neutralEmEnergyFraction (relative to uncorrected jet energy) | |
float | neutralHadronEnergy () const |
neutralHadronEnergy | |
float | neutralHadronEnergyFraction () const |
neutralHadronEnergyFraction (relative to uncorrected jet energy) | |
int | neutralHadronMultiplicity () const |
neutralHadronMultiplicity | |
int | neutralMultiplicity () const |
neutralMultiplicity | |
virtual size_t | numberOfDaughters () const |
int | partonFlavour () const |
return the flavour of the parton underlying the jet | |
reco::PFCandidateFwdPtrVector const & | pfCandidatesFwdPtr () const |
const PFSpecific & | pfSpecific () const |
retrieve the pf specific part of the jet | |
float | photonEnergy () const |
photonEnergy | |
float | photonEnergyFraction () const |
photonEnergyFraction (relative to corrected jet energy) | |
int | photonMultiplicity () const |
photonMultiplicity | |
const reco::TrackRefVector & | pionsInVertexInCalo () const |
pions fully contained in cone | |
const reco::TrackRefVector & | pionsInVertexOutCalo () const |
pions that curled out | |
const reco::TrackRefVector & | pionsOutVertexInCalo () const |
pions that curled in | |
void | setAssociatedTracks (const reco::TrackRefVector &tracks) |
method to set the vector of refs to the tracks associated to this jet | |
void | setCaloSpecific (CaloSpecific newCaloSpecific) |
set the calo specific part of the jet | |
void | setCaloTowers (const CaloTowerFwdPtrCollection &caloTowers) |
method to store the CaloJet constituents internally | |
void | setGenJetRef (const edm::FwdRef< reco::GenJetCollection > &gj) |
method to set the matched generated jet reference, embedding if requested | |
void | setGenParton (const reco::GenParticleRef &gp, bool embed=false) |
method to set the matched parton | |
void | setJetCharge (float jetCharge) |
method to set the jet charge | |
void | setJetID (reco::JetID const &id) |
methods for jet ID | |
void | setJPTSpecific (JPTSpecific newJPTSpecific) |
set the jpt specific part of the jet | |
void | setPartonFlavour (int partonFl) |
method to set the flavour of the parton underlying the jet | |
void | setPFCandidates (const PFCandidateFwdPtrCollection &pfCandidates) |
method to store the PFCandidate constituents internally | |
void | setPFSpecific (PFSpecific newPFSpecific) |
set the pf specific part of the jet | |
const reco::BaseTagInfo * | tagInfo (const std::string &label) const |
const reco::SecondaryVertexTagInfo * | tagInfoSecondaryVertex (const std::string &label="") const |
TagInfoFwdPtrCollection const & | tagInfosFwdPtr () const |
const reco::SoftLeptonTagInfo * | tagInfoSoftLepton (const std::string &label="") const |
const reco::TrackIPTagInfo * | tagInfoTrackIP (const std::string &label="") const |
float | towersArea () const |
returns area of contributing towers | |
void | updateFwdCaloTowerFwdPtr (unsigned int index, edm::Ptr< CaloTower > updateFwd) |
void | updateFwdGenJetFwdRef (edm::Ref< reco::GenJetCollection > updateRef) |
void | updateFwdPFCandidateFwdPtr (unsigned int index, edm::Ptr< reco::PFCandidate > updateFwd) |
void | updateFwdTagInfoFwdPtr (unsigned int index, edm::Ptr< reco::BaseTagInfo > updateFwd) |
const float & | zspCorrection () const |
zero suppression correction | |
virtual | ~Jet () |
destructor | |
Protected Attributes | |
reco::TrackRefVector | associatedTracks_ |
CaloTowerCollection | caloTowers_ |
CaloTowerFwdPtrVector | caloTowersFwdPtr_ |
std::vector< CaloTowerPtr > | caloTowersTemp_ |
JetCorrFactors::Flavor | currentJECFlavor_ |
unsigned int | currentJECLevel_ |
unsigned int | currentJECSet_ |
bool | embeddedCaloTowers_ |
bool | embeddedPFCandidates_ |
std::vector< reco::GenJet > | genJet_ |
edm::FwdRef < reco::GenJetCollection > | genJetFwdRef_ |
reco::GenJetRefVector | genJetRef_ |
std::vector< pat::JetCorrFactors > | jec_ |
float | jetCharge_ |
reco::JetID | jetID_ |
std::vector< std::pair < std::string, float > > | pairDiscriVector_ |
int | partonFlavour_ |
reco::PFCandidateCollection | pfCandidates_ |
reco::PFCandidateFwdPtrVector | pfCandidatesFwdPtr_ |
std::vector< reco::PFCandidatePtr > | pfCandidatesTemp_ |
std::vector< CaloSpecific > | specificCalo_ |
std::vector< JPTSpecific > | specificJPT_ |
std::vector< PFSpecific > | specificPF_ |
std::vector< std::string > | tagInfoLabels_ |
edm::OwnVector< reco::BaseTagInfo > | tagInfos_ |
TagInfoFwdPtrCollection | tagInfosFwdPtr_ |
Private Member Functions | |
void | addJECFactors (const JetCorrFactors &jec) |
add more sets of energy correction factors | |
void | cacheCaloTowers () const |
method to cache the constituents to allow "user-friendly" access | |
void | cachePFCandidates () const |
method to cache the constituents to allow "user-friendly" access | |
const JetCorrFactors * | corrFactors_ (const std::string &set) const |
return the jet correction factors of a different set, for systematic studies | |
const JetCorrFactors * | corrFactors_ () const |
return the correction factor for this jet. Throws if they're not available. | |
void | currentJECFlavor (const JetCorrFactors::Flavor &flavor) |
update the current JEC flavor; used by correctedJet | |
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 JetCorrFactors::Flavor &flavor=JetCorrFactors::NONE, 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 | |
template<typename T > | |
const T * | tagInfoByType () const |
void | tryImportSpecific (const reco::Jet &source) |
constructor helper that tries to import the specific info from the source jet | |
Private Attributes | |
bool | isCaloTowerCached_ |
cache calo towers | |
bool | isPFCandidateCached_ |
Friends | |
class | PATJetProducer |
std::ostream & | reco::operator<< (std::ostream &out, const Jet &obj) |
pipe operator (introduced to use pat::Jet with PFTopProjectors) |
Analysis-level calorimeter jet class.
Jet implements the analysis-level calorimeter jet class within the 'pat' namespace
Jet::Jet | ( | ) |
default constructor
Reimplemented from reco::Jet.
Definition at line 13 of file Jet.cc.
Referenced by clone().
: PATObject<reco::Jet>(reco::Jet()), embeddedCaloTowers_(false), embeddedPFCandidates_(false), partonFlavour_(0), jetCharge_(0.), isCaloTowerCached_(false), isPFCandidateCached_(false) { }
Jet::Jet | ( | const reco::Jet & | aJet | ) |
constructor from a reco::Jet
Definition at line 25 of file Jet.cc.
References tryImportSpecific().
: PATObject<reco::Jet>(aJet), embeddedCaloTowers_(false), embeddedPFCandidates_(false), partonFlavour_(0), jetCharge_(0.0), isCaloTowerCached_(false), isPFCandidateCached_(false) { tryImportSpecific(aJet); }
Jet::Jet | ( | const edm::RefToBase< reco::Jet > & | aJetRef | ) |
constructor from ref to reco::Jet
Definition at line 51 of file Jet.cc.
References tryImportSpecific().
: PATObject<reco::Jet>(aJetRef), embeddedCaloTowers_(false), embeddedPFCandidates_(false), partonFlavour_(0), jetCharge_(0.0), isCaloTowerCached_(false), isPFCandidateCached_(false) { tryImportSpecific(*aJetRef); }
constructor from ref to reco::Jet
Definition at line 38 of file Jet.cc.
References tryImportSpecific().
: PATObject<reco::Jet>(aJetRef), embeddedCaloTowers_(false), embeddedPFCandidates_(false), partonFlavour_(0), jetCharge_(0.0), isCaloTowerCached_(false), isPFCandidateCached_(false) { tryImportSpecific(*aJetRef); }
Jet::~Jet | ( | ) | [virtual] |
void Jet::addBDiscriminatorPair | ( | const std::pair< std::string, float > & | thePair | ) |
method to add a algolabel-discriminator pair
Definition at line 434 of file Jet.cc.
References pairDiscriVector_.
Referenced by pat::PATJetProducer::produce().
{ pairDiscriVector_.push_back(thePair); }
void pat::Jet::addJECFactors | ( | const JetCorrFactors & | jec | ) | [inline, private] |
void Jet::addTagInfo | ( | const std::string & | label, |
const TagInfoFwdPtrCollection::value_type & | info | ||
) |
sets a tagInfo with the given name from an edm::Ptr<T> to it. If the label ends with 'TagInfos', the 'TagInfos' is stripped out.
Definition at line 372 of file Jet.cc.
References tagInfoLabels_, and tagInfosFwdPtr_.
Referenced by pat::PATJetProducer::produce().
{ std::string::size_type idx = label.find("TagInfos"); if (idx == std::string::npos) { tagInfoLabels_.push_back(label); } else { tagInfoLabels_.push_back(label.substr(0,idx)); } tagInfosFwdPtr_.push_back(info); }
const reco::TrackRefVector & Jet::associatedTracks | ( | ) | const |
method to return a vector of refs to the tracks associated to this jet
Definition at line 391 of file Jet.cc.
References associatedTracks_.
Referenced by main().
{ return associatedTracks_; }
const std::vector< std::string > Jet::availableJECLevels | ( | const int & | set = 0 | ) | const |
Definition at line 232 of file Jet.cc.
References jec_.
Referenced by PATJetCorrExtractor::operator()().
{ return set>=0 ? jec_.at(set).correctionLabels() : std::vector<std::string>(); }
const std::vector<std::string> pat::Jet::availableJECLevels | ( | const std::string & | set | ) | const [inline] |
Definition at line 109 of file Jet.h.
References availableJECLevels(), and jecSet().
Referenced by availableJECLevels().
{ return availableJECLevels(jecSet(set)); };
const std::vector< std::string > Jet::availableJECSets | ( | ) | const |
float Jet::bDiscriminator | ( | const std::string & | theLabel | ) | const |
---- methods for accessing b-tagging info ----
get b discriminant from label name
Definition at line 308 of file Jet.cc.
References first, i, and pairDiscriVector_.
Referenced by TtSemiLepJetComb::bTag(), bJetSelector::IsbTag(), TtSemiLRSignalSelObservables::CompareBdisc::operator()(), TtHadLRJetCombObservables::operator()(), TtHadLRSignalSelObservables::CompareBdisc::operator()(), and TtSemiLRJetCombObservables::operator()().
{ float discriminator = -1000.; const std::string & theLabel = ((aLabel == "" || aLabel == "default")) ? "trackCountingHighEffBJetTags" : aLabel; for(unsigned int i=0; i!=pairDiscriVector_.size(); i++){ if(pairDiscriVector_[i].first == theLabel){ discriminator = pairDiscriVector_[i].second; } } return discriminator; }
void Jet::cacheCaloTowers | ( | ) | const [private] |
method to cache the constituents to allow "user-friendly" access
Definition at line 446 of file Jet.cc.
References edm::SortedCollection< T, SORT >::begin(), caloTowers_, caloTowersFwdPtr_, caloTowersTemp_, reco::CompositePtrCandidate::dau, reco::CompositePtrCandidate::daughterPtr(), embeddedCaloTowers_, edm::SortedCollection< T, SORT >::end(), Exception, edm::Ptr< T >::get(), edm::Ptr< T >::id(), isCaloTowerCached_, edm::Ptr< T >::key(), numberOfDaughters(), and edm::SortedCollection< T, SORT >::size().
Referenced by getCaloConstituents().
{ // Clear the cache caloTowersTemp_.clear(); // Here is where we've embedded constituents if ( embeddedCaloTowers_ ) { // Refactorized PAT access if ( caloTowersFwdPtr_.size() > 0 ) { for ( CaloTowerFwdPtrVector::const_iterator ibegin=caloTowersFwdPtr_.begin(), iend = caloTowersFwdPtr_.end(), icalo = ibegin; icalo != iend; ++icalo ) { caloTowersTemp_.push_back( CaloTowerPtr(icalo->ptr() ) ); } } // Compatibility access else if ( caloTowers_.size() > 0 ) { for ( CaloTowerCollection::const_iterator ibegin=caloTowers_.begin(), iend = caloTowers_.end(), icalo = ibegin; icalo != iend; ++icalo ) { caloTowersTemp_.push_back( CaloTowerPtr(&caloTowers_, icalo - ibegin ) ); } } } // Non-embedded access else { for ( unsigned fIndex = 0; fIndex < numberOfDaughters(); ++fIndex ) { Constituent const & dau = daughterPtr (fIndex); const CaloTower* caloTower = dynamic_cast <const CaloTower*> (dau.get()); if (caloTower) { caloTowersTemp_.push_back( CaloTowerPtr(dau.id(), caloTower,dau.key() ) ); } else { throw cms::Exception("Invalid Constituent") << "CaloJet constituent is not of CaloTower type"; } } } // Set the cache flag isCaloTowerCached_=true; }
void Jet::cachePFCandidates | ( | ) | const [private] |
method to cache the constituents to allow "user-friendly" access
Definition at line 488 of file Jet.cc.
References reco::CompositePtrCandidate::dau, reco::CompositePtrCandidate::daughterPtr(), embeddedPFCandidates_, Exception, edm::Ptr< T >::get(), edm::Ptr< T >::id(), isPFCandidateCached_, edm::Ptr< T >::key(), numberOfDaughters(), pfCandidates_, pfCandidatesFwdPtr_, and pfCandidatesTemp_.
Referenced by getPFConstituents().
{ // Clear the cache pfCandidatesTemp_.clear(); // Here is where we've embedded constituents if ( embeddedPFCandidates_ ) { // Refactorized PAT access if ( pfCandidatesFwdPtr_.size() > 0 ) { for ( PFCandidateFwdPtrCollection::const_iterator ibegin=pfCandidatesFwdPtr_.begin(), iend = pfCandidatesFwdPtr_.end(), ipf = ibegin; ipf != iend; ++ipf ) { pfCandidatesTemp_.push_back( reco::PFCandidatePtr(ipf->ptr() ) ); } } // Compatibility access else if ( pfCandidates_.size() > 0 ) { for ( reco::PFCandidateCollection::const_iterator ibegin=pfCandidates_.begin(), iend = pfCandidates_.end(), ipf = ibegin; ipf != iend; ++ipf ) { pfCandidatesTemp_.push_back( reco::PFCandidatePtr(&pfCandidates_, ipf - ibegin ) ); } } } // Non-embedded access else { for ( unsigned fIndex = 0; fIndex < numberOfDaughters(); ++fIndex ) { Constituent const & dau = daughterPtr (fIndex); const reco::PFCandidate* pfCandidate = dynamic_cast <const reco::PFCandidate*> (dau.get()); if (pfCandidate) { pfCandidatesTemp_.push_back( reco::PFCandidatePtr(dau.id(), pfCandidate,dau.key() ) ); } else { throw cms::Exception("Invalid Constituent") << "PFJet constituent is not of PFCandidate type"; } } } // Set the cache flag isPFCandidateCached_=true; }
const CaloSpecific& pat::Jet::caloSpecific | ( | ) | const [inline] |
retrieve the calo specific part of the jet
Definition at line 230 of file Jet.h.
References specificCalo_.
Referenced by emEnergyFraction(), emEnergyInEB(), emEnergyInEE(), emEnergyInHF(), energyFractionHadronic(), hadEnergyInHB(), hadEnergyInHE(), hadEnergyInHF(), hadEnergyInHO(), maxEInEmTowers(), maxEInHadTowers(), and towersArea().
{ if (specificCalo_.empty()) throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a CaloJet.\n"; return specificCalo_[0]; }
CaloTowerFwdPtrVector const& pat::Jet::caloTowersFwdPtr | ( | ) | const [inline] |
Access to bare FwdPtr collections.
Definition at line 453 of file Jet.h.
References caloTowersFwdPtr_.
{ return caloTowersFwdPtr_;}
float pat::Jet::chargedEmEnergy | ( | ) | const [inline] |
chargedEmEnergy
Definition at line 588 of file Jet.h.
References Exception.
Referenced by chargedEmEnergyFraction().
{ if(isPFJet()){ return pfSpecific().mChargedEmEnergy; } else if( isJPTJet() ){ return jptSpecific().mChargedEmEnergy;} else{ throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet nor from PFJet.\n"; } }
float pat::Jet::chargedEmEnergyFraction | ( | ) | const [inline] |
chargedEmEnergyFraction (relative to uncorrected jet energy)
Definition at line 345 of file Jet.h.
References chargedEmEnergy(), reco::LeafCandidate::energy(), jecFactor(), and jecSetsAvailable().
Referenced by PFJetIDSelectionFunctor::firstDataCuts(), and main().
{return chargedEmEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
float pat::Jet::chargedHadronEnergy | ( | ) | const [inline] |
chargedHadronEnergy
Definition at line 574 of file Jet.h.
References Exception, isJPTJet(), isPFJet(), jptSpecific(), reco::JPTJet::Specific::mChargedHadronEnergy, reco::PFJet::Specific::mChargedHadronEnergy, and pfSpecific().
Referenced by chargedHadronEnergyFraction().
{ if(isPFJet()){ return pfSpecific().mChargedHadronEnergy; } else if( isJPTJet() ){ return jptSpecific().mChargedHadronEnergy; } else{ throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet nor from PFJet.\n"; } }
float pat::Jet::chargedHadronEnergyFraction | ( | ) | const [inline] |
chargedHadronEnergyFraction (relative to uncorrected jet energy)
Definition at line 341 of file Jet.h.
References chargedHadronEnergy(), reco::LeafCandidate::energy(), jecFactor(), and jecSetsAvailable().
Referenced by PFJetIDSelectionFunctor::firstDataCuts(), and main().
{return chargedHadronEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
int pat::Jet::chargedHadronMultiplicity | ( | ) | const [inline] |
chargedHadronMultiplicity
Definition at line 372 of file Jet.h.
References reco::PFJet::Specific::mChargedHadronMultiplicity, and pfSpecific().
{return pfSpecific().mChargedHadronMultiplicity;}
float pat::Jet::chargedMuEnergy | ( | ) | const [inline] |
chargedMuEnergy
Definition at line 386 of file Jet.h.
References reco::PFJet::Specific::mChargedMuEnergy, and pfSpecific().
Referenced by chargedMuEnergyFraction().
{return pfSpecific().mChargedMuEnergy;}
float pat::Jet::chargedMuEnergyFraction | ( | ) | const [inline] |
chargedMuEnergyFraction
Definition at line 388 of file Jet.h.
References chargedMuEnergy(), reco::LeafCandidate::energy(), jecFactor(), and jecSetsAvailable().
{return chargedMuEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
int pat::Jet::chargedMultiplicity | ( | ) | const [inline] |
chargedMultiplicity
Definition at line 609 of file Jet.h.
References Exception.
Referenced by PFJetIDSelectionFunctor::firstDataCuts().
{ if(isPFJet()){ return pfSpecific().mChargedMultiplicity; } else if( isJPTJet() ){ return jptSpecific().muonsInVertexInCalo.size()+jptSpecific().muonsInVertexOutCalo.size()+ jptSpecific().pionsInVertexInCalo.size()+jptSpecific().pionsInVertexOutCalo.size()+ jptSpecific().elecsInVertexInCalo.size()+jptSpecific().elecsInVertexOutCalo.size();} else{ throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet nor from PFJet.\n"; } }
virtual Jet* pat::Jet::clone | ( | void | ) | const [inline, virtual] |
required reimplementation of the Candidate's clone method
Reimplemented from reco::CompositePtrCandidate.
Definition at line 90 of file Jet.h.
References Jet().
{ return new Jet(*this); }
Jet Jet::correctedJet | ( | const unsigned int & | level, |
const JetCorrFactors::Flavor & | flavor = JetCorrFactors::NONE , |
||
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 290 of file Jet.cc.
References correctedJet(), currentJECFlavor(), currentJECLevel(), currentJECSet(), jecFactor(), reco::LeafCandidate::p4(), and reco::LeafCandidate::setP4().
{ Jet correctedJet(*this); //rescale p4 of the jet correctedJet.setP4(jecFactor(level, flavor, set)*p4()); // update current level, flavor and set correctedJet.currentJECSet(set); correctedJet.currentJECLevel(level); correctedJet.currentJECFlavor(flavor); return correctedJet; }
Jet Jet::correctedJet | ( | const std::string & | level, |
const std::string & | flavor = "none" , |
||
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 271 of file Jet.cc.
References relativeConstraints::empty, Exception, and jec_.
Referenced by correctedJet(), correctedP4(), StEvtSolution::getRecBottom(), TtHadEvtSolution::getRecHadb(), TtSemiEvtSolution::getRecHadb(), TtHadEvtSolution::getRecHadbbar(), TtHadEvtSolution::getRecHadj(), TtHadEvtSolution::getRecHadk(), TtHadEvtSolution::getRecHadp(), TtSemiEvtSolution::getRecHadp(), TtHadEvtSolution::getRecHadq(), TtSemiEvtSolution::getRecHadq(), TtDilepEvtSolution::getRecJetB(), TtDilepEvtSolution::getRecJetBbar(), TtSemiEvtSolution::getRecLepb(), StEvtSolution::getRecLight(), PFJetIDSelectionFunctor::operator()(), and hitfit::JetTranslatorBase< AJet >::operator()().
{ // 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 correctedJet(jec_[idx].jecLevel(level), jec_[idx].jecFlavor(flavor), 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"; }
const LorentzVector& pat::Jet::correctedP4 | ( | const std::string & | level, |
const std::string & | flavor = "none" , |
||
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 139 of file Jet.h.
References correctedJet(), and reco::LeafCandidate::p4().
Referenced by PFJetMETcorrInputProducer_namespace::RawJetExtractorT< pat::Jet >::operator()(), SmearedJetProducer_namespace::RawJetExtractorT< pat::Jet >::operator()(), CaloJetMETcorrInputProducer_namespace::RawJetExtractorT< pat::Jet >::operator()(), PATJetCorrExtractor::operator()(), and JetIDSelectionFunctor::operator()().
{ return correctedJet(level, flavor, set).p4(); };
const LorentzVector& pat::Jet::correctedP4 | ( | const unsigned int & | level, |
const JetCorrFactors::Flavor & | flavor = JetCorrFactors::NONE , |
||
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 142 of file Jet.h.
References correctedJet(), and reco::LeafCandidate::p4().
{ return correctedJet(level, flavor, set).p4(); };
const JetCorrFactors* pat::Jet::corrFactors_ | ( | const std::string & | set | ) | const [private] |
return the jet correction factors of a different set, for systematic studies
const JetCorrFactors* pat::Jet::corrFactors_ | ( | ) | const [private] |
return the correction factor for this jet. Throws if they're not available.
void pat::Jet::currentJECFlavor | ( | const JetCorrFactors::Flavor & | flavor | ) | [inline, private] |
update the current JEC flavor; used by correctedJet
Definition at line 153 of file Jet.h.
References currentJECFlavor_.
{ currentJECFlavor_=flavor; };
JetCorrFactors::Flavor pat::Jet::currentJECFlavor | ( | ) | const [inline] |
return flavour of the current step of jet energy corrections
Definition at line 124 of file Jet.h.
References currentJECFlavor_.
Referenced by correctedJet(), and initializeJEC().
{ return currentJECFlavor_; };
void pat::Jet::currentJECLevel | ( | const unsigned int & | level | ) | [inline, private] |
update the current JEC level; used by correctedJet
Definition at line 151 of file Jet.h.
References currentJECLevel_, and testEve_cfg::level.
{ currentJECLevel_=level; };
std::string pat::Jet::currentJECLevel | ( | ) | const [inline] |
return the name of the current step of jet energy corrections
Definition at line 122 of file Jet.h.
References currentJECLevel_, currentJECSet_, and jec_.
Referenced by correctedJet(), initializeJEC(), PFJetIDSelectionFunctor::operator()(), JetIDSelectionFunctor::operator()(), and PatJetAnalyzer::print().
{ return currentJECSet_<jec_.size() ? jec_.at(currentJECSet_).jecLevel(currentJECLevel_) : std::string("ERROR"); };
void pat::Jet::currentJECSet | ( | const unsigned int & | set | ) | [inline, private] |
update the current JEC set; used by correctedJet
Definition at line 149 of file Jet.h.
References currentJECSet_.
{ currentJECSet_=set; };
std::string pat::Jet::currentJECSet | ( | ) | const [inline] |
returns the label of the current set of jet energy corrections
Definition at line 120 of file Jet.h.
References currentJECSet_, and jec_.
Referenced by correctedJet(), and initializeJEC().
{ return currentJECSet_<jec_.size() ? jec_.at(currentJECSet_).jecSet() : std::string("ERROR"); }
virtual const reco::Candidate* pat::Jet::daughter | ( | size_t | i | ) | const [inline, virtual] |
get a pointer to a Candididate constituent of the jet If using refactorized PAT, return that. (constituents size > 0) Else check the old version of PAT (embedded constituents size > 0) Else return the reco Jet number of constituents
Reimplemented from reco::CompositePtrCandidate.
Definition at line 406 of file Jet.h.
References caloTowers_, caloTowersFwdPtr_, embeddedCaloTowers_, embeddedPFCandidates_, isCaloJet(), isJPTJet(), isPFJet(), pfCandidates_, pfCandidatesFwdPtr_, and edm::SortedCollection< T, SORT >::size().
{ if (isCaloJet() || isJPTJet() ) { if ( embeddedCaloTowers_ ) { if ( caloTowersFwdPtr_.size() > 0 ) return caloTowersFwdPtr_[i].get(); else if ( caloTowers_.size() > 0 ) return &caloTowers_[i]; else return reco::Jet::daughter(i); } } if (isPFJet()) { if ( embeddedPFCandidates_ ) { if ( pfCandidatesFwdPtr_.size() > 0 ) return pfCandidatesFwdPtr_[i].get(); else if ( pfCandidates_.size() > 0 ) return &pfCandidates_[i]; else return reco::Jet::daughter(i); } } return reco::Jet::daughter(i); }
float pat::Jet::elecMultiplicity | ( | ) | const [inline] |
chargedMultiplicity
Definition at line 323 of file Jet.h.
References reco::JPTJet::Specific::elecsInVertexInCalo, reco::JPTJet::Specific::elecsInVertexOutCalo, jptSpecific(), and edm::RefVector< C, T, F >::size().
{return jptSpecific().elecsInVertexInCalo.size()+jptSpecific().elecsInVertexOutCalo.size();}
const reco::TrackRefVector& pat::Jet::elecsInVertexInCalo | ( | ) | const [inline] |
electrons fully contained in cone
Definition at line 315 of file Jet.h.
References reco::JPTJet::Specific::elecsInVertexInCalo, and jptSpecific().
{return jptSpecific().elecsInVertexInCalo; }
const reco::TrackRefVector& pat::Jet::elecsInVertexOutCalo | ( | ) | const [inline] |
electrons that curled out
Definition at line 317 of file Jet.h.
References reco::JPTJet::Specific::elecsInVertexOutCalo, and jptSpecific().
{return jptSpecific().elecsInVertexOutCalo;}
const reco::TrackRefVector& pat::Jet::elecsOutVertexInCalo | ( | ) | const [inline] |
electrons that curled in
Definition at line 319 of file Jet.h.
References reco::JPTJet::Specific::elecsOutVertexInCalo, and jptSpecific().
{return jptSpecific().elecsOutVertexInCalo;}
float pat::Jet::electronEnergy | ( | ) | const [inline] |
electronEnergy
Definition at line 355 of file Jet.h.
References reco::PFJet::Specific::mElectronEnergy, and pfSpecific().
Referenced by electronEnergyFraction().
{return pfSpecific().mElectronEnergy;}
float pat::Jet::electronEnergyFraction | ( | ) | const [inline] |
electronEnergyFraction (relative to corrected jet energy)
Definition at line 357 of file Jet.h.
References electronEnergy(), reco::LeafCandidate::energy(), jecFactor(), and jecSetsAvailable().
{return electronEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
int pat::Jet::electronMultiplicity | ( | ) | const [inline] |
electronMultiplicity
Definition at line 378 of file Jet.h.
References reco::PFJet::Specific::mElectronMultiplicity, and pfSpecific().
{return pfSpecific().mElectronMultiplicity;}
float pat::Jet::emEnergyFraction | ( | ) | const [inline] |
returns the jet electromagnetic energy fraction
Definition at line 269 of file Jet.h.
References caloSpecific(), and reco::CaloJet::Specific::mEnergyFractionEm.
Referenced by PatZjetsJetAnalyzer::analyze(), main(), and JetIDSelectionFunctor::operator()().
{return caloSpecific().mEnergyFractionEm;}
float pat::Jet::emEnergyInEB | ( | ) | const [inline] |
returns the jet electromagnetic energy in EB
Definition at line 279 of file Jet.h.
References caloSpecific(), and reco::CaloJet::Specific::mEmEnergyInEB.
{return caloSpecific().mEmEnergyInEB;}
float pat::Jet::emEnergyInEE | ( | ) | const [inline] |
returns the jet electromagnetic energy in EE
Definition at line 281 of file Jet.h.
References caloSpecific(), and reco::CaloJet::Specific::mEmEnergyInEE.
{return caloSpecific().mEmEnergyInEE;}
float pat::Jet::emEnergyInHF | ( | ) | const [inline] |
returns the jet electromagnetic energy extracted from HF
Definition at line 283 of file Jet.h.
References caloSpecific(), and reco::CaloJet::Specific::mEmEnergyInHF.
{return caloSpecific().mEmEnergyInHF;}
float pat::Jet::energyFractionHadronic | ( | ) | const [inline] |
returns the jet hadronic energy fraction
Definition at line 267 of file Jet.h.
References caloSpecific(), and reco::CaloJet::Specific::mEnergyFractionHadronic.
{return caloSpecific().mEnergyFractionHadronic;}
const reco::GenJet * Jet::genJet | ( | ) | const |
return the matched generated jet
Definition at line 193 of file Jet.cc.
References genJet_, genJetFwdRef_, genJetRef_, edm::FwdRef< C, T, F >::get(), and edm::RefVector< C, T, F >::size().
Referenced by main(), and SmearedJetProducer_namespace::GenJetMatcherT< pat::Jet >::operator()().
{ if (genJet_.size()) return &(genJet_.front()); else if ( genJetRef_.size() ) return genJetRef_[0].get(); else return genJetFwdRef_.get(); }
edm::FwdRef<reco::GenJetCollection> const& pat::Jet::genJetFwdRef | ( | ) | const [inline] |
const reco::GenParticle* pat::Jet::genParton | ( | ) | const [inline] |
---- methods for MC matching ----
return the matched generated parton
Definition at line 95 of file Jet.h.
References pat::PATObject< reco::Jet >::genParticle().
{ return genParticle(); }
CaloTowerPtr Jet::getCaloConstituent | ( | unsigned | fIndex | ) | const |
convert generic constituent to specific type
============= CaloJet methods ============
get specific constituent of the CaloJet. if the caloTowers were embedded, this reference is transient only and must not be persisted
Definition at line 111 of file Jet.cc.
References caloTowers_, caloTowersFwdPtr_, reco::CompositePtrCandidate::dau, reco::CompositePtrCandidate::daughterPtr(), embeddedCaloTowers_, Exception, edm::Ptr< T >::get(), edm::Ptr< T >::id(), edm::Ptr< T >::key(), and edm::SortedCollection< T, SORT >::size().
Referenced by PatZjetsJetAnalyzer::analyze().
{ if (embeddedCaloTowers_) { // Refactorized PAT access if ( caloTowersFwdPtr_.size() > 0 ) { return (fIndex < caloTowersFwdPtr_.size() ? caloTowersFwdPtr_[fIndex].ptr() : CaloTowerPtr()); } // Compatibility PAT access else { if ( caloTowers_.size() > 0 ) { return (fIndex < caloTowers_.size() ? CaloTowerPtr(&caloTowers_, fIndex) : CaloTowerPtr()); } } } // Non-embedded access else { Constituent dau = daughterPtr (fIndex); const CaloTower* caloTower = dynamic_cast <const CaloTower*> (dau.get()); if (caloTower != 0) { return CaloTowerPtr(dau.id(), caloTower, dau.key() ); } else { throw cms::Exception("Invalid Constituent") << "CaloJet constituent is not of CaloTower type"; } } return CaloTowerPtr (); }
std::vector< CaloTowerPtr > const & Jet::getCaloConstituents | ( | ) | const |
get the constituents of the CaloJet. If the caloTowers were embedded, these reference are transient only and must not be persisted
Definition at line 145 of file Jet.cc.
References cacheCaloTowers(), caloTowers_, caloTowersTemp_, isCaloTowerCached_, and edm::SortedCollection< T, SORT >::size().
Referenced by PatZjetsJetAnalyzer::analyze(), and JetIDSelectionFunctor::operator()().
{ if ( !isCaloTowerCached_ || caloTowers_.size() > 0 ) cacheCaloTowers(); return caloTowersTemp_; }
const std::vector< std::pair< std::string, float > > & Jet::getPairDiscri | ( | ) | const |
get vector of paire labelname-disciValue
============= BTag information methods ============
Definition at line 303 of file Jet.cc.
References pairDiscriVector_.
{ return pairDiscriVector_; }
reco::PFCandidatePtr Jet::getPFConstituent | ( | unsigned | fIndex | ) | const |
convert generic constituent to specific type
============= PFJet methods ============
get specific constituent of the CaloJet. if the caloTowers were embedded, this reference is transient only and must not be persisted
Definition at line 153 of file Jet.cc.
References reco::CompositePtrCandidate::dau, reco::CompositePtrCandidate::daughterPtr(), embeddedPFCandidates_, Exception, edm::Ptr< T >::get(), edm::Ptr< T >::id(), edm::Ptr< T >::key(), pfCandidates_, and pfCandidatesFwdPtr_.
{ if (embeddedPFCandidates_) { // Refactorized PAT access if ( pfCandidatesFwdPtr_.size() > 0 ) { return (fIndex < pfCandidatesFwdPtr_.size() ? pfCandidatesFwdPtr_[fIndex].ptr() : reco::PFCandidatePtr()); } // Compatibility PAT access else { if ( pfCandidates_.size() > 0 ) { return (fIndex < pfCandidates_.size() ? reco::PFCandidatePtr(&pfCandidates_, fIndex) : reco::PFCandidatePtr()); } } } // Non-embedded access else { Constituent dau = daughterPtr (fIndex); const reco::PFCandidate* pfCandidate = dynamic_cast <const reco::PFCandidate*> (dau.get()); if (pfCandidate) { return reco::PFCandidatePtr(dau.id(), pfCandidate, dau.key() ); } else { throw cms::Exception("Invalid Constituent") << "PFJet constituent is not of PFCandidate type"; } } return reco::PFCandidatePtr (); }
std::vector< reco::PFCandidatePtr > const & Jet::getPFConstituents | ( | ) | const |
get the constituents of the CaloJet. If the caloTowers were embedded, these reference are transient only and must not be persisted
Definition at line 185 of file Jet.cc.
References cachePFCandidates(), isPFCandidateCached_, pfCandidates_, and pfCandidatesTemp_.
{ if ( !isPFCandidateCached_ || pfCandidates_.size() > 0 ) cachePFCandidates(); return pfCandidatesTemp_; }
float pat::Jet::hadEnergyInHB | ( | ) | const [inline] |
returns the jet hadronic energy in HB
Definition at line 271 of file Jet.h.
References caloSpecific(), and reco::CaloJet::Specific::mHadEnergyInHB.
{return caloSpecific().mHadEnergyInHB;}
float pat::Jet::hadEnergyInHE | ( | ) | const [inline] |
returns the jet hadronic energy in HE
Definition at line 275 of file Jet.h.
References caloSpecific(), and reco::CaloJet::Specific::mHadEnergyInHE.
{return caloSpecific().mHadEnergyInHE;}
float pat::Jet::hadEnergyInHF | ( | ) | const [inline] |
returns the jet hadronic energy in HF
Definition at line 277 of file Jet.h.
References caloSpecific(), and reco::CaloJet::Specific::mHadEnergyInHF.
{return caloSpecific().mHadEnergyInHF;}
float pat::Jet::hadEnergyInHO | ( | ) | const [inline] |
returns the jet hadronic energy in HO
Definition at line 273 of file Jet.h.
References caloSpecific(), and reco::CaloJet::Specific::mHadEnergyInHO.
{return caloSpecific().mHadEnergyInHO;}
bool pat::Jet::hasTagInfo | ( | const std::string | label | ) | const [inline] |
float pat::Jet::HFEMEnergy | ( | ) | const [inline] |
HFEMEnergy.
Definition at line 367 of file Jet.h.
References reco::PFJet::Specific::mHFEMEnergy, and pfSpecific().
Referenced by HFEMEnergyFraction().
{return pfSpecific().mHFEMEnergy;}
float pat::Jet::HFEMEnergyFraction | ( | ) | const [inline] |
HFEMEnergyFraction (relative to corrected jet energy)
Definition at line 369 of file Jet.h.
References reco::LeafCandidate::energy(), HFEMEnergy(), jecFactor(), and jecSetsAvailable().
{return HFEMEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
int pat::Jet::HFEMMultiplicity | ( | ) | const [inline] |
HFEMMultiplicity.
Definition at line 383 of file Jet.h.
References reco::PFJet::Specific::mHFEMMultiplicity, and pfSpecific().
{return pfSpecific().mHFEMMultiplicity;}
float pat::Jet::HFHadronEnergy | ( | ) | const [inline] |
HFHadronEnergy.
Definition at line 363 of file Jet.h.
References reco::PFJet::Specific::mHFHadronEnergy, and pfSpecific().
Referenced by PFJetIDSelectionFunctor::firstDataCuts(), and HFHadronEnergyFraction().
{return pfSpecific().mHFHadronEnergy;}
float pat::Jet::HFHadronEnergyFraction | ( | ) | const [inline] |
HFHadronEnergyFraction (relative to corrected jet energy)
Definition at line 365 of file Jet.h.
References reco::LeafCandidate::energy(), HFHadronEnergy(), jecFactor(), and jecSetsAvailable().
{return HFHadronEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
int pat::Jet::HFHadronMultiplicity | ( | ) | const [inline] |
HFHadronMultiplicity.
Definition at line 381 of file Jet.h.
References reco::PFJet::Specific::mHFHadronMultiplicity, and pfSpecific().
{return pfSpecific().mHFHadronMultiplicity;}
void Jet::initializeJEC | ( | unsigned int | level, |
const JetCorrFactors::Flavor & | flavor = JetCorrFactors::NONE , |
||
unsigned int | set = 0 |
||
) | [private] |
initialize the jet to a given JEC level during creation starting from Uncorrected
============= Jet Energy Correction methods ============
Definition at line 207 of file Jet.cc.
References currentJECFlavor(), currentJECLevel(), currentJECSet(), jec_, reco::LeafCandidate::p4(), and reco::LeafCandidate::setP4().
Referenced by pat::PATJetProducer::produce().
{ currentJECSet(set); currentJECLevel(level); currentJECFlavor(flavor); setP4(jec_[set].correction(level, flavor)*p4()); }
bool pat::Jet::isBasicJet | ( | ) | const [inline] |
check to see if the jet is no more than a reco::BasicJet
Definition at line 228 of file Jet.h.
References isCaloJet(), isJPTJet(), and isPFJet().
Referenced by PFJetIDSelectionFunctor::firstDataCuts().
bool pat::Jet::isCaloJet | ( | ) | const [inline] |
check to see if the jet is a reco::CaloJet
Definition at line 222 of file Jet.h.
References isJPTJet(), and specificCalo_.
Referenced by hitfit::JetTranslatorBase< AJet >::CheckEta(), daughter(), isBasicJet(), numberOfDaughters(), hitfit::JetTranslatorBase< AJet >::operator()(), CaloJetMETcorrInputProducer_namespace::InputTypeCheckerT< pat::Jet >::operator()(), JetIDSelectionFunctor::operator()(), and pat::PATJetProducer::produce().
{ return !specificCalo_.empty() && !isJPTJet(); }
bool pat::Jet::isJPTJet | ( | ) | const [inline] |
check to see if the jet is a reco::JPTJet
Definition at line 224 of file Jet.h.
References specificJPT_.
Referenced by chargedHadronEnergy(), daughter(), isBasicJet(), isCaloJet(), numberOfDaughters(), JetIDSelectionFunctor::operator()(), and pat::PATJetProducer::produce().
{ return !specificJPT_.empty(); }
bool pat::Jet::isPFJet | ( | ) | const [inline] |
check to see if the jet is a reco::PFJet
Definition at line 226 of file Jet.h.
References specificPF_.
Referenced by chargedHadronEnergy(), hitfit::JetTranslatorBase< AJet >::CheckEta(), daughter(), PFJetIDSelectionFunctor::firstDataCuts(), isBasicJet(), numberOfDaughters(), SmearedJetProducer_namespace::JetResolutionExtractorT< pat::Jet >::operator()(), hitfit::JetTranslatorBase< AJet >::operator()(), PFJetMETcorrInputProducer_namespace::InputTypeCheckerT< pat::Jet, PATJetCorrExtractor >::operator()(), and pat::PATJetProducer::produce().
{ return !specificPF_.empty(); }
float Jet::jecFactor | ( | const std::string & | level, |
const std::string & | flavor = "none" , |
||
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 239 of file Jet.cc.
References relativeConstraints::empty, Exception, and jec_.
Referenced by chargedEmEnergyFraction(), chargedHadronEnergyFraction(), chargedMuEnergyFraction(), TtFullHadKinFitter::KinFit::corJet(), correctedJet(), electronEnergyFraction(), HFEMEnergyFraction(), HFHadronEnergyFraction(), main(), muonEnergyFraction(), neutralEmEnergyFraction(), neutralHadronEnergyFraction(), and photonEnergyFraction().
{ 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), jec_[idx].jecFlavor(flavor), 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"; }
float Jet::jecFactor | ( | const unsigned int & | level, |
const JetCorrFactors::Flavor & | flavor = JetCorrFactors::NONE , |
||
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 257 of file Jet.cc.
References currentJECFlavor_, 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, flavor)/jec_.at(currentJECSet_).correction(currentJECLevel_, currentJECFlavor_); }
int Jet::jecSet | ( | const std::string & | label | ) | const [private] |
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 216 of file Jet.cc.
References jec_, and runtimedef::set().
Referenced by availableJECLevels(), and jecSetAvailable().
bool pat::Jet::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 115 of file Jet.h.
References jecSet().
Referenced by jecFactor().
{return (jecSet(set)>=0); };
bool pat::Jet::jecSetAvailable | ( | const unsigned int & | set | ) | const [inline] |
bool pat::Jet::jecSetsAvailable | ( | ) | const [inline] |
returns true if the jet carries jet energy correction information at all
Definition at line 112 of file Jet.h.
References jec_.
Referenced by chargedEmEnergyFraction(), chargedHadronEnergyFraction(), chargedMuEnergyFraction(), electronEnergyFraction(), HFEMEnergyFraction(), HFHadronEnergyFraction(), jecFactor(), muonEnergyFraction(), neutralEmEnergyFraction(), neutralHadronEnergyFraction(), PFJetMETcorrInputProducer_namespace::RawJetExtractorT< pat::Jet >::operator()(), SmearedJetProducer_namespace::RawJetExtractorT< pat::Jet >::operator()(), CaloJetMETcorrInputProducer_namespace::RawJetExtractorT< pat::Jet >::operator()(), and photonEnergyFraction().
{ return !jec_.empty(); }
float Jet::jetCharge | ( | ) | const |
method to return the JetCharge computed when creating the Jet
Definition at line 386 of file Jet.cc.
References jetCharge_.
Referenced by setJetCharge().
{ return jetCharge_; }
reco::JetID const& pat::Jet::jetID | ( | ) | const [inline] |
const JPTSpecific& pat::Jet::jptSpecific | ( | ) | const [inline] |
retrieve the jpt specific part of the jet
Definition at line 235 of file Jet.h.
References specificJPT_.
Referenced by chargedHadronEnergy(), elecMultiplicity(), elecsInVertexInCalo(), elecsInVertexOutCalo(), elecsOutVertexInCalo(), muonsInVertexInCalo(), muonsInVertexOutCalo(), muonsOutVertexInCalo(), pionsInVertexInCalo(), pionsInVertexOutCalo(), pionsOutVertexInCalo(), and zspCorrection().
{ if (specificJPT_.empty()) throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet.\n"; return specificJPT_[0]; }
float pat::Jet::maxEInEmTowers | ( | ) | const [inline] |
returns the maximum energy deposited in ECAL towers
Definition at line 263 of file Jet.h.
References caloSpecific(), and reco::CaloJet::Specific::mMaxEInEmTowers.
{return caloSpecific().mMaxEInEmTowers;}
float pat::Jet::maxEInHadTowers | ( | ) | const [inline] |
returns the maximum energy deposited in HCAL towers
Definition at line 265 of file Jet.h.
References caloSpecific(), and reco::CaloJet::Specific::mMaxEInHadTowers.
{return caloSpecific().mMaxEInHadTowers;}
float pat::Jet::muonEnergy | ( | ) | const [inline] |
muonEnergy
Definition at line 359 of file Jet.h.
References reco::PFJet::Specific::mMuonEnergy, and pfSpecific().
Referenced by muonEnergyFraction().
{return pfSpecific().mMuonEnergy;}
float pat::Jet::muonEnergyFraction | ( | ) | const [inline] |
muonEnergyFraction (relative to corrected jet energy)
Definition at line 361 of file Jet.h.
References reco::LeafCandidate::energy(), jecFactor(), jecSetsAvailable(), and muonEnergy().
{return muonEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
int pat::Jet::muonMultiplicity | ( | ) | const [inline] |
muonMultiplicity
Definition at line 602 of file Jet.h.
References Exception.
{ if(isPFJet()){ return pfSpecific().mMuonMultiplicity; } else if( isJPTJet() ){ return jptSpecific().muonsInVertexInCalo.size()+jptSpecific().muonsInVertexOutCalo.size();} else{ throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet nor from PFJet.\n"; } }
const reco::TrackRefVector& pat::Jet::muonsInVertexInCalo | ( | ) | const [inline] |
muons fully contained in cone
Definition at line 309 of file Jet.h.
References jptSpecific(), and reco::JPTJet::Specific::muonsInVertexInCalo.
{return jptSpecific().muonsInVertexInCalo; }
const reco::TrackRefVector& pat::Jet::muonsInVertexOutCalo | ( | ) | const [inline] |
muons that curled out
Definition at line 311 of file Jet.h.
References jptSpecific(), and reco::JPTJet::Specific::muonsInVertexOutCalo.
{return jptSpecific().muonsInVertexOutCalo;}
const reco::TrackRefVector& pat::Jet::muonsOutVertexInCalo | ( | ) | const [inline] |
muons that curled in
Definition at line 313 of file Jet.h.
References jptSpecific(), and reco::JPTJet::Specific::muonsOutVertexInCalo.
{return jptSpecific().muonsOutVertexInCalo;}
int pat::Jet::n60 | ( | ) | const [inline] |
returns the number of constituents carrying a 60% of the total Jet energy*/
Definition at line 289 of file Jet.h.
References reco::Jet::nCarrying().
{return nCarrying (0.6);}
int pat::Jet::n90 | ( | ) | const [inline] |
returns the number of constituents carrying a 90% of the total Jet energy*/
Definition at line 287 of file Jet.h.
References reco::Jet::nCarrying().
{return nCarrying (0.9);}
float pat::Jet::neutralEmEnergy | ( | ) | const [inline] |
neutralEmEnergy
Definition at line 595 of file Jet.h.
References Exception.
Referenced by neutralEmEnergyFraction().
{ if(isPFJet()){ return pfSpecific().mNeutralEmEnergy; } else if( isJPTJet() ){ return jptSpecific().mNeutralEmEnergy;} else{ throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet nor from PFJet.\n"; } }
float pat::Jet::neutralEmEnergyFraction | ( | ) | const [inline] |
neutralEmEnergyFraction (relative to uncorrected jet energy)
Definition at line 347 of file Jet.h.
References reco::LeafCandidate::energy(), jecFactor(), jecSetsAvailable(), and neutralEmEnergy().
Referenced by PFJetIDSelectionFunctor::firstDataCuts(), and main().
{return neutralEmEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
float pat::Jet::neutralHadronEnergy | ( | ) | const [inline] |
neutralHadronEnergy
Definition at line 581 of file Jet.h.
References Exception.
Referenced by PFJetIDSelectionFunctor::firstDataCuts(), and neutralHadronEnergyFraction().
{ if(isPFJet()){ return pfSpecific().mNeutralHadronEnergy; } else if( isJPTJet() ){ return jptSpecific().mNeutralHadronEnergy; } else{ throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet nor from PFJet.\n"; } }
float pat::Jet::neutralHadronEnergyFraction | ( | ) | const [inline] |
neutralHadronEnergyFraction (relative to uncorrected jet energy)
Definition at line 343 of file Jet.h.
References reco::LeafCandidate::energy(), jecFactor(), jecSetsAvailable(), and neutralHadronEnergy().
Referenced by main().
{return neutralHadronEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
int pat::Jet::neutralHadronMultiplicity | ( | ) | const [inline] |
neutralHadronMultiplicity
Definition at line 374 of file Jet.h.
References reco::PFJet::Specific::mNeutralHadronMultiplicity, and pfSpecific().
{return pfSpecific().mNeutralHadronMultiplicity;}
int pat::Jet::neutralMultiplicity | ( | ) | const [inline] |
neutralMultiplicity
Definition at line 391 of file Jet.h.
References reco::PFJet::Specific::mNeutralMultiplicity, and pfSpecific().
{return pfSpecific().mNeutralMultiplicity;}
virtual size_t pat::Jet::numberOfDaughters | ( | ) | const [inline, virtual] |
Return number of daughters: If using refactorized PAT, return that. (constituents size > 0) Else check the old version of PAT (embedded constituents size > 0) Else return the reco Jet number of constituents
Reimplemented from reco::CompositePtrCandidate.
Definition at line 430 of file Jet.h.
References caloTowers_, caloTowersFwdPtr_, embeddedCaloTowers_, embeddedPFCandidates_, isCaloJet(), isJPTJet(), isPFJet(), pfCandidates_, pfCandidatesFwdPtr_, and edm::SortedCollection< T, SORT >::size().
Referenced by cacheCaloTowers(), cachePFCandidates(), and PFJetIDSelectionFunctor::firstDataCuts().
{ if (isCaloJet() || isJPTJet()) { if ( embeddedCaloTowers_ ) { if ( caloTowersFwdPtr_.size() > 0 ) return caloTowersFwdPtr_.size(); else if ( caloTowers_.size() > 0 ) return caloTowers_.size(); else return reco::Jet::numberOfDaughters(); } } if (isPFJet()) { if ( embeddedPFCandidates_ ) { if ( pfCandidatesFwdPtr_.size() > 0 ) return pfCandidatesFwdPtr_.size(); else if ( pfCandidates_.size() > 0 ) return pfCandidates_.size(); else return reco::Jet::numberOfDaughters(); } } return reco::Jet::numberOfDaughters(); }
int Jet::partonFlavour | ( | ) | const |
return the flavour of the parton underlying the jet
Definition at line 200 of file Jet.cc.
References partonFlavour_.
Referenced by TtDilepLRSignalSelObservables::operator()().
{ return partonFlavour_; }
reco::PFCandidateFwdPtrVector const& pat::Jet::pfCandidatesFwdPtr | ( | ) | const [inline] |
Definition at line 454 of file Jet.h.
References pfCandidatesFwdPtr_.
{ return pfCandidatesFwdPtr_; }
const PFSpecific& pat::Jet::pfSpecific | ( | ) | const [inline] |
retrieve the pf specific part of the jet
Definition at line 240 of file Jet.h.
References specificPF_.
Referenced by chargedHadronEnergy(), chargedHadronMultiplicity(), chargedMuEnergy(), electronEnergy(), electronMultiplicity(), HFEMEnergy(), HFEMMultiplicity(), HFHadronEnergy(), HFHadronMultiplicity(), muonEnergy(), neutralHadronMultiplicity(), neutralMultiplicity(), SmearedJetProducer_namespace::JetResolutionExtractorT< pat::Jet >::operator()(), photonEnergy(), and photonMultiplicity().
{ if (specificPF_.empty()) throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a PFJet.\n"; return specificPF_[0]; }
float pat::Jet::photonEnergy | ( | ) | const [inline] |
photonEnergy
Definition at line 351 of file Jet.h.
References reco::PFJet::Specific::mPhotonEnergy, and pfSpecific().
Referenced by photonEnergyFraction().
{return pfSpecific().mPhotonEnergy;}
float pat::Jet::photonEnergyFraction | ( | ) | const [inline] |
photonEnergyFraction (relative to corrected jet energy)
Definition at line 353 of file Jet.h.
References reco::LeafCandidate::energy(), jecFactor(), jecSetsAvailable(), and photonEnergy().
{return photonEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
int pat::Jet::photonMultiplicity | ( | ) | const [inline] |
photonMultiplicity
Definition at line 376 of file Jet.h.
References reco::PFJet::Specific::mPhotonMultiplicity, and pfSpecific().
{return pfSpecific().mPhotonMultiplicity;}
const reco::TrackRefVector& pat::Jet::pionsInVertexInCalo | ( | ) | const [inline] |
pions fully contained in cone
Definition at line 303 of file Jet.h.
References jptSpecific(), and reco::JPTJet::Specific::pionsInVertexInCalo.
{return jptSpecific().pionsInVertexInCalo; }
const reco::TrackRefVector& pat::Jet::pionsInVertexOutCalo | ( | ) | const [inline] |
pions that curled out
Definition at line 305 of file Jet.h.
References jptSpecific(), and reco::JPTJet::Specific::pionsInVertexOutCalo.
{return jptSpecific().pionsInVertexOutCalo;}
const reco::TrackRefVector& pat::Jet::pionsOutVertexInCalo | ( | ) | const [inline] |
pions that curled in
Definition at line 307 of file Jet.h.
References jptSpecific(), and reco::JPTJet::Specific::pionsOutVertexInCalo.
{return jptSpecific().pionsOutVertexInCalo;}
void Jet::setAssociatedTracks | ( | const reco::TrackRefVector & | tracks | ) |
method to set the vector of refs to the tracks associated to this jet
Definition at line 396 of file Jet.cc.
References associatedTracks_, and testEve_cfg::tracks.
Referenced by pat::PATJetProducer::produce().
{ associatedTracks_ = tracks; }
void pat::Jet::setCaloSpecific | ( | CaloSpecific | newCaloSpecific | ) | [inline] |
set the calo specific part of the jet
Definition at line 245 of file Jet.h.
References specificCalo_.
{ if (specificCalo_.empty()) throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a CaloJet.\n"; specificCalo_[0] = newCaloSpecific; }
void Jet::setCaloTowers | ( | const CaloTowerFwdPtrCollection & | caloTowers | ) |
method to store the CaloJet constituents internally
Definition at line 401 of file Jet.cc.
References caloTowersFwdPtr_, embeddedCaloTowers_, i, and isCaloTowerCached_.
Referenced by pat::PATJetProducer::produce().
{ for(unsigned int i = 0; i < caloTowers.size(); ++i) { caloTowersFwdPtr_.push_back( caloTowers.at(i) ); } embeddedCaloTowers_ = true; isCaloTowerCached_ = false; }
void Jet::setGenJetRef | ( | const edm::FwdRef< reco::GenJetCollection > & | gj | ) |
method to set the matched generated jet reference, embedding if requested
Definition at line 421 of file Jet.cc.
References genJetFwdRef_.
Referenced by pat::PATJetProducer::produce().
{ genJetFwdRef_ = gj; }
void pat::Jet::setGenParton | ( | const reco::GenParticleRef & | gp, |
bool | embed = false |
||
) | [inline] |
method to set the matched parton
Definition at line 209 of file Jet.h.
References embed, and pat::PATObject< reco::Jet >::setGenParticleRef().
Referenced by pat::PATJetProducer::produce().
{ setGenParticleRef(gp, embed); }
void Jet::setJetCharge | ( | float | jetCharge | ) |
method to set the jet charge
Definition at line 439 of file Jet.cc.
References jetCharge(), and jetCharge_.
Referenced by pat::PATJetProducer::produce().
{ jetCharge_ = jetCharge; }
void pat::Jet::setJetID | ( | reco::JetID const & | id | ) | [inline] |
methods for jet ID
Definition at line 217 of file Jet.h.
References errorMatrix2Lands_multiChannel::id, and jetID_.
Referenced by pat::PATJetProducer::produce().
void pat::Jet::setJPTSpecific | ( | JPTSpecific | newJPTSpecific | ) | [inline] |
set the jpt specific part of the jet
Definition at line 250 of file Jet.h.
References specificJPT_.
{ if (specificJPT_.empty()) throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet.\n"; specificJPT_[0] = newJPTSpecific; }
void Jet::setPartonFlavour | ( | int | partonFl | ) |
method to set the flavour of the parton underlying the jet
Definition at line 429 of file Jet.cc.
References partonFlavour_.
Referenced by pat::PATJetProducer::produce().
{ partonFlavour_ = partonFl; }
void Jet::setPFCandidates | ( | const PFCandidateFwdPtrCollection & | pfCandidates | ) |
method to store the PFCandidate constituents internally
method to store the CaloJet constituents internally
Definition at line 411 of file Jet.cc.
References embeddedPFCandidates_, i, isPFCandidateCached_, and pfCandidatesFwdPtr_.
Referenced by pat::PATJetProducer::produce().
{ for(unsigned int i = 0; i < pfCandidates.size(); ++i) { pfCandidatesFwdPtr_.push_back(pfCandidates.at(i)); } embeddedPFCandidates_ = true; isPFCandidateCached_ = false; }
void pat::Jet::setPFSpecific | ( | PFSpecific | newPFSpecific | ) | [inline] |
set the pf specific part of the jet
Definition at line 255 of file Jet.h.
References specificPF_.
{ if (specificPF_.empty()) throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a PFJet.\n"; specificPF_[0] = newPFSpecific; }
const reco::BaseTagInfo * Jet::tagInfo | ( | const std::string & | label | ) | const |
get a tagInfo with the given name, or NULL if none is found. You should omit the 'TagInfos' part from the label
Definition at line 319 of file Jet.cc.
References spr::find(), label, edm::OwnVector< T, P >::size(), tagInfoLabels_, tagInfos_, and tagInfosFwdPtr_.
Referenced by hasTagInfo(), tagInfoSecondaryVertex(), tagInfoSoftLepton(), and tagInfoTrackIP().
{ std::vector<std::string>::const_iterator it = std::find(tagInfoLabels_.begin(), tagInfoLabels_.end(), label); if (it != tagInfoLabels_.end()) { if ( tagInfosFwdPtr_.size() > 0 ) return tagInfosFwdPtr_[it - tagInfoLabels_.begin()].get(); else if ( tagInfos_.size() > 0 ) return & tagInfos_[it - tagInfoLabels_.begin()]; return 0; } return 0; }
const T * Jet::tagInfoByType | ( | ) | const [private] |
Definition at line 331 of file Jet.cc.
References i, n, edm::OwnVector< T, P >::size(), tagInfos_, and tagInfosFwdPtr_.
{ // First check the factorized PAT version for (size_t i = 0, n = tagInfosFwdPtr_.size(); i < n; ++i) { TagInfoFwdPtrCollection::value_type const & val = tagInfosFwdPtr_[i]; reco::BaseTagInfo const * baseTagInfo = val.get(); if ( typeid(*baseTagInfo) == typeid(T) ) { return static_cast<const T *>( baseTagInfo ); } } // Then check compatibility version for (size_t i = 0, n = tagInfos_.size(); i < n; ++i) { edm::OwnVector<reco::BaseTagInfo>::value_type const & val = tagInfos_[i]; reco::BaseTagInfo const * baseTagInfo = &val; if ( typeid(*baseTagInfo) == typeid(T) ) { return static_cast<const T *>( baseTagInfo ); } } return 0; }
const reco::SecondaryVertexTagInfo * Jet::tagInfoSecondaryVertex | ( | const std::string & | label = "" | ) | const |
TagInfoFwdPtrCollection const& pat::Jet::tagInfosFwdPtr | ( | ) | const [inline] |
const reco::SoftLeptonTagInfo * Jet::tagInfoSoftLepton | ( | const std::string & | label = "" | ) | const |
const reco::TrackIPTagInfo * Jet::tagInfoTrackIP | ( | const std::string & | label = "" | ) | const |
float pat::Jet::towersArea | ( | ) | const [inline] |
returns area of contributing towers
Definition at line 285 of file Jet.h.
References caloSpecific(), and reco::CaloJet::Specific::mTowersArea.
{return caloSpecific().mTowersArea;}
void Jet::tryImportSpecific | ( | const reco::Jet & | source | ) | [private] |
constructor helper that tries to import the specific info from the source jet
Definition at line 81 of file Jet.cc.
References edm::RefToBase< T >::get(), reco::JPTJet::getCaloJetRef(), reco::CaloJet::getSpecific(), reco::JPTJet::getSpecific(), edm::RefToBase< T >::isAvailable(), edm::RefToBase< T >::isNonnull(), LaserTracksInput_cfi::source, specificCalo_, specificJPT_, and specificPF_.
Referenced by Jet().
{ const std::type_info & type = typeid(source); if( type == typeid(reco::CaloJet) ){ specificCalo_.push_back( (static_cast<const reco::CaloJet&>(source)).getSpecific() ); } else if( type == typeid(reco::JPTJet) ){ reco::JPTJet const & jptJet = static_cast<reco::JPTJet const &>(source); specificJPT_.push_back( jptJet.getSpecific() ); reco::CaloJet const * caloJet = 0; if ( jptJet.getCaloJetRef().isNonnull() && jptJet.getCaloJetRef().isAvailable() ) { caloJet = dynamic_cast<reco::CaloJet const *>( jptJet.getCaloJetRef().get() ); } if ( caloJet != 0 ) { specificCalo_.push_back( caloJet->getSpecific() ); } else { edm::LogWarning("OptionalProductNotFound") << " in pat::Jet, Attempted to add Calo Specifics to JPT Jets, but failed." << " Jet ID for JPT Jets will not be available for you." << std::endl; } } else if( type == typeid(reco::PFJet) ){ specificPF_.push_back( (static_cast<const reco::PFJet&>(source)).getSpecific() ); } }
void pat::Jet::updateFwdCaloTowerFwdPtr | ( | unsigned int | index, |
edm::Ptr< CaloTower > | updateFwd | ||
) | [inline] |
Update bare FwdPtr and FwdRef "forward" pointers while keeping the "back" pointers the same (i.e. the ref "forwarding")
Definition at line 460 of file Jet.h.
References caloTowersFwdPtr_, and Exception.
{ if ( index < caloTowersFwdPtr_.size() ) { caloTowersFwdPtr_[index] = CaloTowerFwdPtrVector::value_type( updateFwd, caloTowersFwdPtr_[index].backPtr() ); } else { throw cms::Exception("OutOfRange") << "Index " << index << " is out of range" << std::endl; } }
void pat::Jet::updateFwdGenJetFwdRef | ( | edm::Ref< reco::GenJetCollection > | updateRef | ) | [inline] |
Definition at line 485 of file Jet.h.
References edm::FwdRef< C, T, F >::backRef(), and genJetFwdRef_.
{ genJetFwdRef_ = edm::FwdRef<reco::GenJetCollection>( updateRef, genJetFwdRef_.backRef() ); }
void pat::Jet::updateFwdPFCandidateFwdPtr | ( | unsigned int | index, |
edm::Ptr< reco::PFCandidate > | updateFwd | ||
) | [inline] |
Definition at line 468 of file Jet.h.
References Exception, and pfCandidatesFwdPtr_.
{ if ( index < pfCandidatesFwdPtr_.size() ) { pfCandidatesFwdPtr_[index] = reco::PFCandidateFwdPtrVector::value_type( updateFwd, pfCandidatesFwdPtr_[index].backPtr() ); } else { throw cms::Exception("OutOfRange") << "Index " << index << " is out of range" << std::endl; } }
void pat::Jet::updateFwdTagInfoFwdPtr | ( | unsigned int | index, |
edm::Ptr< reco::BaseTagInfo > | updateFwd | ||
) | [inline] |
Definition at line 477 of file Jet.h.
References Exception, and tagInfosFwdPtr_.
{ if ( index < tagInfosFwdPtr_.size() ) { tagInfosFwdPtr_[index] = TagInfoFwdPtrCollection::value_type( updateFwd, tagInfosFwdPtr_[index].backPtr() ); } else { throw cms::Exception("OutOfRange") << "Index " << index << " is out of range" << std::endl; } }
const float& pat::Jet::zspCorrection | ( | ) | const [inline] |
zero suppression correction
Definition at line 321 of file Jet.h.
References jptSpecific(), and reco::JPTJet::Specific::mZSPCor.
{return jptSpecific().mZSPCor;}
friend class PATJetProducer [friend] |
make friends with PATJetProducer so that it can set the an initial jet energy scale unequal to raw calling the private initializeJEC function, which should be non accessible to any other user
std::ostream& reco::operator<< | ( | std::ostream & | out, |
const Jet & | obj | ||
) | [friend] |
pipe operator (introduced to use pat::Jet with PFTopProjectors)
reco::TrackRefVector pat::Jet::associatedTracks_ [protected] |
Definition at line 541 of file Jet.h.
Referenced by associatedTracks(), and setAssociatedTracks().
CaloTowerCollection pat::Jet::caloTowers_ [protected] |
Definition at line 498 of file Jet.h.
Referenced by cacheCaloTowers(), daughter(), getCaloConstituent(), getCaloConstituents(), and numberOfDaughters().
CaloTowerFwdPtrVector pat::Jet::caloTowersFwdPtr_ [protected] |
Definition at line 499 of file Jet.h.
Referenced by cacheCaloTowers(), caloTowersFwdPtr(), daughter(), getCaloConstituent(), numberOfDaughters(), setCaloTowers(), and updateFwdCaloTowerFwdPtr().
std::vector<CaloTowerPtr> pat::Jet::caloTowersTemp_ [mutable, protected] |
Definition at line 497 of file Jet.h.
Referenced by cacheCaloTowers(), and getCaloConstituents().
JetCorrFactors::Flavor pat::Jet::currentJECFlavor_ [protected] |
Definition at line 528 of file Jet.h.
Referenced by currentJECFlavor(), and jecFactor().
unsigned int pat::Jet::currentJECLevel_ [protected] |
Definition at line 525 of file Jet.h.
Referenced by currentJECLevel(), and jecFactor().
unsigned int pat::Jet::currentJECSet_ [protected] |
Definition at line 523 of file Jet.h.
Referenced by currentJECLevel(), currentJECSet(), and jecFactor().
bool pat::Jet::embeddedCaloTowers_ [protected] |
Definition at line 496 of file Jet.h.
Referenced by cacheCaloTowers(), daughter(), getCaloConstituent(), numberOfDaughters(), and setCaloTowers().
bool pat::Jet::embeddedPFCandidates_ [protected] |
Definition at line 502 of file Jet.h.
Referenced by cachePFCandidates(), daughter(), getPFConstituent(), numberOfDaughters(), and setPFCandidates().
std::vector<reco::GenJet> pat::Jet::genJet_ [protected] |
edm::FwdRef<reco::GenJetCollection> pat::Jet::genJetFwdRef_ [protected] |
Definition at line 512 of file Jet.h.
Referenced by genJet(), genJetFwdRef(), setGenJetRef(), and updateFwdGenJetFwdRef().
reco::GenJetRefVector pat::Jet::genJetRef_ [protected] |
bool pat::Jet::isCaloTowerCached_ [mutable, private] |
cache calo towers
Definition at line 566 of file Jet.h.
Referenced by cacheCaloTowers(), getCaloConstituents(), and setCaloTowers().
bool pat::Jet::isPFCandidateCached_ [mutable, private] |
Definition at line 568 of file Jet.h.
Referenced by cachePFCandidates(), getPFConstituents(), and setPFCandidates().
std::vector<pat::JetCorrFactors> pat::Jet::jec_ [protected] |
Definition at line 520 of file Jet.h.
Referenced by addJECFactors(), availableJECLevels(), availableJECSets(), correctedJet(), currentJECLevel(), currentJECSet(), initializeJEC(), jecFactor(), jecSet(), jecSetAvailable(), and jecSetsAvailable().
float pat::Jet::jetCharge_ [protected] |
Definition at line 540 of file Jet.h.
Referenced by jetCharge(), and setJetCharge().
reco::JetID pat::Jet::jetID_ [protected] |
Definition at line 550 of file Jet.h.
Referenced by jetID(), and setJetID().
std::vector<std::pair<std::string, float> > pat::Jet::pairDiscriVector_ [protected] |
Definition at line 532 of file Jet.h.
Referenced by addBDiscriminatorPair(), bDiscriminator(), and getPairDiscri().
int pat::Jet::partonFlavour_ [protected] |
Definition at line 513 of file Jet.h.
Referenced by partonFlavour(), and setPartonFlavour().
reco::PFCandidateCollection pat::Jet::pfCandidates_ [protected] |
Definition at line 504 of file Jet.h.
Referenced by cachePFCandidates(), daughter(), getPFConstituent(), getPFConstituents(), and numberOfDaughters().
Definition at line 505 of file Jet.h.
Referenced by cachePFCandidates(), daughter(), getPFConstituent(), numberOfDaughters(), pfCandidatesFwdPtr(), setPFCandidates(), and updateFwdPFCandidateFwdPtr().
std::vector<reco::PFCandidatePtr> pat::Jet::pfCandidatesTemp_ [mutable, protected] |
Definition at line 503 of file Jet.h.
Referenced by cachePFCandidates(), and getPFConstituents().
std::vector<CaloSpecific> pat::Jet::specificCalo_ [protected] |
Definition at line 545 of file Jet.h.
Referenced by caloSpecific(), isCaloJet(), setCaloSpecific(), and tryImportSpecific().
std::vector<JPTSpecific> pat::Jet::specificJPT_ [protected] |
Definition at line 546 of file Jet.h.
Referenced by isJPTJet(), jptSpecific(), setJPTSpecific(), and tryImportSpecific().
std::vector<PFSpecific> pat::Jet::specificPF_ [protected] |
Definition at line 547 of file Jet.h.
Referenced by isPFJet(), pfSpecific(), setPFSpecific(), and tryImportSpecific().
std::vector<std::string> pat::Jet::tagInfoLabels_ [protected] |
Definition at line 533 of file Jet.h.
Referenced by addTagInfo(), and tagInfo().
edm::OwnVector<reco::BaseTagInfo> pat::Jet::tagInfos_ [protected] |
Definition at line 534 of file Jet.h.
Referenced by tagInfo(), and tagInfoByType().
TagInfoFwdPtrCollection pat::Jet::tagInfosFwdPtr_ [protected] |
Definition at line 535 of file Jet.h.
Referenced by addTagInfo(), tagInfo(), tagInfoByType(), tagInfosFwdPtr(), and updateFwdTagInfoFwdPtr().