27 theMuonCollectionLabel_ = consumes<reco::MuonCollection>(
parameters.getParameter<
InputTag>(
"MuonCollection"));
30 emNoBin =
parameters.getParameter<
int>(
"emSizeBin");
31 emNoMin =
parameters.getParameter<
double>(
"emSizeMin");
32 emNoMax =
parameters.getParameter<
double>(
"emSizeMax");
34 hadNoBin =
parameters.getParameter<
int>(
"hadSizeBin");
35 hadNoMin =
parameters.getParameter<
double>(
"hadSizeMin");
36 hadNoMax =
parameters.getParameter<
double>(
"hadSizeMax");
38 emS9NoBin =
parameters.getParameter<
int>(
"emS9SizeBin");
39 emS9NoMin =
parameters.getParameter<
double>(
"emS9SizeMin");
40 emS9NoMax =
parameters.getParameter<
double>(
"emS9SizeMax");
42 hadS9NoBin =
parameters.getParameter<
int>(
"hadS9SizeBin");
43 hadS9NoMin =
parameters.getParameter<
double>(
"hadS9SizeMin");
44 hadS9NoMax =
parameters.getParameter<
double>(
"hadS9SizeMax");
46 hoNoBin =
parameters.getParameter<
int>(
"hoSizeBin");
47 hoNoMin =
parameters.getParameter<
double>(
"hoSizeMin");
48 hoNoMax =
parameters.getParameter<
double>(
"hoSizeMax");
50 hoS9NoBin =
parameters.getParameter<
int>(
"hoS9SizeBin");
51 hoS9NoMin =
parameters.getParameter<
double>(
"hoS9SizeMin");
52 hoS9NoMax =
parameters.getParameter<
double>(
"hoS9SizeMax");
61 std::string histname =
"ecalDepositedEnergyBarrel_";
63 ibooker.
book1D(histname +
AlgoName,
"Energy deposited in the ECAL barrel cells", emNoBin, emNoMin, emNoMax);
66 histname =
"ecalDepositedEnergyEndcap_";
68 ibooker.
book1D(histname +
AlgoName,
"Energy deposited in the ECAL endcap cells", emNoBin, emNoMin, emNoMax);
71 histname =
"ecalS9DepositedEnergyBarrel_";
72 ecalS9DepEnergyBarrel = ibooker.
book1D(
73 histname +
AlgoName,
"Energy deposited in the ECAL barrel 3*3 towers", emS9NoBin, emS9NoMin, emS9NoMax);
75 histname =
"ecalS9DepositedEnergyEndcap_";
76 ecalS9DepEnergyEndcap = ibooker.
book1D(
77 histname +
AlgoName,
"Energy deposited in the ECAL endcap 3*3 towers", emS9NoBin, emS9NoMin, emS9NoMax);
79 histname =
"ecalS9PointingMuDepositedEnergy_Glb_";
80 ecalS9PointingMuDepEnergy_Glb = ibooker.
book1D(histname +
AlgoName,
81 "Pointing glb muons energy deposited in the ECAL 3*3 towers",
86 histname =
"ecalS9PointingMuDepositedEnergy_Tk_";
87 ecalS9PointingMuDepEnergy_Tk = ibooker.
book1D(
88 histname +
AlgoName,
"Pointing tk muons energy deposited in the ECAL 3*3 towers", emS9NoBin, emS9NoMin, emS9NoMax);
90 histname =
"ecalS9PointingMuDepositedEnergy_Sta_";
91 ecalS9PointingMuDepEnergy_Sta = ibooker.
book1D(histname +
AlgoName,
92 "Pointing sta muons energy deposited in the ECAL 3*3 towers",
98 histname =
"hadDepositedEnergyBarrel_";
100 ibooker.
book1D(histname +
AlgoName,
"Energy deposited in the HCAL barrel cells", hadNoBin, hadNoMin, hadNoMax);
102 histname =
"hadDepositedEnergyEndcap_";
103 hcalDepEnergyEndcap =
104 ibooker.
book1D(histname +
AlgoName,
"Energy deposited in the HCAL endcap cells", hadNoBin, hadNoMin, hadNoMax);
107 histname =
"hadS9DepositedEnergyBarrel_";
108 hcalS9DepEnergyBarrel = ibooker.
book1D(
109 histname +
AlgoName,
"Energy deposited in the HCAL barrel 3*3 towers", hadS9NoBin, hadS9NoMin, hadS9NoMax);
111 histname =
"hadS9DepositedEnergyEndcap_";
112 hcalS9DepEnergyEndcap = ibooker.
book1D(
113 histname +
AlgoName,
"Energy deposited in the HCAL endcap 3*3 towers", hadS9NoBin, hadS9NoMin, hadS9NoMax);
115 histname =
"hadS9PointingMuDepositedEnergy_Glb_";
116 hcalS9PointingMuDepEnergy_Glb = ibooker.
book1D(histname +
AlgoName,
117 "Pointing glb muons energy deposited in the HCAL endcap 3*3 towers",
122 histname =
"hadS9PointingMuDepositedEnergy_Tk_";
123 hcalS9PointingMuDepEnergy_Tk = ibooker.
book1D(histname +
AlgoName,
124 "Pointing tk muons energy deposited in the HCAL endcap 3*3 towers",
129 histname =
"hadS9PointingMuDepositedEnergy_Sta_";
130 hcalS9PointingMuDepEnergy_Sta = ibooker.
book1D(histname +
AlgoName,
131 "Pointing sta muons energy deposited in the HCAL endcap 3*3 towers",
137 histname =
"hoDepositedEnergy_";
138 hoDepEnergy = ibooker.
book1D(histname +
AlgoName,
"Energy deposited in the HO cells", hoNoBin, hoNoMin, hoNoMax);
141 histname =
"hoS9DepositedEnergy_";
143 ibooker.
book1D(histname +
AlgoName,
"Energy deposited in the HO 3*3 towers", hoS9NoBin, hoS9NoMin, hoS9NoMax);
145 histname =
"hoS9PointingMuDepositedEnergy_Glb_";
146 hoS9PointingMuDepEnergy_Glb = ibooker.
book1D(
147 histname +
AlgoName,
"Pointing glb muons energy deposited in the HO 3*3 towers", hoS9NoBin, hoS9NoMin, hoS9NoMax);
149 histname =
"hoS9PointingMuDepositedEnergy_Tk_";
150 hoS9PointingMuDepEnergy_Tk = ibooker.
book1D(
151 histname +
AlgoName,
"Pointing tk muons energy deposited in the HO 3*3 towers", hoS9NoBin, hoS9NoMin, hoS9NoMax);
153 histname =
"hoS9PointingMuDepositedEnergy_Sta_";
154 hoS9PointingMuDepEnergy_Sta = ibooker.
book1D(
155 histname +
AlgoName,
"Pointing sta muons energy deposited in the HO 3*3 towers", hoS9NoBin, hoS9NoMin, hoS9NoMax);
165 if (!
muons.isValid())
168 for (reco::MuonCollection::const_iterator recoMu =
muons->begin(); recoMu !=
muons->end(); ++recoMu) {
174 if (fabs(recoMu->eta()) > 1.479)
175 ecalDepEnergyEndcap->Fill(muEnergy.
em);
177 ecalDepEnergyBarrel->Fill(muEnergy.
em);
181 if (fabs(recoMu->eta()) > 1.4)
182 hcalDepEnergyEndcap->Fill(muEnergy.
had);
184 hcalDepEnergyBarrel->Fill(muEnergy.
had);
188 if (fabs(recoMu->eta()) < 1.26)
189 hoDepEnergy->Fill(muEnergy.
ho);
193 if (fabs(recoMu->eta()) > 1.479)
194 ecalS9DepEnergyEndcap->Fill(muEnergy.
emS9);
196 ecalS9DepEnergyBarrel->Fill(muEnergy.
emS9);
200 if (fabs(recoMu->eta()) > 1.4)
201 hcalS9DepEnergyEndcap->Fill(muEnergy.
hadS9);
203 hcalS9DepEnergyBarrel->Fill(muEnergy.
hadS9);
207 if (fabs(recoMu->eta()) < 1.26)
208 hoS9DepEnergy->Fill(muEnergy.
hoS9);
215 if (recoMu->isGlobalMuon())
216 TransTrack = theB->
build(recoMu->globalTrack());
217 else if ((recoMu->isTrackerMuon() || recoMu->isRPCMuon()))
218 TransTrack = theB->
build(recoMu->innerTrack());
219 else if (recoMu->isStandAloneMuon())
220 TransTrack = theB->
build(recoMu->outerTrack());
229 if (recoMu->isGlobalMuon()) {
230 ecalS9PointingMuDepEnergy_Glb->Fill(muEnergy.
emS9);
231 hcalS9PointingMuDepEnergy_Glb->Fill(muEnergy.
hadS9);
232 hoS9PointingMuDepEnergy_Glb->Fill(muEnergy.
hoS9);
235 else if (recoMu->isTrackerMuon()) {
236 ecalS9PointingMuDepEnergy_Tk->Fill(muEnergy.
emS9);
237 hcalS9PointingMuDepEnergy_Tk->Fill(muEnergy.
hadS9);
238 hoS9PointingMuDepEnergy_Tk->Fill(muEnergy.
hoS9);
241 else if (recoMu->isStandAloneMuon()) {
242 ecalS9PointingMuDepEnergy_Sta->Fill(muEnergy.
emS9);
243 hcalS9PointingMuDepEnergy_Sta->Fill(muEnergy.
hadS9);
244 hoS9PointingMuDepEnergy_Sta->Fill(muEnergy.
hoS9);