15 embeddedCaloTowers_(
false),
16 embeddedPFCandidates_(
false),
19 isCaloTowerCached_(
false),
20 isPFCandidateCached_(
false)
27 embeddedCaloTowers_(
false),
28 embeddedPFCandidates_(
false),
31 isCaloTowerCached_(
false),
32 isPFCandidateCached_(
false)
40 embeddedCaloTowers_(
false),
41 embeddedPFCandidates_(
false),
44 isCaloTowerCached_(
false),
45 isPFCandidateCached_(
false)
53 embeddedCaloTowers_(
false),
54 embeddedPFCandidates_(
false),
57 isCaloTowerCached_(
false),
58 isPFCandidateCached_(
false)
68 out <<
"\tpat::Jet: ";
69 out << std::setiosflags(std::ios::right);
70 out << std::setiosflags(std::ios::fixed);
71 out << std::setprecision(3);
72 out <<
" E/pT/eta/phi "
85 specificCalo_.push_back( (static_cast<const reco::CaloJet&>(source)).getSpecific() );
97 edm::LogWarning(
"OptionalProductNotFound") <<
" in pat::Jet, Attempted to add Calo Specifics to JPT Jets, but failed."
98 <<
" Jet ID for JPT Jets will not be available for you." << std::endl;
101 specificPF_.push_back( (static_cast<const reco::PFJet&>(source)).getSpecific() );
131 if (caloTower != 0) {
135 throw cms::Exception(
"Invalid Constituent") <<
"CaloJet constituent is not of CaloTower type";
177 throw cms::Exception(
"Invalid Constituent") <<
"PFJet constituent is not of PFCandidate type";
218 for(std::vector<pat::JetCorrFactors>::const_iterator corrFactor=
jec_.begin(); corrFactor!=
jec_.end(); ++corrFactor)
219 if( corrFactor->jecSet()==set ){
return (corrFactor-
jec_.begin()); }
226 std::vector<std::string> sets;
227 for(std::vector<pat::JetCorrFactors>::const_iterator corrFactor=
jec_.begin(); corrFactor!=
jec_.end(); ++corrFactor)
228 sets.push_back(corrFactor->jecSet());
234 return set>=0 ?
jec_.at(set).correctionLabels() : std::vector<std::string>();
242 if(set.empty() ||
jec_.at(
idx).jecSet()==set){
243 if(
jec_[
idx].jecLevel(level)>=0){
247 throw cms::Exception(
"InvalidRequest") <<
"This JEC level " << level <<
" does not exist. \n";
251 throw cms::Exception(
"InvalidRequest") <<
"This jet does not carry any jet energy correction factor information \n"
252 <<
"for a jet energy correction set with label " << set <<
"\n";
260 throw cms::Exception(
"InvalidRequest") <<
"This jet does not carry any jet energy correction factor information \n";
263 throw cms::Exception(
"InvalidRequest") <<
"This jet does not carry any jet energy correction factor information \n"
264 <<
"for a jet energy correction set with index " << set <<
"\n";
276 if(set.empty() ||
jec_.at(
idx).jecSet()==set){
277 if(
jec_[
idx].jecLevel(level)>=0){
281 throw cms::Exception(
"InvalidRequest") <<
"This JEC level " << level <<
" does not exist. \n";
285 throw cms::Exception(
"InvalidRequest") <<
"This JEC set " << set <<
" does not exist. \n";
309 float discriminator = -1000.;
310 const std::string & theLabel = ((aLabel ==
"" || aLabel ==
"default")) ?
"trackCountingHighEffBJetTags" : aLabel;
316 return discriminator;
336 if (
typeid(*baseTagInfo) ==
typeid(
T) ) {
337 return static_cast<const T *
>( baseTagInfo );
344 if (
typeid(*baseTagInfo) ==
typeid(
T) ) {
345 return static_cast<const T *
>( baseTagInfo );
355 return (label.empty() ? tagInfoByType<reco::TrackIPTagInfo>()
356 : dynamic_cast<const reco::TrackIPTagInfo *>(
tagInfo(label)) );
361 return (label.empty() ? tagInfoByType<reco::SoftLeptonTagInfo>()
362 : dynamic_cast<const reco::SoftLeptonTagInfo *>(
tagInfo(label)) );
367 return (label.empty() ? tagInfoByType<reco::SecondaryVertexTagInfo>()
368 : dynamic_cast<const reco::SecondaryVertexTagInfo *>(
tagInfo(label)) );
375 if (idx == std::string::npos) {
402 for(
unsigned int i = 0;
i < caloTowers.size(); ++
i) {
412 for(
unsigned int i = 0;
i < pfCandidates.size(); ++
i) {
456 icalo != iend; ++icalo ) {
465 icalo != iend; ++icalo ) {
479 throw cms::Exception(
"Invalid Constituent") <<
"CaloJet constituent is not of CaloTower type";
498 ipf != iend; ++ipf ) {
504 for ( reco::PFCandidateCollection::const_iterator ibegin=
pfCandidates_.begin(),
507 ipf != iend; ++ipf ) {
521 throw cms::Exception(
"Invalid Constituent") <<
"PFJet constituent is not of PFCandidate type";
virtual double energy() const GCC11_FINAL
energy
void setGenJetRef(const edm::FwdRef< reco::GenJetCollection > &gj)
method to set the matched generated jet reference, embedding if requested
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
const reco::SecondaryVertexTagInfo * tagInfoSecondaryVertex(const std::string &label="") const
reco::GenJetRefVector genJetRef_
CaloTowerFwdPtrVector caloTowersFwdPtr_
std::vector< CaloTowerPtr > caloTowersTemp_
const std::vector< std::string > availableJECLevels(const int &set=0) const
bool jecSetsAvailable() const
Jets made from CaloTowers.
reco::TrackRefVector associatedTracks_
reco::PFCandidateCollection pfCandidates_
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
std::vector< std::pair< std::string, float > > pairDiscriVector_
const reco::GenJet * genJet() const
return the matched generated jet
CandidatePtr daughterPtr(size_type i) const
reference to daughter at given position
const Specific & getSpecific() const
block accessors
Base class for all types of Jets.
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
TagInfoFwdPtrCollection tagInfosFwdPtr_
edm::FwdRef< reco::GenJetCollection > genJetFwdRef_
std::vector< CaloTower >::const_iterator const_iterator
void cacheCaloTowers() const
method to cache the constituents to allow "user-friendly" access
void tryImportSpecific(const reco::Jet &source)
constructor helper that tries to import the specific info from the source jet
const edm::RefToBase< reco::Jet > & getCaloJetRef() const
void setCaloTowers(const CaloTowerFwdPtrCollection &caloTowers)
method to store the CaloJet constituents internally
const reco::TrackIPTagInfo * tagInfoTrackIP(const std::string &label="") const
const reco::TrackRefVector & associatedTracks() const
method to return a vector of refs to the tracks associated to this jet
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const T * tagInfoByType() const
Jets made from PFObjects.
std::vector< reco::PFCandidatePtr > const & getPFConstituents() const
void addTagInfo(const std::string &label, const TagInfoFwdPtrCollection::value_type &info)
std::vector< PFSpecific > specificPF_
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
daughters dau
collection of references to daughters
edm::OwnVector< reco::BaseTagInfo > tagInfos_
void setAssociatedTracks(const reco::TrackRefVector &tracks)
method to set the vector of refs to the tracks associated to this jet
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
std::ostream & operator<<(std::ostream &, BeamSpot beam)
std::vector< CaloSpecific > specificCalo_
T const * get() const
Returns C++ pointer to the item.
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 ...
CaloTowerPtr getCaloConstituent(unsigned fIndex) const
convert generic constituent to specific type
Jets made from CaloJets corrected for ZSP and tracks.
unsigned int currentJECLevel_
edm::Ptr< CaloTower > CaloTowerPtr
ProductID id() const
Accessor for product ID.
T const * get() const
Returns C++ pointer to the item.
float bDiscriminator(const std::string &theLabel) const
-— methods for accessing b-tagging info -—
int jecSet(const std::string &label) const
return true if this jet carries the jet correction factors of a different set, for systematic studies...
Jets made from MC generator particles.
const reco::BaseTagInfo * tagInfo(const std::string &label) const
void setPartonFlavour(int partonFl)
method to set the flavour of the parton underlying the jet
Container::value_type value_type
bool isPFCandidateCached_
int partonFlavour() const
return the flavour of the parton underlying the jet
JetCorrFactors::Flavor currentJECFlavor() const
return flavour of the current step of jet energy corrections
std::vector< CaloTowerPtr > const & getCaloConstituents() const
std::vector< pat::JetCorrFactors > jec_
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
std::vector< std::string > tagInfoLabels_
const_iterator end() const
const reco::SoftLeptonTagInfo * tagInfoSoftLepton(const std::string &label="") const
void setJetCharge(float jetCharge)
method to set the jet charge
virtual size_t numberOfDaughters() const
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
std::vector< edm::FwdPtr< CaloTower > > CaloTowerFwdPtrCollection
std::vector< JPTSpecific > specificJPT_
std::vector< edm::FwdPtr< reco::PFCandidate > > PFCandidateFwdPtrCollection
void addBDiscriminatorPair(const std::pair< std::string, float > &thePair)
method to add a algolabel-discriminator pair
std::string currentJECLevel() const
return the name of the current step of jet energy corrections
Analysis-level calorimeter jet class.
CaloTowerCollection caloTowers_
const std::vector< std::string > availableJECSets() const
-— methods for jet corrections -—
bool isCaloTowerCached_
cache calo towers
void cachePFCandidates() const
method to cache the constituents to allow "user-friendly" access
Particle reconstructed by the particle flow algorithm.
reco::PFCandidateFwdPtrVector pfCandidatesFwdPtr_
virtual void setP4(const LorentzVector &p4) GCC11_FINAL
set 4-momentum
void setPFCandidates(const PFCandidateFwdPtrCollection &pfCandidates)
method to store the PFCandidate constituents internally
size_type size() const
Size of the RefVector.
Templated PAT object container.
reco::PFCandidatePtr getPFConstituent(unsigned fIndex) const
convert generic constituent to specific type
std::vector< reco::PFCandidatePtr > pfCandidatesTemp_
unsigned int currentJECSet_
std::vector< reco::GenJet > genJet_
virtual float pt() const GCC11_FINAL
transverse momentum
edm::Ptr< PFCandidate > PFCandidatePtr
persistent Ptr to a PFCandidate
bool isNonnull() const
Checks for non-null.
JetCorrFactors::Flavor currentJECFlavor_
bool embeddedPFCandidates_
value_type const * get() const
std::string currentJECSet() const
returns the label of the current set of jet energy corrections
const_iterator begin() const
const std::vector< std::pair< std::string, float > > & getPairDiscri() const
get vector of paire labelname-disciValue
float jetCharge() const
method to return the JetCharge computed when creating the Jet
bool jecSetAvailable(const std::string &set) const
const Specific & getSpecific() const