CMS 3D CMS Logo

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

Analysis-level MET class. More...

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

Inheritance diagram for pat::MET:
pat::PATObject< reco::MET > reco::MET reco::RecoCandidate reco::LeafCandidate reco::Candidate

Classes

class  PackedMETUncertainty
 this below should be private but Reflex doesn't like it More...
 
struct  UncorInfo
 
struct  Vector2
 

Public Types

enum  METUncertainty {
  JetEnUp =0, JetEnDown =1, JetResUp =2, JetResDown =3,
  MuonEnUp =4, MuonEnDown =5, ElectronEnUp =6, ElectronEnDown =7,
  TauEnUp =8, TauEnDown =9, UnclusteredEnUp =10, UnclusteredEnDown =11,
  METUncertaintySize =12
}
 
enum  METUncertaintyLevel { Raw =0, Type1 =1, Type1p2 =2 }
 
enum  UncorrectionType {
  uncorrNONE = -1, uncorrALL = 0, uncorrJES, uncorrMUON,
  uncorrTAU, uncorrMAXN
}
 
- Public Types inherited from pat::PATObject< reco::MET >
typedef reco::MET base_type
 
- Public Types inherited from reco::RecoCandidate
enum  TrackType { noTrackType, recoTrackType, gsfTrackType }
 track type 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...
 

Public Member Functions

double CaloMETInmHF () const
 Returns the event MET in HF-. More...
 
double CaloMETInpHF () const
 Returns the event MET in HF+. More...
 
double CaloMETPhiInmHF () const
 Returns the event MET-phi in HF-. More...
 
double CaloMETPhiInpHF () const
 Returns the event MET-phi in HF+. More...
 
double CaloSETInmHF () const
 Returns the event SET in HF-. More...
 
double CaloSETInpHF () const
 Returns the event SET in HF+. More...
 
const SpecificCaloMETDatacaloSpecific () const
 accessor for the CaloMET-specific structure More...
 
double ChargedEMEtFraction () const
 
double ChargedHadEtFraction () const
 
virtual METclone () const
 required reimplementation of the Candidate's clone method More...
 
float corEx (UncorrectionType ix=uncorrALL) const
 
float corEy (UncorrectionType ix=uncorrALL) const
 
float corSumEt (UncorrectionType ix=uncorrALL) const
 
double emEtFraction () const
 Returns the event electromagnetic energy fraction. More...
 
double emEtInEB () const
 Returns the event electromagnetic energy in EB. More...
 
double emEtInEE () const
 Returns the event electromagnetic energy in EE. More...
 
double emEtInHF () const
 Returns the event electromagnetic energy extracted from HF. More...
 
double etFractionHadronic () const
 Returns the event hadronic energy fraction. More...
 
const reco::GenMETgenMET () const
 return the associated GenMET More...
 
double hadEtInHB () const
 Returns the event hadronic energy in HB. More...
 
double hadEtInHE () const
 Returns the event hadronic energy in HE. More...
 
double hadEtInHF () const
 Returns the event hadronic energy in HF. More...
 
double hadEtInHO () const
 Returns the event hadronic energy in HO. More...
 
bool isCaloMET () const
 True if this pat::MET was made from a reco::CaloMET. More...
 
bool isPFMET () const
 True if this pat::MET was made from a reco::pfMET. More...
 
bool isRecoMET () const
 True if this pat::MET was NOT made from a reco::CaloMET nor a reco::pfMET. More...
 
double maxEtInEmTowers () const
 Returns the maximum energy deposited in ECAL towers. More...
 
double maxEtInHadTowers () const
 Returns the maximum energy deposited in HCAL towers. More...
 
 MET ()
 default constructor More...
 
 MET (const reco::MET &aMET)
 constructor from reco::MET More...
 
 MET (const edm::RefToBase< reco::MET > &aMETRef)
 constructor from a RefToBase to reco::MET (to be superseded by Ptr counterpart) More...
 
 MET (const edm::Ptr< reco::MET > &aMETRef)
 constructor from a Ptr to a reco::MET More...
 
 MET (MET const &)
 copy constructor More...
 
double metSignificance () const
 Returns the event MET Significance. More...
 
double MuonEtFraction () const
 
unsigned int nCorrections () const
 return uncorrrection related stuff More...
 
double NeutralEMFraction () const
 
double NeutralHadEtFraction () const
 
METoperator= (MET const &)
 
const SpecificPFMETDatapfSpecific () const
 accessor for the pfMET-specific structure More...
 
void setGenMET (const reco::GenMET &gm)
 set the associated GenMET More...
 
void setShift (double px, double py, double sumEt, METUncertainty shift, METUncertaintyLevel level=Type1)
 
Vector2 shiftedP2 (METUncertainty shift, METUncertaintyLevel level=Type1) const
 
Vector shiftedP3 (METUncertainty shift, METUncertaintyLevel level=Type1) const
 
LorentzVector shiftedP4 (METUncertainty shift, METUncertaintyLevel level=Type1) const
 
double shiftedPhi (METUncertainty shift, METUncertaintyLevel level=Type1) const
 
double shiftedPt (METUncertainty shift, METUncertaintyLevel level=Type1) const
 
double shiftedPx (METUncertainty shift, METUncertaintyLevel level=Type1) const
 
double shiftedPy (METUncertainty shift, METUncertaintyLevel level=Type1) const
 
double shiftedSumEt (METUncertainty shift, METUncertaintyLevel level=Type1) const
 
double Type6EtFraction () const
 
double Type7EtFraction () const
 
float uncorrectedPhi (UncorrectionType ix=uncorrALL) const
 
float uncorrectedPt (UncorrectionType ix=uncorrALL) const
 
virtual ~MET ()
 destructor More...
 
