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 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  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,
  NoShift =12, METUncertaintySize =13
}
 
enum  METUncertaintyLevel { Raw =0, Type1 =1, Type1p2 =2, Calo =3 }
 
- 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...
 
Vector2 caloMETP2 () const
 
double caloMETPhi () const
 
double CaloMETPhiInmHF () const
 Returns the event MET-phi in HF-. More...
 
double CaloMETPhiInpHF () const
 Returns the event MET-phi in HF+. More...
 
double caloMETPt () const
 
double caloMETSumEt () const
 
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...
 
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
 
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 () const
 
float uncorrectedPt () const
 return uncorrrection related stuff More...
 
float uncorrectedSumEt () 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
 
reco::METCovMatrix 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 reco::METCovMatrix &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 float dxyError () const
 uncertainty on dxy More...
 
virtual float dzError () const
 uncertainty on dz 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 Vector boostToCM () const
 
virtual int charge () const
 electric charge More...
 
void construct (int qx3, float pt, float eta, float phi, float mass, const Point &vtx, int pdgId, int status)
 
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 double energy () const
 energy More...
 
virtual double et () const
 transverse energy More...
 
virtual double et2 () const
 transverse energy squared (use this for cut!) More...
 
virtual double eta () const
 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 ()
 
 LeafCandidate (const Candidate &c)
 
template<typename... Args>
 LeafCandidate (Args &&...args)
 
 LeafCandidate (LeafCandidate &rh)
 
 LeafCandidate (LeafCandidate &&)=default
 
 LeafCandidate (LeafCandidate const &)=default
 
virtual bool longLived () const
 is long lived? More...
 
virtual double mass () const
 mass More...
 
virtual bool massConstraint () const
 do mass constraint? More...
 
virtual double massSqr () const
 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
 spatial momentum vector More...
 
virtual const Candidatemother (size_type) const
 return mother at a given position (throws an exception) More...
 
virtual double mt () const
 transverse mass More...
 
virtual double mtSqr () const
 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
 
LeafCandidateoperator= (LeafCandidate &&)=default
 
LeafCandidateoperator= (LeafCandidate const &)=default
 
virtual double p () const
 magnitude of momentum vector More...
 
virtual const LorentzVectorp4 () const
 four-momentum Lorentz vector More...
 
virtual int pdgId () const
 PDG identifier. More...
 
virtual double phi () const
 momentum azimuthal angle More...
 
virtual const PolarLorentzVectorpolarP4 () const
 four-momentum Lorentz vector More...
 
virtual double pt () const
 transverse momentum More...
 
virtual double px () const
 x coordinate of momentum vector More...
 
virtual double py () const
 y coordinate of momentum vector More...
 
virtual double pz () const
 z coordinate of momentum vector More...
 
virtual double rapidity () const
 rapidity More...
 
virtual void setCharge (Charge q)
 set electric charge More...
 
virtual void setLongLived ()
 
virtual void setMass (double m)
 set particle mass More...
 
virtual void setMassConstraint ()
 
virtual void setP4 (const LorentzVector &p4)
 set 4-momentum More...
 
virtual void setP4 (const PolarLorentzVector &p4)
 set 4-momentum More...
 
virtual void setPdgId (int pdgId)
 
virtual void setPz (double pz)
 
virtual void setStatus (int status)
 set status word More...
 
virtual void setThreeCharge (Charge qx3)
 set electric charge More...
 
virtual void setVertex (const Point &vertex)
 set vertex More...
 
virtual CandidatePtr sourceCandidatePtr (size_type i) const
 
virtual int status () const
 status word More...
 
virtual double theta () const
 momentum polar angle More...
 
virtual int threeCharge () const
 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
 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
 rapidity More...
 
virtual ~LeafCandidate ()
 destructor More...
 
- Public Member Functions inherited from reco::Candidate
const_iterator begin () const
 first daughter const_iterator More...
 
iterator begin ()
 first daughter iterator More...
 
 Candidate ()
 default constructor More...
 
const_iterator end () const
 last daughter const_iterator More...
 
iterator end ()
 last daughter iterator 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...
 
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

PackedMETUncertainty caloPackedMet_
 
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_
 

Private Attributes

std::vector< SpecificCaloMETDatacaloMET_
 
std::vector< reco::GenMETgenMET_
 
