CMS 3D CMS Logo

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

#include <MuPFIsoHelper.h>

Public Types

typedef edm::ValueMap< double > CandDoubleMap
 

Public Member Functions

void beginEvent (const edm::Event &iEvent)
 
int embedPFIsolation (reco::Muon &, reco::MuonRef &)
 
 MuPFIsoHelper (const edm::ParameterSet &iConfig)
 
 ~MuPFIsoHelper ()
 

Private Attributes

edm::Handle< CandDoubleMapchargedHadron03_
 
edm::Handle< CandDoubleMapchargedHadron04_
 
edm::Handle< CandDoubleMapchargedParticle03_
 
edm::Handle< CandDoubleMapchargedParticle04_
 
edm::ParameterSet isoCfg03_
 
edm::ParameterSet isoCfg04_
 
edm::Handle< CandDoubleMapneutralHadron03_
 
edm::Handle< CandDoubleMapneutralHadron04_
 
edm::Handle< CandDoubleMapneutralHadronHighThreshold03_
 
edm::Handle< CandDoubleMapneutralHadronHighThreshold04_
 
edm::Handle< CandDoubleMapphoton03_
 
edm::Handle< CandDoubleMapphoton04_
 
edm::Handle< CandDoubleMapphotonHighThreshold03_
 
edm::Handle< CandDoubleMapphotonHighThreshold04_
 
edm::Handle< CandDoubleMappu03_
 
edm::Handle< CandDoubleMappu04_
 

Detailed Description

Definition at line 27 of file MuPFIsoHelper.h.

Member Typedef Documentation

Definition at line 29 of file MuPFIsoHelper.h.

Constructor & Destructor Documentation

MuPFIsoHelper::MuPFIsoHelper ( const edm::ParameterSet iConfig)

Definition at line 4 of file MuPFIsoHelper.cc.

4  :
5  isoCfg03_(iConfig.getParameter<edm::ParameterSet>("isolationR03")),
6  isoCfg04_(iConfig.getParameter<edm::ParameterSet>("isolationR04"))
7 {
8 
9 
10 }
T getParameter(std::string const &) const
edm::ParameterSet isoCfg03_
Definition: MuPFIsoHelper.h:40
edm::ParameterSet isoCfg04_
Definition: MuPFIsoHelper.h:41
MuPFIsoHelper::~MuPFIsoHelper ( )

Definition at line 14 of file MuPFIsoHelper.cc.

14  {
15 
16 }

Member Function Documentation

void MuPFIsoHelper::beginEvent ( const edm::Event iEvent)

Definition at line 103 of file MuPFIsoHelper.cc.

References chargedHadron03_, chargedHadron04_, chargedParticle03_, chargedParticle04_, edm::Event::getByLabel(), edm::ParameterSet::getParameter(), isoCfg03_, isoCfg04_, neutralHadron03_, neutralHadron04_, neutralHadronHighThreshold03_, neutralHadronHighThreshold04_, photon03_, photon04_, photonHighThreshold03_, photonHighThreshold04_, pu03_, and pu04_.

Referenced by MuonProducer::produce(), and MuPFIsoEmbedder::produce().

103  {
104 
109  iEvent.getByLabel(isoCfg03_.getParameter<edm::InputTag>("neutralHadronHighThreshold"),neutralHadronHighThreshold03_);
110  iEvent.getByLabel(isoCfg03_.getParameter<edm::InputTag>("photonHighThreshold"),photonHighThreshold03_);
112 
117  iEvent.getByLabel(isoCfg04_.getParameter<edm::InputTag>("neutralHadronHighThreshold"),neutralHadronHighThreshold04_);
118  iEvent.getByLabel(isoCfg04_.getParameter<edm::InputTag>("photonHighThreshold"),photonHighThreshold04_);
120 
121 }
T getParameter(std::string const &) const
edm::Handle< CandDoubleMap > pu04_
Definition: MuPFIsoHelper.h:58
edm::Handle< CandDoubleMap > photonHighThreshold04_
Definition: MuPFIsoHelper.h:57
edm::Handle< CandDoubleMap > neutralHadronHighThreshold03_
Definition: MuPFIsoHelper.h:48
edm::Handle< CandDoubleMap > neutralHadronHighThreshold04_
Definition: MuPFIsoHelper.h:56
edm::Handle< CandDoubleMap > chargedParticle04_
Definition: MuPFIsoHelper.h:52
edm::Handle< CandDoubleMap > neutralHadron03_
Definition: MuPFIsoHelper.h:46
edm::Handle< CandDoubleMap > photon03_
Definition: MuPFIsoHelper.h:47
edm::Handle< CandDoubleMap > pu03_
Definition: MuPFIsoHelper.h:50
edm::ParameterSet isoCfg03_
Definition: MuPFIsoHelper.h:40
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
edm::Handle< CandDoubleMap > chargedHadron04_
Definition: MuPFIsoHelper.h:53
edm::Handle< CandDoubleMap > photon04_
Definition: MuPFIsoHelper.h:55
edm::Handle< CandDoubleMap > photonHighThreshold03_
Definition: MuPFIsoHelper.h:49
edm::Handle< CandDoubleMap > chargedParticle03_
Definition: MuPFIsoHelper.h:44
edm::Handle< CandDoubleMap > neutralHadron04_
Definition: MuPFIsoHelper.h:54
edm::Handle< CandDoubleMap > chargedHadron03_
Definition: MuPFIsoHelper.h:45
edm::ParameterSet isoCfg04_
Definition: MuPFIsoHelper.h:41
int MuPFIsoHelper::embedPFIsolation ( reco::Muon muon,
reco::MuonRef muonRef 
)

