CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes | Private Member Functions | Friends
pat::Jet Class Reference

Analysis-level calorimeter jet class. More...

#include "DataFormats/PatCandidates/interface/Jet.h"

Inheritance diagram for pat::Jet:
pat::PATObject< reco::Jet > reco::Jet reco::CompositePtrCandidate reco::LeafCandidate reco::Candidate

Public Member Functions

void addBDiscriminatorPair (const std::pair< std::string, float > &thePair)
 method to add a algolabel-discriminator pair More...
 
void addTagInfo (const std::string &label, const TagInfoFwdPtrCollection::value_type &info)
 
const reco::TrackRefVectorassociatedTracks () const
 method to return a vector of refs to the tracks associated to this jet More...
 
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 -— More...
 
float bDiscriminator (const std::string &theLabel) const
 -— methods for accessing b-tagging info -— More...
 
const CaloSpecificcaloSpecific () const
 retrieve the calo specific part of the jet More...
 
CaloTowerFwdPtrVector const & caloTowersFwdPtr () const
 Access to bare FwdPtr collections. More...
 
float chargedEmEnergy () const
 chargedEmEnergy More...
 
float chargedEmEnergyFraction () const
 chargedEmEnergyFraction (relative to uncorrected jet energy) More...
 
float chargedHadronEnergy () const
 chargedHadronEnergy More...
 
float chargedHadronEnergyFraction () const
 chargedHadronEnergyFraction (relative to uncorrected jet energy) More...
 
int chargedHadronMultiplicity () const
 chargedHadronMultiplicity More...
 
float chargedMuEnergy () const
 chargedMuEnergy More...
 
float chargedMuEnergyFraction () const
 chargedMuEnergyFraction More...
 
int chargedMultiplicity () const
 chargedMultiplicity More...
 
virtual Jetclone () const
 required reimplementation of the Candidate's clone method More...
 
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 LorentzVectorcorrectedP4 (const std::string &level, const std::string &flavor="none", const std::string &set="") const
 
