CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuPFIsoHelper.cc
Go to the documentation of this file.
2 
3 
5  isoCfg03_(iConfig.getParameter<edm::ParameterSet>("isolationR03")),
6  isoCfg04_(iConfig.getParameter<edm::ParameterSet>("isolationR04"))
7 {
8 
9 
10 }
11 
12 
13 
15 
16 }
17 
18 
19 
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 }
100 
101 
102 
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
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)
int iEvent
Definition: GenABIO.cc:243
edm::Handle< CandDoubleMap > chargedParticle04_
Definition: MuPFIsoHelper.h:52
edm::Handle< CandDoubleMap > neutralHadron03_
Definition: MuPFIsoHelper.h:46
MuPFIsoHelper(const edm::ParameterSet &iConfig)
Definition: MuPFIsoHelper.cc:4
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
int embedPFIsolation(reco::Muon &, reco::MuonRef &)
edm::Handle< CandDoubleMap > photon04_
Definition: MuPFIsoHelper.h:55
edm::Handle< CandDoubleMap > photonHighThreshold03_
Definition: MuPFIsoHelper.h:49
void beginEvent(const edm::Event &iEvent)
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
edm::ParameterSet isoCfg04_
Definition: MuPFIsoHelper.h:41