std::vector< SpecificPFMETDatapfMET_
 

Additional Inherited Members

- 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...
 

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 43 of file MET.h.

Member Enumeration Documentation

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

Definition at line 142 of file MET.h.

Enumerator
Raw 
Type1 
Type1p2 
Calo 

Definition at line 147 of file MET.h.

147  {
148  Raw=0, Type1=1, Type1p2=2, Calo=3
149  };

Constructor & Destructor Documentation

MET::MET ( )

default constructor

Definition at line 11 of file MET.cc.

Referenced by clone().

11  {
12 }
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(), operator=(), and pfMET_.

16  : PATObject<reco::MET>(aMET) {
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  const pat::MET * pm = dynamic_cast<const pat::MET *>(&aMET);
22  if (pm != 0) this->operator=(*pm);
23 }
Analysis-level MET class.
Definition: MET.h:43
SpecificPFMETData getSpecific() const
Definition: PFMET.h:72
SpecificCaloMETData getSpecific() const
Definition: CaloMET.h:79
MET & operator=(MET const &)
Definition: MET.cc:63
std::vector< SpecificCaloMETData > caloMET_
Definition: MET.h:199
std::vector< SpecificPFMETData > pfMET_
Definition: MET.h:201
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 27 of file MET.cc.

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

27  : PATObject<reco::MET>(aMETRef) {
28  const reco::CaloMET * calo = dynamic_cast<const reco::CaloMET *>(aMETRef.get());
29  if (calo != 0) caloMET_.push_back(calo->getSpecific());
30  const reco::PFMET * pf = dynamic_cast<const reco::PFMET *>(aMETRef.get());
31  if (pf != 0) pfMET_.push_back(pf->getSpecific());
32  const pat::MET * pm = dynamic_cast<const pat::MET *>(aMETRef.get());
33  if (pm != 0) this->operator=(*pm);
34 }
Analysis-level MET class.
Definition: MET.h:43
value_type const * get() const
Definition: RefToBase.h:212
SpecificPFMETData getSpecific() const
Definition: PFMET.h:72
SpecificCaloMETData getSpecific() const
Definition: CaloMET.h:79
MET & operator=(MET const &)
Definition: MET.cc:63
std::vector< SpecificCaloMETData > caloMET_
Definition: MET.h:199
std::vector< SpecificPFMETData > pfMET_
Definition: MET.h:201
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 37 of file MET.cc.

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

37  : PATObject<reco::MET>(aMETRef) {
38  const reco::CaloMET * calo = dynamic_cast<const reco::CaloMET *>(aMETRef.get());
39  if (calo != 0) caloMET_.push_back(calo->getSpecific());
40  const reco::PFMET * pf = dynamic_cast<const reco::PFMET *>(aMETRef.get());
41  if (pf != 0) pfMET_.push_back(pf->getSpecific());
42  const pat::MET * pm = dynamic_cast<const pat::MET *>(aMETRef.get());
43  if (pm != 0) this->operator=(*pm);
44 }
Analysis-level MET class.
Definition: MET.h:43
SpecificPFMETData getSpecific() const
Definition: PFMET.h:72
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:143
SpecificCaloMETData getSpecific() const
Definition: CaloMET.h:79
MET & operator=(MET const &)
Definition: MET.cc:63
std::vector< SpecificCaloMETData > caloMET_
Definition: MET.h:199
std::vector< SpecificPFMETData > pfMET_
Definition: MET.h:201
MET::MET ( MET const &  iOther)

copy constructor

Definition at line 47 of file MET.cc.

47  :
48 PATObject<reco::MET>(iOther),
49 genMET_(iOther.genMET_),
50 caloMET_(iOther.caloMET_),
51 pfMET_(iOther.pfMET_),
52 uncertaintiesRaw_(iOther.uncertaintiesRaw_),
53 uncertaintiesType1_(iOther.uncertaintiesType1_),
54 uncertaintiesType1p2_(iOther.uncertaintiesType1p2_),
55 caloPackedMet_(iOther.caloPackedMet_) {
56 }
std::vector< PackedMETUncertainty > uncertaintiesRaw_
Definition: MET.h:206
std::vector< PackedMETUncertainty > uncertaintiesType1p2_
Definition: MET.h:206
PackedMETUncertainty caloPackedMet_
Definition: MET.h:208
std::vector< reco::GenMET > genMET_
Definition: MET.h:197
std::vector< SpecificCaloMETData > caloMET_
Definition: MET.h:199
std::vector< PackedMETUncertainty > uncertaintiesType1_
Definition: MET.h:206
std::vector< SpecificPFMETData > pfMET_
Definition: MET.h:201
MET::~MET ( )
virtual