Definition at line 20 of file MuPFIsoHelper.cc.

References chargedHadron03_, chargedHadron04_, chargedParticle03_, chargedParticle04_, HiCaloIsolation_cff::isoR3, HiCaloIsolation_cff::isoR4, neutralHadron03_, neutralHadron04_, neutralHadronHighThreshold03_, neutralHadronHighThreshold04_, photon03_, photon04_, photonHighThreshold03_, photonHighThreshold04_, pu03_, pu04_, reco::Muon::setPFIsolation(), reco::MuonPFIsolation::sumChargedHadronPt, reco::MuonPFIsolation::sumChargedParticlePt, reco::MuonPFIsolation::sumNeutralHadronEt, reco::MuonPFIsolation::sumNeutralHadronEtHighThreshold, reco::MuonPFIsolation::sumPhotonEt, reco::MuonPFIsolation::sumPhotonEtHighThreshold, and reco::MuonPFIsolation::sumPUPt.

Referenced by MuonProducer::produce(), and MuPFIsoEmbedder::produce().

20  {
22  if(chargedParticle03_.isValid()) {
23  isoR3.sumChargedParticlePt = (*chargedParticle03_)[muonRef];
24  }
25  else { return -1;}
26 
27  if(chargedHadron03_.isValid()) {
28  isoR3.sumChargedHadronPt = (*chargedHadron03_)[muonRef];
29  }
30  else { return -1;}
31 
32  if(neutralHadron03_.isValid()) {
33  isoR3.sumNeutralHadronEt = (*neutralHadron03_)[muonRef];
34  }
35  else { return -1;}
36 
37  if(photon03_.isValid()) {
38  isoR3.sumPhotonEt = (*photon03_)[muonRef];
39  }
40  else { return -1;}
41 
42  if(neutralHadronHighThreshold03_.isValid()) {
43  isoR3.sumNeutralHadronEtHighThreshold = (*neutralHadronHighThreshold03_)[muonRef];
44  }
45  else { return -1;}
46 
47  if(photonHighThreshold03_.isValid()) {
48  isoR3.sumPhotonEtHighThreshold = (*photonHighThreshold03_)[muonRef];
49  }
50  else { return -1;}
51 
52  if(pu03_.isValid()) {
53  isoR3.sumPUPt = (*pu03_)[muonRef];
54  }
55  else { return -1;}
56 
57 
58 
60  if(chargedParticle04_.isValid()) {
61  isoR4.sumChargedParticlePt = (*chargedParticle04_)[muonRef];
62  }
63  else { return -1;}
64 
65  if(chargedHadron04_.isValid()) {
66  isoR4.sumChargedHadronPt = (*chargedHadron04_)[muonRef];
67  }
68  else { return -1;}
69 
70  if(neutralHadron04_.isValid()) {
71  isoR4.sumNeutralHadronEt = (*neutralHadron04_)[muonRef];
72  }
73  else { return -1;}
74 
75  if(photon04_.isValid()) {
76  isoR4.sumPhotonEt = (*photon04_)[muonRef];
77  }
78  else { return -1;}
79 
80  if(neutralHadronHighThreshold04_.isValid()) {
81  isoR4.sumNeutralHadronEtHighThreshold = (*neutralHadronHighThreshold04_)[muonRef];
82  }
83  else { return -1;}
84 
85  if(photonHighThreshold04_.isValid()) {
86  isoR4.sumPhotonEtHighThreshold = (*photonHighThreshold04_)[muonRef];
87  }
88  else { return -1;}
89 
90  if(pu04_.isValid()) {
91  isoR4.sumPUPt = (*pu04_)[muonRef];
92  }
93  else { return -1;}
94 
95 
96  muon.setPFIsolation(isoR3,isoR4);
97 
98  return 0;
99 }
edm::Handle< CandDoubleMap > pu04_
Definition: MuPFIsoHelper.h:58
float sumNeutralHadronEtHighThreshold
sum pt of neutral hadrons with a higher threshold
float sumPhotonEt
sum pt of PF photons
edm::Handle< CandDoubleMap > photonHighThreshold04_
Definition: MuPFIsoHelper.h:57
edm::Handle< CandDoubleMap > neutralHadronHighThreshold03_
Definition: MuPFIsoHelper.h:48
float sumNeutralHadronEt
sum pt of neutral hadrons
edm::Handle< CandDoubleMap > neutralHadronHighThreshold04_
Definition: MuPFIsoHelper.h:56
float sumChargedParticlePt
sum-pt of charged Particles(inludes e/mu)
float sumPUPt
sum pt of charged Particles not from PV (for Pu corrections)
edm::Handle< CandDoubleMap > chargedParticle04_
Definition: MuPFIsoHelper.h:52
edm::Handle< CandDoubleMap > neutralHadron03_
Definition: MuPFIsoHelper.h:46
edm::Handle< CandDoubleMap > photon03_
Definition: MuPFIsoHelper.h:47
edm::Handle< CandDoubleMap > pu03_
Definition: MuPFIsoHelper.h:50
edm::Handle< CandDoubleMap > chargedHadron04_
Definition: MuPFIsoHelper.h:53
edm::Handle< CandDoubleMap > photon04_
Definition: MuPFIsoHelper.h:55
edm::Handle< CandDoubleMap > photonHighThreshold03_
Definition: MuPFIsoHelper.h:49
edm::Handle< CandDoubleMap > chargedParticle03_
Definition: MuPFIsoHelper.h:44
float sumPhotonEtHighThreshold
sum pt of PF photons with a higher threshold
void setPFIsolation(const MuonPFIsolation &isoR03, const MuonPFIsolation &isoR04)
Definition: Muon.cc:736
edm::Handle< CandDoubleMap > neutralHadron04_
Definition: MuPFIsoHelper.h:54
edm::Handle< CandDoubleMap > chargedHadron03_
Definition: MuPFIsoHelper.h:45
float sumChargedHadronPt
sum-pt of charged Hadron