const LorentzVectorcorrectedP4 (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 More...
 
std::string currentJECLevel () const
 return the name of the current step of jet energy corrections More...
 
std::string currentJECSet () const
 returns the label of the current set of jet energy corrections More...
 
virtual const reco::Candidatedaughter (size_t i) const
 
float elecMultiplicity () const
 chargedMultiplicity More...
 
const reco::TrackRefVectorelecsInVertexInCalo () const
 electrons fully contained in cone More...
 
const reco::TrackRefVectorelecsInVertexOutCalo () const
 electrons that curled out More...
 
const reco::TrackRefVectorelecsOutVertexInCalo () const
 electrons that curled in More...
 
float electronEnergy () const
 electronEnergy More...
 
float electronEnergyFraction () const
 electronEnergyFraction (relative to corrected jet energy) More...
 
int electronMultiplicity () const
 electronMultiplicity More...
 
float emEnergyFraction () const
 returns the jet electromagnetic energy fraction More...
 
float emEnergyInEB () const
 returns the jet electromagnetic energy in EB More...
 
float emEnergyInEE () const
 returns the jet electromagnetic energy in EE More...
 
float emEnergyInHF () const
 returns the jet electromagnetic energy extracted from HF More...
 
float energyFractionHadronic () const
 returns the jet hadronic energy fraction More...
 
const reco::GenJetgenJet () const
 return the matched generated jet More...
 
edm::FwdRef
< reco::GenJetCollection >
const & 
genJetFwdRef () const
 
const reco::GenParticlegenParton () const
 -— methods for MC matching -— More...
 
CaloTowerPtr getCaloConstituent (unsigned fIndex) const
 convert generic constituent to specific type More...
 
std::vector< CaloTowerPtr > const & getCaloConstituents () const
 
const std::vector< std::pair
< std::string, float > > & 
getPairDiscri () const
 get vector of paire labelname-disciValue More...
 
reco::PFCandidatePtr getPFConstituent (unsigned fIndex) const
 convert generic constituent to specific type More...
 
std::vector
< reco::PFCandidatePtr > const & 
getPFConstituents () const
 
float hadEnergyInHB () const
 returns the jet hadronic energy in HB More...
 
float hadEnergyInHE () const
 returns the jet hadronic energy in HE More...
 
float hadEnergyInHF () const
 returns the jet hadronic energy in HF More...
 
float hadEnergyInHO () const
 returns the jet hadronic energy in HO More...
 
bool hasTagInfo (const std::string label) const
 check to see if the given tag info is nonzero More...
 
float HFEMEnergy () const
 HFEMEnergy. More...
 
float HFEMEnergyFraction () const
 HFEMEnergyFraction (relative to corrected jet energy) More...
 
int HFEMMultiplicity () const
 HFEMMultiplicity. More...
 
float HFHadronEnergy () const
 HFHadronEnergy. More...
 
float HFHadronEnergyFraction () const
 HFHadronEnergyFraction (relative to corrected jet energy) More...
 
int HFHadronMultiplicity () const
 HFHadronMultiplicity. More...
 
bool isBasicJet () const
 check to see if the jet is no more than a reco::BasicJet More...
 
bool isCaloJet () const
 check to see if the jet is a reco::CaloJet More...
 
bool isJPTJet () const
 check to see if the jet is a reco::JPTJet More...
 
bool isPFJet () const
 check to see if the jet is a reco::PFJet More...
 
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 ()
 default constructor More...
 
 Jet (const reco::Jet &aJet)
 constructor from a reco::Jet More...
 
 Jet (const edm::RefToBase< reco::Jet > &aJetRef)
 constructor from ref to reco::Jet More...
 
 Jet (const edm::Ptr< reco::Jet > &aJetRef)
 constructor from ref to reco::Jet More...
 
float jetCharge () const
 method to return the JetCharge computed when creating the Jet More...
 
reco::JetID const & jetID () const
 accessing Jet ID information More...
 
const JPTSpecificjptSpecific () const
 retrieve the jpt specific part of the jet More...
 
float maxEInEmTowers () const
 returns the maximum energy deposited in ECAL towers More...
 
float maxEInHadTowers () const
 returns the maximum energy deposited in HCAL towers More...
 
float muonEnergy () const
 muonEnergy More...
 
float muonEnergyFraction () const
 muonEnergyFraction (relative to corrected jet energy) More...
 
int muonMultiplicity () const
 muonMultiplicity More...
 
const reco::TrackRefVectormuonsInVertexInCalo () const
 muons fully contained in cone More...
 
const reco::TrackRefVectormuonsInVertexOutCalo () const
 muons that curled out More...
 
const reco::TrackRefVectormuonsOutVertexInCalo () const
 muons that curled in More...
 
int n60 () const
 returns the number of constituents carrying a 60% of the total Jet energy*/ More...
 
int n90 () const
 returns the number of constituents carrying a 90% of the total Jet energy*/ More...
 
float neutralEmEnergy () const
 neutralEmEnergy More...
 
float neutralEmEnergyFraction () const
 neutralEmEnergyFraction (relative to uncorrected jet energy) More...
 
float neutralHadronEnergy () const
 neutralHadronEnergy More...
 
float neutralHadronEnergyFraction () const
 neutralHadronEnergyFraction (relative to uncorrected jet energy) More...
 
int neutralHadronMultiplicity () const
 neutralHadronMultiplicity More...
 
int neutralMultiplicity () const
 neutralMultiplicity More...
 
virtual size_t numberOfDaughters () const
 
int partonFlavour () const
 return the flavour of the parton underlying the jet More...
 
reco::PFCandidateFwdPtrVector
const & 
pfCandidatesFwdPtr () const
 
const PFSpecificpfSpecific () const
 retrieve the pf specific part of the jet More...
 
float photonEnergy () const
 photonEnergy More...
 
float photonEnergyFraction () const
 photonEnergyFraction (relative to corrected jet energy) More...
 
int photonMultiplicity () const
 photonMultiplicity More...
 
const reco::TrackRefVectorpionsInVertexInCalo () const
 pions fully contained in cone More...
 
const reco::TrackRefVectorpionsInVertexOutCalo () const
 pions that curled out More...
 
const reco::TrackRefVectorpionsOutVertexInCalo () const
 pions that curled in More...
 
void setAssociatedTracks (const reco::TrackRefVector &tracks)
 method to set the vector of refs to the tracks associated to this jet More...
 
void setCaloSpecific (const CaloSpecific &newCaloSpecific)
 set the calo specific part of the jet More...
 
void setCaloTowers (const CaloTowerFwdPtrCollection &caloTowers)
 method to store the CaloJet constituents internally More...
 
void setGenJetRef (const edm::FwdRef< reco::GenJetCollection > &gj)
 method to set the matched generated jet reference, embedding if requested More...
 
void setGenParton (const reco::GenParticleRef &gp, bool embed=false)
 method to set the matched parton More...
 
void setJetCharge (float jetCharge)
 method to set the jet charge More...
 
void setJetID (reco::JetID const &id)
 methods for jet ID More...
 
void setJPTSpecific (const JPTSpecific &newJPTSpecific)
 set the jpt specific part of the jet More...
 
void setPartonFlavour (int partonFl)
 method to set the flavour of the parton underlying the jet More...
 
void setPFCandidates (const PFCandidateFwdPtrCollection &pfCandidates)
 method to store the PFCandidate constituents internally More...
 
void setPFSpecific (const PFSpecific &newPFSpecific)
 set the pf specific part of the jet More...
 
const reco::BaseTagInfotagInfo (const std::string &label) const
 
const
reco::SecondaryVertexTagInfo
tagInfoSecondaryVertex (const std::string &label="") const
 
TagInfoFwdPtrCollection const & tagInfosFwdPtr () const
 
const reco::SoftLeptonTagInfotagInfoSoftLepton (const std::string &label="") const
 
const reco::TrackIPTagInfotagInfoTrackIP (const std::string &label="") const
 
float towersArea () const
 returns area of contributing towers More...
 
void updateFwdCaloTowerFwdPtr (unsigned int index, const edm::Ptr< CaloTower > &updateFwd)
 
void updateFwdGenJetFwdRef (edm::Ref< reco::GenJetCollection > updateRef)
 
void updateFwdPFCandidateFwdPtr (unsigned int index, const edm::Ptr< reco::PFCandidate > &updateFwd)
 
void updateFwdTagInfoFwdPtr (unsigned int index, const edm::Ptr< reco::BaseTagInfo > &updateFwd)
 
const float & zspCorrection () const
 zero suppression correction More...
 
virtual ~Jet ()
 destructor More...
 
- Public Member Functions inherited from pat::PATObject< reco::Jet >
void addGenParticleRef (const reco::GenParticleRef &ref)
 
void addTriggerObjectMatch (const TriggerObjectStandAlone &trigObj)
 add a trigger match More...
 
void addUserCand (const std::string &label, const reco::CandidatePtr &data)
 Set user-defined int. More...
 
void addUserData (const std::string &label, const T &data, bool transientOnly=false)
 
void addUserDataFromPtr (const std::string &label, const edm::Ptr< pat::UserData > &data)
 
void addUserFloat (const std::string &label, float data)
 Set user-defined float. More...
 
void addUserInt (const std::string &label, int32_t data)
 Set user-defined int. More...
 
std::vector< std::pair
< std::string,
pat::LookupTableRecord > > 
efficiencies () const
 Returns the efficiencies as <name,value> pairs (by value) More...
 
const pat::LookupTableRecordefficiency (const std::string &name) const
 Returns an efficiency given its name. More...
 
const std::vector< std::string > & efficiencyNames () const
 Returns the list of the names of the stored efficiencies. More...
 
const std::vector
< pat::LookupTableRecord > & 
efficiencyValues () const
 Returns the list of the values of the stored efficiencies (the ordering is the same as in efficiencyNames()) More...
 
void embedGenParticle ()
 
const reco::GenParticlegenParticle (size_t idx=0) const
 
reco::GenParticleRef genParticleById (int pdgId, int status, uint8_t autoCharge=0) const
 
reco::GenParticleRef genParticleRef (size_t idx=0) const
 
std::vector< reco::GenParticleRefgenParticleRefs () const
 
size_t genParticlesSize () const
 Number of generator level particles stored as ref or embedded. More...
 
const pat::CandKinResolutiongetKinResolution (const std::string &label="") const
 
bool hasKinResolution (const std::string &label="") const
 Check if the kinematic resolutions are stored into this object (possibly specifying a label for them) More...
 
bool hasOverlaps (const std::string &label) const
 Returns true if there was at least one overlap for this test label. More...
 
bool hasUserCand (const std::string &key) const
 Return true if there is a user-defined int with a given name. More...
 
bool hasUserData (const std::string &key) const
 Check if user data with a specific type is present. More...
 
bool hasUserFloat (const std::string &key) const
 Return true if there is a user-defined float with a given name. More...
 
bool hasUserFloat (const char *key) const
 a CINT-friendly interface More...
 
bool hasUserInt (const std::string &key) const
 Return true if there is a user-defined int with a given name. More...
 
const reco::CandidateoriginalObject () const
 access to the original object; returns zero for null Ref and throws for unavailable collection More...
 
const edm::Ptr< reco::Candidate > & originalObjectRef () const
 reference to original object. Returns a null reference if not available More...
 
const std::vector< std::string > & overlapLabels () const
 Returns the labels of the overlap tests that found at least one overlap. More...
 
const reco::CandidatePtrVectoroverlaps (const std::string &label) const
 
 PATObject ()
 default constructor More...
 
 PATObject (const reco::Jet &obj)
 constructor from a base object (leaves invalid reference to original object!) More...
 
 PATObject (const edm::RefToBase< reco::Jet > &ref)
 constructor from reference More...
 
 PATObject (const edm::Ptr< reco::Jet > &ref)
 constructor from reference More...
 
double resolE (const std::string &label="") const
 Resolution on energy, possibly with a label to specify which resolution to use. More...
 
double resolEt (const std::string &label="") const
 Resolution on et, possibly with a label to specify which resolution to use. More...
 
double resolEta (const std::string &label="") const
 Resolution on eta, possibly with a label to specify which resolution to use. More...
 
double resolM (const std::string &label="") const
 
double resolP (const std::string &label="") const
 Resolution on p, possibly with a label to specify which resolution to use. More...
 
double resolPhi (const std::string &label="") const
 Resolution on phi, possibly with a label to specify which resolution to use. More...
 
double resolPInv (const std::string &label="") const
 Resolution on 1/p, possibly with a label to specify which resolution to use. More...
 
double resolPt (const std::string &label="") const
 Resolution on pt, possibly with a label to specify which resolution to use. More...
 
double resolPx (const std::string &label="") const
 Resolution on px, possibly with a label to specify which resolution to use. More...
 
double resolPy (const std::string &label="") const
 Resolution on py, possibly with a label to specify which resolution to use. More...
 
double resolPz (const std::string &label="") const
 Resolution on pz, possibly with a label to specify which resolution to use. More...
 
double resolTheta (const std::string &label="") const
 Resolution on theta, possibly with a label to specify which resolution to use. More...
 
void setEfficiency (const std::string &name, const pat::LookupTableRecord &value)
 
void setGenParticle (const reco::GenParticle &particle)
 Set the generator level particle from a particle not in the Event (embedding it, of course) More...
 
void setGenParticleRef (const reco::GenParticleRef &ref, bool embed=false)
 Set the generator level particle reference. More...
 
void setKinResolution (const pat::CandKinResolution &resol, const std::string &label="")
 Add a kinematic resolution to this object (possibly with a label) More...
 
void setOverlaps (const std::string &label, const reco::CandidatePtrVector &overlaps)
 
const TriggerObjectStandAlonetriggerObjectMatch (const size_t idx=0) const
 get one matched trigger object by index More...
 
const TriggerObjectStandAlonetriggerObjectMatchByAlgorithm (const std::string &nameAlgorithm, const bool algoCondAccepted=true, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByAlgorithm (const char *nameAlgorithm, const bool algoCondAccepted=true, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByAlgorithm (const std::string &nameAlgorithm, const unsigned algoCondAccepted, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByAlgorithm (const char *nameAlgorithm, const unsigned algoCondAccepted, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByCollection (const std::string &coll, const size_t idx=0) const
 get one matched trigger object from a certain collection by index More...
 
const TriggerObjectStandAlonetriggerObjectMatchByCollection (const char *coll, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByCondition (const std::string &nameCondition, const size_t idx=0) const
 get one matched L1 object used in a succeeding object combination of a certain L1 condition by index More...
 
const TriggerObjectStandAlonetriggerObjectMatchByCondition (const char *nameCondition, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByFilter (const std::string &labelFilter, const size_t idx=0) const
 get one matched HLT object used in a certain HLT filter by index More...
 
const TriggerObjectStandAlonetriggerObjectMatchByFilter (const char *labelFilter, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByFilterID (const unsigned triggerObjectType, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByPath (const std::string &namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByPath (const char *namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByPath (const std::string &namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByPath (const char *namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByType (const trigger::TriggerObjectType triggerObjectType, const size_t idx=0) const
 get one matched trigger object of a certain type by index More...
 
const TriggerObjectStandAlonetriggerObjectMatchByType (const unsigned triggerObjectType, const size_t idx=0) const
 
const
TriggerObjectStandAloneCollection
triggerObjectMatches () const
 get all matched trigger objects More...
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByAlgorithm (const std::string &nameAlgorithm, const bool algoCondAccepted=true) const
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByAlgorithm (const char *nameAlgorithm, const bool algoCondAccepted=true) const
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByAlgorithm (const std::string &nameAlgorithm, const unsigned algoCondAccepted) const
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByAlgorithm (const char *nameAlgorithm, const unsigned algoCondAccepted) const
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByCollection (const std::string &coll) const
 get all matched trigger objects from a certain collection More...
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByCollection (const char *coll) const
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByCondition (const std::string &nameCondition) const
 get all matched L1 objects used in a succeeding object combination of a certain L1 condition More...
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByCondition (const char *nameCondition) const
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByFilter (const std::string &labelFilter) const
 get all matched HLT objects used in a certain HLT filter More...
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByFilter (const char *labelFilter) const
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByFilterID (const unsigned triggerObjectType) const
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByPath (const std::string &namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true) const
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByPath (const char *namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true) const
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByPath (const std::string &namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1) const
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByPath (const char *namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1) const
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByType (const trigger::TriggerObjectType triggerObjectType) const
 
const
TriggerObjectStandAloneCollection 
triggerObjectMatchesByType (const unsigned triggerObjectType) const
 
reco::CandidatePtr userCand (const std::string &key) const
 
const std::vector< std::string > & userCandNames () const
 Get list of user-defined cand names. More...
 
const TuserData (const std::string &key) const
 Returns user-defined data. Returns NULL if the data is not present, or not of type T. More...
 
const void * userDataBare (const std::string &key) const
 
const std::vector< std::string > & userDataNames () const
 Get list of user data object names. More...
 
const std::string & userDataObjectType (const std::string &key) const
 Get human-readable type of user data object, for debugging. More...
 
float userFloat (const std::string &key) const
 
float userFloat (const char *key) const
 a CINT-friendly interface More...
 
const std::vector< std::string > & userFloatNames () const
 Get list of user-defined float names. More...
 
int32_t userInt (const std::string &key) const
 
const std::vector< std::string > & userIntNames () const
 Get list of user-defined int names. More...
 
virtual ~PATObject ()
 destructor More...
 
- Public Member Functions inherited from reco::Jet
float constituentEtaPhiSpread () const
 
float constituentPtDistribution () const
 
float etaetaMoment () const
 eta-eta second moment, ET weighted More...
 
float etaphiMoment () const
 eta-phi second moment, ET weighted More...
 
EtaPhiMoments etaPhiStatistics () const
 eta-phi statistics, ET weighted More...
 
float etInAnnulus (float fRmin, float fRmax) const
 ET in annulus between rmin and rmax around jet direction. More...
 
virtual Constituents getJetConstituents () const
 list of constituents More...
 
virtual std::vector< const
reco::Candidate * > 
getJetConstituentsQuick () const
 quick list of constituents More...
 
bool isJet () const
 
 Jet ()
 Default constructor. More...
 
 Jet (const LorentzVector &fP4, const Point &fVertex)
 Initiator. More...
 
 Jet (const LorentzVector &fP4, const Point &fVertex, const Constituents &fConstituents)
 
virtual float jetArea () const
 get jet area More...
 
float maxDistance () const
 maximum distance from jet to constituent More...
 
int nCarrying (float fFraction) const
 return # of constituent carrying fraction of energy More...
 
virtual int nConstituents () const
 

of constituents

More...
 
virtual int nPasses () const
 number of passes taken by algorithm More...
 
float phiphiMoment () const
 phi-phi second moment, ET weighted More...
 
virtual float pileup () const
 pileup energy contribution as calculated by algorithm More...
 
virtual std::string print () const
 Print object. More...
 
virtual void scaleEnergy (double fScale)
 scale energy of the jet More...
 
virtual void setJetArea (float fArea)
 set jet area More...
 
virtual void setNPasses (int fPasses)
 Set number of passes taken by algorithm. More...
 
virtual void setPileup (float fEnergy)
 Set pileup energy contribution as calculated by algorithm. More...
 
- Public Member Functions inherited from reco::CompositePtrCandidate
void addDaughter (const CandidatePtr &)
 add a daughter via a reference More...
 
virtual const_iterator begin () const
 first daughter const_iterator More...
 
virtual iterator begin ()
 first daughter iterator More...
 
void clearDaughters ()
 clear daughter references More...
 
 CompositePtrCandidate ()
 default constructor More...
 
 CompositePtrCandidate (Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values More...
 
 CompositePtrCandidate (Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values More...
 
 CompositePtrCandidate (const Candidate &p)
 constructor from a Candidate More...
 
virtual Candidatedaughter (size_type)
 return daughter at a given position, i = 0, ... numberOfDaughters() - 1 More...
 
CandidatePtr daughterPtr (size_type i) const
 reference to daughter at given position More...
 
const daughtersdaughterPtrVector () const
 references to daughtes More...
 
virtual const_iterator end () const
 last daughter const_iterator More...
 
virtual iterator end ()
 last daughter iterator More...
 
virtual const Candidatemother (size_t i=0) const
 return pointer to mother More...
 
virtual size_t numberOfMothers () const
 number of mothers More...
 
virtual size_type numberOfSourceCandidatePtrs () const
 
virtual CandidatePtr sourceCandidatePtr (size_type i) const
 
virtual ~CompositePtrCandidate ()
 destructor More...
 
- Public Member Functions inherited from reco::LeafCandidate
template<typename S >
daughter_iterator< S >::type beginFilter (const S &s) const
 
virtual Vector boostToCM () const GCC11_FINAL
 
virtual int charge () const GCC11_FINAL
 electric charge More...
 
virtual Candidatedaughter (const std::string &s)
 return daughter with a specified role name More...
 
virtual const Candidatedaughter (const std::string &s) const
 return daughter with a specified role name More...
 
template<typename S >
daughter_iterator< S >::type endFilter (const S &s) const
 
virtual double energy () const GCC11_FINAL
 energy More...
 
virtual double et () const GCC11_FINAL
 transverse energy More...
 
virtual float eta () const GCC11_FINAL
 momentum pseudorapidity More...
 
virtual void fillVertexCovariance (CovarianceMatrix &v) const
 fill SMatrix More...
 
template<typename T >
T get () const
 get a component More...
 
template<typename T , typename Tag >
T get () const
 get a component More...
 
template<typename T >
T get (size_type i) const
 get a component More...
 
template<typename T , typename Tag >
T get (size_type i) const
 get a component More...
 
virtual bool hasMasterClone () const
 
virtual bool hasMasterClonePtr () const
 
virtual bool isCaloMuon () const
 
virtual bool isConvertedPhoton () const
 
virtual bool isElectron () const
 
virtual bool isGlobalMuon () const
 
virtual bool isMuon () const
 
virtual bool isPhoton () const
 
virtual bool isStandAloneMuon () const
 
virtual bool isTrackerMuon () const
 
 LeafCandidate ()
 default constructor More...
 
 LeafCandidate (const Candidate &c)
 
template<typename P4 >
 LeafCandidate (Charge q, const P4 &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from Any values More...
 
 LeafCandidate (Charge q, const PtEtaPhiMass &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values More...
 
 LeafCandidate (Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values More...
 
 LeafCandidate (Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values More...
 
virtual bool longLived () const GCC11_FINAL
 is long lived? More...
 
virtual float mass () const GCC11_FINAL
 mass More...
 
virtual bool massConstraint () const GCC11_FINAL
 do mass constraint? More...
 
virtual float massSqr () const GCC11_FINAL
 mass squared More...
 
virtual const CandidateBaseRefmasterClone () const
 
virtual const CandidatePtrmasterClonePtr () const
 
template<typename Ref >
Ref masterRef () const
 cast master clone reference to a concrete type More...
 
virtual Vector momentum () const GCC11_FINAL
 spatial momentum vector More...
 
virtual double mt () const GCC11_FINAL
 transverse mass More...
 
virtual double mtSqr () const GCC11_FINAL
 transverse mass squared More...
 
template<typename T >
size_type numberOf () const
 number of components More...
 
template<typename T , typename Tag >
size_type numberOf () const
 number of components More...
 
virtual double p () const GCC11_FINAL
 magnitude of momentum vector More...
 
virtual const LorentzVectorp4 () const GCC11_FINAL
 four-momentum Lorentz vector More...
 
virtual int pdgId () const GCC11_FINAL
 PDG identifier. More...
 
virtual float phi () const GCC11_FINAL
 momentum azimuthal angle More...
 
virtual const PolarLorentzVectorpolarP4 () const GCC11_FINAL
 four-momentum Lorentz vector More...
 
virtual float pt () const GCC11_FINAL
 transverse momentum More...
 
virtual double px () const GCC11_FINAL
 x coordinate of momentum vector More...
 
virtual double py () const GCC11_FINAL
 y coordinate of momentum vector More...
 
virtual double pz () const GCC11_FINAL
 z coordinate of momentum vector More...
 
virtual double rapidity () const GCC11_FINAL
 rapidity More...
 
virtual void setCharge (Charge q) GCC11_FINAL
 set electric charge More...
 
virtual void setLongLived () GCC11_FINAL
 set long lived flag More...
 
virtual void setMass (double m) GCC11_FINAL
 set particle mass More...
 
virtual void setMassConstraint () GCC11_FINAL
 set mass constraint flag More...
 
virtual void setP4 (const LorentzVector &p4) GCC11_FINAL
 set 4-momentum More...
 
virtual void setP4 (const PolarLorentzVector &p4) GCC11_FINAL
 set 4-momentum More...
 
virtual void setPdgId (int pdgId) GCC11_FINAL
 
virtual void setPz (double pz) GCC11_FINAL
 
virtual void setStatus (int status) GCC11_FINAL
 set status word More...
 
virtual void setThreeCharge (Charge qx3) GCC11_FINAL
 set electric charge More...
 
virtual void setVertex (const Point &vertex)
 set vertex More...
 
virtual int status () const GCC11_FINAL
 status word More...
 
virtual double theta () const GCC11_FINAL
 momentum polar angle More...
 
virtual int threeCharge () const GCC11_FINAL
 electric charge More...
 
virtual const Pointvertex () const
 vertex position (overwritten by PF...) More...
 
virtual double vertexChi2 () const
 chi-squares More...
 
virtual double vertexCovariance (int i, int j) const
 (i, j)-th element of error matrix, i, j = 0, ... 2 More...
 
CovarianceMatrix vertexCovariance () const GCC11_FINAL
 return SMatrix More...
 
virtual double vertexNdof () const
 
virtual double vertexNormalizedChi2 () const
 chi-squared divided by n.d.o.f. More...
 
virtual double vx () const
 x coordinate of vertex position More...
 
virtual double vy () const
 y coordinate of vertex position More...
 
virtual double vz () const
 z coordinate of vertex position More...
 
virtual double y () const GCC11_FINAL
 rapidity More...
 
virtual ~LeafCandidate ()
 destructor More...
 
- Public Member Functions inherited from reco::Candidate
template<typename S >
daughter_iterator< S >::type beginFilter (const S &s) const
 
 Candidate ()
 default constructor More...
 
template<typename S >
daughter_iterator< S >::type endFilter (const S &s) const
 
template<typename T >
T get () const
 get a component More...
 
template<typename T , typename Tag >
T get () const
 get a component More...
 
template<typename T >
T get (size_type i) const
 get a component More...
 
template<typename T , typename Tag >
T get (size_type i) const
 get a component More...
 
template<typename Ref >
Ref masterRef () const
 cast master clone reference to a concrete type More...
 
template<typename T >
size_type numberOf () const
 number of components More...
 
template<typename T , typename Tag >
size_type numberOf () const
 number of components More...
 
virtual void setSourceCandidatePtr (const CandidatePtr &ptr)
 Set the ptr to the source Candidate. More...
 
virtual ~Candidate ()
 destructor More...
 

Protected Attributes

reco::TrackRefVector associatedTracks_
 
CaloTowerCollection caloTowers_
 
CaloTowerFwdPtrVector caloTowersFwdPtr_
 
edm::AtomicPtrCache
< std::vector< CaloTowerPtr > > 
caloTowersTemp_
 
JetCorrFactors::Flavor currentJECFlavor_
 
unsigned int currentJECLevel_
 
unsigned int currentJECSet_
 
bool embeddedCaloTowers_
 
bool embeddedPFCandidates_
 
std::vector< reco::GenJetgenJet_
 
edm::FwdRef
< reco::GenJetCollection
genJetFwdRef_
 
reco::GenJetRefVector genJetRef_
 
std::vector< pat::JetCorrFactorsjec_
 
float jetCharge_
 
reco::JetID jetID_
 
std::vector< std::pair
< std::string, float > > 
pairDiscriVector_
 
int partonFlavour_
 
reco::PFCandidateCollection pfCandidates_
 
reco::PFCandidateFwdPtrVector pfCandidatesFwdPtr_
 
edm::AtomicPtrCache
< std::vector
< reco::PFCandidatePtr > > 
pfCandidatesTemp_
 
std::vector< CaloSpecificspecificCalo_
 
std::vector< JPTSpecificspecificJPT_
 
std::vector< PFSpecificspecificPF_
 
std::vector< std::string > tagInfoLabels_
 
edm::OwnVector< reco::BaseTagInfotagInfos_
 
TagInfoFwdPtrCollection tagInfosFwdPtr_
 
- Protected Attributes inherited from pat::PATObject< reco::Jet >
std::vector< std::string > efficiencyNames_
 vector of the efficiencies (names) More...
 
std::vector
< pat::LookupTableRecord
efficiencyValues_
 vector of the efficiencies (values) More...
 
std::vector< reco::GenParticlegenParticleEmbedded_
 vector to hold an embedded generator level particle More...
 
std::vector< reco::GenParticleRefgenParticleRef_
 Reference to a generator level particle. More...
 
std::vector< std::string > kinResolutionLabels_
 
std::vector
< pat::CandKinResolution
kinResolutions_
 Kinematic resolutions. More...
 
std::vector
< reco::CandidatePtrVector
overlapItems_
 Overlapping items (sorted by distance) More...
 
std::vector< std::string > overlapLabels_
 Overlapping test labels (only if there are any overlaps) More...
 
edm::Ptr< reco::CandidaterefToOrig_
 
TriggerObjectStandAloneCollection triggerObjectMatchesEmbedded_
 vector of trigger matches More...
 
std::vector< std::string > userCandLabels_
 
std::vector< reco::CandidatePtruserCands_
 
std::vector< std::string > userDataLabels_
 User data object. More...
 
pat::UserDataCollection userDataObjects_
 
std::vector< std::string > userFloatLabels_
 
std::vector< float > userFloats_
 
std::vector< std::string > userIntLabels_
 
std::vector< int32_t > userInts_
 
- Protected Attributes inherited from reco::LeafCandidate
bool cacheCartesianFixed_
 
bool cachePolarFixed_
 has cache been set? More...
 
float eta_
 
float mass_
 
LorentzVector p4Cartesian_
 internal cache for p4 More...
 
PolarLorentzVector p4Polar_
 internal cache for p4 More...
 
int pdgId_
 PDG identifier. More...
 
float phi_
 
float pt_
 four-momentum Lorentz vector More...
 
Charge qx3_
 electric charge More...
 
int status_
 status word More...
 
Point vertex_
 vertex position More...
 

Private Member Functions

void addJECFactors (const JetCorrFactors &jec)
 add more sets of energy correction factors More...
 
void cacheCaloTowers () const
 cache calo towers More...
 
void cachePFCandidates () const
 method to cache the constituents to allow "user-friendly" access More...
 
const JetCorrFactorscorrFactors_ (const std::string &set) const
 return the jet correction factors of a different set, for systematic studies More...
 
const JetCorrFactorscorrFactors_ () const
 return the correction factor for this jet. Throws if they're not available. More...
 
void currentJECFlavor (const JetCorrFactors::Flavor &flavor)
 update the current JEC flavor; used by correctedJet More...
 
void currentJECLevel (const unsigned int &level)
 update the current JEC level; used by correctedJet More...
 
void currentJECSet (const unsigned int &set)
 update the current JEC set; used by correctedJet More...
 
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 More...
 
int jecSet (const std::string &label) const
 return true if this jet carries the jet correction factors of a different set, for systematic studies More...
 
template<typename T >
const TtagInfoByType () const
 
void tryImportSpecific (const reco::Jet &source)
 constructor helper that tries to import the specific info from the source jet More...
 

Friends

class PATJetProducer
 
std::ostream & reco::operator<< (std::ostream &out, const Jet &obj)
 pipe operator (introduced to use pat::Jet with PFTopProjectors) More...
 

Additional Inherited Members

- Public Types inherited from pat::PATObject< reco::Jet >
typedef reco::Jet base_type
 
- Public Types inherited from reco::Jet
typedef edm::Ptr< CandidateConstituent
 
typedef std::vector< ConstituentConstituents
 
- Public Types inherited from reco::CompositePtrCandidate
typedef std::vector< CandidatePtrdaughters
 collection of references to daughters More...
 
typedef std::vector< CandidatePtrmothers
 collection of references to daughters More...
 
- Public Types inherited from reco::LeafCandidate
typedef int Charge
 electric charge type More...
 
typedef CandidateCollection daughters
 collection of daughter candidates More...
 
typedef unsigned int index
 
typedef math::XYZTLorentzVector LorentzVector
 Lorentz vector. More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef
math::PtEtaPhiMLorentzVector 
PolarLorentzVector
 Lorentz vector. More...
 
typedef math::XYZVector Vector
 point in the space More...
 
- Public Types inherited from reco::Candidate
enum  { dimension = 3 }
 
enum  { size = dimension * (dimension + 1)/2 }
 matix size More...
 
typedef int Charge
 electric charge type More...
 
typedef candidate::const_iterator const_iterator
 
typedef math::Error< dimension >
::type 
CovarianceMatrix
 covariance error matrix (3x3) More...
 
typedef unsigned int index
 index type More...
 
typedef candidate::iterator iterator
 
typedef math::XYZTLorentzVector LorentzVector
 Lorentz vector. More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef
math::PtEtaPhiMLorentzVector 
PolarLorentzVector
 Lorentz vector. More...
 
typedef size_t size_type
 
typedef math::XYZVector Vector
 point in the space More...
 
- Static Public Member Functions inherited from reco::Jet
static float detectorEta (float fZVertex, float fPhysicsEta)
 static function to convert physics eta to detector eta More...
 
static Candidate::LorentzVector detectorP4 (const Candidate::Point &vertex, const Candidate &inParticle)
 
static float physicsEta (float fZVertex, float fDetectorEta)
 static function to convert detector eta to physics eta More...
 
static Candidate::LorentzVector physicsP4 (const Candidate::Point &newVertex, const Candidate &inParticle, const Candidate::Point &oldVertex=Candidate::Point(0, 0, 0))
 
- Static Public Attributes inherited from reco::LeafCandidate
static const unsigned int longLivedTag = 65536
 long lived flag More...
 
static const unsigned int massConstraintTag = 131072
 do mass constraint flag More...
 
- Protected Member Functions inherited from reco::LeafCandidate
void cacheCartesian () const
 set internal cache More...
 
void cachePolar () const
 set internal cache More...
 
void clearCache () const
 clear internal cache More...
 

Detailed Description

Analysis-level calorimeter jet class.

Jet implements the analysis-level calorimeter jet class within the 'pat' namespace

Author
Steven Lowette, Giovanni Petrucciani, Roger Wolf, Christian Autermann

Definition at line 70 of file Jet.h.

Constructor & Destructor Documentation

Jet::Jet ( )

default constructor

Definition at line 12 of file Jet.cc.

Referenced by clone().

12  :
14  embeddedCaloTowers_(false),
15  embeddedPFCandidates_(false),
16  partonFlavour_(0),
17  jetCharge_(0.)
18 {
19 }
int partonFlavour_
Definition: Jet.h:512
Base class for all types of Jets.
Definition: Jet.h:20
bool embeddedCaloTowers_
Definition: Jet.h:495
float jetCharge_
Definition: Jet.h:539
bool embeddedPFCandidates_
Definition: Jet.h:501
Jet::Jet ( const reco::Jet aJet)

constructor from a reco::Jet

Definition at line 22 of file Jet.cc.

References tryImportSpecific().

22  :
24  embeddedCaloTowers_(false),
25  embeddedPFCandidates_(false),
26  partonFlavour_(0),
27  jetCharge_(0.0)
28 {
29  tryImportSpecific(aJet);
30 }
int partonFlavour_
Definition: Jet.h:512
void tryImportSpecific(const reco::Jet &source)
constructor helper that tries to import the specific info from the source jet
Definition: Jet.cc:72
bool embeddedCaloTowers_
Definition: Jet.h:495
float jetCharge_
Definition: Jet.h:539
bool embeddedPFCandidates_
Definition: Jet.h:501
Jet::Jet ( const edm::RefToBase< reco::Jet > &  aJetRef)

constructor from ref to reco::Jet

Definition at line 44 of file Jet.cc.

References tryImportSpecific().

44  :
45  PATObject<reco::Jet>(aJetRef),
46  embeddedCaloTowers_(false),
47  embeddedPFCandidates_(false),
48  partonFlavour_(0),
49  jetCharge_(0.0)
50 {
51  tryImportSpecific(*aJetRef);
52 }
int partonFlavour_
Definition: Jet.h:512
void tryImportSpecific(const reco::Jet &source)
constructor helper that tries to import the specific info from the source jet
Definition: Jet.cc:72
bool embeddedCaloTowers_
Definition: Jet.h:495
float jetCharge_
Definition: Jet.h:539
bool embeddedPFCandidates_
Definition: Jet.h:501
Jet::Jet ( const edm::Ptr< reco::Jet > &  aJetRef)

constructor from ref to reco::Jet

Definition at line 33 of file Jet.cc.

References tryImportSpecific().

33  :
34  PATObject<reco::Jet>(aJetRef),
35  embeddedCaloTowers_(false),
36  embeddedPFCandidates_(false),
37  partonFlavour_(0),
38  jetCharge_(0.0)
39 {
40  tryImportSpecific(*aJetRef);
41 }
int partonFlavour_
Definition: Jet.h:512
void tryImportSpecific(const reco::Jet &source)
constructor helper that tries to import the specific info from the source jet
Definition: Jet.cc:72
bool embeddedCaloTowers_
Definition: Jet.h:495
float jetCharge_
Definition: Jet.h:539
bool embeddedPFCandidates_
Definition: Jet.h:501
Jet::~Jet ( )
virtual

destructor

Reimplemented from reco::Jet.

Definition at line 97 of file Jet.cc.

97  {
98 }

Member Function Documentation

void Jet::addBDiscriminatorPair ( const std::pair< std::string, float > &  thePair)

method to add a algolabel-discriminator pair

Definition at line 427 of file Jet.cc.

References pairDiscriVector_.

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

427  {
428  pairDiscriVector_.push_back(thePair);
429 }
std::vector< std::pair< std::string, float > > pairDiscriVector_
Definition: Jet.h:531
void pat::Jet::addJECFactors ( const JetCorrFactors jec)
inlineprivate

add more sets of energy correction factors

Definition at line 154 of file Jet.h.

References jec_.

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

154 {jec_.push_back(jec); };
std::vector< pat::JetCorrFactors > jec_
Definition: Jet.h:519
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 363 of file Jet.cc.

References customizeTrackingMonitorSeedNumber::idx, tagInfoLabels_, and tagInfosFwdPtr_.

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

364  {
365  std::string::size_type idx = label.find("TagInfos");
366  if (idx == std::string::npos) {
367  tagInfoLabels_.push_back(label);
368  } else {
369  tagInfoLabels_.push_back(label.substr(0,idx));
370  }
371  tagInfosFwdPtr_.push_back(info);
372 }
static const TGPicture * info(bool iBackgroundIsBlack)
TagInfoFwdPtrCollection tagInfosFwdPtr_
Definition: Jet.h:534
uint16_t size_type
std::vector< std::string > tagInfoLabels_
Definition: Jet.h:532
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
const reco::TrackRefVector & Jet::associatedTracks ( ) const

method to return a vector of refs to the tracks associated to this jet

Definition at line 382 of file Jet.cc.

References associatedTracks_.

Referenced by main().

382  {
383  return associatedTracks_;
384 }
reco::TrackRefVector associatedTracks_
Definition: Jet.h:540
const std::vector< std::string > Jet::availableJECLevels ( const int &  set = 0) const

Definition at line 223 of file Jet.cc.

References jec_.

Referenced by PATJetCorrExtractor::operator()().

224 {
225  return set>=0 ? jec_.at(set).correctionLabels() : std::vector<std::string>();
226 }
std::vector< pat::JetCorrFactors > jec_
Definition: Jet.h:519
const std::vector<std::string> pat::Jet::availableJECLevels ( const std::string &  set) const
inline

Definition at line 108 of file Jet.h.

References availableJECLevels(), and jecSet().

Referenced by availableJECLevels().

108 { return availableJECLevels(jecSet(set)); };
const std::vector< std::string > availableJECLevels(const int &set=0) const
Definition: Jet.cc:223
int jecSet(const std::string &label) const
return true if this jet carries the jet correction factors of a different set, for systematic studies...
Definition: Jet.cc:207
const std::vector< std::string > Jet::availableJECSets ( ) const

-— methods for jet corrections -—

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

returns the labels of all available sets of jet energy corrections

Definition at line 215 of file Jet.cc.

References jec_.

216 {
217  std::vector<std::string> sets;
218  for(std::vector<pat::JetCorrFactors>::const_iterator corrFactor=jec_.begin(); corrFactor!=jec_.end(); ++corrFactor)
219  sets.push_back(corrFactor->jecSet());
220  return sets;
221 }
std::vector< pat::JetCorrFactors > jec_
Definition: Jet.h:519
float Jet::bDiscriminator ( const std::string &  theLabel) const

-— methods for accessing b-tagging info -—

get b discriminant from label name

Definition at line 299 of file Jet.cc.

References first, i, pairDiscriVector_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by AnalysisTasksAnalyzerBTag::analyze(), TtSemiLepJetComb::bTag(), bJetSelector::IsbTag(), TtHadLRJetCombObservables::operator()(), TtHadLRSignalSelObservables::CompareBdisc::operator()(), TtSemiLRJetCombObservables::operator()(), and TtSemiLRSignalSelObservables::CompareBdisc::operator()().

299  {
300  float discriminator = -1000.;
301  const std::string & theLabel = ((aLabel == "" || aLabel == "default")) ? "trackCountingHighEffBJetTags" : aLabel;
302  for(unsigned int i=0; i!=pairDiscriVector_.size(); i++){
303  if(pairDiscriVector_[i].first == theLabel){
304  discriminator = pairDiscriVector_[i].second;
305  }
306  }
307  return discriminator;
308 }
int i
Definition: DBlmapReader.cc:9
std::vector< std::pair< std::string, float > > pairDiscriVector_
Definition: Jet.h:531
bool first
Definition: L1TdeRCT.cc:79
void Jet::cacheCaloTowers ( ) const
private

cache calo towers

method to cache the constituents to allow "user-friendly" access

Definition at line 439 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(), edm::hlt::Exception, edm::Ptr< T >::get(), edm::Ptr< T >::id(), edm::Ptr< T >::key(), numberOfDaughters(), and edm::SortedCollection< T, SORT >::size().

Referenced by getCaloConstituents().

439  {
440  // Clear the cache
441  // Here is where we've embedded constituents
442  std::unique_ptr<std::vector<CaloTowerPtr>> caloTowersTemp{ new std::vector<CaloTowerPtr>{}};
443  if ( embeddedCaloTowers_ ) {
444  // Refactorized PAT access
445  if ( caloTowersFwdPtr_.size() > 0 ) {
446  caloTowersTemp->reserve(caloTowersFwdPtr_.size());
447  for ( CaloTowerFwdPtrVector::const_iterator ibegin=caloTowersFwdPtr_.begin(),
448  iend = caloTowersFwdPtr_.end(),
449  icalo = ibegin;
450  icalo != iend; ++icalo ) {
451  caloTowersTemp->emplace_back( icalo->ptr() );
452  }
453  }
454  // Compatibility access
455  else if ( caloTowers_.size() > 0 ) {
456  caloTowersTemp->reserve(caloTowers_.size());
458  iend = caloTowers_.end(),
459  icalo = ibegin;
460  icalo != iend; ++icalo ) {
461  caloTowersTemp->emplace_back( &caloTowers_, icalo - ibegin );
462  }
463  }
464  }
465  // Non-embedded access
466  else {
467  const auto nDaughters = numberOfDaughters();
468  caloTowersTemp->reserve(nDaughters);
469  for ( unsigned fIndex = 0; fIndex < nDaughters; ++fIndex ) {
470  Constituent const & dau = daughterPtr (fIndex);
471  const CaloTower* caloTower = dynamic_cast <const CaloTower*> (dau.get());
472  if (caloTower) {
473  caloTowersTemp->emplace_back( dau.id(), caloTower,dau.key() );
474  }
475  else {
476  throw cms::Exception("Invalid Constituent") << "CaloJet constituent is not of CaloTower type";
477  }
478  }
479  }
480  caloTowersTemp_.set(std::move(caloTowersTemp));
481 }
CaloTowerFwdPtrVector caloTowersFwdPtr_
Definition: Jet.h:498
CandidatePtr daughterPtr(size_type i) const
reference to daughter at given position
std::vector< CaloTower >::const_iterator const_iterator
edm::AtomicPtrCache< std::vector< CaloTowerPtr > > caloTowersTemp_
Definition: Jet.h:496
daughters dau
collection of references to daughters
bool embeddedCaloTowers_
Definition: Jet.h:495
const_iterator end() const
edm::Ptr< Candidate > Constituent
Definition: Jet.h:22
virtual size_t numberOfDaughters() const
Definition: Jet.h:429
CaloTowerCollection caloTowers_
Definition: Jet.h:497
size_type size() const
const_iterator begin() const
void Jet::cachePFCandidates ( ) const
private

method to cache the constituents to allow "user-friendly" access

Definition at line 484 of file Jet.cc.

References reco::CompositePtrCandidate::dau, reco::CompositePtrCandidate::daughterPtr(), embeddedPFCandidates_, edm::hlt::Exception, edm::Ptr< T >::get(), edm::Ptr< T >::id(), edm::Ptr< T >::key(), numberOfDaughters(), pfCandidates_, pfCandidatesFwdPtr_, pfCandidatesTemp_, and edm::AtomicPtrCache< T >::set().

Referenced by getPFConstituents().

484  {
485 
486  std::unique_ptr<std::vector<reco::PFCandidatePtr>> pfCandidatesTemp{ new std::vector<reco::PFCandidatePtr>{}};
487  // Here is where we've embedded constituents
488  if ( embeddedPFCandidates_ ) {
489  // Refactorized PAT access
490  if ( pfCandidatesFwdPtr_.size() > 0 ) {
491  pfCandidatesTemp->reserve(pfCandidatesFwdPtr_.size());
492  for ( PFCandidateFwdPtrCollection::const_iterator ibegin=pfCandidatesFwdPtr_.begin(),
493  iend = pfCandidatesFwdPtr_.end(),
494  ipf = ibegin;
495  ipf != iend; ++ipf ) {
496  pfCandidatesTemp->emplace_back( ipf->ptr() );
497  }
498  }
499  // Compatibility access
500  else if ( pfCandidates_.size() > 0 ) {
501  pfCandidatesTemp->reserve(pfCandidates_.size());
502  for ( reco::PFCandidateCollection::const_iterator ibegin=pfCandidates_.begin(),
503  iend = pfCandidates_.end(),
504  ipf = ibegin;
505  ipf != iend; ++ipf ) {
506  pfCandidatesTemp->emplace_back( &pfCandidates_, ipf - ibegin );
507  }
508  }
509  }
510  // Non-embedded access
511  else {
512  const auto nDaughters = numberOfDaughters();
513  pfCandidatesTemp->reserve(nDaughters);
514  for ( unsigned fIndex = 0; fIndex < nDaughters; ++fIndex ) {
515  Constituent const & dau = daughterPtr (fIndex);
516  const reco::PFCandidate* pfCandidate = dynamic_cast <const reco::PFCandidate*> (dau.get());
517  if (pfCandidate) {
518  pfCandidatesTemp->emplace_back( dau.id(), pfCandidate,dau.key() );
519  }
520  else {
521  throw cms::Exception("Invalid Constituent") << "PFJet constituent is not of PFCandidate type";
522  }
523  }
524  }
525  // Set the cache
526  pfCandidatesTemp_.set(std::move(pfCandidatesTemp));
527 }
reco::PFCandidateCollection pfCandidates_
Definition: Jet.h:503
CandidatePtr daughterPtr(size_type i) const
reference to daughter at given position
daughters dau
collection of references to daughters
edm::Ptr< Candidate > Constituent
Definition: Jet.h:22
virtual size_t numberOfDaughters() const
Definition: Jet.h:429
bool set(std::unique_ptr< T > iNewValue) const
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:38
reco::PFCandidateFwdPtrVector pfCandidatesFwdPtr_
Definition: Jet.h:504
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > pfCandidatesTemp_
Definition: Jet.h:502
bool embeddedPFCandidates_
Definition: Jet.h:501
const CaloSpecific& pat::Jet::caloSpecific ( ) const
inline

retrieve the calo specific part of the jet

Definition at line 229 of file Jet.h.

References specificCalo_.

Referenced by emEnergyFraction(), emEnergyInEB(), emEnergyInEE(), emEnergyInHF(), energyFractionHadronic(), hadEnergyInHB(), hadEnergyInHE(), hadEnergyInHF(), hadEnergyInHO(), maxEInEmTowers(), maxEInHadTowers(), and towersArea().

229  {
230  if (specificCalo_.empty()) throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a CaloJet.\n";
231  return specificCalo_[0];
232  }
std::vector< CaloSpecific > specificCalo_
Definition: Jet.h:544
CaloTowerFwdPtrVector const& pat::Jet::caloTowersFwdPtr ( ) const
inline

Access to bare FwdPtr collections.

Definition at line 452 of file Jet.h.

References caloTowersFwdPtr_.

452 { return caloTowersFwdPtr_;}
CaloTowerFwdPtrVector caloTowersFwdPtr_
Definition: Jet.h:498
float pat::Jet::chargedEmEnergy ( ) const
inline

chargedEmEnergy

Definition at line 585 of file Jet.h.

References edm::hlt::Exception.

Referenced by chargedEmEnergyFraction().

586 {
587  if(isPFJet()){ return pfSpecific().mChargedEmEnergy; }
588  else if( isJPTJet() ){ return jptSpecific().mChargedEmEnergy;}
589  else{ throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet nor from PFJet.\n"; }
590 }
const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
float mChargedEmEnergy
Definition: JPTJet.h:64
const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
float mChargedEmEnergy
Definition: PFJet.h:70
bool isPFJet() const
check to see if the jet is a reco::PFJet
Definition: Jet.h:225
bool isJPTJet() const
check to see if the jet is a reco::JPTJet
Definition: Jet.h:223
float pat::Jet::chargedEmEnergyFraction ( ) const
inline

chargedEmEnergyFraction (relative to uncorrected jet energy)

Definition at line 344 of file Jet.h.

References chargedEmEnergy(), reco::LeafCandidate::energy(), jecFactor(), and jecSetsAvailable().

Referenced by PFJetIDSelectionFunctor::firstDataCuts(), and main().

344 {return chargedEmEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
virtual double energy() const GCC11_FINAL
energy
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:230
bool jecSetsAvailable() const
Definition: Jet.h:111
float chargedEmEnergy() const
chargedEmEnergy
Definition: Jet.h:585
float pat::Jet::chargedHadronEnergy ( ) const
inline

chargedHadronEnergy

Definition at line 571 of file Jet.h.

References edm::hlt::Exception, isJPTJet(), isPFJet(), jptSpecific(), reco::PFJet::Specific::mChargedHadronEnergy, reco::JPTJet::Specific::mChargedHadronEnergy, and pfSpecific().

Referenced by chargedHadronEnergyFraction().

572 {
573  if(isPFJet()){ return pfSpecific().mChargedHadronEnergy; }
574  else if( isJPTJet() ){ return jptSpecific().mChargedHadronEnergy; }
575  else{ throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet nor from PFJet.\n"; }
576 }
const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
float mChargedHadronEnergy
Definition: JPTJet.h:62
float mChargedHadronEnergy
Definition: PFJet.h:52
bool isPFJet() const
check to see if the jet is a reco::PFJet
Definition: Jet.h:225
bool isJPTJet() const
check to see if the jet is a reco::JPTJet
Definition: Jet.h:223
float pat::Jet::chargedHadronEnergyFraction ( ) const
inline

chargedHadronEnergyFraction (relative to uncorrected jet energy)

Definition at line 340 of file Jet.h.

References chargedHadronEnergy(), reco::LeafCandidate::energy(), jecFactor(), and jecSetsAvailable().

Referenced by PFJetIDSelectionFunctor::firstDataCuts(), and main().

340 {return chargedHadronEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
virtual double energy() const GCC11_FINAL
energy
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:230
bool jecSetsAvailable() const
Definition: Jet.h:111
float chargedHadronEnergy() const
chargedHadronEnergy
Definition: Jet.h:571
int pat::Jet::chargedHadronMultiplicity ( ) const
inline

chargedHadronMultiplicity

Definition at line 371 of file Jet.h.

References reco::PFJet::Specific::mChargedHadronMultiplicity, and pfSpecific().

const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
int mChargedHadronMultiplicity
Definition: PFJet.h:60
float pat::Jet::chargedMuEnergy ( ) const
inline

chargedMuEnergy

Definition at line 385 of file Jet.h.

References reco::PFJet::Specific::mChargedMuEnergy, and pfSpecific().

Referenced by chargedMuEnergyFraction().

385 {return pfSpecific().mChargedMuEnergy;}
const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
float mChargedMuEnergy
Definition: PFJet.h:71
float pat::Jet::chargedMuEnergyFraction ( ) const
inline

chargedMuEnergyFraction

Definition at line 387 of file Jet.h.

References chargedMuEnergy(), reco::LeafCandidate::energy(), jecFactor(), and jecSetsAvailable().

387 {return chargedMuEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
virtual double energy() const GCC11_FINAL
energy
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:230
bool jecSetsAvailable() const
Definition: Jet.h:111
float chargedMuEnergy() const
chargedMuEnergy
Definition: Jet.h:385
int pat::Jet::chargedMultiplicity ( ) const
inline

chargedMultiplicity

Definition at line 606 of file Jet.h.

References edm::hlt::Exception.

Referenced by PFJetIDSelectionFunctor::firstDataCuts().

607 {
608  if(isPFJet()){ return pfSpecific().mChargedMultiplicity; }
612  else{ throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet nor from PFJet.\n"; }
613 }
reco::TrackRefVector muonsInVertexOutCalo
Definition: JPTJet.h:57
const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
reco::TrackRefVector muonsInVertexInCalo
Definition: JPTJet.h:56
int mChargedMultiplicity
Definition: PFJet.h:73
const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
reco::TrackRefVector pionsInVertexOutCalo
Definition: JPTJet.h:54
reco::TrackRefVector elecsInVertexInCalo
Definition: JPTJet.h:59
bool isPFJet() const
check to see if the jet is a reco::PFJet
Definition: Jet.h:225
bool isJPTJet() const
check to see if the jet is a reco::JPTJet
Definition: Jet.h:223
reco::TrackRefVector pionsInVertexInCalo
Definition: JPTJet.h:53
reco::TrackRefVector elecsInVertexOutCalo
Definition: JPTJet.h:60
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
virtual Jet* pat::Jet::clone ( void  ) const
inlinevirtual

required reimplementation of the Candidate's clone method

Reimplemented from reco::CompositePtrCandidate.

Definition at line 89 of file Jet.h.

References Jet().

89 { return new Jet(*this); }
Jet()
default constructor
Definition: Jet.cc:12
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 262 of file Jet.cc.

References edm::hlt::Exception, customizeTrackingMonitorSeedNumber::idx, 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(), hitfit::JetTranslatorBase< AJet >::operator()(), and PFJetIDSelectionFunctor::operator()().

263 {
264  // rescale p4 of the jet; the update of current values is
265  // done within the called jecFactor function
266  for(unsigned int idx=0; idx<jec_.size(); ++idx){
267  if(set.empty() || jec_.at(idx).jecSet()==set){
268  if(jec_[idx].jecLevel(level)>=0){
269  return correctedJet(jec_[idx].jecLevel(level), jec_[idx].jecFlavor(flavor), idx);
270  }
271  else{
272  throw cms::Exception("InvalidRequest") << "This JEC level " << level << " does not exist. \n";
273  }
274  }
275  }
276  throw cms::Exception("InvalidRequest") << "This JEC set " << set << " does not exist. \n";
277 }
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:262
std::vector< pat::JetCorrFactors > jec_
Definition: Jet.h:519
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
tuple level
Definition: testEve_cfg.py:34
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 281 of file Jet.cc.

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

282 {
283  Jet correctedJet(*this);
284  //rescale p4 of the jet
285  correctedJet.setP4(jecFactor(level, flavor, set)*p4());
286  // update current level, flavor and set
288  return correctedJet;
289 }
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:230
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:262
JetCorrFactors::Flavor currentJECFlavor() const
return flavour of the current step of jet energy corrections
Definition: Jet.h:123
std::string currentJECLevel() const
return the name of the current step of jet energy corrections
Definition: Jet.h:121
Analysis-level calorimeter jet class.
Definition: Jet.h:70
virtual void setP4(const LorentzVector &p4) GCC11_FINAL
set 4-momentum
tuple level
Definition: testEve_cfg.py:34
std::string currentJECSet() const
returns the label of the current set of jet energy corrections
Definition: Jet.h:119
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 138 of file Jet.h.

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

Referenced by PFJetMETcorrInputProducer_namespace::RawJetExtractorT< pat::Jet >::operator()(), CaloJetMETcorrInputProducer_namespace::RawJetExtractorT< pat::Jet >::operator()(), PATJetCorrExtractor::operator()(), SmearedJetProducer_namespace::RawJetExtractorT< pat::Jet >::operator()(), and JetIDSelectionFunctor::operator()().

138 { return correctedJet(level, flavor, set).p4(); };
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:262
tuple level
Definition: testEve_cfg.py:34
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 141 of file Jet.h.

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

141 { return correctedJet(level, flavor, set).p4(); };
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:262
tuple level
Definition: testEve_cfg.py:34
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.

JetCorrFactors::Flavor pat::Jet::currentJECFlavor ( ) const
inline

return flavour of the current step of jet energy corrections

Definition at line 123 of file Jet.h.

References currentJECFlavor_.

Referenced by correctedJet(), and initializeJEC().

123 { return currentJECFlavor_; };
JetCorrFactors::Flavor currentJECFlavor_
Definition: Jet.h:527
void pat::Jet::currentJECFlavor ( const JetCorrFactors::Flavor flavor)
inlineprivate

update the current JEC flavor; used by correctedJet

Definition at line 152 of file Jet.h.

References currentJECFlavor_.

152 { currentJECFlavor_=flavor; };
JetCorrFactors::Flavor currentJECFlavor_
Definition: Jet.h:527
std::string pat::Jet::currentJECLevel ( ) const
inline

return the name of the current step of jet energy corrections

Definition at line 121 of file Jet.h.

References currentJECLevel_, currentJECSet_, jec_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by correctedJet(), initializeJEC(), PFJetIDSelectionFunctor::operator()(), JetIDSelectionFunctor::operator()(), and PatJetAnalyzer::print().

121 { return currentJECSet_<jec_.size() ? jec_.at(currentJECSet_).jecLevel(currentJECLevel_) : std::string("ERROR"); };
unsigned int currentJECLevel_
Definition: Jet.h:524
std::vector< pat::JetCorrFactors > jec_
Definition: Jet.h:519
unsigned int currentJECSet_
Definition: Jet.h:522
void pat::Jet::currentJECLevel ( const unsigned int &  level)
inlineprivate

update the current JEC level; used by correctedJet

Definition at line 150 of file Jet.h.

References currentJECLevel_, and testEve_cfg::level.

unsigned int currentJECLevel_
Definition: Jet.h:524
tuple level
Definition: testEve_cfg.py:34
std::string pat::Jet::currentJECSet ( ) const
inline

returns the label of the current set of jet energy corrections

Definition at line 119 of file Jet.h.

References currentJECSet_, jec_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by correctedJet(), and initializeJEC().

119 { return currentJECSet_<jec_.size() ? jec_.at(currentJECSet_).jecSet() : std::string("ERROR"); }
std::vector< pat::JetCorrFactors > jec_
Definition: Jet.h:519
unsigned int currentJECSet_
Definition: Jet.h:522
void pat::Jet::currentJECSet ( const unsigned int &  set)
inlineprivate

update the current JEC set; used by correctedJet

Definition at line 148 of file Jet.h.

References currentJECSet_.

148 { currentJECSet_=set; };
unsigned int currentJECSet_
Definition: Jet.h:522
virtual const reco::Candidate* pat::Jet::daughter ( size_t  i) const
inlinevirtual

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 405 of file Jet.h.

References caloTowers_, caloTowersFwdPtr_, reco::CompositePtrCandidate::daughter(), embeddedCaloTowers_, embeddedPFCandidates_, isCaloJet(), isJPTJet(), isPFJet(), pfCandidates_, pfCandidatesFwdPtr_, and edm::SortedCollection< T, SORT >::size().

405  {
406  if (isCaloJet() || isJPTJet() ) {
407  if ( embeddedCaloTowers_ ) {
408  if ( caloTowersFwdPtr_.size() > 0 ) return caloTowersFwdPtr_[i].get();
409  else if ( caloTowers_.size() > 0 ) return &caloTowers_[i];
410  else return reco::Jet::daughter(i);
411  }
412  }
413  if (isPFJet()) {
414  if ( embeddedPFCandidates_ ) {
415  if ( pfCandidatesFwdPtr_.size() > 0 ) return pfCandidatesFwdPtr_[i].get();
416  else if ( pfCandidates_.size() > 0 ) return &pfCandidates_[i];
417  else return reco::Jet::daughter(i);
418  }
419  }
420  return reco::Jet::daughter(i);
421  }
int i
Definition: DBlmapReader.cc:9
CaloTowerFwdPtrVector caloTowersFwdPtr_
Definition: Jet.h:498
reco::PFCandidateCollection pfCandidates_
Definition: Jet.h:503
bool isCaloJet() const
check to see if the jet is a reco::CaloJet
Definition: Jet.h:221
bool embeddedCaloTowers_
Definition: Jet.h:495
bool isPFJet() const
check to see if the jet is a reco::PFJet
Definition: Jet.h:225
bool isJPTJet() const
check to see if the jet is a reco::JPTJet
Definition: Jet.h:223
CaloTowerCollection caloTowers_
Definition: Jet.h:497
reco::PFCandidateFwdPtrVector pfCandidatesFwdPtr_
Definition: Jet.h:504
size_type size() const
bool embeddedPFCandidates_
Definition: Jet.h:501
virtual const Candidate * daughter(size_type) const
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
float pat::Jet::elecMultiplicity ( ) const
inline

chargedMultiplicity

Definition at line 322 of file Jet.h.

References reco::JPTJet::Specific::elecsInVertexInCalo, reco::JPTJet::Specific::elecsInVertexOutCalo, jptSpecific(), and edm::RefVector< C, T, F >::size().

const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
reco::TrackRefVector elecsInVertexInCalo
Definition: JPTJet.h:59
reco::TrackRefVector elecsInVertexOutCalo
Definition: JPTJet.h:60
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
const reco::TrackRefVector& pat::Jet::elecsInVertexInCalo ( ) const
inline

electrons fully contained in cone

Definition at line 314 of file Jet.h.

References reco::JPTJet::Specific::elecsInVertexInCalo, and jptSpecific().

314 {return jptSpecific().elecsInVertexInCalo; }
const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
reco::TrackRefVector elecsInVertexInCalo
Definition: JPTJet.h:59
const reco::TrackRefVector& pat::Jet::elecsInVertexOutCalo ( ) const
inline

electrons that curled out

Definition at line 316 of file Jet.h.

References reco::JPTJet::Specific::elecsInVertexOutCalo, and jptSpecific().

const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
reco::TrackRefVector elecsInVertexOutCalo
Definition: JPTJet.h:60
const reco::TrackRefVector& pat::Jet::elecsOutVertexInCalo ( ) const
inline

electrons that curled in

Definition at line 318 of file Jet.h.

References reco::JPTJet::Specific::elecsOutVertexInCalo, and jptSpecific().

const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
reco::TrackRefVector elecsOutVertexInCalo
Definition: JPTJet.h:61
float pat::Jet::electronEnergy ( ) const
inline

electronEnergy

Definition at line 354 of file Jet.h.

References reco::PFJet::Specific::mElectronEnergy, and pfSpecific().

Referenced by electronEnergyFraction().

354 {return pfSpecific().mElectronEnergy;}
const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
float mElectronEnergy
Definition: PFJet.h:55
float pat::Jet::electronEnergyFraction ( ) const
inline

electronEnergyFraction (relative to corrected jet energy)

Definition at line 356 of file Jet.h.

References electronEnergy(), reco::LeafCandidate::energy(), jecFactor(), and jecSetsAvailable().

356 {return electronEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
virtual double energy() const GCC11_FINAL
energy
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:230
bool jecSetsAvailable() const
Definition: Jet.h:111
float electronEnergy() const
electronEnergy
Definition: Jet.h:354
int pat::Jet::electronMultiplicity ( ) const
inline

electronMultiplicity

Definition at line 377 of file Jet.h.

References reco::PFJet::Specific::mElectronMultiplicity, and pfSpecific().

const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
int mElectronMultiplicity
Definition: PFJet.h:63
float pat::Jet::emEnergyFraction ( ) const
inline

returns the jet electromagnetic energy fraction

Definition at line 268 of file Jet.h.

References caloSpecific(), and reco::CaloJet::Specific::mEnergyFractionEm.

Referenced by PatZjetsJetAnalyzer::analyze(), main(), and JetIDSelectionFunctor::operator()().

float mEnergyFractionEm
Em energy fraction.
Definition: CaloJet.h:73
const CaloSpecific & caloSpecific() const
retrieve the calo specific part of the jet
Definition: Jet.h:229
float pat::Jet::emEnergyInEB ( ) const
inline

returns the jet electromagnetic energy in EB

Definition at line 278 of file Jet.h.

References caloSpecific(), and reco::CaloJet::Specific::mEmEnergyInEB.

278 {return caloSpecific().mEmEnergyInEB;}
float mEmEnergyInEB
Em energy in EB.
Definition: CaloJet.h:65
const CaloSpecific & caloSpecific() const
retrieve the calo specific part of the jet
Definition: Jet.h:229
float pat::Jet::emEnergyInEE ( ) const
inline

returns the jet electromagnetic energy in EE

Definition at line 280 of file Jet.h.

References caloSpecific(), and reco::CaloJet::Specific::mEmEnergyInEE.

280 {return caloSpecific().mEmEnergyInEE;}
const CaloSpecific & caloSpecific() const
retrieve the calo specific part of the jet
Definition: Jet.h:229
float mEmEnergyInEE
Em energy in EE.
Definition: CaloJet.h:67
float pat::Jet::emEnergyInHF ( ) const
inline

returns the jet electromagnetic energy extracted from HF

Definition at line 282 of file Jet.h.

References caloSpecific(), and reco::CaloJet::Specific::mEmEnergyInHF.

282 {return caloSpecific().mEmEnergyInHF;}
float mEmEnergyInHF
Em energy in HF.
Definition: CaloJet.h:69
const CaloSpecific & caloSpecific() const
retrieve the calo specific part of the jet
Definition: Jet.h:229
float pat::Jet::energyFractionHadronic ( ) const
inline

returns the jet hadronic energy fraction

Definition at line 266 of file Jet.h.

References caloSpecific(), and reco::CaloJet::Specific::mEnergyFractionHadronic.

float mEnergyFractionHadronic
Hadronic energy fraction.
Definition: CaloJet.h:71
const CaloSpecific & caloSpecific() const
retrieve the calo specific part of the jet
Definition: Jet.h:229
const reco::GenJet * Jet::genJet ( ) const

return the matched generated jet

Definition at line 184 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()().

184  {
185  if (genJet_.size()) return &(genJet_.front());
186  else if ( genJetRef_.size() ) return genJetRef_[0].get();
187  else return genJetFwdRef_.get();
188 }
reco::GenJetRefVector genJetRef_
Definition: Jet.h:510
edm::FwdRef< reco::GenJetCollection > genJetFwdRef_
Definition: Jet.h:511
T const * get() const
Returns C++ pointer to the item.
Definition: FwdRef.h:157
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
std::vector< reco::GenJet > genJet_
Definition: Jet.h:509
edm::FwdRef<reco::GenJetCollection> const& pat::Jet::genJetFwdRef ( ) const
inline

Definition at line 454 of file Jet.h.

References genJetFwdRef_.

454 { return genJetFwdRef_; }
edm::FwdRef< reco::GenJetCollection > genJetFwdRef_
Definition: Jet.h:511
const reco::GenParticle* pat::Jet::genParton ( ) const
inline

-— methods for MC matching -—

return the matched generated parton

Definition at line 94 of file Jet.h.

References pat::PATObject< reco::Jet >::genParticle().

94 { return genParticle(); }
const reco::GenParticle * genParticle(size_t idx=0) const
Definition: PATObject.h:232
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 102 of file Jet.cc.

References caloTowers_, caloTowersFwdPtr_, reco::CompositePtrCandidate::dau, reco::CompositePtrCandidate::daughterPtr(), embeddedCaloTowers_, edm::hlt::Exception, edm::Ptr< T >::get(), edm::Ptr< T >::id(), edm::Ptr< T >::key(), and edm::SortedCollection< T, SORT >::size().

Referenced by PatZjetsJetAnalyzer::analyze().

102  {
103  if (embeddedCaloTowers_) {
104  // Refactorized PAT access
105  if ( caloTowersFwdPtr_.size() > 0 ) {
106  return (fIndex < caloTowersFwdPtr_.size() ?
107  caloTowersFwdPtr_[fIndex].ptr() : CaloTowerPtr());
108  }
109  // Compatibility PAT access
110  else {
111  if ( caloTowers_.size() > 0 ) {
112  return (fIndex < caloTowers_.size() ?
113  CaloTowerPtr(&caloTowers_, fIndex) : CaloTowerPtr());
114 
115  }
116  }
117  }
118  // Non-embedded access
119  else {
120  Constituent dau = daughterPtr (fIndex);
121  const CaloTower* caloTower = dynamic_cast <const CaloTower*> (dau.get());
122  if (caloTower != 0) {
123  return CaloTowerPtr(dau.id(), caloTower, dau.key() );
124  }
125  else {
126  throw cms::Exception("Invalid Constituent") << "CaloJet constituent is not of CaloTower type";
127  }
128 
129  }
130 
131  return CaloTowerPtr ();
132 }
CaloTowerFwdPtrVector caloTowersFwdPtr_
Definition: Jet.h:498
CandidatePtr daughterPtr(size_type i) const
reference to daughter at given position
daughters dau
collection of references to daughters
edm::Ptr< CaloTower > CaloTowerPtr
Definition: CaloTowerFwd.h:12
bool embeddedCaloTowers_
Definition: Jet.h:495
edm::Ptr< Candidate > Constituent
Definition: Jet.h:22
CaloTowerCollection caloTowers_
Definition: Jet.h:497
size_type size() const
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 136 of file Jet.cc.

References cacheCaloTowers(), caloTowers_, caloTowersTemp_, and edm::SortedCollection< T, SORT >::size().

Referenced by PatZjetsJetAnalyzer::analyze(), and JetIDSelectionFunctor::operator()().

136  {
137  if ( !caloTowersTemp_.isSet() || caloTowers_.size() > 0 ) cacheCaloTowers();
138  return *caloTowersTemp_;
139 }
void cacheCaloTowers() const
cache calo towers
Definition: Jet.cc:439
edm::AtomicPtrCache< std::vector< CaloTowerPtr > > caloTowersTemp_
Definition: Jet.h:496
CaloTowerCollection caloTowers_
Definition: Jet.h:497
size_type size() const
const std::vector< std::pair< std::string, float > > & Jet::getPairDiscri ( ) const

get vector of paire labelname-disciValue

============= BTag information methods ============

Definition at line 294 of file Jet.cc.

References pairDiscriVector_.

294  {
295  return pairDiscriVector_;
296 }
std::vector< std::pair< std::string, float > > pairDiscriVector_
Definition: Jet.h:531
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 144 of file Jet.cc.

References reco::CompositePtrCandidate::dau, reco::CompositePtrCandidate::daughterPtr(), embeddedPFCandidates_, edm::hlt::Exception, edm::Ptr< T >::get(), edm::Ptr< T >::id(), edm::Ptr< T >::key(), pfCandidates_, and pfCandidatesFwdPtr_.

144  {
145  if (embeddedPFCandidates_) {
146  // Refactorized PAT access
147  if ( pfCandidatesFwdPtr_.size() > 0 ) {
148  return (fIndex < pfCandidatesFwdPtr_.size() ?
149  pfCandidatesFwdPtr_[fIndex].ptr() : reco::PFCandidatePtr());
150  }
151  // Compatibility PAT access
152  else {
153  if ( pfCandidates_.size() > 0 ) {
154  return (fIndex < pfCandidates_.size() ?
156 
157  }
158  }
159  }
160  // Non-embedded access
161  else {
162  Constituent dau = daughterPtr (fIndex);
163  const reco::PFCandidate* pfCandidate = dynamic_cast <const reco::PFCandidate*> (dau.get());
164  if (pfCandidate) {
165  return reco::PFCandidatePtr(dau.id(), pfCandidate, dau.key() );
166  }
167  else {
168  throw cms::Exception("Invalid Constituent") << "PFJet constituent is not of PFCandidate type";
169  }
170 
171  }
172 
173  return reco::PFCandidatePtr ();
174 }
reco::PFCandidateCollection pfCandidates_
Definition: Jet.h:503
CandidatePtr daughterPtr(size_type i) const
reference to daughter at given position
daughters dau
collection of references to daughters
edm::Ptr< Candidate > Constituent
Definition: Jet.h:22
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:38
reco::PFCandidateFwdPtrVector pfCandidatesFwdPtr_
Definition: Jet.h:504
edm::Ptr< PFCandidate > PFCandidatePtr
persistent Ptr to a PFCandidate
bool embeddedPFCandidates_
Definition: Jet.h:501
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 176 of file Jet.cc.

References cachePFCandidates(), edm::AtomicPtrCache< T >::isSet(), pfCandidates_, and pfCandidatesTemp_.

176  {
177  if ( !pfCandidatesTemp_.isSet() || pfCandidates_.size() > 0 ) cachePFCandidates();
178  return *pfCandidatesTemp_;
179 }
reco::PFCandidateCollection pfCandidates_
Definition: Jet.h:503
bool isSet() const
void cachePFCandidates() const
method to cache the constituents to allow &quot;user-friendly&quot; access
Definition: Jet.cc:484
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > pfCandidatesTemp_
Definition: Jet.h:502
float pat::Jet::hadEnergyInHB ( ) const
inline

returns the jet hadronic energy in HB

Definition at line 270 of file Jet.h.

References caloSpecific(), and reco::CaloJet::Specific::mHadEnergyInHB.

270 {return caloSpecific().mHadEnergyInHB;}
float mHadEnergyInHB
Hadronic energy in HB.
Definition: CaloJet.h:59
const CaloSpecific & caloSpecific() const
retrieve the calo specific part of the jet
Definition: Jet.h:229
float pat::Jet::hadEnergyInHE ( ) const
inline

returns the jet hadronic energy in HE

Definition at line 274 of file Jet.h.

References caloSpecific(), and reco::CaloJet::Specific::mHadEnergyInHE.

274 {return caloSpecific().mHadEnergyInHE;}
const CaloSpecific & caloSpecific() const
retrieve the calo specific part of the jet
Definition: Jet.h:229
float mHadEnergyInHE
Hadronic energy in HE.
Definition: CaloJet.h:63
float pat::Jet::hadEnergyInHF ( ) const
inline

returns the jet hadronic energy in HF

Definition at line 276 of file Jet.h.

References caloSpecific(), and reco::CaloJet::Specific::mHadEnergyInHF.

276 {return caloSpecific().mHadEnergyInHF;}
float mHadEnergyInHF
Hadronic energy in HF.
Definition: CaloJet.h:61
const CaloSpecific & caloSpecific() const
retrieve the calo specific part of the jet
Definition: Jet.h:229
float pat::Jet::hadEnergyInHO ( ) const
inline

returns the jet hadronic energy in HO

Definition at line 272 of file Jet.h.

References caloSpecific(), and reco::CaloJet::Specific::mHadEnergyInHO.

272 {return caloSpecific().mHadEnergyInHO;}
float mHadEnergyInHO
Hadronic nergy fraction in HO.
Definition: CaloJet.h:57
const CaloSpecific & caloSpecific() const
retrieve the calo specific part of the jet
Definition: Jet.h:229
bool pat::Jet::hasTagInfo ( const std::string  label) const
inline

check to see if the given tag info is nonzero

Definition at line 166 of file Jet.h.

References tagInfo().

166 { return tagInfo(label) != 0; }
const reco::BaseTagInfo * tagInfo(const std::string &label) const
Definition: Jet.cc:310
float pat::Jet::HFEMEnergy ( ) const
inline

HFEMEnergy.

Definition at line 366 of file Jet.h.

References reco::PFJet::Specific::mHFEMEnergy, and pfSpecific().

Referenced by HFEMEnergyFraction().

366 {return pfSpecific().mHFEMEnergy;}
const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
float pat::Jet::HFEMEnergyFraction ( ) const
inline

HFEMEnergyFraction (relative to corrected jet energy)

Definition at line 368 of file Jet.h.

References reco::LeafCandidate::energy(), HFEMEnergy(), jecFactor(), and jecSetsAvailable().

368 {return HFEMEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
virtual double energy() const GCC11_FINAL
energy
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:230
bool jecSetsAvailable() const
Definition: Jet.h:111
float HFEMEnergy() const
HFEMEnergy.
Definition: Jet.h:366
int pat::Jet::HFEMMultiplicity ( ) const
inline

HFEMMultiplicity.

Definition at line 382 of file Jet.h.

References reco::PFJet::Specific::mHFEMMultiplicity, and pfSpecific().

382 {return pfSpecific().mHFEMMultiplicity;}
const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
float pat::Jet::HFHadronEnergy ( ) const
inline

HFHadronEnergy.

Definition at line 362 of file Jet.h.

References reco::PFJet::Specific::mHFHadronEnergy, and pfSpecific().

Referenced by PFJetIDSelectionFunctor::firstDataCuts(), and HFHadronEnergyFraction().

362 {return pfSpecific().mHFHadronEnergy;}
const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
float mHFHadronEnergy
Definition: PFJet.h:57
float pat::Jet::HFHadronEnergyFraction ( ) const
inline

HFHadronEnergyFraction (relative to corrected jet energy)

Definition at line 364 of file Jet.h.

References reco::LeafCandidate::energy(), HFHadronEnergy(), jecFactor(), and jecSetsAvailable().

364 {return HFHadronEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
virtual double energy() const GCC11_FINAL
energy
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:230
bool jecSetsAvailable() const
Definition: Jet.h:111
float HFHadronEnergy() const
HFHadronEnergy.
Definition: Jet.h:362
int pat::Jet::HFHadronMultiplicity ( ) const
inline

HFHadronMultiplicity.

Definition at line 380 of file Jet.h.

References reco::PFJet::Specific::mHFHadronMultiplicity, and pfSpecific().

const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
int mHFHadronMultiplicity
Definition: PFJet.h:65
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 198 of file Jet.cc.

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

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

199 {
200  currentJECSet(set);
202  currentJECFlavor(flavor);
203  setP4(jec_[set].correction(level, flavor)*p4());
204 }
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
JetCorrFactors::Flavor currentJECFlavor() const
return flavour of the current step of jet energy corrections
Definition: Jet.h:123
std::vector< pat::JetCorrFactors > jec_
Definition: Jet.h:519
std::string currentJECLevel() const
return the name of the current step of jet energy corrections
Definition: Jet.h:121
virtual void setP4(const LorentzVector &p4) GCC11_FINAL
set 4-momentum
tuple level
Definition: testEve_cfg.py:34
std::string currentJECSet() const
returns the label of the current set of jet energy corrections
Definition: Jet.h:119
bool pat::Jet::isBasicJet ( ) const
inline

check to see if the jet is no more than a reco::BasicJet

Definition at line 227 of file Jet.h.

References isCaloJet(), isJPTJet(), and isPFJet().

Referenced by PFJetIDSelectionFunctor::firstDataCuts().

227 { return !(isCaloJet() || isPFJet() || isJPTJet()); }
bool isCaloJet() const
check to see if the jet is a reco::CaloJet
Definition: Jet.h:221
bool isPFJet() const
check to see if the jet is a reco::PFJet
Definition: Jet.h:225
bool isJPTJet() const
check to see if the jet is a reco::JPTJet
Definition: Jet.h:223
bool pat::Jet::isCaloJet ( ) const
inline

check to see if the jet is a reco::CaloJet

Definition at line 221 of file Jet.h.

References isJPTJet(), and specificCalo_.

Referenced by hitfit::JetTranslatorBase< AJet >::CheckEta(), daughter(), isBasicJet(), numberOfDaughters(), CaloJetMETcorrInputProducer_namespace::InputTypeCheckerT< pat::Jet >::operator()(), hitfit::JetTranslatorBase< AJet >::operator()(), JetIDSelectionFunctor::operator()(), and pat::PATJetProducer::produce().

221 { return !specificCalo_.empty() && !isJPTJet(); }
std::vector< CaloSpecific > specificCalo_
Definition: Jet.h:544
bool isJPTJet() const
check to see if the jet is a reco::JPTJet
Definition: Jet.h:223
bool pat::Jet::isJPTJet ( ) const
inline

check to see if the jet is a reco::JPTJet

Definition at line 223 of file Jet.h.

References specificJPT_.

Referenced by chargedHadronEnergy(), daughter(), isBasicJet(), isCaloJet(), numberOfDaughters(), JetIDSelectionFunctor::operator()(), and pat::PATJetProducer::produce().

223 { return !specificJPT_.empty(); }
std::vector< JPTSpecific > specificJPT_
Definition: Jet.h:545
bool pat::Jet::isPFJet ( ) const
inline
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 230 of file Jet.cc.

References edm::hlt::Exception, customizeTrackingMonitorSeedNumber::idx, and jec_.

Referenced by chargedEmEnergyFraction(), chargedHadronEnergyFraction(), chargedMuEnergyFraction(), TtFullHadKinFitter::KinFit::corJet(), correctedJet(), electronEnergyFraction(), HFEMEnergyFraction(), HFHadronEnergyFraction(), main(), muonEnergyFraction(), neutralEmEnergyFraction(), neutralHadronEnergyFraction(), and photonEnergyFraction().

231 {
232  for(unsigned int idx=0; idx<jec_.size(); ++idx){
233  if(set.empty() || jec_.at(idx).jecSet()==set){
234  if(jec_[idx].jecLevel(level)>=0){
235  return jecFactor(jec_[idx].jecLevel(level), jec_[idx].jecFlavor(flavor), idx);
236  }
237  else{
238  throw cms::Exception("InvalidRequest") << "This JEC level " << level << " does not exist. \n";
239  }
240  }
241  }
242  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n"
243  << "for a jet energy correction set with label " << set << "\n";
244 }
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:230
std::vector< pat::JetCorrFactors > jec_
Definition: Jet.h:519
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
tuple level
Definition: testEve_cfg.py:34
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 248 of file Jet.cc.

References currentJECFlavor_, currentJECLevel_, currentJECSet_, edm::hlt::Exception, jec_, jecSetAvailable(), and jecSetsAvailable().

249 {
250  if(!jecSetsAvailable()){
251  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n";
252  }
253  if(!jecSetAvailable(set)){
254  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n"
255  << "for a jet energy correction set with index " << set << "\n";
256  }
257  return jec_.at(set).correction(level, flavor)/jec_.at(currentJECSet_).correction(currentJECLevel_, currentJECFlavor_);
258 }
bool jecSetsAvailable() const
Definition: Jet.h:111
unsigned int currentJECLevel_
Definition: Jet.h:524
std::vector< pat::JetCorrFactors > jec_
Definition: Jet.h:519
tuple level
Definition: testEve_cfg.py:34
unsigned int currentJECSet_
Definition: Jet.h:522
JetCorrFactors::Flavor currentJECFlavor_
Definition: Jet.h:527
bool jecSetAvailable(const std::string &set) const
Definition: Jet.h:114
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 207 of file Jet.cc.

References jec_.

Referenced by availableJECLevels(), and jecSetAvailable().

208 {
209  for(std::vector<pat::JetCorrFactors>::const_iterator corrFactor=jec_.begin(); corrFactor!=jec_.end(); ++corrFactor)
210  if( corrFactor->jecSet()==set ){ return (corrFactor-jec_.begin()); }
211  return -1;
212 }
std::vector< pat::JetCorrFactors > jec_
Definition: Jet.h:519
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 114 of file Jet.h.

References jecSet().

Referenced by jecFactor().

114 {return (jecSet(set)>=0); };
int jecSet(const std::string &label) const
return true if this jet carries the jet correction factors of a different set, for systematic studies...
Definition: Jet.cc:207
bool pat::Jet::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 117 of file Jet.h.

References jec_.

117 {return (set<jec_.size()); };
std::vector< pat::JetCorrFactors > jec_
Definition: Jet.h:519
bool pat::Jet::jecSetsAvailable ( ) const
inline
float Jet::jetCharge ( ) const

method to return the JetCharge computed when creating the Jet

Definition at line 377 of file Jet.cc.

References jetCharge_.

Referenced by setJetCharge().

377  {
378  return jetCharge_;
379 }
float jetCharge_
Definition: Jet.h:539
reco::JetID const& pat::Jet::jetID ( ) const
inline

accessing Jet ID information

Definition at line 448 of file Jet.h.

References jetID_.

Referenced by main(), and JetIDSelectionFunctor::operator()().

448 { return jetID_;}
reco::JetID jetID_
Definition: Jet.h:549
const JPTSpecific& pat::Jet::jptSpecific ( ) const
inline

retrieve the jpt specific part of the jet

Definition at line 234 of file Jet.h.

References specificJPT_.

Referenced by chargedHadronEnergy(), elecMultiplicity(), elecsInVertexInCalo(), elecsInVertexOutCalo(), elecsOutVertexInCalo(), muonsInVertexInCalo(), muonsInVertexOutCalo(), muonsOutVertexInCalo(), pionsInVertexInCalo(), pionsInVertexOutCalo(), pionsOutVertexInCalo(), and zspCorrection().

234  {
235  if (specificJPT_.empty()) throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet.\n";
236  return specificJPT_[0];
237  }
std::vector< JPTSpecific > specificJPT_
Definition: Jet.h:545
float pat::Jet::maxEInEmTowers ( ) const
inline

returns the maximum energy deposited in ECAL towers

Definition at line 262 of file Jet.h.

References caloSpecific(), and reco::CaloJet::Specific::mMaxEInEmTowers.

262 {return caloSpecific().mMaxEInEmTowers;}
float mMaxEInEmTowers
Maximum energy in EM towers.
Definition: CaloJet.h:53
const CaloSpecific & caloSpecific() const
retrieve the calo specific part of the jet
Definition: Jet.h:229
float pat::Jet::maxEInHadTowers ( ) const
inline

returns the maximum energy deposited in HCAL towers

Definition at line 264 of file Jet.h.

References caloSpecific(), and reco::CaloJet::Specific::mMaxEInHadTowers.

264 {return caloSpecific().mMaxEInHadTowers;}
float mMaxEInHadTowers
Maximum energy in HCAL towers.
Definition: CaloJet.h:55
const CaloSpecific & caloSpecific() const
retrieve the calo specific part of the jet
Definition: Jet.h:229
float pat::Jet::muonEnergy ( ) const
inline

muonEnergy

Definition at line 358 of file Jet.h.

References reco::PFJet::Specific::mMuonEnergy, and pfSpecific().

Referenced by muonEnergyFraction().

358 {return pfSpecific().mMuonEnergy;}
const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
float pat::Jet::muonEnergyFraction ( ) const
inline

muonEnergyFraction (relative to corrected jet energy)

Definition at line 360 of file Jet.h.

References reco::LeafCandidate::energy(), jecFactor(), jecSetsAvailable(), and muonEnergy().

360 {return muonEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
virtual double energy() const GCC11_FINAL
energy
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:230
float muonEnergy() const
muonEnergy
Definition: Jet.h:358
bool jecSetsAvailable() const
Definition: Jet.h:111
int pat::Jet::muonMultiplicity ( ) const
inline

muonMultiplicity

Definition at line 599 of file Jet.h.

References edm::hlt::Exception.

600 {
601  if(isPFJet()){ return pfSpecific().mMuonMultiplicity; }
603  else{ throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet nor from PFJet.\n"; }
604 }
reco::TrackRefVector muonsInVertexOutCalo
Definition: JPTJet.h:57
const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
reco::TrackRefVector muonsInVertexInCalo
Definition: JPTJet.h:56
const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
bool isPFJet() const
check to see if the jet is a reco::PFJet
Definition: Jet.h:225
bool isJPTJet() const
check to see if the jet is a reco::JPTJet
Definition: Jet.h:223
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
const reco::TrackRefVector& pat::Jet::muonsInVertexInCalo ( ) const
inline

muons fully contained in cone

Definition at line 308 of file Jet.h.

References jptSpecific(), and reco::JPTJet::Specific::muonsInVertexInCalo.

308 {return jptSpecific().muonsInVertexInCalo; }
const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
reco::TrackRefVector muonsInVertexInCalo
Definition: JPTJet.h:56
const reco::TrackRefVector& pat::Jet::muonsInVertexOutCalo ( ) const
inline

muons that curled out

Definition at line 310 of file Jet.h.

References jptSpecific(), and reco::JPTJet::Specific::muonsInVertexOutCalo.

reco::TrackRefVector muonsInVertexOutCalo
Definition: JPTJet.h:57
const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
const reco::TrackRefVector& pat::Jet::muonsOutVertexInCalo ( ) const
inline

muons that curled in

Definition at line 312 of file Jet.h.

References jptSpecific(), and reco::JPTJet::Specific::muonsOutVertexInCalo.

const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
reco::TrackRefVector muonsOutVertexInCalo
Definition: JPTJet.h:58
int pat::Jet::n60 ( ) const
inline

returns the number of constituents carrying a 60% of the total Jet energy*/

Definition at line 288 of file Jet.h.

References reco::Jet::nCarrying().

288 {return nCarrying (0.6);}
int nCarrying(float fFraction) const
return # of constituent carrying fraction of energy
Definition: Jet.cc:291
int pat::Jet::n90 ( ) const
inline

returns the number of constituents carrying a 90% of the total Jet energy*/

Definition at line 286 of file Jet.h.

References reco::Jet::nCarrying().

286 {return nCarrying (0.9);}
int nCarrying(float fFraction) const
return # of constituent carrying fraction of energy
Definition: Jet.cc:291
float pat::Jet::neutralEmEnergy ( ) const
inline

neutralEmEnergy

Definition at line 592 of file Jet.h.

References edm::hlt::Exception.

Referenced by neutralEmEnergyFraction().

593 {
594  if(isPFJet()){ return pfSpecific().mNeutralEmEnergy; }
595  else if( isJPTJet() ){ return jptSpecific().mNeutralEmEnergy;}
596  else{ throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet nor from PFJet.\n"; }
597 }
const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
float mNeutralEmEnergy
Definition: JPTJet.h:65
float mNeutralEmEnergy
Definition: PFJet.h:72
bool isPFJet() const
check to see if the jet is a reco::PFJet
Definition: Jet.h:225
bool isJPTJet() const
check to see if the jet is a reco::JPTJet
Definition: Jet.h:223
float pat::Jet::neutralEmEnergyFraction ( ) const
inline

neutralEmEnergyFraction (relative to uncorrected jet energy)

Definition at line 346 of file Jet.h.

References reco::LeafCandidate::energy(), jecFactor(), jecSetsAvailable(), and neutralEmEnergy().

Referenced by PFJetIDSelectionFunctor::firstDataCuts(), and main().

346 {return neutralEmEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
virtual double energy() const GCC11_FINAL
energy
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:230
bool jecSetsAvailable() const
Definition: Jet.h:111
float neutralEmEnergy() const
neutralEmEnergy
Definition: Jet.h:592
float pat::Jet::neutralHadronEnergy ( ) const
inline

neutralHadronEnergy

Definition at line 578 of file Jet.h.

References edm::hlt::Exception.

Referenced by PFJetIDSelectionFunctor::firstDataCuts(), and neutralHadronEnergyFraction().

579 {
580  if(isPFJet()){ return pfSpecific().mNeutralHadronEnergy; }
581  else if( isJPTJet() ){ return jptSpecific().mNeutralHadronEnergy; }
582  else{ throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet nor from PFJet.\n"; }
583 }
const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
float mNeutralHadronEnergy
Definition: PFJet.h:53
float mNeutralHadronEnergy
Definition: JPTJet.h:63
bool isPFJet() const
check to see if the jet is a reco::PFJet
Definition: Jet.h:225
bool isJPTJet() const
check to see if the jet is a reco::JPTJet
Definition: Jet.h:223
float pat::Jet::neutralHadronEnergyFraction ( ) const
inline

neutralHadronEnergyFraction (relative to uncorrected jet energy)

Definition at line 342 of file Jet.h.

References reco::LeafCandidate::energy(), jecFactor(), jecSetsAvailable(), and neutralHadronEnergy().

Referenced by main().

342 {return neutralHadronEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
virtual double energy() const GCC11_FINAL
energy
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:230
bool jecSetsAvailable() const
Definition: Jet.h:111
float neutralHadronEnergy() const
neutralHadronEnergy
Definition: Jet.h:578
int pat::Jet::neutralHadronMultiplicity ( ) const
inline

neutralHadronMultiplicity

Definition at line 373 of file Jet.h.

References reco::PFJet::Specific::mNeutralHadronMultiplicity, and pfSpecific().

const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
int mNeutralHadronMultiplicity
Definition: PFJet.h:61
int pat::Jet::neutralMultiplicity ( ) const
inline

neutralMultiplicity

Definition at line 390 of file Jet.h.

References reco::PFJet::Specific::mNeutralMultiplicity, and pfSpecific().

const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
int mNeutralMultiplicity
Definition: PFJet.h:74
virtual size_t pat::Jet::numberOfDaughters ( ) const
inlinevirtual

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 429 of file Jet.h.

References caloTowers_, caloTowersFwdPtr_, embeddedCaloTowers_, embeddedPFCandidates_, isCaloJet(), isJPTJet(), isPFJet(), reco::CompositePtrCandidate::numberOfDaughters(), pfCandidates_, pfCandidatesFwdPtr_, and edm::SortedCollection< T, SORT >::size().

Referenced by cacheCaloTowers(), cachePFCandidates(), and PFJetIDSelectionFunctor::firstDataCuts().

429  {
430  if (isCaloJet() || isJPTJet()) {
431  if ( embeddedCaloTowers_ ) {
432  if ( caloTowersFwdPtr_.size() > 0 ) return caloTowersFwdPtr_.size();
433  else if ( caloTowers_.size() > 0 ) return caloTowers_.size();
434  else return reco::Jet::numberOfDaughters();
435  }
436  }
437  if (isPFJet()) {
438  if ( embeddedPFCandidates_ ) {
439  if ( pfCandidatesFwdPtr_.size() > 0 ) return pfCandidatesFwdPtr_.size();
440  else if ( pfCandidates_.size() > 0 ) return pfCandidates_.size();
441  else return reco::Jet::numberOfDaughters();
442  }
443  }
445  }
CaloTowerFwdPtrVector caloTowersFwdPtr_
Definition: Jet.h:498
reco::PFCandidateCollection pfCandidates_
Definition: Jet.h:503
bool isCaloJet() const
check to see if the jet is a reco::CaloJet
Definition: Jet.h:221
virtual size_t numberOfDaughters() const
number of daughters
bool embeddedCaloTowers_
Definition: Jet.h:495
bool isPFJet() const
check to see if the jet is a reco::PFJet
Definition: Jet.h:225
bool isJPTJet() const
check to see if the jet is a reco::JPTJet
Definition: Jet.h:223
CaloTowerCollection caloTowers_
Definition: Jet.h:497
reco::PFCandidateFwdPtrVector pfCandidatesFwdPtr_
Definition: Jet.h:504
size_type size() const
bool embeddedPFCandidates_
Definition: Jet.h:501
int Jet::partonFlavour ( ) const

return the flavour of the parton underlying the jet

Definition at line 191 of file Jet.cc.

References partonFlavour_.

Referenced by AnalysisTasksAnalyzerBTag::analyze(), and TtDilepLRSignalSelObservables::operator()().

191  {
192  return partonFlavour_;
193 }
int partonFlavour_
Definition: Jet.h:512
reco::PFCandidateFwdPtrVector const& pat::Jet::pfCandidatesFwdPtr ( ) const
inline

Definition at line 453 of file Jet.h.

References pfCandidatesFwdPtr_.

453 { return pfCandidatesFwdPtr_; }
reco::PFCandidateFwdPtrVector pfCandidatesFwdPtr_
Definition: Jet.h:504
const PFSpecific& pat::Jet::pfSpecific ( ) const
inline

retrieve the pf specific part of the jet

Definition at line 239 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().

239  {
240  if (specificPF_.empty()) throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a PFJet.\n";
241  return specificPF_[0];
242  }
std::vector< PFSpecific > specificPF_
Definition: Jet.h:546
float pat::Jet::photonEnergy ( ) const
inline

photonEnergy

Definition at line 350 of file Jet.h.

References reco::PFJet::Specific::mPhotonEnergy, and pfSpecific().

Referenced by photonEnergyFraction().

350 {return pfSpecific().mPhotonEnergy;}
const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
float mPhotonEnergy
Definition: PFJet.h:54
float pat::Jet::photonEnergyFraction ( ) const
inline

photonEnergyFraction (relative to corrected jet energy)

Definition at line 352 of file Jet.h.

References reco::LeafCandidate::energy(), jecFactor(), jecSetsAvailable(), and photonEnergy().

352 {return photonEnergy()/((jecSetsAvailable() ? jecFactor(0) : 1.)*energy());}
float photonEnergy() const
photonEnergy
Definition: Jet.h:350
virtual double energy() const GCC11_FINAL
energy
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:230
bool jecSetsAvailable() const
Definition: Jet.h:111
int pat::Jet::photonMultiplicity ( ) const
inline

photonMultiplicity

Definition at line 375 of file Jet.h.

References reco::PFJet::Specific::mPhotonMultiplicity, and pfSpecific().

const PFSpecific & pfSpecific() const
retrieve the pf specific part of the jet
Definition: Jet.h:239
int mPhotonMultiplicity
Definition: PFJet.h:62
const reco::TrackRefVector& pat::Jet::pionsInVertexInCalo ( ) const
inline

pions fully contained in cone

Definition at line 302 of file Jet.h.

References jptSpecific(), and reco::JPTJet::Specific::pionsInVertexInCalo.

302 {return jptSpecific().pionsInVertexInCalo; }
const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
reco::TrackRefVector pionsInVertexInCalo
Definition: JPTJet.h:53
const reco::TrackRefVector& pat::Jet::pionsInVertexOutCalo ( ) const
inline

pions that curled out

Definition at line 304 of file Jet.h.

References jptSpecific(), and reco::JPTJet::Specific::pionsInVertexOutCalo.

const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
reco::TrackRefVector pionsInVertexOutCalo
Definition: JPTJet.h:54
const reco::TrackRefVector& pat::Jet::pionsOutVertexInCalo ( ) const
inline

pions that curled in

Definition at line 306 of file Jet.h.

References jptSpecific(), and reco::JPTJet::Specific::pionsOutVertexInCalo.

const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234
reco::TrackRefVector pionsOutVertexInCalo
Definition: JPTJet.h:55
void Jet::setAssociatedTracks ( const reco::TrackRefVector tracks)

method to set the vector of refs to the tracks associated to this jet

Definition at line 387 of file Jet.cc.

References associatedTracks_, and testEve_cfg::tracks.

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

387  {
389 }
reco::TrackRefVector associatedTracks_
Definition: Jet.h:540
tuple tracks
Definition: testEve_cfg.py:39
void pat::Jet::setCaloSpecific ( const CaloSpecific newCaloSpecific)
inline

set the calo specific part of the jet

Definition at line 244 of file Jet.h.

References specificCalo_.

244  {
245  if (specificCalo_.empty()) throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a CaloJet.\n";
246  specificCalo_[0] = newCaloSpecific;
247  }
std::vector< CaloSpecific > specificCalo_
Definition: Jet.h:544
void Jet::setCaloTowers ( const CaloTowerFwdPtrCollection caloTowers)

method to store the CaloJet constituents internally

Definition at line 392 of file Jet.cc.

References caloTowersFwdPtr_, caloTowersTemp_, and embeddedCaloTowers_.

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

392  {
393  caloTowersFwdPtr_.reserve(caloTowers.size());
394  for(auto const& tower : caloTowers) {
395  caloTowersFwdPtr_.push_back( tower );
396  }
397  embeddedCaloTowers_ = true;
398  caloTowersTemp_.reset();
399 }
CaloTowerFwdPtrVector caloTowersFwdPtr_
Definition: Jet.h:498
edm::AtomicPtrCache< std::vector< CaloTowerPtr > > caloTowersTemp_
Definition: Jet.h:496
bool embeddedCaloTowers_
Definition: Jet.h:495
void Jet::setGenJetRef ( const edm::FwdRef< reco::GenJetCollection > &  gj)

method to set the matched generated jet reference, embedding if requested

Definition at line 414 of file Jet.cc.

References genJetFwdRef_.

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

415 {
416  genJetFwdRef_ = gj;
417 }
edm::FwdRef< reco::GenJetCollection > genJetFwdRef_
Definition: Jet.h:511
void pat::Jet::setGenParton ( const reco::GenParticleRef gp,
bool  embed = false 
)
inline

method to set the matched parton

Definition at line 208 of file Jet.h.

References embed, and pat::PATObject< reco::Jet >::setGenParticleRef().

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

208 { setGenParticleRef(gp, embed); }
void setGenParticleRef(const reco::GenParticleRef &ref, bool embed=false)
Set the generator level particle reference.
#define embed
Definition: AMPTWrapper.h:178
void Jet::setJetCharge ( float  jetCharge)

method to set the jet charge

Definition at line 432 of file Jet.cc.

References jetCharge(), and jetCharge_.

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

432  {
434 }
float jetCharge_
Definition: Jet.h:539
float jetCharge() const
method to return the JetCharge computed when creating the Jet
Definition: Jet.cc:377
void pat::Jet::setJetID ( reco::JetID const &  id)
inline

methods for jet ID

Definition at line 216 of file Jet.h.

References jetID_.

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

216 { jetID_ = id; }
reco::JetID jetID_
Definition: Jet.h:549
void pat::Jet::setJPTSpecific ( const JPTSpecific newJPTSpecific)
inline

set the jpt specific part of the jet

Definition at line 249 of file Jet.h.

References specificJPT_.

249  {
250  if (specificJPT_.empty()) throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a JPTJet.\n";
251  specificJPT_[0] = newJPTSpecific;
252  }
std::vector< JPTSpecific > specificJPT_
Definition: Jet.h:545
void Jet::setPartonFlavour ( int  partonFl)

method to set the flavour of the parton underlying the jet

Definition at line 422 of file Jet.cc.

References partonFlavour_.

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

422  {
423  partonFlavour_ = partonFl;
424 }
int partonFlavour_
Definition: Jet.h:512
void Jet::setPFCandidates ( const PFCandidateFwdPtrCollection pfCandidates)

method to store the PFCandidate constituents internally

method to store the CaloJet constituents internally

Definition at line 403 of file Jet.cc.

References embeddedPFCandidates_, pfCandidatesFwdPtr_, pfCandidatesTemp_, and edm::AtomicPtrCache< T >::reset().

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

403  {
404  pfCandidatesFwdPtr_.reserve(pfCandidates.size());
405  for(auto const& cand : pfCandidates) {
406  pfCandidatesFwdPtr_.push_back(cand);
407  }
408  embeddedPFCandidates_ = true;
410 }
void reset()
unsets the value and deletes the memory
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
reco::PFCandidateFwdPtrVector pfCandidatesFwdPtr_
Definition: Jet.h:504
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > pfCandidatesTemp_
Definition: Jet.h:502
bool embeddedPFCandidates_
Definition: Jet.h:501
void pat::Jet::setPFSpecific ( const PFSpecific newPFSpecific)
inline

set the pf specific part of the jet

Definition at line 254 of file Jet.h.

References specificPF_.

254  {
255  if (specificPF_.empty()) throw cms::Exception("Type Mismatch") << "This PAT jet was not made from a PFJet.\n";
256  specificPF_[0] = newPFSpecific;
257  }
std::vector< PFSpecific > specificPF_
Definition: Jet.h:546
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 310 of file Jet.cc.

References spr::find(), diffTwoXMLs::label, edm::OwnVector< T, P >::size(), tagInfoLabels_, tagInfos_, and tagInfosFwdPtr_.

Referenced by hasTagInfo(), tagInfoSecondaryVertex(), tagInfoSoftLepton(), and tagInfoTrackIP().

310  {
311  std::vector<std::string>::const_iterator it = std::find(tagInfoLabels_.begin(), tagInfoLabels_.end(), label);
312  if (it != tagInfoLabels_.end()) {
313  if ( tagInfosFwdPtr_.size() > 0 ) return tagInfosFwdPtr_[it - tagInfoLabels_.begin()].get();
314  else if ( tagInfos_.size() > 0 ) return & tagInfos_[it - tagInfoLabels_.begin()];
315  return 0;
316  }
317  return 0;
318 }
TagInfoFwdPtrCollection tagInfosFwdPtr_
Definition: Jet.h:534
size_type size() const
Definition: OwnVector.h:247
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
edm::OwnVector< reco::BaseTagInfo > tagInfos_
Definition: Jet.h:533
std::vector< std::string > tagInfoLabels_
Definition: Jet.h:532
template<typename T >
const T * Jet::tagInfoByType ( ) const
private

Definition at line 322 of file Jet.cc.

References i, n, edm::OwnVector< T, P >::size(), tagInfos_, and tagInfosFwdPtr_.

322  {
323  // First check the factorized PAT version
324  for (size_t i = 0, n = tagInfosFwdPtr_.size(); i < n; ++i) {
326  reco::BaseTagInfo const * baseTagInfo = val.get();
327  if ( typeid(*baseTagInfo) == typeid(T) ) {
328  return static_cast<const T *>( baseTagInfo );
329  }
330  }
331  // Then check compatibility version
332  for (size_t i = 0, n = tagInfos_.size(); i < n; ++i) {
334  reco::BaseTagInfo const * baseTagInfo = &val;
335  if ( typeid(*baseTagInfo) == typeid(T) ) {
336  return static_cast<const T *>( baseTagInfo );
337  }
338  }
339  return 0;
340 }
int i
Definition: DBlmapReader.cc:9
TagInfoFwdPtrCollection tagInfosFwdPtr_
Definition: Jet.h:534
size_type size() const
Definition: OwnVector.h:247
edm::OwnVector< reco::BaseTagInfo > tagInfos_
Definition: Jet.h:533
Container::value_type value_type
long double T
const reco::SecondaryVertexTagInfo * Jet::tagInfoSecondaryVertex ( const std::string &  label = "") const

get a tagInfo with the given name and type or NULL if none is found. If the label is empty or not specified, it returns the first tagInfo of that type (if any one exists) you should omit the 'TagInfos' part from the label

Definition at line 357 of file Jet.cc.

References tagInfo().

357  {
358  return (label.empty() ? tagInfoByType<reco::SecondaryVertexTagInfo>()
359  : dynamic_cast<const reco::SecondaryVertexTagInfo *>(tagInfo(label)) );
360 }
const reco::BaseTagInfo * tagInfo(const std::string &label) const
Definition: Jet.cc:310
TagInfoFwdPtrCollection const& pat::Jet::tagInfosFwdPtr ( ) const
inline

Definition at line 455 of file Jet.h.

References tagInfosFwdPtr_.

455 { return tagInfosFwdPtr_; }
TagInfoFwdPtrCollection tagInfosFwdPtr_
Definition: Jet.h:534
const reco::SoftLeptonTagInfo * Jet::tagInfoSoftLepton ( const std::string &  label = "") const

get a tagInfo with the given name and type or NULL if none is found. If the label is empty or not specified, it returns the first tagInfo of that type (if any one exists) you should omit the 'TagInfos' part from the label

Definition at line 351 of file Jet.cc.

References tagInfo().

351  {
352  return (label.empty() ? tagInfoByType<reco::SoftLeptonTagInfo>()
353  : dynamic_cast<const reco::SoftLeptonTagInfo *>(tagInfo(label)) );
354 }
const reco::BaseTagInfo * tagInfo(const std::string &label) const
Definition: Jet.cc:310
const reco::TrackIPTagInfo * Jet::tagInfoTrackIP ( const std::string &  label = "") const

get a tagInfo with the given name and type or NULL if none is found. If the label is empty or not specified, it returns the first tagInfo of that type (if any one exists) you should omit the 'TagInfos' part from the label

Definition at line 345 of file Jet.cc.

References tagInfo().

345  {
346  return (label.empty() ? tagInfoByType<reco::TrackIPTagInfo>()
347  : dynamic_cast<const reco::TrackIPTagInfo *>(tagInfo(label)) );
348 }
const reco::BaseTagInfo * tagInfo(const std::string &label) const
Definition: Jet.cc:310
float pat::Jet::towersArea ( ) const
inline

returns area of contributing towers

Definition at line 284 of file Jet.h.

References caloSpecific(), and reco::CaloJet::Specific::mTowersArea.

284 {return caloSpecific().mTowersArea;}
float mTowersArea
Area of contributing CaloTowers.
Definition: CaloJet.h:75
const CaloSpecific & caloSpecific() const
retrieve the calo specific part of the jet
Definition: Jet.h:229
void Jet::tryImportSpecific ( const reco::Jet source)
private

constructor helper that tries to import the specific info from the source jet

Definition at line 72 of file Jet.cc.

References edm::RefToBase< T >::get(), reco::JPTJet::getCaloJetRef(), reco::JPTJet::getSpecific(), reco::CaloJet::getSpecific(), edm::RefToBase< T >::isAvailable(), edm::RefToBase< T >::isNonnull(), source, specificCalo_, specificJPT_, and specificPF_.

Referenced by Jet().

73 {
74  const std::type_info & type = typeid(source);
75  if( type == typeid(reco::CaloJet) ){
76  specificCalo_.push_back( (static_cast<const reco::CaloJet&>(source)).getSpecific() );
77  } else if( type == typeid(reco::JPTJet) ){
78  reco::JPTJet const & jptJet = static_cast<reco::JPTJet const &>(source);
79  specificJPT_.push_back( jptJet.getSpecific() );
80  reco::CaloJet const * caloJet = 0;
81  if ( jptJet.getCaloJetRef().isNonnull() && jptJet.getCaloJetRef().isAvailable() ) {
82  caloJet = dynamic_cast<reco::CaloJet const *>( jptJet.getCaloJetRef().get() );
83  }
84  if ( caloJet != 0 ) {
85  specificCalo_.push_back( caloJet->getSpecific() );
86  }
87  else {
88  edm::LogWarning("OptionalProductNotFound") << " in pat::Jet, Attempted to add Calo Specifics to JPT Jets, but failed."
89  << " Jet ID for JPT Jets will not be available for you." << std::endl;
90  }
91  } else if( type == typeid(reco::PFJet) ){
92  specificPF_.push_back( (static_cast<const reco::PFJet&>(source)).getSpecific() );
93  }
94 }
type
Definition: HCALResponse.h:21
Jets made from CaloTowers.
Definition: CaloJet.h:29
const Specific & getSpecific() const
block accessors
Definition: JPTJet.h:133
const edm::RefToBase< reco::Jet > & getCaloJetRef() const
Definition: JPTJet.h:130
Jets made from PFObjects.
Definition: PFJet.h:21
bool isAvailable() const
Definition: RefToBase.h:112
std::vector< PFSpecific > specificPF_
Definition: Jet.h:546
std::vector< CaloSpecific > specificCalo_
Definition: Jet.h:544
Jets made from CaloJets corrected for ZSP and tracks.
Definition: JPTJet.h:29
std::vector< JPTSpecific > specificJPT_
Definition: Jet.h:545
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:279
static std::string const source
Definition: EdmProvDump.cc:43
value_type const * get() const
Definition: RefToBase.h:212
const Specific & getSpecific() const
Definition: CaloJet.h:149
void pat::Jet::updateFwdCaloTowerFwdPtr ( unsigned int  index,
const 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 459 of file Jet.h.

References caloTowersFwdPtr_, and edm::hlt::Exception.

459  {
460  if ( index < caloTowersFwdPtr_.size() ) {
462  } else {
463  throw cms::Exception("OutOfRange") << "Index " << index << " is out of range" << std::endl;
464  }
465  }
CaloTowerFwdPtrVector caloTowersFwdPtr_
Definition: Jet.h:498
unsigned int index
Definition: LeafCandidate.h:34
Container::value_type value_type
void pat::Jet::updateFwdGenJetFwdRef ( edm::Ref< reco::GenJetCollection updateRef)
inline

Definition at line 484 of file Jet.h.

References edm::FwdRef< C, T, F >::backRef(), and genJetFwdRef_.

484  {
486  }
edm::FwdRef< reco::GenJetCollection > genJetFwdRef_
Definition: Jet.h:511
Ref< C, T, F > const & backRef() const
Definition: FwdRef.h:178
void pat::Jet::updateFwdPFCandidateFwdPtr ( unsigned int  index,
const edm::Ptr< reco::PFCandidate > &  updateFwd 
)
inline

Definition at line 467 of file Jet.h.

References edm::hlt::Exception, and pfCandidatesFwdPtr_.

467  {
468  if ( index < pfCandidatesFwdPtr_.size() ) {
470  } else {
471  throw cms::Exception("OutOfRange") << "Index " << index << " is out of range" << std::endl;
472  }
473  }
unsigned int index
Definition: LeafCandidate.h:34
Container::value_type value_type
reco::PFCandidateFwdPtrVector pfCandidatesFwdPtr_
Definition: Jet.h:504
void pat::Jet::updateFwdTagInfoFwdPtr ( unsigned int  index,
const edm::Ptr< reco::BaseTagInfo > &  updateFwd 
)
inline

Definition at line 476 of file Jet.h.

References edm::hlt::Exception, and tagInfosFwdPtr_.

476  {
477  if ( index < tagInfosFwdPtr_.size() ) {
479  } else {
480  throw cms::Exception("OutOfRange") << "Index " << index << " is out of range" << std::endl;
481  }
482  }
TagInfoFwdPtrCollection tagInfosFwdPtr_
Definition: Jet.h:534
unsigned int index
Definition: LeafCandidate.h:34
Container::value_type value_type
const float& pat::Jet::zspCorrection ( ) const
inline

zero suppression correction

Definition at line 320 of file Jet.h.

References jptSpecific(), and reco::JPTJet::Specific::mZSPCor.

320 {return jptSpecific().mZSPCor;}
const JPTSpecific & jptSpecific() const
retrieve the jpt specific part of the jet
Definition: Jet.h:234

Friends And Related Function Documentation

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

Definition at line 74 of file Jet.h.

std::ostream& reco::operator<< ( std::ostream &  out,
const Jet obj 
)
friend

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

Member Data Documentation

reco::TrackRefVector pat::Jet::associatedTracks_
protected

Definition at line 540 of file Jet.h.

Referenced by associatedTracks(), and setAssociatedTracks().

CaloTowerCollection pat::Jet::caloTowers_
protected
CaloTowerFwdPtrVector pat::Jet::caloTowersFwdPtr_
protected
edm::AtomicPtrCache<std::vector<CaloTowerPtr> > pat::Jet::caloTowersTemp_
protected

Definition at line 496 of file Jet.h.

Referenced by cacheCaloTowers(), getCaloConstituents(), and setCaloTowers().

JetCorrFactors::Flavor pat::Jet::currentJECFlavor_
protected

Definition at line 527 of file Jet.h.

Referenced by currentJECFlavor(), and jecFactor().

unsigned int pat::Jet::currentJECLevel_
protected

Definition at line 524 of file Jet.h.

Referenced by currentJECLevel(), and jecFactor().

unsigned int pat::Jet::currentJECSet_
protected

Definition at line 522 of file Jet.h.

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

bool pat::Jet::embeddedCaloTowers_
protected
bool pat::Jet::embeddedPFCandidates_
protected
std::vector<reco::GenJet> pat::Jet::genJet_
protected

Definition at line 509 of file Jet.h.

Referenced by genJet().

edm::FwdRef<reco::GenJetCollection> pat::Jet::genJetFwdRef_
protected

Definition at line 511 of file Jet.h.

Referenced by genJet(), genJetFwdRef(), setGenJetRef(), and updateFwdGenJetFwdRef().

reco::GenJetRefVector pat::Jet::genJetRef_
protected

Definition at line 510 of file Jet.h.

Referenced by genJet().

std::vector<pat::JetCorrFactors> pat::Jet::jec_
protected
float pat::Jet::jetCharge_
protected

Definition at line 539 of file Jet.h.

Referenced by jetCharge(), and setJetCharge().

reco::JetID pat::Jet::jetID_
protected

Definition at line 549 of file Jet.h.

Referenced by jetID(), and setJetID().

std::vector<std::pair<std::string, float> > pat::Jet::pairDiscriVector_
protected

Definition at line 531 of file Jet.h.

Referenced by addBDiscriminatorPair(), bDiscriminator(), and getPairDiscri().

int pat::Jet::partonFlavour_
protected

Definition at line 512 of file Jet.h.

Referenced by partonFlavour(), and setPartonFlavour().

reco::PFCandidateCollection pat::Jet::pfCandidates_
protected
reco::PFCandidateFwdPtrVector pat::Jet::pfCandidatesFwdPtr_
protected
edm::AtomicPtrCache<std::vector<reco::PFCandidatePtr> > pat::Jet::pfCandidatesTemp_
protected

Definition at line 502 of file Jet.h.

Referenced by cachePFCandidates(), getPFConstituents(), and setPFCandidates().

std::vector<CaloSpecific> pat::Jet::specificCalo_
protected

Definition at line 544 of file Jet.h.

Referenced by caloSpecific(), isCaloJet(), setCaloSpecific(), and tryImportSpecific().

std::vector<JPTSpecific> pat::Jet::specificJPT_
protected

Definition at line 545 of file Jet.h.

Referenced by isJPTJet(), jptSpecific(), setJPTSpecific(), and tryImportSpecific().

std::vector<PFSpecific> pat::Jet::specificPF_
protected

Definition at line 546 of file Jet.h.

Referenced by isPFJet(), pfSpecific(), setPFSpecific(), and tryImportSpecific().

std::vector<std::string> pat::Jet::tagInfoLabels_
protected

Definition at line 532 of file Jet.h.

Referenced by addTagInfo(), and tagInfo().

edm::OwnVector<reco::BaseTagInfo> pat::Jet::tagInfos_
protected

Definition at line 533 of file Jet.h.

Referenced by tagInfo(), and tagInfoByType().

TagInfoFwdPtrCollection pat::Jet::tagInfosFwdPtr_
protected

Definition at line 534 of file Jet.h.

Referenced by addTagInfo(), tagInfo(), tagInfoByType(), tagInfosFwdPtr(), and updateFwdTagInfoFwdPtr().