CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Protected Attributes | Private Member Functions | 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  METCorrectionLevel {
  Raw = 0, Type1 = 1, Type01 = 2, TypeXY = 3,
  Type1XY = 4, Type01XY = 5, Type1Smear = 6, Type01Smear = 7,
  Type1SmearXY = 8, Type01SmearXY = 9, RawCalo = 10, RawChs = 11,
  RawTrk = 12, RawDeepResponseTune = 13, RawDeepResolutionTune = 14, METCorrectionLevelSize = 15
}
 
enum  METCorrectionType {
  None = 0, T1 = 1, T0 = 2, TXY = 3,
  TXYForRaw = 4, TXYForT01 = 5, TXYForT1Smear = 6, TXYForT01Smear = 7,
  Smear = 8, Calo = 9, Chs = 10, Trk = 11,
  DeepResponseTune = 12, DeepResolutionTune = 13, METCorrectionTypeSize = 14
}
 
enum  METUncertainty {
  JetResUp = 0, JetResDown = 1, JetEnUp = 2, JetEnDown = 3,
  MuonEnUp = 4, MuonEnDown = 5, ElectronEnUp = 6, ElectronEnDown = 7,
  TauEnUp = 8, TauEnDown = 9, UnclusteredEnUp = 10, UnclusteredEnDown = 11,
  PhotonEnUp = 12, PhotonEnDown = 13, NoShift = 14, METUncertaintySize = 15,
  JetResUpSmear = 16, JetResDownSmear = 17, METFullUncertaintySize = 18
}
 
- 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 caloMetSignificance () const
 Returns the event MET Significance. More...
 
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
 
METclone () const override
 required reimplementation of the Candidate's clone method More...
 
Vector2 corP2 (METCorrectionLevel level=Type1) const
 
Vector corP3 (METCorrectionLevel level=Type1) const
 
LorentzVector corP4 (METCorrectionLevel level=Type1) const
 
double corPhi (METCorrectionLevel level=Type1) const
 
double corPt (METCorrectionLevel level=Type1) const
 
double corPx (METCorrectionLevel level=Type1) const
 
double corPy (METCorrectionLevel level=Type1) const
 
double corSumEt (METCorrectionLevel level=Type1) 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 edm::Ptr< reco::MET > &aMETRef)
 constructor from a Ptr to a 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 reco::MET &aMET)
 constructor from reco::MET More...
 
 MET (const reco::MET &corMET, const MET &srcMET)
 constructor for corrected METs (keeping specific informations from src MET) More...
 
 MET (MET const &)
 copy constructor More...
 
double metSignificance () const
 
double metSumPtUnclustered () const
 
double MuonEtFraction () const
 
double NeutralEMFraction () const
 
double NeutralHadEtFraction () const
 
METoperator= (MET const &)
 
const SpecificPFMETDatapfSpecific () const
 accessor for the pfMET-specific structure More...
 
void setCorShift (double px, double py, double sumEt, METCorrectionType level)
 
void setGenMET (const reco::GenMET &gm)
 set the associated GenMET More...
 
void setMETSignificance (const double &metSig)
 
void setMETSumPtUnclustered (const double &sumPtUnclustered)
 
void setUncShift (double px, double py, double sumEt, METUncertainty shift, bool isSmeared=false)
 
Vector2 shiftedP2 (METUncertainty shift, METCorrectionLevel level=Type1) const
 
Vector2 shiftedP2_74x (METUncertainty shift, METCorrectionLevel level) const
 
Vector shiftedP3 (METUncertainty shift, METCorrectionLevel level=Type1) const
 
Vector shiftedP3_74x (METUncertainty shift, METCorrectionLevel level) const
 
LorentzVector shiftedP4 (METUncertainty shift, METCorrectionLevel level=Type1) const
 
LorentzVector shiftedP4_74x (METUncertainty shift, METCorrectionLevel level) const
 
double shiftedPhi (METUncertainty shift, METCorrectionLevel level=Type1) const
 
double shiftedPt (METUncertainty shift, METCorrectionLevel level=Type1) const
 
double shiftedPx (METUncertainty shift, METCorrectionLevel level=Type1) const
 
double shiftedPy (METUncertainty shift, METCorrectionLevel level=Type1) const
 
double shiftedSumEt (METUncertainty shift, METCorrectionLevel level=Type1) const
 
double shiftedSumEt_74x (METUncertainty shift, METCorrectionLevel level) const
 
double Type6EtFraction () const
 
double Type7EtFraction () const
 
Vector2 uncorP2 () const
 
Vector uncorP3 () const
 
LorentzVector uncorP4 () const
 
double uncorPhi () const
 
double uncorPt () const
 
double uncorPx () const
 
double uncorPy () const
 
double uncorSumEt () const
 
 ~MET () override
 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, const bool overwrite=false)
 Set user-defined int. More...
 
void addUserData (const std::string &label, const T &data, bool transientOnly=false, bool overwrite=false)
 
void addUserDataFromPtr (const std::string &label, const edm::Ptr< pat::UserData > &data, bool overwrite=false)
 
void addUserFloat (const std::string &label, float data, const bool overwrite=false)
 Set user-defined float. More...
 
void addUserInt (const std::string &label, int32_t data, const bool overwrite=false)
 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 char *key) const
 a CINT-friendly interface More...
 
bool hasUserFloat (const std::string &key) const
 Return true if there is a user-defined float with a given name. 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 edm::Ptr< reco::MET > &ref)
 constructor from reference More...
 
 PATObject (const edm::RefToBase< reco::MET > &ref)
 constructor from reference More...
 
 PATObject (const reco::MET &obj)
 constructor from a base object (leaves invalid reference to original object!) 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 char *nameAlgorithm, const bool algoCondAccepted=true, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByAlgorithm (const char *nameAlgorithm, const unsigned algoCondAccepted, const size_t idx=0) const
 