Member Data Documentation

edm::Handle<CandDoubleMap> MuPFIsoHelper::chargedHadron03_
private

Definition at line 45 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and embedPFIsolation().

edm::Handle<CandDoubleMap> MuPFIsoHelper::chargedHadron04_
private

Definition at line 53 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and embedPFIsolation().

edm::Handle<CandDoubleMap> MuPFIsoHelper::chargedParticle03_
private

Definition at line 44 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and embedPFIsolation().

edm::Handle<CandDoubleMap> MuPFIsoHelper::chargedParticle04_
private

Definition at line 52 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and embedPFIsolation().

edm::ParameterSet MuPFIsoHelper::isoCfg03_
private

Definition at line 40 of file MuPFIsoHelper.h.

Referenced by beginEvent().

edm::ParameterSet MuPFIsoHelper::isoCfg04_
private

Definition at line 41 of file MuPFIsoHelper.h.

Referenced by beginEvent().

edm::Handle<CandDoubleMap> MuPFIsoHelper::neutralHadron03_
private

Definition at line 46 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and embedPFIsolation().

edm::Handle<CandDoubleMap> MuPFIsoHelper::neutralHadron04_
private

Definition at line 54 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and embedPFIsolation().

edm::Handle<CandDoubleMap> MuPFIsoHelper::neutralHadronHighThreshold03_
private

Definition at line 48 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and embedPFIsolation().

edm::Handle<CandDoubleMap> MuPFIsoHelper::neutralHadronHighThreshold04_
private

Definition at line 56 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and embedPFIsolation().

edm::Handle<CandDoubleMap> MuPFIsoHelper::photon03_
private

Definition at line 47 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and embedPFIsolation().

edm::Handle<CandDoubleMap> MuPFIsoHelper::photon04_
private

Definition at line 55 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and embedPFIsolation().

edm::Handle<CandDoubleMap> MuPFIsoHelper::photonHighThreshold03_
private

Definition at line 49 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and embedPFIsolation().

edm::Handle<CandDoubleMap> MuPFIsoHelper::photonHighThreshold04_
private

Definition at line 57 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and embedPFIsolation().

edm::Handle<CandDoubleMap> MuPFIsoHelper::pu03_
private

Definition at line 50 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and embedPFIsolation().

edm::Handle<CandDoubleMap> MuPFIsoHelper::pu04_
private

Definition at line 58 of file MuPFIsoHelper.h.

Referenced by beginEvent(), and embedPFIsolation().