- Public Member Functions inherited from pat::PATObject< reco::MET >
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::MET &obj)
 constructor from a base object (leaves invalid reference to original object!) More...
 
 PATObject (const edm::RefToBase< reco::MET > &ref)
 constructor from reference More...
 
 PATObject (const edm::Ptr< reco::MET > &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
 
void unpackTriggerObjectPathNames (const edm::TriggerNames &names)
 unpack path names of matched trigger objects (if they were packed before embedding, which is not normally the case) More...
 
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::MET
std::vector< double > dmEx () const
 
std::vector< double > dmEy () const
 
std::vector< double > dsumEt () const
 
double e_longitudinal () const
 
TMatrixD getSignificanceMatrix (void) const
 
 MET ()
 
 MET (const LorentzVector &p4_, const Point &vtx_)
 
 MET (double sumet_, const LorentzVector &p4_, const Point &vtx_)
 
 MET (double sumet_, const std::vector< CorrMETData > &corr_, const LorentzVector &p4_, const Point &vtx_)
 
std::vector< CorrMETDatamEtCorr () const
 
double mEtSig () const
 
void setSignificanceMatrix (const TMatrixD &matrix)
 
double significance () const
 
double sumEt () const
 
- Public Member Functions inherited from reco::RecoCandidate
virtual const TrackbestTrack () const
 best track pointer More...
 
virtual TrackBaseRef bestTrackRef () const
 best track RefToBase More...
 
virtual TrackType bestTrackType () const
 track type More...
 
virtual CaloTowerRef caloTower () const
 reference to a CaloTower More...
 
virtual reco::TrackRef combinedMuon () const
 reference to a stand-alone muon Track More...
 
virtual reco::GsfTrackRef gsfTrack () const
 reference to a GsfTrack More...
 
virtual size_t numberOfTracks () const
 number of multiple Tracks More...
 
 RecoCandidate ()
 default constructor More...
 
template<typename P4 >
 RecoCandidate (Charge q, const P4 &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0)
 constructor from values More...
 
virtual reco::TrackRef standAloneMuon () const
 reference to a stand-alone muon Track More...
 
virtual reco::SuperClusterRef superCluster () const
 reference to a SuperCluster More...
 
virtual reco::TrackRef track () const
 reference to a Track More...
 
virtual reco::TrackRef track (size_t) const
 reference to one of multiple Tracks More...
 
virtual ~RecoCandidate ()
 destructor More...
 
- Public Member Functions inherited from reco::LeafCandidate
virtual const_iterator begin () const
 first daughter const_iterator More...
 
virtual iterator begin ()
 first daughter iterator More...
 
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 const Candidatedaughter (size_type) const
 return daughter at a given position (throws an exception) More...
 
virtual Candidatedaughter (size_type)
 return daughter at a given position (throws an exception) 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...
 
virtual const_iterator end () const
 last daughter const_iterator More...
 
virtual iterator end ()
 last daughter iterator 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 isJet () 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...
 
 LeafCandidate (Charge q, const GlobalVector &p3, float iEnergy, bool massless, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values More...
 
 LeafCandidate (Charge q, const GlobalVector &p3, float iEnergy, float imass, 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 const Candidatemother (size_type) const
 return mother at a given position (throws an exception) 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 size_t numberOfDaughters () const
 number of daughters More...
 
virtual size_t numberOfMothers () const
 number of mothers More...
 
virtual size_t numberOfSourceCandidatePtrs () const
 
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 CandidatePtr sourceCandidatePtr (size_type i) const
 
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 Member Functions

void checkUncor_ () const
 check and set transients More...
 
void setPtPhi_ (UncorInfo &uci) const
 
- Protected Member Functions inherited from reco::RecoCandidate
template<typename R >
bool checkOverlap (const R &r1, const R &r2) const
 check if two components overlap 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...
 

Protected Attributes

std::vector< PackedMETUncertaintyuncertaintiesRaw_
 
std::vector< PackedMETUncertaintyuncertaintiesType1_
 
std::vector< PackedMETUncertaintyuncertaintiesType1p2_
 
- Protected Attributes inherited from pat::PATObject< reco::MET >
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 Attributes

std::vector< SpecificCaloMETDatacaloMET_
 
std::vector< reco::GenMETgenMET_
 
unsigned int nCorrections_
 
std::vector< SpecificPFMETDatapfMET_
 
std::atomic< std::vector
< UncorInfo > * > 
uncorInfo_
 

Additional Inherited Members

- Static Public Member Functions inherited from reco::LeafCandidate
static double dmass (GlobalVector v, double e)
 
static double magd (GlobalVector v)
 
- 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...
 

Detailed Description

Analysis-level MET class.

pat::MET implements an analysis-level missing energy class as a 4-vector within the 'pat' namespace.

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

Author
Steven Lowette, Giovanni Petrucciani, Frederic Ronga, Slava Krutelyov

Definition at line 42 of file MET.h.

Member Enumeration Documentation

Enumerator
JetEnUp 
JetEnDown 
JetResUp 
JetResDown 
MuonEnUp 
MuonEnDown 
ElectronEnUp 
ElectronEnDown 
TauEnUp 
TauEnDown 
UnclusteredEnUp 
UnclusteredEnDown 
METUncertaintySize 

Definition at line 168 of file MET.h.

Enumerator
Raw 
Type1 
Type1p2 

Definition at line 173 of file MET.h.

173  {
174  Raw=0, Type1=1, Type1p2=2
175  };
Enumerator
uncorrNONE 
uncorrALL 

do nothing

uncorrJES 

uncorrect to bare bones

uncorrMUON 

uncorrect for JES only

uncorrTAU 

uncorrect for MUON only

uncorrMAXN 

uncorrect for TAU only

Definition at line 79 of file MET.h.

79  {
80  uncorrNONE = -1,
81  uncorrALL = 0,
82  uncorrJES,
83  uncorrMUON,
84  uncorrTAU,
86  };
uncorrect for JES only
Definition: MET.h:83
uncorrect to bare bones
Definition: MET.h:82
uncorrect for MUON only
Definition: MET.h:84
uncorrect for TAU only
Definition: MET.h:85
do nothing
Definition: MET.h:81

Constructor & Destructor Documentation

MET::MET ( )

default constructor

Definition at line 11 of file MET.cc.

Referenced by clone().

11  : uncorInfo_(nullptr) {
12 }
std::atomic< std::vector< UncorInfo > * > uncorInfo_
Definition: MET.h:217
MET::MET ( const reco::MET aMET)

constructor from reco::MET

Definition at line 16 of file MET.cc.

References caloMET_, reco::PFMET::getSpecific(), reco::CaloMET::getSpecific(), and pfMET_.

16  : PATObject<reco::MET>(aMET), uncorInfo_(nullptr) {
17  const reco::CaloMET * calo = dynamic_cast<const reco::CaloMET *>(&aMET);
18  if (calo != 0) caloMET_.push_back(calo->getSpecific());
19  const reco::PFMET * pf = dynamic_cast<const reco::PFMET *>(&aMET);
20  if (pf != 0) pfMET_.push_back(pf->getSpecific());
21 }
SpecificPFMETData getSpecific() const
Definition: PFMET.h:72
SpecificCaloMETData getSpecific() const
Definition: CaloMET.h:79
std::atomic< std::vector< UncorInfo > * > uncorInfo_
Definition: MET.h:217
std::vector< SpecificCaloMETData > caloMET_
Definition: MET.h:211
std::vector< SpecificPFMETData > pfMET_
Definition: MET.h:213
MET::MET ( const edm::RefToBase< reco::MET > &  aMETRef)

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

constructor from ref to reco::MET

Definition at line 25 of file MET.cc.

References caloMET_, edm::RefToBase< T >::get(), reco::PFMET::getSpecific(), reco::CaloMET::getSpecific(), and pfMET_.

25  : PATObject<reco::MET>(aMETRef), uncorInfo_(nullptr) {
26  const reco::CaloMET * calo = dynamic_cast<const reco::CaloMET *>(aMETRef.get());
27  if (calo != 0) caloMET_.push_back(calo->getSpecific());
28  const reco::PFMET * pf = dynamic_cast<const reco::PFMET *>(aMETRef.get());
29  if (pf != 0) pfMET_.push_back(pf->getSpecific());
30 }
SpecificPFMETData getSpecific() const
Definition: PFMET.h:72
SpecificCaloMETData getSpecific() const
Definition: CaloMET.h:79
std::atomic< std::vector< UncorInfo > * > uncorInfo_
Definition: MET.h:217
std::vector< SpecificCaloMETData > caloMET_
Definition: MET.h:211
std::vector< SpecificPFMETData > pfMET_
Definition: MET.h:213
value_type const * get() const
Definition: RefToBase.h:212
MET::MET ( const edm::Ptr< reco::MET > &  aMETRef)

constructor from a Ptr to a reco::MET

constructor from ref to reco::MET

Definition at line 33 of file MET.cc.

References caloMET_, edm::Ptr< T >::get(), reco::PFMET::getSpecific(), reco::CaloMET::getSpecific(), and pfMET_.

33  : PATObject<reco::MET>(aMETRef), uncorInfo_(nullptr) {
34  const reco::CaloMET * calo = dynamic_cast<const reco::CaloMET *>(aMETRef.get());
35  if (calo != 0) caloMET_.push_back(calo->getSpecific());
36  const reco::PFMET * pf = dynamic_cast<const reco::PFMET *>(aMETRef.get());
37  if (pf != 0) pfMET_.push_back(pf->getSpecific());
38 }
SpecificPFMETData getSpecific() const
Definition: PFMET.h:72
SpecificCaloMETData getSpecific() const
Definition: CaloMET.h:79
std::atomic< std::vector< UncorInfo > * > uncorInfo_
Definition: MET.h:217
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:143
std::vector< SpecificCaloMETData > caloMET_
Definition: MET.h:211
std::vector< SpecificPFMETData > pfMET_
Definition: MET.h:213
MET::MET ( MET const &  iOther)

copy constructor

Definition at line 41 of file MET.cc.

References nCorrections_, tmp, and uncorInfo_.

41  :
42 PATObject<reco::MET>(iOther),
43 genMET_(iOther.genMET_),
44 caloMET_(iOther.caloMET_),
45 pfMET_(iOther.pfMET_),
46 uncorInfo_(nullptr)
47 {
48  auto tmp = iOther.uncorInfo_.load(std::memory_order_acquire);
49  if(tmp != nullptr) {
50  //Only thread-safe to read iOther.nCorrections_ if iOther.uncorInfo_ != nullptr
51  nCorrections_ = iOther.nCorrections_;
52  uncorInfo_.store( new std::vector<UncorInfo>{*tmp},std::memory_order_release);
53  }
54 }
unsigned int nCorrections_
Definition: MET.h:221
std::atomic< std::vector< UncorInfo > * > uncorInfo_
Definition: MET.h:217
std::vector< reco::GenMET > genMET_
Definition: MET.h:209
std::vector< SpecificCaloMETData > caloMET_
Definition: MET.h:211
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
std::vector< SpecificPFMETData > pfMET_
Definition: MET.h:213
MET::~MET ( )
virtual

destructor

Definition at line 57 of file MET.cc.

References uncorInfo_.

57  {
58  delete uncorInfo_.load(std::memory_order_acquire);
59 }
std::atomic< std::vector< UncorInfo > * > uncorInfo_
Definition: MET.h:217

Member Function Documentation

double pat::MET::CaloMETInmHF ( ) const
inline

Returns the event MET in HF-.

Definition at line 133 of file MET.h.

References SpecificCaloMETData::CaloMETInmHF, and caloSpecific().

133 {return caloSpecific().CaloMETInmHF;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
double pat::MET::CaloMETInpHF ( ) const
inline

Returns the event MET in HF+.

Definition at line 131 of file MET.h.

References SpecificCaloMETData::CaloMETInpHF, and caloSpecific().

131 {return caloSpecific().CaloMETInpHF;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
double pat::MET::CaloMETPhiInmHF ( ) const
inline

Returns the event MET-phi in HF-.

Definition at line 137 of file MET.h.

References SpecificCaloMETData::CaloMETPhiInmHF, and caloSpecific().

137 {return caloSpecific().CaloMETPhiInmHF;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
double pat::MET::CaloMETPhiInpHF ( ) const
inline

Returns the event MET-phi in HF+.

Definition at line 135 of file MET.h.

References SpecificCaloMETData::CaloMETPhiInpHF, and caloSpecific().

135 {return caloSpecific().CaloMETPhiInpHF;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
double pat::MET::CaloSETInmHF ( ) const
inline

Returns the event SET in HF-.

Definition at line 129 of file MET.h.

References SpecificCaloMETData::CaloSETInmHF, and caloSpecific().

129 {return caloSpecific().CaloSETInmHF;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
double pat::MET::CaloSETInpHF ( ) const
inline

Returns the event SET in HF+.

Definition at line 127 of file MET.h.

References SpecificCaloMETData::CaloSETInpHF, and caloSpecific().

127 {return caloSpecific().CaloSETInpHF;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
const SpecificCaloMETData& pat::MET::caloSpecific ( ) const
inline

accessor for the CaloMET-specific structure

Definition at line 139 of file MET.h.

References caloMET_, edm::hlt::Exception, and isCaloMET().

Referenced by CaloMETInmHF(), CaloMETInpHF(), CaloMETPhiInmHF(), CaloMETPhiInpHF(), CaloSETInmHF(), CaloSETInpHF(), emEtFraction(), emEtInEB(), emEtInEE(), emEtInHF(), etFractionHadronic(), hadEtInHB(), hadEtInHE(), hadEtInHF(), hadEtInHO(), maxEtInEmTowers(), maxEtInHadTowers(), and metSignificance().

139  {
140  if (!isCaloMET()) throw cms::Exception("pat::MET") << "This pat::MET has not been made from a reco::CaloMET\n";
141  return caloMET_[0];
142  }
bool isCaloMET() const
True if this pat::MET was made from a reco::CaloMET.
Definition: MET.h:95
std::vector< SpecificCaloMETData > caloMET_
Definition: MET.h:211
double pat::MET::ChargedEMEtFraction ( ) const
inline

Definition at line 147 of file MET.h.

References SpecificPFMETData::ChargedEMFraction, and pfSpecific().

147 { return pfSpecific().ChargedEMFraction; }
const SpecificPFMETData & pfSpecific() const
accessor for the pfMET-specific structure
Definition: MET.h:153
double pat::MET::ChargedHadEtFraction ( ) const
inline

Definition at line 148 of file MET.h.

References SpecificPFMETData::ChargedHadFraction, and pfSpecific().

148 { return pfSpecific().ChargedHadFraction; }
const SpecificPFMETData & pfSpecific() const
accessor for the pfMET-specific structure
Definition: MET.h:153
void MET::checkUncor_ ( ) const
protected

check and set transients

ugly ALL

JES

MUON

TAU

Definition at line 115 of file MET.cc.

References reco::MET::mEtCorr(), nCorrections_, nullptr, setPtPhi_(), uncorInfo_, uncorrALL, uncorrJES, uncorrMAXN, uncorrMUON, and uncorrTAU.

Referenced by corEx(), corEy(), corSumEt(), nCorrections(), uncorrectedPhi(), and uncorrectedPt().

115  {
116  if (uncorInfo_.load(std::memory_order_acquire)!=nullptr ) return;
117 
118  const std::vector<CorrMETData>& corrs(mEtCorr());
119  const auto nCorrectionsTmp = corrs.size();
120 
121  std::unique_ptr<std::vector<UncorInfo>> uncorInfoTmpPtr{ new std::vector<UncorInfo>{uncorrMAXN} };
122  auto& uncorInfoTmp = *uncorInfoTmpPtr;
123 
124  UncorrectionType ix;
125 
128  ix = uncorrALL;
129  uncorInfoTmp[ix] = UncorInfo();
130  for (unsigned int iC=0; iC < nCorrectionsTmp; ++iC){
131  uncorInfoTmp[ix].corEx += corrs[iC].mex;
132  uncorInfoTmp[ix].corEy += corrs[iC].mey;
133  uncorInfoTmp[ix].corSumEt += corrs[iC].sumet;
134  }
135  setPtPhi_(uncorInfoTmp[ix]);
136 
138  ix = uncorrJES;
139  uncorInfoTmp[ix] = UncorInfo();
140  if (nCorrectionsTmp >=1 ){
141  unsigned int iC = 0;
142  uncorInfoTmp[ix].corEx += corrs[iC].mex;
143  uncorInfoTmp[ix].corEy += corrs[iC].mey;
144  uncorInfoTmp[ix].corSumEt += corrs[iC].sumet;
145  }
146  setPtPhi_(uncorInfoTmp[ix]);
147 
149  ix = uncorrMUON;
150  uncorInfoTmp[ix] = UncorInfo();
151  if (nCorrectionsTmp >=2 ){
152  unsigned int iC = 1;
153  uncorInfoTmp[ix].corEx += corrs[iC].mex;
154  uncorInfoTmp[ix].corEy += corrs[iC].mey;
155  uncorInfoTmp[ix].corSumEt += corrs[iC].sumet;
156  }
157  setPtPhi_(uncorInfoTmp[ix]);
158 
160  ix = uncorrTAU;
161  uncorInfoTmp[ix] = UncorInfo();
162  if (nCorrectionsTmp >=3 ){
163  unsigned int iC = 2;
164  uncorInfoTmp[ix].corEx += corrs[iC].mex;
165  uncorInfoTmp[ix].corEy += corrs[iC].mey;
166  uncorInfoTmp[ix].corSumEt += corrs[iC].sumet;
167  }
168  setPtPhi_(uncorInfoTmp[ix]);
169 
170  //The compare_exchange_strong guarantees that the new value of nCorrections_ will be seen by other
171  // threads
172  nCorrections_ = nCorrectionsTmp;
173 
174  std::vector<UncorInfo>* expected=nullptr;
175  if(uncorInfo_.compare_exchange_strong(expected,uncorInfoTmpPtr.get(),std::memory_order_acq_rel)) {
176  uncorInfoTmpPtr.release();
177  }
178 }
uncorrect for JES only
Definition: MET.h:83
#define nullptr
unsigned int nCorrections_
Definition: MET.h:221
uncorrect to bare bones
Definition: MET.h:82
std::atomic< std::vector< UncorInfo > * > uncorInfo_
Definition: MET.h:217
uncorrect for MUON only
Definition: MET.h:84
std::vector< CorrMETData > mEtCorr() const
Definition: MET.h:67
void setPtPhi_(UncorInfo &uci) const
Definition: MET.cc:180
uncorrect for TAU only
Definition: MET.h:85
UncorrectionType
Definition: MET.h:79
do nothing
Definition: MET.h:81
virtual MET* pat::MET::clone ( void  ) const
inlinevirtual

required reimplementation of the Candidate's clone method

Reimplemented from reco::MET.

Definition at line 62 of file MET.h.

References MET().

62 { return new MET(*this); }
MET()
default constructor
Definition: MET.cc:11
float MET::corEx ( UncorrectionType  ix = uncorrALL) const

Definition at line 92 of file MET.cc.

References checkUncor_(), uncorInfo_, and uncorrNONE.

92  {
93  if (ix == uncorrNONE) return 0;
94  checkUncor_(); return (*uncorInfo_.load(std::memory_order_acquire))[ix].corEx;
95 }
void checkUncor_() const
check and set transients
Definition: MET.cc:115
float corEx(UncorrectionType ix=uncorrALL) const
Definition: MET.cc:92
std::atomic< std::vector< UncorInfo > * > uncorInfo_
Definition: MET.h:217
float MET::corEy ( UncorrectionType  ix = uncorrALL) const

Definition at line 96 of file MET.cc.

References checkUncor_(), uncorInfo_, and uncorrNONE.

96  {
97  if (ix == uncorrNONE) return 0;
98  checkUncor_(); return (*uncorInfo_.load(std::memory_order_acquire))[ix].corEy;
99 }
void checkUncor_() const
check and set transients
Definition: MET.cc:115
std::atomic< std::vector< UncorInfo > * > uncorInfo_
Definition: MET.h:217
float corEy(UncorrectionType ix=uncorrALL) const
Definition: MET.cc:96
float MET::corSumEt ( UncorrectionType  ix = uncorrALL) const

Definition at line 100 of file MET.cc.

References checkUncor_(), uncorInfo_, and uncorrNONE.

100  {
101  if (ix == uncorrNONE) return 0;
102  checkUncor_(); return (*uncorInfo_.load(std::memory_order_acquire))[ix].corSumEt;
103 }
void checkUncor_() const
check and set transients
Definition: MET.cc:115
float corSumEt(UncorrectionType ix=uncorrALL) const
Definition: MET.cc:100
std::atomic< std::vector< UncorInfo > * > uncorInfo_
Definition: MET.h:217
double pat::MET::emEtFraction ( ) const
inline

Returns the event electromagnetic energy fraction.

Definition at line 109 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::EtFractionEm.

109 {return caloSpecific().EtFractionEm;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
double pat::MET::emEtInEB ( ) const
inline

Returns the event electromagnetic energy in EB.

Definition at line 119 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::EmEtInEB.

119 {return caloSpecific().EmEtInEB;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
double pat::MET::emEtInEE ( ) const
inline

Returns the event electromagnetic energy in EE.

Definition at line 121 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::EmEtInEE.

121 {return caloSpecific().EmEtInEE;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
double pat::MET::emEtInHF ( ) const
inline

Returns the event electromagnetic energy extracted from HF.

Definition at line 123 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::EmEtInHF.

123 {return caloSpecific().EmEtInHF;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
double pat::MET::etFractionHadronic ( ) const
inline

Returns the event hadronic energy fraction.

Definition at line 107 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::EtFractionHadronic.

const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
const reco::GenMET * MET::genMET ( ) const

return the associated GenMET

return the generated MET from neutrinos

Definition at line 79 of file MET.cc.

References genMET_.

79  {
80  return (genMET_.size() > 0 ? &genMET_.front() : 0 );
81 }
std::vector< reco::GenMET > genMET_
Definition: MET.h:209
double pat::MET::hadEtInHB ( ) const
inline

Returns the event hadronic energy in HB.

Definition at line 111 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::HadEtInHB.

111 {return caloSpecific().HadEtInHB;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
double pat::MET::hadEtInHE ( ) const
inline

Returns the event hadronic energy in HE.

Definition at line 115 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::HadEtInHE.

115 {return caloSpecific().HadEtInHE;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
double pat::MET::hadEtInHF ( ) const
inline

Returns the event hadronic energy in HF.

Definition at line 117 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::HadEtInHF.

117 {return caloSpecific().HadEtInHF;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
double pat::MET::hadEtInHO ( ) const
inline

Returns the event hadronic energy in HO.

Definition at line 113 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::HadEtInHO.

113 {return caloSpecific().HadEtInHO;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
bool pat::MET::isCaloMET ( ) const
inline

True if this pat::MET was made from a reco::CaloMET.

Definition at line 95 of file MET.h.

References caloMET_.

Referenced by caloSpecific().

95 { return !caloMET_.empty(); }
std::vector< SpecificCaloMETData > caloMET_
Definition: MET.h:211
bool pat::MET::isPFMET ( ) const
inline

True if this pat::MET was made from a reco::pfMET.

Definition at line 97 of file MET.h.

References pfMET_.

Referenced by pfSpecific().

97 { return !pfMET_.empty(); }
std::vector< SpecificPFMETData > pfMET_
Definition: MET.h:213
bool pat::MET::isRecoMET ( ) const
inline

True if this pat::MET was NOT made from a reco::CaloMET nor a reco::pfMET.

Definition at line 99 of file MET.h.

References caloMET_, and pfMET_.

99 { return ( caloMET_.empty() && pfMET_.empty() ); }
std::vector< SpecificCaloMETData > caloMET_
Definition: MET.h:211
std::vector< SpecificPFMETData > pfMET_
Definition: MET.h:213
double pat::MET::maxEtInEmTowers ( ) const
inline

Returns the maximum energy deposited in ECAL towers.

Definition at line 103 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::MaxEtInEmTowers.

103 {return caloSpecific().MaxEtInEmTowers;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
double pat::MET::maxEtInHadTowers ( ) const
inline

Returns the maximum energy deposited in HCAL towers.

Definition at line 105 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::MaxEtInHadTowers.

105 {return caloSpecific().MaxEtInHadTowers;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
double pat::MET::metSignificance ( ) const
inline

Returns the event MET Significance.

Definition at line 125 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::METSignificance.

125 {return caloSpecific().METSignificance;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:139
double pat::MET::MuonEtFraction ( ) const
inline

Definition at line 149 of file MET.h.

References SpecificPFMETData::MuonFraction, and pfSpecific().

149 { return pfSpecific().MuonFraction; }
const SpecificPFMETData & pfSpecific() const
accessor for the pfMET-specific structure
Definition: MET.h:153
unsigned int MET::nCorrections ( ) const

return uncorrrection related stuff

uses internal info from mEtCorr except for full uncorrection, how do you know which is which? you don't, present ordering: 1: jet escale Type1 correction 2: muon Type1 (?) correction 3: tau Type1 (?) correction

Definition at line 90 of file MET.cc.

References checkUncor_(), and nCorrections_.

90 { checkUncor_(); return nCorrections_; }
void checkUncor_() const
check and set transients
Definition: MET.cc:115
unsigned int nCorrections_
Definition: MET.h:221
double pat::MET::NeutralEMFraction ( ) const
inline

Definition at line 145 of file MET.h.

References SpecificPFMETData::NeutralEMFraction, and pfSpecific().

145 { return pfSpecific().NeutralEMFraction; }
const SpecificPFMETData & pfSpecific() const
accessor for the pfMET-specific structure
Definition: MET.h:153
double pat::MET::NeutralHadEtFraction ( ) const
inline

Definition at line 146 of file MET.h.

References SpecificPFMETData::NeutralHadFraction, and pfSpecific().

146 { return pfSpecific().NeutralHadFraction; }
const SpecificPFMETData & pfSpecific() const
accessor for the pfMET-specific structure
Definition: MET.h:153
MET & MET::operator= ( MET const &  iOther)

Definition at line 61 of file MET.cc.

References caloMET_, genMET_, nCorrections_, pfMET_, tmp, and uncorInfo_.

61  {
63  genMET_ = iOther.genMET_;
64  caloMET_ =iOther.caloMET_;
65  pfMET_ =iOther.pfMET_;
66  auto tmp = iOther.uncorInfo_.load(std::memory_order_acquire);
67  if(tmp != nullptr) {
68  //Only thread-safe to read iOther.nCorrections_ if iOther.uncorInfo_ != nullptr
69  nCorrections_ = iOther.nCorrections_;
70  delete uncorInfo_.exchange( new std::vector<UncorInfo>{*tmp},std::memory_order_acq_rel);
71  } else {
72  nCorrections_ = 0;
73  delete uncorInfo_.exchange(nullptr, std::memory_order_acq_rel);
74  }
75  return *this;
76 }
unsigned int nCorrections_
Definition: MET.h:221
std::atomic< std::vector< UncorInfo > * > uncorInfo_
Definition: MET.h:217
std::vector< reco::GenMET > genMET_
Definition: MET.h:209
std::vector< SpecificCaloMETData > caloMET_
Definition: MET.h:211
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
Templated PAT object container.
Definition: PATObject.h:41
std::vector< SpecificPFMETData > pfMET_
Definition: MET.h:213
const SpecificPFMETData& pat::MET::pfSpecific ( ) const
inline

accessor for the pfMET-specific structure

Definition at line 153 of file MET.h.

References edm::hlt::Exception, isPFMET(), and pfMET_.

Referenced by ChargedEMEtFraction(), ChargedHadEtFraction(), MuonEtFraction(), NeutralEMFraction(), NeutralHadEtFraction(), Type6EtFraction(), and Type7EtFraction().

153  {
154  if (!isPFMET()) throw cms::Exception("pat::MET") << "This pat::MET has not been made from a reco::PFMET\n";
155  return pfMET_[0];
156  }
bool isPFMET() const
True if this pat::MET was made from a reco::pfMET.
Definition: MET.h:97
std::vector< SpecificPFMETData > pfMET_
Definition: MET.h:213
void MET::setGenMET ( const reco::GenMET gm)

set the associated GenMET

method to set the generated MET

Definition at line 84 of file MET.cc.

References genMET_.

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

84  {
85  genMET_.clear();
86  genMET_.push_back(gm);
87 }
std::vector< reco::GenMET > genMET_
Definition: MET.h:209
void MET::setPtPhi_ ( UncorInfo uci) const
protected

Definition at line 180 of file MET.cc.

References pat::MET::UncorInfo::corEx, pat::MET::UncorInfo::corEy, pat::MET::UncorInfo::phi, pat::MET::UncorInfo::pt, reco::LeafCandidate::px(), reco::LeafCandidate::py(), and mathSSE::sqrt().

Referenced by checkUncor_().

180  {
181  float lpx = px() - uci.corEx;
182  float lpy = py() - uci.corEy;
183  uci.pt = sqrt(lpx*lpx + lpy*lpy);
184  uci.phi = atan2(lpy, lpx);
185 }
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
T sqrt(T t)
Definition: SSEVec.h:48
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
void MET::setShift ( double  px,
double  py,
double  sumEt,
MET::METUncertainty  shift,
MET::METUncertaintyLevel  level = Type1 
)

Definition at line 209 of file MET.cc.

References METUncertaintySize, reco::LeafCandidate::px(), reco::LeafCandidate::py(), edm::shift, reco::MET::sumEt(), Type1, Type1p2, uncertaintiesRaw_, uncertaintiesType1_, and uncertaintiesType1p2_.

Referenced by pat::PATMETSlimmer::OneMETShift::readAndSet().

209  {
210  std::vector<PackedMETUncertainty> &v = (level == Type1 ? uncertaintiesType1_ : (level == Type1p2 ? uncertaintiesType1p2_ : uncertaintiesRaw_));
211  if (v.empty()) v.resize(METUncertaintySize);
212  v[shift].set(px - this->px(), py - this->py(), sumEt - this->sumEt());
213 }
std::vector< PackedMETUncertainty > uncertaintiesRaw_
Definition: MET.h:229
std::vector< PackedMETUncertainty > uncertaintiesType1p2_
Definition: MET.h:229
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
double sumEt() const
Definition: MET.h:53
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
std::vector< PackedMETUncertainty > uncertaintiesType1_
Definition: MET.h:229
static unsigned int const shift
tuple level
Definition: testEve_cfg.py:34
MET::Vector2 MET::shiftedP2 ( MET::METUncertainty  shift,
MET::METUncertaintyLevel  level = Type1 
) const

Definition at line 187 of file MET.cc.

References reco::LeafCandidate::px(), reco::LeafCandidate::py(), run_regression::ret, edm::shift, Type1, Type1p2, uncertaintiesRaw_, uncertaintiesType1_, uncertaintiesType1p2_, and findQualityFiles::v.

Referenced by shiftedPhi(), shiftedPt(), shiftedPx(), and shiftedPy().

187  {
188  const std::vector<PackedMETUncertainty> &v = (level == Type1 ? uncertaintiesType1_ : (level == Type1p2 ? uncertaintiesType1p2_ : uncertaintiesRaw_));
189  if (v.empty()) throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type");
190  Vector2 ret{ (px() + v[shift].dpx()), (py() + v[shift].dpy()) };
191  return ret;
192 }
std::vector< PackedMETUncertainty > uncertaintiesRaw_
Definition: MET.h:229
std::vector< PackedMETUncertainty > uncertaintiesType1p2_
Definition: MET.h:229
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
std::vector< PackedMETUncertainty > uncertaintiesType1_
Definition: MET.h:229
static unsigned int const shift
tuple level
Definition: testEve_cfg.py:34
MET::Vector MET::shiftedP3 ( MET::METUncertainty  shift,
MET::METUncertaintyLevel  level = Type1 
) const

Definition at line 193 of file MET.cc.

References reco::LeafCandidate::px(), reco::LeafCandidate::py(), Type1, Type1p2, uncertaintiesRaw_, uncertaintiesType1_, and uncertaintiesType1p2_.

193  {
194  const std::vector<PackedMETUncertainty> &v = (level == Type1 ? uncertaintiesType1_ : (level == Type1p2 ? uncertaintiesType1p2_ : uncertaintiesRaw_));
195  if (v.empty()) throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type");
196  return Vector(px() + v[shift].dpx(), py() + v[shift].dpy(), 0);
197 }
std::vector< PackedMETUncertainty > uncertaintiesRaw_
Definition: MET.h:229
std::vector< PackedMETUncertainty > uncertaintiesType1p2_
Definition: MET.h:229
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
std::vector< PackedMETUncertainty > uncertaintiesType1_
Definition: MET.h:229
math::XYZVector Vector
point in the space
Definition: LeafCandidate.h:34
static unsigned int const shift
tuple level
Definition: testEve_cfg.py:34
MET::LorentzVector MET::shiftedP4 ( METUncertainty  shift,
MET::METUncertaintyLevel  level = Type1 
) const

Definition at line 198 of file MET.cc.

References reco::LeafCandidate::px(), reco::LeafCandidate::py(), edm::shift, Type1, Type1p2, uncertaintiesRaw_, uncertaintiesType1_, uncertaintiesType1p2_, x, and reco::LeafCandidate::y().

198  {
199  const std::vector<PackedMETUncertainty> &v = (level == Type1 ? uncertaintiesType1_ : (level == Type1p2 ? uncertaintiesType1p2_ : uncertaintiesRaw_));
200  if (v.empty()) throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type");
201  double x = px() + v[shift].dpx(), y = py() + v[shift].dpy();
202  return LorentzVector(x, y, 0, std::hypot(x,y));
203 }
std::vector< PackedMETUncertainty > uncertaintiesRaw_
Definition: MET.h:229
std::vector< PackedMETUncertainty > uncertaintiesType1p2_
Definition: MET.h:229
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
virtual double y() const GCC11_FINAL
rapidity
std::vector< PackedMETUncertainty > uncertaintiesType1_
Definition: MET.h:229
static unsigned int const shift
tuple level
Definition: testEve_cfg.py:34
Definition: DDAxes.h:10
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: LeafCandidate.h:28
double pat::MET::shiftedPhi ( METUncertainty  shift,
METUncertaintyLevel  level = Type1 
) const
inline

Definition at line 187 of file MET.h.

References testEve_cfg::level, pat::MET::Vector2::phi(), and shiftedP2().

187 { return shiftedP2(shift,level).phi(); }
double phi() const
Definition: MET.h:179
Vector2 shiftedP2(METUncertainty shift, METUncertaintyLevel level=Type1) const
Definition: MET.cc:187
static unsigned int const shift
tuple level
Definition: testEve_cfg.py:34
double pat::MET::shiftedPt ( METUncertainty  shift,
METUncertaintyLevel  level = Type1 
) const
inline

Definition at line 186 of file MET.h.

References testEve_cfg::level, pat::MET::Vector2::pt(), and shiftedP2().

186 { return shiftedP2(shift,level).pt(); }
double pt() const
Definition: MET.h:178
Vector2 shiftedP2(METUncertainty shift, METUncertaintyLevel level=Type1) const
Definition: MET.cc:187
static unsigned int const shift
tuple level
Definition: testEve_cfg.py:34
double pat::MET::shiftedPx ( METUncertainty  shift,
METUncertaintyLevel  level = Type1 
) const
inline

Definition at line 184 of file MET.h.

References testEve_cfg::level, pat::MET::Vector2::px, and shiftedP2().

184 { return shiftedP2(shift,level).px; }
double px
Definition: MET.h:177
Vector2 shiftedP2(METUncertainty shift, METUncertaintyLevel level=Type1) const
Definition: MET.cc:187
static unsigned int const shift
tuple level
Definition: testEve_cfg.py:34
double pat::MET::shiftedPy ( METUncertainty  shift,
METUncertaintyLevel  level = Type1 
) const
inline

Definition at line 185 of file MET.h.

References testEve_cfg::level, pat::MET::Vector2::py, and shiftedP2().

185 { return shiftedP2(shift,level).py; }
double py
Definition: MET.h:177
Vector2 shiftedP2(METUncertainty shift, METUncertaintyLevel level=Type1) const
Definition: MET.cc:187
static unsigned int const shift
tuple level
Definition: testEve_cfg.py:34
double MET::shiftedSumEt ( MET::METUncertainty  shift,
MET::METUncertaintyLevel  level = Type1 
) const

Definition at line 204 of file MET.cc.

References edm::shift, reco::MET::sumEt(), Type1, Type1p2, uncertaintiesRaw_, uncertaintiesType1_, and uncertaintiesType1p2_.

204  {
205  const std::vector<PackedMETUncertainty> &v = (level == Type1 ? uncertaintiesType1_ : (level == Type1p2 ? uncertaintiesType1p2_ : uncertaintiesRaw_));
206  if (v.empty()) throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type");
207  return sumEt() + v[shift].dsumEt();
208 }
std::vector< PackedMETUncertainty > uncertaintiesRaw_
Definition: MET.h:229
std::vector< PackedMETUncertainty > uncertaintiesType1p2_
Definition: MET.h:229
double sumEt() const
Definition: MET.h:53
std::vector< PackedMETUncertainty > uncertaintiesType1_
Definition: MET.h:229
static unsigned int const shift
tuple level
Definition: testEve_cfg.py:34
double pat::MET::Type6EtFraction ( ) const
inline

Definition at line 150 of file MET.h.

References pfSpecific(), and SpecificPFMETData::Type6Fraction.

150 { return pfSpecific().Type6Fraction; }
const SpecificPFMETData & pfSpecific() const
accessor for the pfMET-specific structure
Definition: MET.h:153
double pat::MET::Type7EtFraction ( ) const
inline

Definition at line 151 of file MET.h.

References pfSpecific(), and SpecificPFMETData::Type7Fraction.

151 { return pfSpecific().Type7Fraction; }
const SpecificPFMETData & pfSpecific() const
accessor for the pfMET-specific structure
Definition: MET.h:153
float MET::uncorrectedPhi ( UncorrectionType  ix = uncorrALL) const

Definition at line 108 of file MET.cc.

References checkUncor_(), reco::LeafCandidate::phi(), uncorInfo_, and uncorrNONE.

108  {
109  if (ix == uncorrNONE) return phi();
110  checkUncor_(); return (*uncorInfo_.load(std::memory_order_acquire))[ix].phi;
111 }
void checkUncor_() const
check and set transients
Definition: MET.cc:115
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
std::atomic< std::vector< UncorInfo > * > uncorInfo_
Definition: MET.h:217
float MET::uncorrectedPt ( UncorrectionType  ix = uncorrALL) const

Definition at line 104 of file MET.cc.

References checkUncor_(), reco::LeafCandidate::pt(), uncorInfo_, and uncorrNONE.

104  {
105  if (ix == uncorrNONE) return pt();
106  checkUncor_(); return (*uncorInfo_.load(std::memory_order_acquire))[ix].pt;
107 }
void checkUncor_() const
check and set transients
Definition: MET.cc:115
std::atomic< std::vector< UncorInfo > * > uncorInfo_
Definition: MET.h:217
virtual float pt() const GCC11_FINAL
transverse momentum

Member Data Documentation

std::vector<SpecificCaloMETData> pat::MET::caloMET_
private

Definition at line 211 of file MET.h.

Referenced by caloSpecific(), isCaloMET(), isRecoMET(), MET(), and operator=().

std::vector<reco::GenMET> pat::MET::genMET_
private

Definition at line 209 of file MET.h.

Referenced by genMET(), operator=(), and setGenMET().

unsigned int pat::MET::nCorrections_
mutableprivate

Definition at line 221 of file MET.h.

Referenced by checkUncor_(), MET(), nCorrections(), and operator=().

std::vector<SpecificPFMETData> pat::MET::pfMET_
private

Definition at line 213 of file MET.h.

Referenced by isPFMET(), isRecoMET(), MET(), operator=(), and pfSpecific().

std::vector<PackedMETUncertainty> pat::MET::uncertaintiesRaw_
protected

Definition at line 229 of file MET.h.

Referenced by setShift(), shiftedP2(), shiftedP3(), shiftedP4(), and shiftedSumEt().

std::vector<PackedMETUncertainty> pat::MET::uncertaintiesType1_
protected

Definition at line 229 of file MET.h.

Referenced by setShift(), shiftedP2(), shiftedP3(), shiftedP4(), and shiftedSumEt().

std::vector<PackedMETUncertainty> pat::MET::uncertaintiesType1p2_
protected

Definition at line 229 of file MET.h.

Referenced by setShift(), shiftedP2(), shiftedP3(), shiftedP4(), and shiftedSumEt().

std::atomic<std::vector<UncorInfo>*> pat::MET::uncorInfo_
mutableprivate

Definition at line 217 of file MET.h.

Referenced by checkUncor_(), corEx(), corEy(), corSumEt(), MET(), operator=(), uncorrectedPhi(), uncorrectedPt(), and ~MET().