const TriggerObjectStandAlonetriggerObjectMatchByAlgorithm (const std::string &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 TriggerObjectStandAlonetriggerObjectMatchByCollection (const char *coll, 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 TriggerObjectStandAlonetriggerObjectMatchByCondition (const char *nameCondition, 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 TriggerObjectStandAlonetriggerObjectMatchByFilter (const char *labelFilter, 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 TriggerObjectStandAlonetriggerObjectMatchByFilterID (const unsigned triggerObjectType, 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 char *namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1, 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 std::string &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 TriggerObjectStandAloneCollectiontriggerObjectMatches () const
 get all matched trigger objects More...
 
const TriggerObjectStandAloneCollection triggerObjectMatchesByAlgorithm (const char *nameAlgorithm, const bool algoCondAccepted=true) const
 
const TriggerObjectStandAloneCollection triggerObjectMatchesByAlgorithm (const char *nameAlgorithm, const unsigned algoCondAccepted) const
 
const TriggerObjectStandAloneCollection triggerObjectMatchesByAlgorithm (const std::string &nameAlgorithm, const bool algoCondAccepted=true) const
 
const TriggerObjectStandAloneCollection triggerObjectMatchesByAlgorithm (const std::string &nameAlgorithm, const unsigned algoCondAccepted) const
 
const TriggerObjectStandAloneCollection triggerObjectMatchesByCollection (const char *coll) const
 
const TriggerObjectStandAloneCollection triggerObjectMatchesByCollection (const std::string &coll) const
 get all matched trigger objects from a certain collection More...
 
const TriggerObjectStandAloneCollection triggerObjectMatchesByCondition (const char *nameCondition) 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 triggerObjectMatchesByFilter (const char *labelFilter) const
 
const TriggerObjectStandAloneCollection triggerObjectMatchesByFilter (const std::string &labelFilter) const
 get all matched HLT objects used in a certain HLT filter More...
 
const TriggerObjectStandAloneCollection triggerObjectMatchesByFilterID (const unsigned triggerObjectType) const
 
const TriggerObjectStandAloneCollection triggerObjectMatchesByPath (const char *namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true) const
 
const TriggerObjectStandAloneCollection triggerObjectMatchesByPath (const char *namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted=1) const
 
const TriggerObjectStandAloneCollection triggerObjectMatchesByPath (const std::string &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 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 char *key) const
 a CINT-friendly interface More...
 
float userFloat (const std::string &key) const
 
const std::vector< std::string > & userFloatNames () const
 Get list of user-defined float names. More...
 
std::vector< float > userFloatRange (const std::string &key) const
 return a range of values corresponding to key More...
 
int32_t userInt (const std::string &key) const
 
const std::vector< std::string > & userIntNames () const
 Get list of user-defined int names. More...
 
std::vector< int > userIntRange (const std::string &key) const
 returns a range of values corresponding to key More...
 
 ~PATObject () override
 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
 
int isWeighted () const
 boolean if weights were applied by algorithm (e.g. PUPPI weights) More...
 
 MET ()
 
 MET (const LorentzVector &p4_, const Point &vtx_, bool isWeighted=false)
 
 MET (double sumet_, const LorentzVector &p4_, const Point &vtx_, bool isWeighted=false)
 
 MET (double sumet_, const std::vector< CorrMETData > &corr_, const LorentzVector &p4_, const Point &vtx_, bool isWeighted=false)
 
std::vector< CorrMETDatamEtCorr () const
 
double mEtSig () const
 
void setIsWeighted (bool isWeighted)
 Set boolean if weights were applied by algorithm (e.g. PUPPI weights) More...
 
void setSignificanceMatrix (const reco::METCovMatrix &matrix)
 
double significance () const
 
double sumEt () const
 
- Public Member Functions inherited from reco::RecoCandidate
const TrackbestTrack () const override
 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...
 
RecoCandidateclone () const override
 returns a clone of the Candidate object More...
 
virtual reco::TrackRef combinedMuon () const
 reference to a stand-alone muon Track More...
 
float dxyError () const override
 uncertainty on dxy More...
 
float dzError () const override
 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...
 
 ~RecoCandidate () override
 destructor More...
 
- Public Member Functions inherited from reco::LeafCandidate
Vector boostToCM () const final
 
int charge () const final
 electric charge More...
 
void construct (int qx3, float pt, float eta, float phi, float mass, const Point &vtx, int pdgId, int status)
 
const Candidatedaughter (const std::string &s) const override
 return daughter with a specified role name More...
 
Candidatedaughter (const std::string &s) override
 return daughter with a specified role name More...
 
const Candidatedaughter (size_type) const override
 return daughter at a given position (throws an exception) More...
 
Candidatedaughter (size_type) override
 return daughter at a given position (throws an exception) More...
 
double energy () const final
 energy More...
 
double et () const final
 transverse energy More...
 
double et2 () const final
 transverse energy squared (use this for cut!) More...
 
double eta () const final
 momentum pseudorapidity More...
 
void fillVertexCovariance (CovarianceMatrix &v) const override
 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...
 
bool hasMasterClone () const override
 
bool hasMasterClonePtr () const override
 
bool isCaloMuon () const override
 
bool isConvertedPhoton () const override
 
bool isElectron () const override
 
bool isGlobalMuon () const override
 
bool isJet () const override
 
bool isMuon () const override
 
bool isPhoton () const override
 
bool isStandAloneMuon () const override
 
bool isTrackerMuon () const override
 
 LeafCandidate ()
 
template<typename... Args>
 LeafCandidate (Args &&... args)
 
 LeafCandidate (const Candidate &c)
 
 LeafCandidate (LeafCandidate &&)=default
 
 LeafCandidate (LeafCandidate &rh)
 
 LeafCandidate (LeafCandidate const &)=default
 
bool longLived () const final
 is long lived? More...
 
double mass () const final
 mass More...
 
bool massConstraint () const final
 do mass constraint? More...
 
double massSqr () const final
 mass squared More...
 
const CandidateBaseRefmasterClone () const override
 
const CandidatePtrmasterClonePtr () const override
 
template<typename Ref >
Ref masterRef () const
 cast master clone reference to a concrete type More...
 
Vector momentum () const final
 spatial momentum vector More...
 
const Candidatemother (size_type) const override
 return mother at a given position (throws an exception) More...
 
double mt () const final
 transverse mass More...
 
double mtSqr () const 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...
 
size_t numberOfDaughters () const override
 number of daughters More...
 
size_t numberOfMothers () const override
 number of mothers More...
 
size_t numberOfSourceCandidatePtrs () const override
 
LeafCandidateoperator= (LeafCandidate &&)=default
 
LeafCandidateoperator= (LeafCandidate const &)=default
 
double p () const final
 magnitude of momentum vector More...
 
const LorentzVectorp4 () const final
 four-momentum Lorentz vector More...
 
int pdgId () const final
 PDG identifier. More...
 
double phi () const final
 momentum azimuthal angle More...
 
const PolarLorentzVectorpolarP4 () const final
 four-momentum Lorentz vector More...
 
double pt () const final
 transverse momentum More...
 
double px () const final
 x coordinate of momentum vector More...
 
double py () const final
 y coordinate of momentum vector More...
 
double pz () const final
 z coordinate of momentum vector More...
 
double rapidity () const final
 rapidity More...
 
void setCharge (Charge q) final
 set electric charge More...
 
void setLongLived () final
 
void setMass (double m) final
 set particle mass More...
 
void setMassConstraint () final
 
void setP4 (const LorentzVector &p4) final
 set 4-momentum More...
 
void setP4 (const PolarLorentzVector &p4) final
 set 4-momentum More...
 
void setPdgId (int pdgId) final
 
void setPz (double pz) final
 
void setStatus (int status) final
 set status word More...
 
void setThreeCharge (Charge qx3) final
 set electric charge More...
 
void setVertex (const Point &vertex) override
 set vertex More...
 
CandidatePtr sourceCandidatePtr (size_type i) const override
 
int status () const final
 status word More...
 
double theta () const final
 momentum polar angle More...
 
int threeCharge () const final
 electric charge More...
 
const Pointvertex () const override
 vertex position (overwritten by PF...) More...
 
double vertexChi2 () const override
 chi-squares More...
 
CovarianceMatrix vertexCovariance () const final
 return SMatrix More...
 
double vertexCovariance (int i, int j) const override
 (i, j)-th element of error matrix, i, j = 0, ... 2 More...
 
double vertexNdof () const override
 
double vertexNormalizedChi2 () const override
 chi-squared divided by n.d.o.f. More...
 
double vx () const override
 x coordinate of vertex position More...
 
double vy () const override
 y coordinate of vertex position More...
 
double vz () const override
 z coordinate of vertex position More...
 
double y () const final
 rapidity More...
 
 ~LeafCandidate () override
 destructor More...
 
- Public Member Functions inherited from reco::Candidate
iterator begin ()
 first daughter iterator More...
 
const_iterator begin () const
 first daughter const_iterator More...
 
 Candidate ()
 default constructor More...
 
iterator end ()
 last daughter iterator More...
 
const_iterator end () const
 last daughter const_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< PackedMETUncertaintycorrections_
 
std::vector< PackedMETUncertaintyuncertainties_
 
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::LookupTableRecordefficiencyValues_
 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::CandKinResolutionkinResolutions_
 Kinematic resolutions. More...
 
std::vector< reco::CandidatePtrVectoroverlapItems_
 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 Member Functions

const PackedMETUncertainty findMETTotalShift (MET::METCorrectionLevel cor, MET::METUncertainty shift) const
 
void initCorMap ()
 

Private Attributes

std::vector< SpecificCaloMETDatacaloMET_
 
std::map< MET::METCorrectionLevel, std::vector< MET::METCorrectionType > > corMap_
 
std::vector< reco::GenMETgenMET_
 
double metSig_
 
std::vector< SpecificPFMETDatapfMET_
 
double sumPtUnclustered_
 

Additional Inherited Members

- Protected Member Functions inherited from pat::PATObject< reco::MET >
void addUserDataObject_ (const std::string &label, std::unique_ptr< pat::UserData > value, bool overwrite=false)
 
- 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 40 of file MET.h.

Member Enumeration Documentation

◆ METCorrectionLevel

Enumerator
Raw 
Type1 
Type01 
TypeXY 
Type1XY 
Type01XY 
Type1Smear 
Type01Smear 
Type1SmearXY 
Type01SmearXY 
RawCalo 
RawChs 
RawTrk 
RawDeepResponseTune 
RawDeepResolutionTune 
METCorrectionLevelSize 

Definition at line 173 of file MET.h.

173  {
174  Raw = 0,
175  Type1 = 1,
176  Type01 = 2,
177  TypeXY = 3,
178  Type1XY = 4,
179  Type01XY = 5,
180  Type1Smear = 6,
181  Type01Smear = 7,
182  Type1SmearXY = 8,
183  Type01SmearXY = 9,
184  RawCalo = 10,
185  RawChs = 11,
186  RawTrk = 12,
187  RawDeepResponseTune = 13,
190  };

◆ METCorrectionType

Enumerator
None 
T1 
T0 
TXY 
TXYForRaw 
TXYForT01 
TXYForT1Smear 
TXYForT01Smear 
Smear 
Calo 
Chs 
Trk 
DeepResponseTune 
DeepResolutionTune 
METCorrectionTypeSize 

Definition at line 191 of file MET.h.

191  {
192  None = 0,
193  T1 = 1,
194  T0 = 2,
195  TXY = 3,
196  TXYForRaw = 4,
197  TXYForT01 = 5,
198  TXYForT1Smear = 6,
199  TXYForT01Smear = 7,
200  Smear = 8,
201  Calo = 9,
202  Chs = 10,
203  Trk = 11,
204  DeepResponseTune = 12,
205  DeepResolutionTune = 13,
207  };

◆ METUncertainty

Enumerator
JetResUp 
JetResDown 
JetEnUp 
JetEnDown 
MuonEnUp 
MuonEnDown 
ElectronEnUp 
ElectronEnDown 
TauEnUp 
TauEnDown 
UnclusteredEnUp 
UnclusteredEnDown 
PhotonEnUp 
PhotonEnDown 
NoShift 
METUncertaintySize 
JetResUpSmear 
JetResDownSmear 
METFullUncertaintySize 

Definition at line 152 of file MET.h.

152  {
153  JetResUp = 0,
154  JetResDown = 1,
155  JetEnUp = 2,
156  JetEnDown = 3,
157  MuonEnUp = 4,
158  MuonEnDown = 5,
159  ElectronEnUp = 6,
160  ElectronEnDown = 7,
161  TauEnUp = 8,
162  TauEnDown = 9,
163  UnclusteredEnUp = 10,
164  UnclusteredEnDown = 11,
165  PhotonEnUp = 12,
166  PhotonEnDown = 13,
167  NoShift = 14,
168  METUncertaintySize = 15,
169  JetResUpSmear = 16,
170  JetResDownSmear = 17,
172  };

Constructor & Destructor Documentation

◆ MET() [1/6]

MET::MET ( )

default constructor

Definition at line 9 of file MET.cc.

9 { initCorMap(); }

References initCorMap().

Referenced by clone().

◆ MET() [2/6]

MET::MET ( const reco::MET aMET)

constructor from reco::MET

Definition at line 12 of file MET.cc.

12  : PATObject<reco::MET>(aMET) {
13  const reco::CaloMET *calo = dynamic_cast<const reco::CaloMET *>(&aMET);
14  if (calo != nullptr)
15  caloMET_.push_back(calo->getSpecific());
16  const reco::PFMET *pf = dynamic_cast<const reco::PFMET *>(&aMET);
17  if (pf != nullptr)
18  pfMET_.push_back(pf->getSpecific());
19  const pat::MET *pm = dynamic_cast<const pat::MET *>(&aMET);
20  if (pm != nullptr)
21  this->operator=(*pm);
22 
23  metSig_ = 0.;
24  sumPtUnclustered_ = 0.;
25  initCorMap();
26 }

References caloMET_, initCorMap(), metSig_, operator=(), packedPFCandidateRefMixer_cfi::pf, pfMET_, and sumPtUnclustered_.

◆ MET() [3/6]

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 29 of file MET.cc.

29  : PATObject<reco::MET>(aMETRef) {
30  const reco::CaloMET *calo = dynamic_cast<const reco::CaloMET *>(aMETRef.get());
31  if (calo != nullptr)
32  caloMET_.push_back(calo->getSpecific());
33  const reco::PFMET *pf = dynamic_cast<const reco::PFMET *>(aMETRef.get());
34  if (pf != nullptr)
35  pfMET_.push_back(pf->getSpecific());
36  const pat::MET *pm = dynamic_cast<const pat::MET *>(aMETRef.get());
37  if (pm != nullptr)
38  this->operator=(*pm);
39 
40  metSig_ = 0.;
41  sumPtUnclustered_ = 0.;
42  initCorMap();
43 }

References caloMET_, edm::RefToBase< T >::get(), initCorMap(), metSig_, operator=(), packedPFCandidateRefMixer_cfi::pf, pfMET_, and sumPtUnclustered_.

◆ MET() [4/6]

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 46 of file MET.cc.

46  : PATObject<reco::MET>(aMETRef) {
47  const reco::CaloMET *calo = dynamic_cast<const reco::CaloMET *>(aMETRef.get());
48  if (calo != nullptr)
49  caloMET_.push_back(calo->getSpecific());
50  const reco::PFMET *pf = dynamic_cast<const reco::PFMET *>(aMETRef.get());
51  if (pf != nullptr)
52  pfMET_.push_back(pf->getSpecific());
53  const pat::MET *pm = dynamic_cast<const pat::MET *>(aMETRef.get());
54  if (pm != nullptr)
55  this->operator=(*pm);
56 
57  metSig_ = 0.;
58  sumPtUnclustered_ = 0.;
59  initCorMap();
60 }

References caloMET_, edm::Ptr< T >::get(), initCorMap(), metSig_, operator=(), packedPFCandidateRefMixer_cfi::pf, pfMET_, and sumPtUnclustered_.

◆ MET() [5/6]

MET::MET ( MET const &  iOther)

copy constructor

Definition at line 63 of file MET.cc.

64  : PATObject<reco::MET>(iOther),
65  genMET_(iOther.genMET_),
66  caloMET_(iOther.caloMET_),
67  pfMET_(iOther.pfMET_),
68  metSig_(iOther.metSig_),
69  sumPtUnclustered_(iOther.sumPtUnclustered_),
70  uncertaintiesRaw_(iOther.uncertaintiesRaw_), //74X reading compatibility
71  uncertaintiesType1_(iOther.uncertaintiesType1_), //74X compatibility
72  uncertaintiesType1p2_(iOther.uncertaintiesType1p2_), //74X compatibility
73  uncertainties_(iOther.uncertainties_),
74  corrections_(iOther.corrections_),
75  caloPackedMet_(iOther.caloPackedMet_) {
76  initCorMap();
77 }

References initCorMap().

◆ MET() [6/6]

MET::MET ( const reco::MET corMET,
const MET srcMET 
)

constructor for corrected METs (keeping specific informations from src MET)

constructor for corrected mets, keeping track of srcMET informations,

Definition at line 81 of file MET.cc.

82  : PATObject<reco::MET>(corMET),
83  genMET_(srcMET.genMET_),
84  caloMET_(srcMET.caloMET_),
85  pfMET_(srcMET.pfMET_),
86  metSig_(srcMET.metSig_),
87  sumPtUnclustered_(srcMET.sumPtUnclustered_),
88  caloPackedMet_(srcMET.caloPackedMet_) {
89  setSignificanceMatrix(srcMET.getSignificanceMatrix());
90 
91  initCorMap();
92 }

References initCorMap(), reco::MET::setSignificanceMatrix(), and correctionTermsCaloMet_cff::srcMET.

◆ ~MET()

MET::~MET ( )
override

destructor

Definition at line 95 of file MET.cc.

95 {}

Member Function Documentation

◆ CaloMETInmHF()

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

Returns the event MET in HF-.

Definition at line 124 of file MET.h.

124 { return caloSpecific().CaloMETInmHF; }

References SpecificCaloMETData::CaloMETInmHF, and caloSpecific().

◆ CaloMETInpHF()

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

Returns the event MET in HF+.

Definition at line 122 of file MET.h.

122 { return caloSpecific().CaloMETInpHF; }

References SpecificCaloMETData::CaloMETInpHF, and caloSpecific().

◆ caloMETP2()

MET::Vector2 MET::caloMETP2 ( ) const

Definition at line 360 of file MET.cc.

360  {
361  return shiftedP2(MET::METUncertainty::NoShift, MET::METCorrectionLevel::RawCalo);
362 }

References shiftedP2().

Referenced by caloMETPhi(), and caloMETPt().

◆ caloMETPhi()

double MET::caloMETPhi ( ) const

Definition at line 366 of file MET.cc.

366 { return caloMETP2().phi(); }

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

◆ CaloMETPhiInmHF()

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

Returns the event MET-phi in HF-.

Definition at line 128 of file MET.h.

128 { return caloSpecific().CaloMETPhiInmHF; }

References SpecificCaloMETData::CaloMETPhiInmHF, and caloSpecific().

◆ CaloMETPhiInpHF()

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

Returns the event MET-phi in HF+.

Definition at line 126 of file MET.h.

126 { return caloSpecific().CaloMETPhiInpHF; }

References SpecificCaloMETData::CaloMETPhiInpHF, and caloSpecific().

◆ caloMETPt()

double MET::caloMETPt ( ) const

Definition at line 364 of file MET.cc.

364 { return caloMETP2().pt(); }

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

◆ caloMetSignificance()

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

Returns the event MET Significance.

Definition at line 116 of file MET.h.

116 { return caloSpecific().METSignificance; }

References caloSpecific(), and SpecificCaloMETData::METSignificance.

◆ caloMETSumEt()

double MET::caloMETSumEt ( ) const

Definition at line 368 of file MET.cc.

References NoShift, RawCalo, and shiftedSumEt().

◆ CaloSETInmHF()

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

Returns the event SET in HF-.

Definition at line 120 of file MET.h.

120 { return caloSpecific().CaloSETInmHF; }

References SpecificCaloMETData::CaloSETInmHF, and caloSpecific().

◆ CaloSETInpHF()

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

Returns the event SET in HF+.

Definition at line 118 of file MET.h.

118 { return caloSpecific().CaloSETInpHF; }

References SpecificCaloMETData::CaloSETInpHF, and caloSpecific().

◆ caloSpecific()

const SpecificCaloMETData& pat::MET::caloSpecific ( ) const
inline

accessor for the CaloMET-specific structure

Definition at line 130 of file MET.h.

130  {
131  if (!isCaloMET())
132  throw cms::Exception("pat::MET") << "This pat::MET has not been made from a reco::CaloMET\n";
133  return caloMET_[0];
134  }

References caloMET_, Exception, and isCaloMET().

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

◆ ChargedEMEtFraction()

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

Definition at line 139 of file MET.h.

139 { return pfSpecific().ChargedEMFraction; }

References SpecificPFMETData::ChargedEMFraction, and pfSpecific().

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

◆ ChargedHadEtFraction()

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

Definition at line 140 of file MET.h.

140 { return pfSpecific().ChargedHadFraction; }

References SpecificPFMETData::ChargedHadFraction, and pfSpecific().

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

◆ clone()

MET* pat::MET::clone ( void  ) const
inlineoverridevirtual

required reimplementation of the Candidate's clone method

Reimplemented from reco::MET.

Definition at line 60 of file MET.h.

60 { return new MET(*this); }

References MET().

◆ corP2()

MET::Vector2 MET::corP2 ( MET::METCorrectionLevel  cor = Type1) const

Definition at line 326 of file MET.cc.

326 { return shiftedP2(MET::NoShift, cor); }

References NoShift, and shiftedP2().

Referenced by corPhi(), corPt(), corPx(), and corPy().

◆ corP3()

MET::Vector MET::corP3 ( MET::METCorrectionLevel  cor = Type1) const

Definition at line 327 of file MET.cc.

327 { return shiftedP3(MET::NoShift, cor); }

References NoShift, and shiftedP3().

◆ corP4()

MET::LorentzVector MET::corP4 ( MET::METCorrectionLevel  cor = Type1) const

Definition at line 328 of file MET.cc.

328 { return shiftedP4(MET::NoShift, cor); }

References NoShift, and shiftedP4().

◆ corPhi()

double pat::MET::corPhi ( METCorrectionLevel  level = Type1) const
inline

Definition at line 238 of file MET.h.

238 { return corP2(level).phi(); };

References corP2(), personalPlayback::level, and pat::MET::Vector2::phi().

◆ corPt()

double pat::MET::corPt ( METCorrectionLevel  level = Type1) const
inline

Definition at line 237 of file MET.h.

237 { return corP2(level).pt(); };

References corP2(), personalPlayback::level, and pat::MET::Vector2::pt().

◆ corPx()

double pat::MET::corPx ( METCorrectionLevel  level = Type1) const
inline

Definition at line 235 of file MET.h.

235 { return corP2(level).px; };

References corP2(), personalPlayback::level, and pat::MET::Vector2::px.

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

◆ corPy()

double pat::MET::corPy ( METCorrectionLevel  level = Type1) const
inline

Definition at line 236 of file MET.h.

236 { return corP2(level).py; };

References corP2(), personalPlayback::level, and pat::MET::Vector2::py.

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

◆ corSumEt()

double MET::corSumEt ( MET::METCorrectionLevel  cor = Type1) const

Definition at line 329 of file MET.cc.

329 { return shiftedSumEt(MET::NoShift, cor); }

References NoShift, and shiftedSumEt().

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

◆ emEtFraction()

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

Returns the event electromagnetic energy fraction.

Definition at line 100 of file MET.h.

100 { return caloSpecific().EtFractionEm; }

References caloSpecific(), and SpecificCaloMETData::EtFractionEm.

◆ emEtInEB()

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

Returns the event electromagnetic energy in EB.

Definition at line 110 of file MET.h.

110 { return caloSpecific().EmEtInEB; }

References caloSpecific(), and SpecificCaloMETData::EmEtInEB.

◆ emEtInEE()

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

Returns the event electromagnetic energy in EE.

Definition at line 112 of file MET.h.

112 { return caloSpecific().EmEtInEE; }

References caloSpecific(), and SpecificCaloMETData::EmEtInEE.

◆ emEtInHF()

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

Returns the event electromagnetic energy extracted from HF.

Definition at line 114 of file MET.h.

114 { return caloSpecific().EmEtInHF; }

References caloSpecific(), and SpecificCaloMETData::EmEtInHF.

◆ etFractionHadronic()

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

Returns the event hadronic energy fraction.

Definition at line 98 of file MET.h.

98 { return caloSpecific().EtFractionHadronic; }

References caloSpecific(), and SpecificCaloMETData::EtFractionHadronic.

◆ findMETTotalShift()

const MET::PackedMETUncertainty MET::findMETTotalShift ( MET::METCorrectionLevel  cor,
MET::METUncertainty  shift 
) const
private

Definition at line 208 of file MET.cc.

208  {
209  //find corrections shifts =============================
210  std::map<MET::METCorrectionLevel, std::vector<MET::METCorrectionType> >::const_iterator itCor_ = corMap_.find(cor);
211  if (itCor_ == corMap_.end())
212  throw cms::Exception("Unsupported", "Specified MET correction scheme does not exist");
213 
214  bool isSmeared = false;
215  MET::PackedMETUncertainty totShift;
216  unsigned int scor = itCor_->second.size();
217  for (unsigned int i = 0; i < scor; i++) {
218  totShift.add(corrections_[itCor_->second[i]].dpx(),
219  corrections_[itCor_->second[i]].dpy(),
220  corrections_[itCor_->second[i]].dsumEt());
221 
222  if (itCor_->first >= MET::Type1Smear)
223  isSmeared = true;
224  }
225 
226  //find uncertainty shift =============================
227 
228  if (uncertainties_.empty())
229  return totShift;
230 
232  throw cms::Exception("Unsupported", "MET uncertainty does not exist");
233  if (isSmeared && shift <= MET::JetResDown)
235 
236  totShift.add(uncertainties_[shift].dpx(), uncertainties_[shift].dpy(), uncertainties_[shift].dsumEt());
237 
238  return totShift;
239 }

References pat::MET::PackedMETUncertainty::add(), corMap_, corrections_, reco::MET::dsumEt(), Exception, mps_fire::i, JetResDown, METUncertaintySize, edm::shift, Type1Smear, and uncertainties_.

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

◆ genMET()

const reco::GenMET * MET::genMET ( ) const

return the associated GenMET

return the generated MET from neutrinos

Definition at line 115 of file MET.cc.

115 { return (!genMET_.empty() ? &genMET_.front() : nullptr); }

References genMET_.

◆ hadEtInHB()

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

Returns the event hadronic energy in HB.

Definition at line 102 of file MET.h.

102 { return caloSpecific().HadEtInHB; }

References caloSpecific(), and SpecificCaloMETData::HadEtInHB.

◆ hadEtInHE()

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

Returns the event hadronic energy in HE.

Definition at line 106 of file MET.h.

106 { return caloSpecific().HadEtInHE; }

References caloSpecific(), and SpecificCaloMETData::HadEtInHE.

◆ hadEtInHF()

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

Returns the event hadronic energy in HF.

Definition at line 108 of file MET.h.

108 { return caloSpecific().HadEtInHF; }

References caloSpecific(), and SpecificCaloMETData::HadEtInHF.

◆ hadEtInHO()

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

Returns the event hadronic energy in HO.

Definition at line 104 of file MET.h.

104 { return caloSpecific().HadEtInHO; }

References caloSpecific(), and SpecificCaloMETData::HadEtInHO.

◆ initCorMap()

void MET::initCorMap ( )
private

Definition at line 132 of file MET.cc.

132  {
133  std::vector<MET::METCorrectionType> tmpRaw;
134  std::vector<MET::METCorrectionType> tmpType1;
135  std::vector<MET::METCorrectionType> tmpType01;
136  std::vector<MET::METCorrectionType> tmpTypeXY;
137  std::vector<MET::METCorrectionType> tmpType1XY;
138  std::vector<MET::METCorrectionType> tmpType01XY;
139  std::vector<MET::METCorrectionType> tmpType1Smear;
140  std::vector<MET::METCorrectionType> tmpType01Smear;
141  std::vector<MET::METCorrectionType> tmpType1SmearXY;
142  std::vector<MET::METCorrectionType> tmpType01SmearXY;
143 
144  tmpRaw.push_back(MET::None);
145 
146  tmpType1.push_back(MET::T1);
147  tmpType01.push_back(MET::T1);
148  tmpType1XY.push_back(MET::T1);
149  tmpType01XY.push_back(MET::T1);
150  tmpType1Smear.push_back(MET::T1);
151  tmpType01Smear.push_back(MET::T1);
152  tmpType1SmearXY.push_back(MET::T1);
153  tmpType01SmearXY.push_back(MET::T1);
154 
155  tmpType01.push_back(MET::T0);
156  tmpType01XY.push_back(MET::T0);
157  tmpType01Smear.push_back(MET::T0);
158  tmpType01SmearXY.push_back(MET::T0);
159 
160  tmpType1Smear.push_back(MET::Smear);
161  tmpType01Smear.push_back(MET::Smear);
162  tmpType1SmearXY.push_back(MET::Smear);
163  tmpType01SmearXY.push_back(MET::Smear);
164 
165  tmpTypeXY.push_back(MET::TXYForRaw);
166  tmpType1XY.push_back(MET::TXY);
167  tmpType01XY.push_back(MET::TXYForT01);
168  tmpType1SmearXY.push_back(MET::TXYForT1Smear);
169  tmpType01SmearXY.push_back(MET::TXYForT01Smear);
170 
171  corMap_[MET::Raw] = tmpRaw;
172  corMap_[MET::Type1] = tmpType1;
173  corMap_[MET::Type01] = tmpType01;
174  corMap_[MET::TypeXY] = tmpTypeXY;
175  corMap_[MET::Type1XY] = tmpType1XY;
176  corMap_[MET::Type01XY] = tmpType01XY;
177  corMap_[MET::Type1Smear] = tmpType1Smear;
178  corMap_[MET::Type01Smear] = tmpType01Smear;
179  corMap_[MET::Type1SmearXY] = tmpType1SmearXY;
180  corMap_[MET::Type01SmearXY] = tmpType01SmearXY;
181 
182  //specific calo case
183  std::vector<MET::METCorrectionType> tmpRawCalo;
184  tmpRawCalo.push_back(MET::Calo);
185  corMap_[MET::RawCalo] = tmpRawCalo;
186 
187  //specific chs case
188  std::vector<MET::METCorrectionType> tmpRawChs;
189  tmpRawChs.push_back(MET::Chs);
190  corMap_[MET::RawChs] = tmpRawChs;
191 
192  //specific trk case
193  std::vector<MET::METCorrectionType> tmpRawTrk;
194  tmpRawTrk.push_back(MET::Trk);
195  corMap_[MET::RawTrk] = tmpRawTrk;
196 
197  //specific deep response tune case
198  std::vector<MET::METCorrectionType> tmpDeepResponse;
199  tmpDeepResponse.push_back(MET::DeepResponseTune);
200  corMap_[MET::RawDeepResponseTune] = tmpDeepResponse;
201 
202  //specific deep resolution tune case
203  std::vector<MET::METCorrectionType> tmpDeepResolution;
204  tmpDeepResolution.push_back(MET::DeepResolutionTune);
205  corMap_[MET::RawDeepResolutionTune] = tmpDeepResolution;
206 }

References Calo, Chs, corMap_, DeepResolutionTune, DeepResponseTune, None, Raw, RawCalo, RawChs, RawDeepResolutionTune, RawDeepResponseTune, RawTrk, Smear, T0, T1, Trk, TXY, TXYForRaw, TXYForT01, TXYForT01Smear, TXYForT1Smear, Type01, Type01Smear, Type01SmearXY, Type01XY, Type1, Type1Smear, Type1SmearXY, Type1XY, and TypeXY.

Referenced by MET().

◆ isCaloMET()

bool pat::MET::isCaloMET ( ) const
inline

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

Definition at line 86 of file MET.h.

86 { return !caloMET_.empty(); }

References caloMET_.

Referenced by caloSpecific().

◆ isPFMET()

bool pat::MET::isPFMET ( ) const
inline

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

Definition at line 88 of file MET.h.

88 { return !pfMET_.empty(); }

References pfMET_.

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

◆ isRecoMET()

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

90 { return (caloMET_.empty() && pfMET_.empty()); }

References caloMET_, and pfMET_.

◆ maxEtInEmTowers()

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

Returns the maximum energy deposited in ECAL towers.

Definition at line 94 of file MET.h.

94 { return caloSpecific().MaxEtInEmTowers; }

References caloSpecific(), and SpecificCaloMETData::MaxEtInEmTowers.

◆ maxEtInHadTowers()

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

Returns the maximum energy deposited in HCAL towers.

Definition at line 96 of file MET.h.

96 { return caloSpecific().MaxEtInHadTowers; }

References caloSpecific(), and SpecificCaloMETData::MaxEtInHadTowers.

◆ metSignificance()

double MET::metSignificance ( ) const

Definition at line 126 of file MET.cc.

126 { return metSig_; }

References metSig_.

◆ metSumPtUnclustered()

double MET::metSumPtUnclustered ( ) const

Definition at line 130 of file MET.cc.

130 { return sumPtUnclustered_; }

References sumPtUnclustered_.

◆ MuonEtFraction()

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

Definition at line 141 of file MET.h.

141 { return pfSpecific().MuonFraction; }

References SpecificPFMETData::MuonFraction, and pfSpecific().

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

◆ NeutralEMFraction()

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

Definition at line 137 of file MET.h.

137 { return pfSpecific().NeutralEMFraction; }

References SpecificPFMETData::NeutralEMFraction, and pfSpecific().

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

◆ NeutralHadEtFraction()

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

Definition at line 138 of file MET.h.

138 { return pfSpecific().NeutralHadFraction; }

References SpecificPFMETData::NeutralHadFraction, and pfSpecific().

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

◆ operator=()

MET & MET::operator= ( MET const &  iOther)

Definition at line 97 of file MET.cc.

97  {
99  genMET_ = iOther.genMET_;
100  caloMET_ = iOther.caloMET_;
101  pfMET_ = iOther.pfMET_;
102  uncertaintiesRaw_ = iOther.uncertaintiesRaw_; //74X compatibility
103  uncertaintiesType1_ = iOther.uncertaintiesType1_;
104  uncertaintiesType1p2_ = iOther.uncertaintiesType1p2_;
105  uncertainties_ = iOther.uncertainties_;
106  corrections_ = iOther.corrections_;
107  metSig_ = iOther.metSig_;
108  sumPtUnclustered_ = iOther.sumPtUnclustered_;
109  caloPackedMet_ = iOther.caloPackedMet_;
110 
111  return *this;
112 }

References caloMET_, caloPackedMet_, corrections_, genMET_, metSig_, pfMET_, sumPtUnclustered_, uncertainties_, uncertaintiesRaw_, uncertaintiesType1_, and uncertaintiesType1p2_.

Referenced by MET().

◆ pfSpecific()

const SpecificPFMETData& pat::MET::pfSpecific ( ) const
inline

accessor for the pfMET-specific structure

Definition at line 145 of file MET.h.

145  {
146  if (!isPFMET())
147  throw cms::Exception("pat::MET") << "This pat::MET has not been made from a reco::PFMET\n";
148  return pfMET_[0];
149  }

References Exception, isPFMET(), and pfMET_.

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

◆ setCorShift()

void MET::setCorShift ( double  px,
double  py,
double  sumEt,
MET::METCorrectionType  level 
)

Definition at line 352 of file MET.cc.

352  {
353  if (corrections_.empty()) {
354  corrections_.resize(MET::METCorrectionType::METCorrectionTypeSize);
355  }
356 
357  corrections_[level].set(px - this->px(), py - this->py(), sumEt - this->sumEt());
358 }

References corrections_, personalPlayback::level, reco::LeafCandidate::px(), reco::LeafCandidate::py(), and reco::MET::sumEt().

◆ setGenMET()

void MET::setGenMET ( const reco::GenMET gm)

set the associated GenMET

method to set the generated MET

Definition at line 118 of file MET.cc.

118  {
119  genMET_.clear();
120  genMET_.push_back(gm);
121 }

References genMET_.

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

◆ setMETSignificance()

void MET::setMETSignificance ( const double &  metSig)

Definition at line 124 of file MET.cc.

124 { metSig_ = metSig; }

References metSig_.

Referenced by pat::PATMETProducer::produce(), and CorrectedPATMETProducer::produce().

◆ setMETSumPtUnclustered()

void MET::setMETSumPtUnclustered ( const double &  sumPtUnclustered)

Definition at line 128 of file MET.cc.

References met_cff::sumPtUnclustered, and sumPtUnclustered_.

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

◆ setUncShift()

void MET::setUncShift ( double  px,
double  py,
double  sumEt,
METUncertainty  shift,
bool  isSmeared = false 
)

Definition at line 336 of file MET.cc.

336  {
337  if (uncertainties_.empty()) {
338  uncertainties_.resize(METUncertainty::METFullUncertaintySize);
339  }
340 
341  if (isSmeared && shift <= MET::JetResDown) {
342  //changing reference to only get the uncertainty shift and not the smeared one
343  // which is performed independently
344  shift = (MET::METUncertainty)(METUncertainty::METUncertaintySize + shift + 1);
345  const PackedMETUncertainty &ref = uncertainties_[METUncertainty::NoShift];
346  uncertainties_[shift].set(
347  px + ref.dpx() - this->px(), py + ref.dpy() - this->py(), sumEt + ref.dsumEt() - this->sumEt());
348  } else
349  uncertainties_[shift].set(px - this->px(), py - this->py(), sumEt - this->sumEt());
350 }

References pat::MET::PackedMETUncertainty::dpx(), pat::MET::PackedMETUncertainty::dpy(), pat::MET::PackedMETUncertainty::dsumEt(), JetResDown, reco::LeafCandidate::px(), reco::LeafCandidate::py(), edm::shift, reco::MET::sumEt(), and uncertainties_.

◆ shiftedP2()

MET::Vector2 MET::shiftedP2 ( MET::METUncertainty  shift,
MET::METCorrectionLevel  cor = Type1 
) const

Definition at line 241 of file MET.cc.

241  {
242  Vector2 vo;
243 
244  //backward compatibility with 74X samples -> the only one
245  // with uncertaintiesType1_/uncertaintiesRaw_ not empty
246  //will be removed once 74X is not used anymore
247  if (!uncertaintiesType1_.empty() || !uncertaintiesRaw_.empty()) {
248  if (cor != MET::METCorrectionLevel::RawCalo) {
249  vo = shiftedP2_74x(shift, cor);
250  } else {
251  Vector2 ret{caloPackedMet_.dpx(), caloPackedMet_.dpy()};
252  vo = ret;
253  }
254  } else {
256  Vector2 ret{(px() + v.dpx()), (py() + v.dpy())};
257  //return ret;
258  vo = ret;
259  }
260  return vo;
261 }

References caloPackedMet_, pat::MET::PackedMETUncertainty::dpx(), pat::MET::PackedMETUncertainty::dpy(), findMETTotalShift(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), runTheMatrix::ret, edm::shift, shiftedP2_74x(), uncertaintiesRaw_, uncertaintiesType1_, and findQualityFiles::v.

Referenced by caloMETP2(), corP2(), shiftedPhi(), shiftedPt(), shiftedPx(), shiftedPy(), and uncorP2().

◆ shiftedP2_74x()

MET::Vector2 MET::shiftedP2_74x ( MET::METUncertainty  shift,
MET::METCorrectionLevel  level 
) const

Definition at line 371 of file MET.cc.

371  {
372  if (level != Type1 && level != Raw)
373  throw cms::Exception("Unsupported", "MET uncertainties only supported for Raw and Type1 in 74X samples \n");
374  const std::vector<PackedMETUncertainty> &v = (level == Type1 ? uncertaintiesType1_ : uncertaintiesRaw_);
375  if (v.empty())
376  throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type\n");
377  if (v.size() == 1) {
378  if (shift != MET::METUncertainty::NoShift)
379  throw cms::Exception(
380  "Unsupported",
381  "MET uncertainties not available for the specified correction type (only central value available)\n");
382  return Vector2{(px() + v.front().dpx()), (py() + v.front().dpy())};
383  }
384  Vector2 ret{(px() + v[shift].dpx()), (py() + v[shift].dpy())};
385  return ret;
386 }

References Exception, personalPlayback::level, reco::LeafCandidate::px(), reco::LeafCandidate::py(), Raw, runTheMatrix::ret, edm::shift, Type1, uncertaintiesRaw_, uncertaintiesType1_, and findQualityFiles::v.

Referenced by shiftedP2().

◆ shiftedP3()

MET::Vector MET::shiftedP3 ( MET::METUncertainty  shift,
MET::METCorrectionLevel  cor = Type1 
) const

Definition at line 262 of file MET.cc.

262  {
263  Vector vo;
264 
265  //backward compatibility with 74X samples -> the only one
266  // with uncertaintiesType1_/uncertaintiesRaw_ not empty
267  //will be removed once 74X is not used anymore
268  if (!uncertaintiesType1_.empty() || !uncertaintiesRaw_.empty()) {
269  if (cor != MET::METCorrectionLevel::RawCalo) {
270  vo = shiftedP3_74x(shift, cor);
271  } else {
273  vo = tmp;
274  }
275  } else {
277  //return Vector(px() + v.dpx(), py() + v.dpy(), 0);
278  Vector tmp(px() + v.dpx(), py() + v.dpy(), 0);
279  vo = tmp;
280  }
281  return vo;
282 }

References caloPackedMet_, pat::MET::PackedMETUncertainty::dpx(), pat::MET::PackedMETUncertainty::dpy(), findMETTotalShift(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), edm::shift, shiftedP3_74x(), createJobs::tmp, uncertaintiesRaw_, uncertaintiesType1_, and findQualityFiles::v.

Referenced by corP3(), and uncorP3().

◆ shiftedP3_74x()

MET::Vector MET::shiftedP3_74x ( MET::METUncertainty  shift,
MET::METCorrectionLevel  level 
) const

Definition at line 388 of file MET.cc.

388  {
389  if (level != Type1 && level != Raw)
390  throw cms::Exception("Unsupported", "MET uncertainties only supported for Raw and Type1 in 74X samples \n");
391  const std::vector<PackedMETUncertainty> &v = (level == Type1 ? uncertaintiesType1_ : uncertaintiesRaw_);
392  if (v.empty())
393  throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type\n");
394  if (v.size() == 1) {
395  if (shift != MET::METUncertainty::NoShift)
396  throw cms::Exception(
397  "Unsupported",
398  "MET uncertainties not available for the specified correction type (only central value available)\n");
399  return Vector(px() + v.front().dpx(), py() + v.front().dpy(), 0);
400  }
401  return Vector(px() + v[shift].dpx(), py() + v[shift].dpy(), 0);
402 }

References Exception, personalPlayback::level, reco::LeafCandidate::px(), reco::LeafCandidate::py(), Raw, edm::shift, Type1, uncertaintiesRaw_, uncertaintiesType1_, and findQualityFiles::v.

Referenced by shiftedP3().

◆ shiftedP4()

MET::LorentzVector MET::shiftedP4 ( METUncertainty  shift,
MET::METCorrectionLevel  cor = Type1 
) const

Definition at line 283 of file MET.cc.

283  {
284  LorentzVector vo;
285 
286  //backward compatibility with 74X samples -> the only one
287  // with uncertaintiesType1_/uncertaintiesRaw_ not empty
288  //will be removed once 74X is not used anymore
289  if (!uncertaintiesType1_.empty() || !uncertaintiesRaw_.empty()) {
290  if (cor != MET::METCorrectionLevel::RawCalo) {
291  vo = shiftedP4_74x(shift, cor);
292  } else {
293  double x = caloPackedMet_.dpx(), y = caloPackedMet_.dpy();
294  LorentzVector tmp(x, y, 0, std::hypot(x, y));
295  vo = tmp;
296  }
297  } else {
299  double x = px() + v.dpx(), y = py() + v.dpy();
300  //return LorentzVector(x, y, 0, std::hypot(x,y));
301  LorentzVector tmp(x, y, 0, std::hypot(x, y));
302  vo = tmp;
303  }
304  return vo;
305 }

References caloPackedMet_, pat::MET::PackedMETUncertainty::dpx(), pat::MET::PackedMETUncertainty::dpy(), findMETTotalShift(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), edm::shift, shiftedP4_74x(), createJobs::tmp, uncertaintiesRaw_, uncertaintiesType1_, findQualityFiles::v, and reco::LeafCandidate::y().

Referenced by corP4(), and uncorP4().

◆ shiftedP4_74x()

MET::LorentzVector MET::shiftedP4_74x ( METUncertainty  shift,
MET::METCorrectionLevel  level 
) const

Definition at line 404 of file MET.cc.

404  {
405  if (level != Type1 && level != Raw)
406  throw cms::Exception("Unsupported", "MET uncertainties only supported for Raw and Type1 in 74X samples\n");
407  const std::vector<PackedMETUncertainty> &v = (level == Type1 ? uncertaintiesType1_ : uncertaintiesRaw_);
408  if (v.empty())
409  throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type\n");
410  if (v.size() == 1) {
411  if (shift != MET::METUncertainty::NoShift)
412  throw cms::Exception(
413  "Unsupported",
414  "MET uncertainties not available for the specified correction type (only central value available)\n");
415  double x = px() + v.front().dpx(), y = py() + v.front().dpy();
416  return LorentzVector(x, y, 0, std::hypot(x, y));
417  }
418  double x = px() + v[shift].dpx(), y = py() + v[shift].dpy();
419  return LorentzVector(x, y, 0, std::hypot(x, y));
420 }

References Exception, personalPlayback::level, reco::LeafCandidate::px(), reco::LeafCandidate::py(), Raw, edm::shift, Type1, uncertaintiesRaw_, uncertaintiesType1_, findQualityFiles::v, and reco::LeafCandidate::y().

Referenced by shiftedP4().

◆ shiftedPhi()

double pat::MET::shiftedPhi ( METUncertainty  shift,
METCorrectionLevel  level = Type1 
) const
inline

Definition at line 227 of file MET.h.

227  {
228  return shiftedP2(shift, level).phi();
229  };

References personalPlayback::level, pat::MET::Vector2::phi(), edm::shift, and shiftedP2().

◆ shiftedPt()

double pat::MET::shiftedPt ( METUncertainty  shift,
METCorrectionLevel  level = Type1 
) const
inline

Definition at line 224 of file MET.h.

224  {
225  return shiftedP2(shift, level).pt();
226  };

References personalPlayback::level, pat::MET::Vector2::pt(), edm::shift, and shiftedP2().

Referenced by METTester::analyze().

◆ shiftedPx()

double pat::MET::shiftedPx ( METUncertainty  shift,
METCorrectionLevel  level = Type1 
) const
inline

Definition at line 218 of file MET.h.

218  {
219  return shiftedP2(shift, level).px;
220  };

References personalPlayback::level, pat::MET::Vector2::px, edm::shift, and shiftedP2().

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

◆ shiftedPy()

double pat::MET::shiftedPy ( METUncertainty  shift,
METCorrectionLevel  level = Type1 
) const
inline

Definition at line 221 of file MET.h.

221  {
222  return shiftedP2(shift, level).py;
223  };

References personalPlayback::level, pat::MET::Vector2::py, edm::shift, and shiftedP2().

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

◆ shiftedSumEt()

double MET::shiftedSumEt ( MET::METUncertainty  shift,
MET::METCorrectionLevel  cor = Type1 
) const

Definition at line 306 of file MET.cc.

306  {
307  double sumEto;
308 
309  //backward compatibility with 74X samples -> the only one
310  // with uncertaintiesType1_/uncertaintiesRaw_ not empty
311  //will be removed once 74X is not used anymore
312  if (!uncertaintiesType1_.empty() || !uncertaintiesRaw_.empty()) {
313  if (cor != MET::METCorrectionLevel::RawCalo) {
314  sumEto = shiftedSumEt_74x(shift, cor);
315  } else {
316  sumEto = caloPackedMet_.dsumEt();
317  }
318  } else {
320  //return sumEt() + v.dsumEt();
321  sumEto = sumEt() + v.dsumEt();
322  }
323  return sumEto;
324 }

References caloPackedMet_, pat::MET::PackedMETUncertainty::dsumEt(), findMETTotalShift(), edm::shift, shiftedSumEt_74x(), reco::MET::sumEt(), uncertaintiesRaw_, uncertaintiesType1_, and findQualityFiles::v.

Referenced by caloMETSumEt(), corSumEt(), pat::PATMETSlimmer::OneMETShift::readAndSet(), and uncorSumEt().

◆ shiftedSumEt_74x()

double MET::shiftedSumEt_74x ( MET::METUncertainty  shift,
MET::METCorrectionLevel  level 
) const

Definition at line 422 of file MET.cc.

422  {
423  if (level != Type1 && level != Raw)
424  throw cms::Exception("Unsupported", "MET uncertainties only supported for Raw and Type1 in 74X samples\n");
425  const std::vector<PackedMETUncertainty> &v = (level == Type1 ? uncertaintiesType1_ : uncertaintiesRaw_);
426  if (v.empty())
427  throw cms::Exception("Unsupported", "MET uncertainties not available for the specified correction type\n");
428  if (v.size() == 1) {
429  if (shift != MET::METUncertainty::NoShift)
430  throw cms::Exception(
431  "Unsupported",
432  "MET uncertainties not available for the specified correction type (only central value available)\n");
433  return sumEt() + v.front().dsumEt();
434  }
435  return sumEt() + v[shift].dsumEt();
436 }

References Exception, personalPlayback::level, Raw, edm::shift, reco::MET::sumEt(), Type1, uncertaintiesRaw_, uncertaintiesType1_, and findQualityFiles::v.

Referenced by shiftedSumEt().

◆ Type6EtFraction()

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

Definition at line 142 of file MET.h.

142 { return pfSpecific().Type6Fraction; }

References pfSpecific(), and SpecificPFMETData::Type6Fraction.

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

◆ Type7EtFraction()

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

Definition at line 143 of file MET.h.

143 { return pfSpecific().Type7Fraction; }

References pfSpecific(), and SpecificPFMETData::Type7Fraction.

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

◆ uncorP2()

MET::Vector2 MET::uncorP2 ( ) const

Definition at line 331 of file MET.cc.

331 { return shiftedP2(MET::NoShift, MET::Raw); }

References NoShift, Raw, and shiftedP2().

Referenced by uncorPhi(), uncorPt(), uncorPx(), and uncorPy().

◆ uncorP3()

MET::Vector MET::uncorP3 ( ) const

Definition at line 332 of file MET.cc.

332 { return shiftedP3(MET::NoShift, MET::Raw); }

References NoShift, Raw, and shiftedP3().

◆ uncorP4()

MET::LorentzVector MET::uncorP4 ( ) const

Definition at line 333 of file MET.cc.

333 { return shiftedP4(MET::NoShift, MET::Raw); }

References NoShift, Raw, and shiftedP4().

◆ uncorPhi()

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

Definition at line 247 of file MET.h.

247 { return uncorP2().phi(); };

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

◆ uncorPt()

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

Definition at line 246 of file MET.h.

246 { return uncorP2().pt(); };

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

◆ uncorPx()

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

Definition at line 244 of file MET.h.

244 { return uncorP2().px; };

References pat::MET::Vector2::px, and uncorP2().

◆ uncorPy()

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

Definition at line 245 of file MET.h.

245 { return uncorP2().py; };

References pat::MET::Vector2::py, and uncorP2().

◆ uncorSumEt()

double MET::uncorSumEt ( ) const

Definition at line 334 of file MET.cc.

334 { return shiftedSumEt(MET::NoShift, MET::Raw); }

References NoShift, Raw, and shiftedSumEt().

Member Data Documentation

◆ caloMET_

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

Definition at line 322 of file MET.h.

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

◆ caloPackedMet_

PackedMETUncertainty pat::MET::caloPackedMet_
protected

Definition at line 344 of file MET.h.

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

◆ corMap_

std::map<MET::METCorrectionLevel, std::vector<MET::METCorrectionType> > pat::MET::corMap_
private

Definition at line 333 of file MET.h.

Referenced by findMETTotalShift(), and initCorMap().

◆ corrections_

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

Definition at line 342 of file MET.h.

Referenced by findMETTotalShift(), operator=(), and setCorShift().

◆ genMET_

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

Definition at line 320 of file MET.h.

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

◆ metSig_

double pat::MET::metSig_
private

Definition at line 327 of file MET.h.

Referenced by MET(), metSignificance(), operator=(), and setMETSignificance().

◆ pfMET_

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

Definition at line 324 of file MET.h.

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

◆ sumPtUnclustered_

double pat::MET::sumPtUnclustered_
private

Definition at line 329 of file MET.h.

Referenced by MET(), metSumPtUnclustered(), operator=(), and setMETSumPtUnclustered().

◆ uncertainties_

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

Definition at line 341 of file MET.h.

Referenced by findMETTotalShift(), operator=(), and setUncShift().

◆ uncertaintiesRaw_

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

◆ uncertaintiesType1_

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

◆ uncertaintiesType1p2_

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

Definition at line 339 of file MET.h.

Referenced by operator=().

personalPlayback.level
level
Definition: personalPlayback.py:22
pat::MET::Smear
Definition: MET.h:200
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:542
met_cff.sumPtUnclustered
sumPtUnclustered
Definition: met_cff.py:19
SpecificCaloMETData::HadEtInHE
float HadEtInHE
Definition: SpecificCaloMETData.h:48
pat::MET::pfSpecific
const SpecificPFMETData & pfSpecific() const
accessor for the pfMET-specific structure
Definition: MET.h:145
pat::MET::caloMETP2
Vector2 caloMETP2() const
Definition: MET.cc:360
pat::MET::TXYForT01Smear
Definition: MET.h:199
mps_fire.i
i
Definition: mps_fire.py:428
pat::MET::PackedMETUncertainty::dpy
double dpy() const
Definition: MET.h:287
SpecificCaloMETData::CaloSETInpHF
float CaloSETInpHF
Definition: SpecificCaloMETData.h:57
SpecificPFMETData::Type6Fraction
float Type6Fraction
Definition: SpecificPFMETData.h:28
pat::MET::DeepResolutionTune
Definition: MET.h:205
SpecificCaloMETData::CaloSETInmHF
float CaloSETInmHF
Definition: SpecificCaloMETData.h:58
pat::MET::JetEnDown
Definition: MET.h:156
pat::MET::corP2
Vector2 corP2(METCorrectionLevel level=Type1) const
Definition: MET.cc:326
SpecificCaloMETData::EtFractionHadronic
float EtFractionHadronic
Definition: SpecificCaloMETData.h:52
SpecificCaloMETData::CaloMETPhiInmHF
float CaloMETPhiInmHF
Definition: SpecificCaloMETData.h:60
pat::MET::shiftedP2_74x
Vector2 shiftedP2_74x(METUncertainty shift, METCorrectionLevel level) const
Definition: MET.cc:371
pat::MET::Type01XY
Definition: MET.h:179
pat::MET::uncertaintiesType1p2_
std::vector< PackedMETUncertainty > uncertaintiesType1p2_
Definition: MET.h:339
pat::MET::isPFMET
bool isPFMET() const
True if this pat::MET was made from a reco::pfMET.
Definition: MET.h:88
pat::MET::Type1Smear
Definition: MET.h:180
pat::MET::METUncertainty
METUncertainty
Definition: MET.h:152
pat::MET::PhotonEnDown
Definition: MET.h:166
reco::MET::sumEt
double sumEt() const
Definition: MET.h:56
pat::MET::Type01SmearXY
Definition: MET.h:183
reco::Candidate::const_iterator
candidate::const_iterator const_iterator
Definition: Candidate.h:30
pat::MET::T1
Definition: MET.h:193
pat::MET::Trk
Definition: MET.h:203
pat::MET::shiftedP3
Vector shiftedP3(METUncertainty shift, METCorrectionLevel level=Type1) const
Definition: MET.cc:262
pat::MET::pfMET_
std::vector< SpecificPFMETData > pfMET_
Definition: MET.h:324
pat::MET::Vector2::phi
double phi() const
Definition: MET.h:212
edm::Ptr::get
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:139
DDAxes::x
pat::MET::METCorrectionTypeSize
Definition: MET.h:206
findQualityFiles.v
v
Definition: findQualityFiles.py:179
pat::MET::TXYForT1Smear
Definition: MET.h:198
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
pat::MET::TauEnDown
Definition: MET.h:162
pat::MET::Vector2::pt
double pt() const
Definition: MET.h:211
SpecificPFMETData::ChargedHadFraction
float ChargedHadFraction
Definition: SpecificPFMETData.h:26
pat::MET::JetResUp
Definition: MET.h:153
Vector
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
reco::CaloMET
Definition: CaloMET.h:21
pat::MET::PhotonEnUp
Definition: MET.h:165
pat::MET::shiftedSumEt
double shiftedSumEt(METUncertainty shift, METCorrectionLevel level=Type1) const
Definition: MET.cc:306
reco::MET::setSignificanceMatrix
void setSignificanceMatrix(const reco::METCovMatrix &matrix)
Definition: MET.cc:142
pat::MET::TXYForT01
Definition: MET.h:197
pat::MET::Vector2::px
double px
Definition: MET.h:210
pat::MET::Type01Smear
Definition: MET.h:181
pat::MET::shiftedP4_74x
LorentzVector shiftedP4_74x(METUncertainty shift, METCorrectionLevel level) const
Definition: MET.cc:404
pat::MET::Vector2::py
double py
Definition: MET.h:210
pat::MET::RawDeepResponseTune
Definition: MET.h:187
pat::MET::TauEnUp
Definition: MET.h:161
pat::MET::Raw
Definition: MET.h:174
pat::MET::RawCalo
Definition: MET.h:184
pat::MET::METUncertaintySize
Definition: MET.h:168
pat::MET::PackedMETUncertainty::dsumEt
double dsumEt() const
Definition: MET.h:292
reco::LeafCandidate::py
double py() const final
y coordinate of momentum vector
Definition: LeafCandidate.h:142
pat::MET::shiftedP3_74x
Vector shiftedP3_74x(METUncertainty shift, METCorrectionLevel level) const
Definition: MET.cc:388
pat::MET::PackedMETUncertainty::dpx
double dpx() const
Definition: MET.h:282
pat::PATObject< reco::MET >
reco::LeafCandidate::y
double y() const final
rapidity
Definition: LeafCandidate.h:156
pat::MET::ElectronEnDown
Definition: MET.h:160
pat::MET::uncorP2
Vector2 uncorP2() const
Definition: MET.cc:331
pat::MET::Chs
Definition: MET.h:202
SpecificPFMETData::NeutralHadFraction
float NeutralHadFraction
Definition: SpecificPFMETData.h:24
SpecificCaloMETData::CaloMETInpHF
float CaloMETInpHF
Definition: SpecificCaloMETData.h:55
pat::MET::JetResUpSmear
Definition: MET.h:169
edm::RefToBase::get
value_type const * get() const
Definition: RefToBase.h:209
pat::MET::shiftedP2
Vector2 shiftedP2(METUncertainty shift, METCorrectionLevel level=Type1) const
Definition: MET.cc:241
SpecificPFMETData::Type7Fraction
float Type7Fraction
Definition: SpecificPFMETData.h:29
reco::PFMET
Definition: PFMET.h:18
pat::MET::JetResDown
Definition: MET.h:154
pat::MET::RawTrk
Definition: MET.h:186
SpecificCaloMETData::EmEtInEE
float EmEtInEE
Definition: SpecificCaloMETData.h:50
pat::MET::corrections_
std::vector< PackedMETUncertainty > corrections_
Definition: MET.h:342
pat::MET::METCorrectionLevelSize
Definition: MET.h:189
pat::MET::shiftedSumEt_74x
double shiftedSumEt_74x(METUncertainty shift, METCorrectionLevel level) const
Definition: MET.cc:422
pat::MET::Type01
Definition: MET.h:176
pat::MET::caloPackedMet_
PackedMETUncertainty caloPackedMet_
Definition: MET.h:344
pat::MET::PackedMETUncertainty
this below should be private but Reflex doesn't like it
Definition: MET.h:270
pat::MET::isCaloMET
bool isCaloMET() const
True if this pat::MET was made from a reco::CaloMET.
Definition: MET.h:86
pat::MET::Type1SmearXY
Definition: MET.h:182
pat::MET::caloMET_
std::vector< SpecificCaloMETData > caloMET_
Definition: MET.h:322
pat::MET::Type1
Definition: MET.h:175
pat::MET::RawChs
Definition: MET.h:185
SpecificCaloMETData::HadEtInHB
float HadEtInHB
Definition: SpecificCaloMETData.h:46
pat::MET
Analysis-level MET class.
Definition: MET.h:40
pat::MET::initCorMap
void initCorMap()
Definition: MET.cc:132
SpecificCaloMETData::CaloMETInmHF
float CaloMETInmHF
Definition: SpecificCaloMETData.h:56
pat::MET::operator=
MET & operator=(MET const &)
Definition: MET.cc:97
pat::MET::MuonEnDown
Definition: MET.h:158
pat::MET::genMET_
std::vector< reco::GenMET > genMET_
Definition: MET.h:320
SpecificCaloMETData::HadEtInHF
float HadEtInHF
Definition: SpecificCaloMETData.h:47
pat::MET::uncertaintiesRaw_
std::vector< PackedMETUncertainty > uncertaintiesRaw_
Definition: MET.h:339
SpecificCaloMETData::EtFractionEm
float EtFractionEm
Definition: SpecificCaloMETData.h:53
SpecificCaloMETData::EmEtInEB
float EmEtInEB
Definition: SpecificCaloMETData.h:49
pat::MET::TypeXY
Definition: MET.h:177
pat::MET::ElectronEnUp
Definition: MET.h:159
pat::MET::MET
MET()
default constructor
Definition: MET.cc:9
SpecificCaloMETData::METSignificance
float METSignificance
Definition: SpecificCaloMETData.h:54
SpecificPFMETData::MuonFraction
float MuonFraction
Definition: SpecificPFMETData.h:27
pat::MET::JetResDownSmear
Definition: MET.h:170
pat::MET::metSig_
double metSig_
Definition: MET.h:327
pat::MET::NoShift
Definition: MET.h:167
pat::MET::shiftedP4
LorentzVector shiftedP4(METUncertainty shift, METCorrectionLevel level=Type1) const
Definition: MET.cc:283
edm::shift
static unsigned const int shift
Definition: LuminosityBlockID.cc:7
pat::MET::TXY
Definition: MET.h:195
packedPFCandidateRefMixer_cfi.pf
pf
Definition: packedPFCandidateRefMixer_cfi.py:4
pat::MET::T0
Definition: MET.h:194
pat::MET::sumPtUnclustered_
double sumPtUnclustered_
Definition: MET.h:329
LorentzVector
math::XYZTLorentzVector LorentzVector
Definition: HLTMuonMatchAndPlot.h:49
correctionTermsCaloMet_cff.srcMET
srcMET
Definition: correctionTermsCaloMet_cff.py:14
pat::MET::None
Definition: MET.h:192
Exception
Definition: hltDiff.cc:245
SpecificCaloMETData::MaxEtInHadTowers
float MaxEtInHadTowers
Definition: SpecificCaloMETData.h:44
SpecificCaloMETData::MaxEtInEmTowers
float MaxEtInEmTowers
Definition: SpecificCaloMETData.h:43
pat::MET::UnclusteredEnUp
Definition: MET.h:163
pat::MET::PackedMETUncertainty::add
void add(float dpx, float dpy, float dsumEt)
Definition: MET.h:304
pat::MET::JetEnUp
Definition: MET.h:155
pat::MET::MuonEnUp
Definition: MET.h:157
cms::Exception
Definition: Exception.h:70
pat::MET::findMETTotalShift
const PackedMETUncertainty findMETTotalShift(MET::METCorrectionLevel cor, MET::METUncertainty shift) const
Definition: MET.cc:208
SpecificPFMETData::NeutralEMFraction
float NeutralEMFraction
Definition: SpecificPFMETData.h:23
calo
Definition: Common.h:9
SpecificCaloMETData::CaloMETPhiInpHF
float CaloMETPhiInpHF
Definition: SpecificCaloMETData.h:59
SpecificCaloMETData::HadEtInHO
float HadEtInHO
Definition: SpecificCaloMETData.h:45
SpecificPFMETData::ChargedEMFraction
float ChargedEMFraction
Definition: SpecificPFMETData.h:25
pat::MET::corMap_
std::map< MET::METCorrectionLevel, std::vector< MET::METCorrectionType > > corMap_
Definition: MET.h:333
SpecificCaloMETData::EmEtInHF
float EmEtInHF
Definition: SpecificCaloMETData.h:51
pat::MET::UnclusteredEnDown
Definition: MET.h:164
pat::MET::TXYForRaw
Definition: MET.h:196
pat::MET::uncertaintiesType1_
std::vector< PackedMETUncertainty > uncertaintiesType1_
Definition: MET.h:339
pat::MET::Type1XY
Definition: MET.h:178
pat::MET::uncertainties_
std::vector< PackedMETUncertainty > uncertainties_
Definition: MET.h:341
reco::LeafCandidate::px
double px() const final
x coordinate of momentum vector
Definition: LeafCandidate.h:140
pat::MET::RawDeepResolutionTune
Definition: MET.h:188
reco::LeafCandidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: LeafCandidate.h:23
reco::MET::dsumEt
std::vector< double > dsumEt() const
Definition: MET.cc:117
pat::MET::DeepResponseTune
Definition: MET.h:204
pat::MET::Calo
Definition: MET.h:201
pat::MET::METFullUncertaintySize
Definition: MET.h:171
reco::LeafCandidate::Vector
math::XYZVector Vector
point in the space
Definition: LeafCandidate.h:29
pat::MET::caloSpecific
const SpecificCaloMETData & caloSpecific() const
accessor for the CaloMET-specific structure
Definition: MET.h:130