destructor

Definition at line 59 of file MET.cc.

59  {
60 
61 }

Member Function Documentation

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

Returns the event MET in HF-.

Definition at line 116 of file MET.h.

References SpecificCaloMETData::CaloMETInmHF, and caloSpecific().

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

Returns the event MET in HF+.

Definition at line 114 of file MET.h.

References SpecificCaloMETData::CaloMETInpHF, and caloSpecific().

114 {return caloSpecific().CaloMETInpHF;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:122
MET::Vector2 MET::caloMETP2 ( ) const

Definition at line 178 of file MET.cc.

References caloPackedMet_, pat::MET::PackedMETUncertainty::dpx(), pat::MET::PackedMETUncertainty::dpy(), and run_regression::ret.

Referenced by caloMETPhi(), and caloMETPt().

178  {
179  Vector2 ret{ caloPackedMet_.dpx(), caloPackedMet_.dpy() };
180  return ret;
181 }
double dpy() const
Definition: MET.h:183
PackedMETUncertainty caloPackedMet_
Definition: MET.h:208
double dpx() const
Definition: MET.h:182
double MET::caloMETPhi ( ) const

Definition at line 187 of file MET.cc.

References caloMETP2(), and pat::MET::Vector2::phi().

187  {
188  return caloMETP2().phi();
189 }
Vector2 caloMETP2() const
Definition: MET.cc:178
double phi() const
Definition: MET.h:153
double pat::MET::CaloMETPhiInmHF ( ) const
inline

Returns the event MET-phi in HF-.

Definition at line 120 of file MET.h.

References SpecificCaloMETData::CaloMETPhiInmHF, and caloSpecific().

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

Returns the event MET-phi in HF+.

Definition at line 118 of file MET.h.

References SpecificCaloMETData::CaloMETPhiInpHF, and caloSpecific().

118 {return caloSpecific().CaloMETPhiInpHF;}
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:122
double MET::caloMETPt ( ) const

Definition at line 183 of file MET.cc.

References caloMETP2(), and pat::MET::Vector2::pt().

183  {
184  return caloMETP2().pt();
185 }
Vector2 caloMETP2() const
Definition: MET.cc:178
double pt() const
Definition: MET.h:152
double MET::caloMETSumEt ( ) const

Definition at line 191 of file MET.cc.

References caloPackedMet_, and pat::MET::PackedMETUncertainty::dsumEt().

191  {
192  return caloPackedMet_.dsumEt();
193 }
double dsumEt() const
Definition: MET.h:184
PackedMETUncertainty caloPackedMet_
Definition: MET.h:208
double pat::MET::CaloSETInmHF ( ) const
inline

Returns the event SET in HF-.

Definition at line 112 of file MET.h.

References SpecificCaloMETData::CaloSETInmHF, and caloSpecific().

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

Returns the event SET in HF+.

Definition at line 110 of file MET.h.

References SpecificCaloMETData::CaloSETInpHF, and caloSpecific().

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

accessor for the CaloMET-specific structure

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

122  {
123  if (!isCaloMET()) throw cms::Exception("pat::MET") << "This pat::MET has not been made from a reco::CaloMET\n";
124  return caloMET_[0];
125  }
bool isCaloMET() const
True if this pat::MET was made from a reco::CaloMET.
Definition: MET.h:78
std::vector< SpecificCaloMETData > caloMET_
Definition: MET.h:199
double pat::MET::ChargedEMEtFraction ( ) const
inline

Definition at line 130 of file MET.h.

References SpecificPFMETData::ChargedEMFraction, and pfSpecific().

Referenced by METTester::analyze().

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

Definition at line 131 of file MET.h.

References SpecificPFMETData::ChargedHadFraction, and pfSpecific().

Referenced by METTester::analyze(), and METAnalyzer::fillMonitorElement().

131 { return pfSpecific().ChargedHadFraction; }
const SpecificPFMETData & pfSpecific() const
accessor for the pfMET-specific structure
Definition: MET.h:136
virtual MET* pat::MET::clone ( void  ) const
inlinevirtual

required reimplementation of the Candidate's clone method

Reimplemented from reco::MET.

Definition at line 63 of file MET.h.

References MET().

63 { return new MET(*this); }
MET()
default constructor
Definition: MET.cc:11
double pat::MET::emEtFraction ( ) const
inline

Returns the event electromagnetic energy fraction.

Definition at line 92 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::EtFractionEm.

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

Returns the event electromagnetic energy in EB.

Definition at line 102 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::EmEtInEB.

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

Returns the event electromagnetic energy in EE.

Definition at line 104 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::EmEtInEE.

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

Returns the event electromagnetic energy extracted from HF.

Definition at line 106 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::EmEtInHF.

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

Returns the event hadronic energy fraction.

Definition at line 90 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::EtFractionHadronic.

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

return the associated GenMET

return the generated MET from neutrinos

Definition at line 77 of file MET.cc.

References genMET_.

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

Returns the event hadronic energy in HB.

Definition at line 94 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::HadEtInHB.

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

Returns the event hadronic energy in HE.

Definition at line 98 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::HadEtInHE.

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

Returns the event hadronic energy in HF.

Definition at line 100 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::HadEtInHF.

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

Returns the event hadronic energy in HO.

Definition at line 96 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::HadEtInHO.

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

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

Definition at line 78 of file MET.h.

References caloMET_.

Referenced by caloSpecific().

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

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

Definition at line 80 of file MET.h.

References pfMET_.

Referenced by METTester::analyze(), and pfSpecific().

80 { return !pfMET_.empty(); }
std::vector< SpecificPFMETData > pfMET_
Definition: MET.h:201
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 82 of file MET.h.

References caloMET_, and pfMET_.

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

Returns the maximum energy deposited in ECAL towers.

Definition at line 86 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::MaxEtInEmTowers.

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

Returns the maximum energy deposited in HCAL towers.

Definition at line 88 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::MaxEtInHadTowers.

const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:122
double pat::MET::metSignificance ( ) const
inline

Returns the event MET Significance.

Definition at line 108 of file MET.h.

References caloSpecific(), and SpecificCaloMETData::METSignificance.

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

Definition at line 132 of file MET.h.

References SpecificPFMETData::MuonFraction, and pfSpecific().

Referenced by METTester::analyze().

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

Definition at line 128 of file MET.h.

References SpecificPFMETData::NeutralEMFraction, and pfSpecific().

Referenced by METTester::analyze(), and METAnalyzer::fillMonitorElement().

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

Definition at line 129 of file MET.h.

References SpecificPFMETData::NeutralHadFraction, and pfSpecific().

Referenced by METTester::analyze(), and METAnalyzer::fillMonitorElement().

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

Definition at line 63 of file MET.cc.

References caloMET_, caloPackedMet_, genMET_, pfMET_, uncertaintiesRaw_, uncertaintiesType1_, and uncertaintiesType1p2_.

Referenced by MET().

63  {
65  genMET_ = iOther.genMET_;
66  caloMET_ =iOther.caloMET_;
67  pfMET_ =iOther.pfMET_;
68  uncertaintiesRaw_ = iOther.uncertaintiesRaw_;
69  uncertaintiesType1_ = iOther.uncertaintiesType1_;
70  uncertaintiesType1p2_ = iOther.uncertaintiesType1p2_;
71  caloPackedMet_ = iOther.caloPackedMet_;
72 
73  return *this;
74 }
std::vector< PackedMETUncertainty > uncertaintiesRaw_
Definition: MET.h:206
std::vector< PackedMETUncertainty > uncertaintiesType1p2_
Definition: MET.h:206
PackedMETUncertainty caloPackedMet_
Definition: MET.h:208
std::vector< reco::GenMET > genMET_
Definition: MET.h:197
std::vector< SpecificCaloMETData > caloMET_
Definition: MET.h:199
std::vector< PackedMETUncertainty > uncertaintiesType1_
Definition: MET.h:206
Templated PAT object container.
Definition: PATObject.h:41
std::vector< SpecificPFMETData > pfMET_
Definition: MET.h:201
const SpecificPFMETData& pat::MET::pfSpecific ( ) const
inline

accessor for the pfMET-specific structure

Definition at line 136 of file MET.h.

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

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

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

set the associated GenMET

method to set the generated MET

Definition at line 82 of file MET.cc.

References genMET_.

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

82  {
83  genMET_.clear();
84  genMET_.push_back(gm);
85 }
std::vector< reco::GenMET > genMET_
Definition: MET.h:197
void MET::setShift ( double  px,
double  py,
double  sumEt,
MET::METUncertainty  shift,
MET::METUncertaintyLevel  level = Type1 
)

Definition at line 145 of file MET.cc.

References Calo, caloPackedMet_, edm::hlt::Exception, METUncertaintySize, reco::LeafCandidate::px(), reco::LeafCandidate::py(), Raw, pat::MET::PackedMETUncertainty::set(), edm::shift, reco::MET::sumEt(), Type1, Type1p2, uncertaintiesRaw_, uncertaintiesType1_, and uncertaintiesType1p2_.

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

145  {
146  if( level != Calo ) {
147  if (level != Type1 && level != Type1p2 && level != Raw) throw cms::Exception("Unsupported", "MET uncertainties only supported for Raw, Type1 and Type1p2\n");
148  std::vector<PackedMETUncertainty> &v = (level == Type1 ? uncertaintiesType1_ : (level == Type1p2 ? uncertaintiesType1p2_ : uncertaintiesRaw_));
149  if (shift == MET::METUncertainty::NoShift) {
150  if (v.empty()) { // fresh MET: make size 1, add this
151  v.resize(1);
152  v.back().set(px - this->px(), py - this->py(), sumEt - this->sumEt());
153  } else if (v.size() == 1) { // only unshifted, and I'm updating it
154  v.back().set(px - this->px(), py - this->py(), sumEt - this->sumEt());
155  } else if (v.size() != MET::METUncertainty::METUncertaintySize) {
156  // already initialized with something I don't understand
157  throw cms::Exception("Unsupported", "setShift called after the set of uncertainties is not of a supported size (not 0, 1, or METUncertaintySize)\n");
158  } else {
159  // full set of uncertainties, and I'm updating the no-shift one
160  v[shift].set(px - this->px(), py - this->py(), sumEt - this->sumEt());
161  }
162  } else {
163  if (v.empty()) { // fresh MET. make room for all
164  v.resize(METUncertaintySize);
165  } else if (v.size() == 1) { // I had set only the unshifted, so I extend it copying over the existing one
166  v.resize(METUncertaintySize, v.back());
167  } else if (v.size() != MET::METUncertainty::METUncertaintySize) { // already initialized with something I don't understand
168  throw cms::Exception("Unsupported", "setShift called after the set of uncertainties is not of a supported size (not 0, 1, or METUncertaintySize)\n");
169  }
170  v[shift].set(px - this->px(), py - this->py(), sumEt - this->sumEt());
171  }
172  } else {
174  }
175 }
std::vector< PackedMETUncertainty > uncertaintiesRaw_
Definition: MET.h:206
std::vector< PackedMETUncertainty > uncertaintiesType1p2_
Definition: MET.h:206
double sumEt() const
Definition: MET.h:56
PackedMETUncertainty caloPackedMet_
Definition: MET.h:208
virtual double px() const
x coordinate of momentum vector
std::vector< PackedMETUncertainty > uncertaintiesType1_
Definition: MET.h:206
static unsigned int const shift
tuple level
Definition: testEve_cfg.py:34
virtual double py() const
y coordinate of momentum vector
void set(float dpx, float dpy, float dsumEt)
Definition: MET.h:185
MET::Vector2 MET::shiftedP2 ( MET::METUncertainty  shift,
MET::METUncertaintyLevel  level = Type1 
) const

Definition at line 101 of file MET.cc.

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

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

101  {
102  if (level != Type1 && level != Type1p2 && level != Raw) throw cms::Exception("Unsupported", "MET uncertainties only supported for Raw, Type1 and Type1p2\n");
103  const std::vector<PackedMETUncertainty> &v = (level == Type1 ? uncertaintiesType1_ : (level == Type1p2 ? uncertaintiesType1p2_ : uncertaintiesRaw_));
104  if (v.empty()) throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type");
105  if (v.size() == 1) {
106  if (shift != MET::METUncertainty::NoShift) throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type (only central value available)");
107  return Vector2{ (px() + v.front().dpx()), (py() + v.front().dpy()) };
108  }
109  Vector2 ret{ (px() + v[shift].dpx()), (py() + v[shift].dpy()) };
110  return ret;
111 }
std::vector< PackedMETUncertainty > uncertaintiesRaw_
Definition: MET.h:206
std::vector< PackedMETUncertainty > uncertaintiesType1p2_
Definition: MET.h:206
virtual double px() const
x coordinate of momentum vector
std::vector< PackedMETUncertainty > uncertaintiesType1_
Definition: MET.h:206
static unsigned int const shift
tuple level
Definition: testEve_cfg.py:34
virtual double py() const
y coordinate of momentum vector
MET::Vector MET::shiftedP3 ( MET::METUncertainty  shift,
MET::METUncertaintyLevel  level = Type1 
) const

Definition at line 112 of file MET.cc.

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

112  {
113  if (level != Type1 && level != Type1p2 && level != Raw) throw cms::Exception("Unsupported", "MET uncertainties only supported for Raw, Type1 and Type1p2\n");
114  const std::vector<PackedMETUncertainty> &v = (level == Type1 ? uncertaintiesType1_ : (level == Type1p2 ? uncertaintiesType1p2_ : uncertaintiesRaw_));
115  if (v.empty()) throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type");
116  if (v.size() == 1) {
117  if (shift != MET::METUncertainty::NoShift) throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type (only central value available)");
118  return Vector(px() + v.front().dpx(), py() + v.front().dpy(), 0);
119  }
120  return Vector(px() + v[shift].dpx(), py() + v[shift].dpy(), 0);
121 }
std::vector< PackedMETUncertainty > uncertaintiesRaw_
Definition: MET.h:206
std::vector< PackedMETUncertainty > uncertaintiesType1p2_
Definition: MET.h:206
virtual double px() const
x coordinate of momentum vector
std::vector< PackedMETUncertainty > uncertaintiesType1_
Definition: MET.h:206
math::XYZVector Vector
point in the space
Definition: LeafCandidate.h:29
static unsigned int const shift
tuple level
Definition: testEve_cfg.py:34
virtual double py() const
y coordinate of momentum vector
MET::LorentzVector MET::shiftedP4 ( METUncertainty  shift,
MET::METUncertaintyLevel  level = Type1 
) const

Definition at line 122 of file MET.cc.

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

122  {
123  if (level != Type1 && level != Type1p2 && level != Raw) throw cms::Exception("Unsupported", "MET uncertainties only supported for Raw, Type1 and Type1p2\n");
124  const std::vector<PackedMETUncertainty> &v = (level == Type1 ? uncertaintiesType1_ : (level == Type1p2 ? uncertaintiesType1p2_ : uncertaintiesRaw_));
125  if (v.empty()) throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type");
126  if (v.size() == 1) {
127  if (shift != MET::METUncertainty::NoShift) throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type (only central value available)");
128  double x = px() + v.front().dpx(), y = py() + v.front().dpy();
129  return LorentzVector(x, y, 0, std::hypot(x,y));
130  }
131  double x = px() + v[shift].dpx(), y = py() + v[shift].dpy();
132  return LorentzVector(x, y, 0, std::hypot(x,y));
133 }
std::vector< PackedMETUncertainty > uncertaintiesRaw_
Definition: MET.h:206
std::vector< PackedMETUncertainty > uncertaintiesType1p2_
Definition: MET.h:206
virtual double y() const
rapidity
virtual double px() const
x coordinate of momentum vector
std::vector< PackedMETUncertainty > uncertaintiesType1_
Definition: MET.h:206
static unsigned int const shift
tuple level
Definition: testEve_cfg.py:34
Definition: DDAxes.h:10
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: LeafCandidate.h:23
virtual double py() const
y coordinate of momentum vector
double pat::MET::shiftedPhi ( METUncertainty  shift,
METUncertaintyLevel  level = Type1 
) const
inline

Definition at line 161 of file MET.h.

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

Referenced by uncorrectedPhi().

161 { return shiftedP2(shift,level).phi(); }
double phi() const
Definition: MET.h:153
Vector2 shiftedP2(METUncertainty shift, METUncertaintyLevel level=Type1) const
Definition: MET.cc:101
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 160 of file MET.h.

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

Referenced by uncorrectedPt().

160 { return shiftedP2(shift,level).pt(); }
double pt() const
Definition: MET.h:152
Vector2 shiftedP2(METUncertainty shift, METUncertaintyLevel level=Type1) const
Definition: MET.cc:101
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 158 of file MET.h.

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

158 { return shiftedP2(shift,level).px; }
double px
Definition: MET.h:151
Vector2 shiftedP2(METUncertainty shift, METUncertaintyLevel level=Type1) const
Definition: MET.cc:101
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 159 of file MET.h.

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

159 { return shiftedP2(shift,level).py; }
double py
Definition: MET.h:151
Vector2 shiftedP2(METUncertainty shift, METUncertaintyLevel level=Type1) const
Definition: MET.cc:101
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 134 of file MET.cc.

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

Referenced by uncorrectedSumEt().

134  {
135  if (level != Type1 && level != Type1p2 && level != Raw) throw cms::Exception("Unsupported", "MET uncertainties only supported for Raw, Type1 and Type1p2\n");
136  const std::vector<PackedMETUncertainty> &v = (level == Type1 ? uncertaintiesType1_ : (level == Type1p2 ? uncertaintiesType1p2_ : uncertaintiesRaw_));
137  if (v.empty()) throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type");
138  if (v.size() == 1) {
139  if (shift != MET::METUncertainty::NoShift) throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type (only central value available)");
140  return sumEt() + v.front().dsumEt();
141  }
142  return sumEt() + v[shift].dsumEt();
143 }
std::vector< PackedMETUncertainty > uncertaintiesRaw_
Definition: MET.h:206
std::vector< PackedMETUncertainty > uncertaintiesType1p2_
Definition: MET.h:206
double sumEt() const
Definition: MET.h:56
std::vector< PackedMETUncertainty > uncertaintiesType1_
Definition: MET.h:206
static unsigned int const shift
tuple level
Definition: testEve_cfg.py:34
double pat::MET::Type6EtFraction ( ) const
inline

Definition at line 133 of file MET.h.

References pfSpecific(), and SpecificPFMETData::Type6Fraction.

Referenced by METTester::analyze(), and METAnalyzer::fillMonitorElement().

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

Definition at line 134 of file MET.h.

References pfSpecific(), and SpecificPFMETData::Type7Fraction.

Referenced by METTester::analyze(), and METAnalyzer::fillMonitorElement().

134 { return pfSpecific().Type7Fraction; }
const SpecificPFMETData & pfSpecific() const
accessor for the pfMET-specific structure
Definition: MET.h:136
float MET::uncorrectedPhi ( ) const

Definition at line 93 of file MET.cc.

References shiftedPhi().

93  {
94  return shiftedPhi(MET::METUncertainty::NoShift, MET::METUncertaintyLevel::Raw);
95 }
double shiftedPhi(METUncertainty shift, METUncertaintyLevel level=Type1) const
Definition: MET.h:161
float MET::uncorrectedPt ( ) const

return uncorrrection related stuff

Definition at line 90 of file MET.cc.

References shiftedPt().

90  {
91  return shiftedPt(MET::METUncertainty::NoShift, MET::METUncertaintyLevel::Raw);
92 }
double shiftedPt(METUncertainty shift, METUncertaintyLevel level=Type1) const
Definition: MET.h:160
float MET::uncorrectedSumEt ( ) const

Definition at line 96 of file MET.cc.

References shiftedSumEt().

96  {
97  return shiftedSumEt(MET::METUncertainty::NoShift, MET::METUncertaintyLevel::Raw);
98 }
double shiftedSumEt(METUncertainty shift, METUncertaintyLevel level=Type1) const
Definition: MET.cc:134

Member Data Documentation

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

Definition at line 199 of file MET.h.

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

PackedMETUncertainty pat::MET::caloPackedMet_
protected

Definition at line 208 of file MET.h.

Referenced by caloMETP2(), caloMETSumEt(), operator=(), and setShift().

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

Definition at line 197 of file MET.h.

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

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

Definition at line 201 of file MET.h.

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

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

Definition at line 206 of file MET.h.

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

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

Definition at line 206 of file MET.h.

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

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

Definition at line 206 of file MET.h.

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