56 #include <TLorentzVector.h>
67 if (iConfig.
exists(
"HLTBitLabels"))
68 HLTBitLabel_ = iConfig.
getParameter<std::vector<edm::InputTag> >(
"HLTBitLabels");
84 for (
unsigned int i = 0;
i < HLTBitLabel_.size();
i++) {
85 if (!HLTBitLabel_[
i].
label().empty()) {
86 hCT_NEvents_HLT.push_back(
87 ibooker.
book1D(
"METTask_CT_" + HLTBitLabel_[
i].label(), HLTBitLabel_[
i].label(), 2, -0.5, 1.5));
92 hCT_Nevents = ibooker.
book1D(
"METTask_CT_Nevents",
"", 1, 0, 1);
94 hCT_et_ieta_iphi = ibooker.
book2D(
"METTask_CT_et_ieta_iphi",
"", 83, -41, 42, 72, 1, 73);
96 hCT_et_ieta_iphi->setAxisTitle(
"ieta", 1);
97 hCT_et_ieta_iphi->setAxisTitle(
"ephi", 2);
99 hCT_emEt_ieta_iphi = ibooker.
book2D(
"METTask_CT_emEt_ieta_iphi",
"", 83, -41, 42, 72, 1, 73);
101 hCT_emEt_ieta_iphi->setAxisTitle(
"ieta", 1);
102 hCT_emEt_ieta_iphi->setAxisTitle(
"ephi", 2);
103 hCT_hadEt_ieta_iphi = ibooker.
book2D(
"METTask_CT_hadEt_ieta_iphi",
"", 83, -41, 42, 72, 1, 73);
105 hCT_hadEt_ieta_iphi->setAxisTitle(
"ieta", 1);
106 hCT_hadEt_ieta_iphi->setAxisTitle(
"ephi", 2);
107 hCT_outerEt_ieta_iphi = ibooker.
book2D(
"METTask_CT_outerEt_ieta_iphi",
"", 83, -41, 42, 72, 1, 73);
108 hCT_outerEt_ieta_iphi->
setOption(
"colz");
109 hCT_outerEt_ieta_iphi->setAxisTitle(
"ieta", 1);
110 hCT_outerEt_ieta_iphi->setAxisTitle(
"ephi", 2);
111 hCT_Occ_ieta_iphi = ibooker.
book2D(
"METTask_CT_Occ_ieta_iphi",
"", 83, -41, 42, 72, 1, 73);
113 hCT_Occ_ieta_iphi->setAxisTitle(
"ieta", 1);
114 hCT_Occ_ieta_iphi->setAxisTitle(
"ephi", 2);
116 hCT_Occ_EM_Et_ieta_iphi = ibooker.
book2D(
"METTask_CT_Occ_EM_Et_ieta_iphi",
"", 83, -41, 42, 72, 1, 73);
117 hCT_Occ_EM_Et_ieta_iphi->
setOption(
"colz");
118 hCT_Occ_EM_Et_ieta_iphi->setAxisTitle(
"ieta", 1);
119 hCT_Occ_EM_Et_ieta_iphi->setAxisTitle(
"ephi", 2);
121 hCT_Occ_HAD_Et_ieta_iphi = ibooker.
book2D(
"METTask_CT_Occ_HAD_Et_ieta_iphi",
"", 83, -41, 42, 72, 1, 73);
122 hCT_Occ_HAD_Et_ieta_iphi->
setOption(
"colz");
123 hCT_Occ_HAD_Et_ieta_iphi->setAxisTitle(
"ieta", 1);
124 hCT_Occ_HAD_Et_ieta_iphi->setAxisTitle(
"ephi", 2);
126 hCT_Occ_Outer_Et_ieta_iphi = ibooker.
book2D(
"METTask_CT_Occ_Outer_Et_ieta_iphi",
"", 83, -41, 42, 72, 1, 73);
127 hCT_Occ_Outer_Et_ieta_iphi->
setOption(
"colz");
128 hCT_Occ_Outer_Et_ieta_iphi->setAxisTitle(
"ieta", 1);
129 hCT_Occ_Outer_Et_ieta_iphi->setAxisTitle(
"ephi", 2);
136 hCT_etvsieta = ibooker.
book2D(
"METTask_CT_etvsieta",
"", 83, -41, 42, 10001, 0, 1001);
137 hCT_Minetvsieta = ibooker.
book2D(
"METTask_CT_Minetvsieta",
"", 83, -41, 42, 10001, 0, 1001);
138 hCT_Maxetvsieta = ibooker.
book2D(
"METTask_CT_Maxetvsieta",
"", 83, -41, 42, 10001, 0, 1001);
139 hCT_emEtvsieta = ibooker.
book2D(
"METTask_CT_emEtvsieta",
"", 83, -41, 42, 10001, 0, 1001);
140 hCT_hadEtvsieta = ibooker.
book2D(
"METTask_CT_hadEtvsieta",
"", 83, -41, 42, 10001, 0, 1001);
141 hCT_outerEtvsieta = ibooker.
book2D(
"METTask_CT_outerEtvsieta",
"", 83, -41, 42, 10001, 0, 1001);
144 hCT_Occvsieta = ibooker.
book2D(
"METTask_CT_Occvsieta",
"", 83, -41, 42, 84, 0, 84);
145 hCT_SETvsieta = ibooker.
book2D(
"METTask_CT_SETvsieta",
"", 83, -41, 42, 20001, 0, 2001);
146 hCT_METvsieta = ibooker.
book2D(
"METTask_CT_METvsieta",
"", 83, -41, 42, 20001, 0, 2001);
147 hCT_METPhivsieta = ibooker.
book2D(
"METTask_CT_METPhivsieta",
"", 83, -41, 42, 80, -4, 4);
148 hCT_MExvsieta = ibooker.
book2D(
"METTask_CT_MExvsieta",
"", 83, -41, 42, 10001, -500, 501);
149 hCT_MEyvsieta = ibooker.
book2D(
"METTask_CT_MEyvsieta",
"", 83, -41, 42, 10001, -500, 501);
152 hCT_etvsieta = ibooker.
book2D(
"METTask_CT_etvsieta",
"", 83, -41, 42, 200, -0.5, 999.5);
153 hCT_Minetvsieta = ibooker.
book2D(
"METTask_CT_Minetvsieta",
"", 83, -41, 42, 200, -0.5, 999.5);
154 hCT_Maxetvsieta = ibooker.
book2D(
"METTask_CT_Maxetvsieta",
"", 83, -41, 42, 200, -0.5, 999.5);
155 hCT_emEtvsieta = ibooker.
book2D(
"METTask_CT_emEtvsieta",
"", 83, -41, 42, 200, -0.5, 999.5);
156 hCT_hadEtvsieta = ibooker.
book2D(
"METTask_CT_hadEtvsieta",
"", 83, -41, 42, 200, -0.5, 999.5);
157 hCT_outerEtvsieta = ibooker.
book2D(
"METTask_CT_outerEtvsieta",
"", 83, -41, 42, 80, -0.5, 399.5);
161 hCT_Occvsieta = ibooker.
book2D(
"METTask_CT_Occvsieta",
"", 83, -41, 42, 73, -0.5, 72.5);
162 hCT_SETvsieta = ibooker.
book2D(
"METTask_CT_SETvsieta",
"", 83, -41, 42, 200, -0.5, 1999.5);
163 hCT_METvsieta = ibooker.
book2D(
"METTask_CT_METvsieta",
"", 83, -41, 42, 200, -0.5, 1999.5);
164 hCT_METPhivsieta = ibooker.
book2D(
"METTask_CT_METPhivsieta",
"", 83, -41, 42, 80, -4, 4);
165 hCT_MExvsieta = ibooker.
book2D(
"METTask_CT_MExvsieta",
"", 83, -41, 42, 100, -499.5, 499.5);
166 hCT_MEyvsieta = ibooker.
book2D(
"METTask_CT_MEyvsieta",
"", 83, -41, 42, 100, -499.5, 499.5);
174 iEvent.getByToken(HLTResultsLabel_, TheHLTResults);
181 bool EventPasses =
true;
183 if (TheHLTResults.
isValid() && hltselection_) {
194 if (bit < TheHLTResults->
size()) {
196 if (TheHLTResults->
accept(bit) && !TheHLTResults->
error(bit)) {
198 hCT_NEvents_HLT[
index]->Fill(1);
200 hCT_NEvents_HLT[
index]->Fill(0);
202 edm::LogInfo(
"OutputInfo") <<
"The HLT Trigger Name : " << HLTBitLabel_[
index].label()
203 <<
" is not valid for this trigger table " << std::endl;
209 if (!EventPasses && hltselection_)
213 float ETTowerMin = -1;
214 float METRingMin = -2;
217 hCT_Nevents->Fill(0);
226 if ((!
towers.isValid())) {
234 iEvent.getByToken(HBHENoiseFilterResultLabel_, HBHENoiseFilterResultHandle);
235 bool HBHENoiseFilterResult = *HBHENoiseFilterResultHandle;
236 if (!HBHENoiseFilterResultHandle.
isValid()) {
237 LogDebug(
"") <<
"CaloTowerAnalyzer: Could not find HBHENoiseFilterResult" << std::endl;
240 bool bHcalNoiseFilter = HBHENoiseFilterResult;
242 if (!bHcalNoiseFilter)
251 int CTmin_iphi = 99, CTmax_iphi = -99;
252 int CTmin_ieta = 99, CTmax_ieta = -99;
254 TLorentzVector vMET_EtaRing[83];
256 int NActiveTowers[83];
257 double SET_EtaRing[83];
258 double MinEt_EtaRing[83];
259 double MaxEt_EtaRing[83];
260 for (
int i = 0;
i < 83;
i++) {
262 NActiveTowers[
i] = 0;
264 MinEt_EtaRing[
i] = 0;
265 MaxEt_EtaRing[
i] = 0;
269 for (; towerCand !=
towers->end(); towerCand++) {
270 const Candidate* candidate = &(*towerCand);
281 double Tower_OuterEt =
calotower->outerEt();
288 int EtaRing = 41 + Tower_ieta;
289 ActiveRing[EtaRing] = 1;
290 NActiveTowers[EtaRing]++;
291 SET_EtaRing[EtaRing] += Tower_ET;
293 v_.SetPtEtaPhiE(Tower_ET, 0, Tower_Phi, Tower_ET);
294 if (Tower_ET > ETTowerMin)
295 vMET_EtaRing[EtaRing] -= v_;
298 hCT_Occ_ieta_iphi->Fill(Tower_ieta, Tower_iphi);
300 hCT_Occ_EM_Et_ieta_iphi->Fill(Tower_ieta, Tower_iphi);
302 hCT_Occ_HAD_Et_ieta_iphi->Fill(Tower_ieta, Tower_iphi);
304 hCT_Occ_Outer_Et_ieta_iphi->Fill(Tower_ieta, Tower_iphi);
306 hCT_et_ieta_iphi->Fill(Tower_ieta, Tower_iphi, Tower_ET);
307 hCT_emEt_ieta_iphi->Fill(Tower_ieta, Tower_iphi, Tower_EMEt);
308 hCT_hadEt_ieta_iphi->Fill(Tower_ieta, Tower_iphi, Tower_HadEt);
309 hCT_outerEt_ieta_iphi->Fill(Tower_ieta, Tower_iphi, Tower_OuterEt);
312 hCT_etvsieta->Fill(Tower_ieta, Tower_ET);
313 hCT_emEtvsieta->Fill(Tower_ieta, Tower_EMEt);
314 hCT_hadEtvsieta->Fill(Tower_ieta, Tower_HadEt);
315 hCT_outerEtvsieta->Fill(Tower_ieta, Tower_OuterEt);
318 if (Tower_ET > MaxEt_EtaRing[EtaRing])
319 MaxEt_EtaRing[EtaRing] = Tower_ET;
320 if (Tower_ET < MinEt_EtaRing[EtaRing] && Tower_ET > 0)
321 MinEt_EtaRing[EtaRing] = Tower_ET;
323 if (Tower_ieta < CTmin_ieta)
324 CTmin_ieta = Tower_ieta;
325 if (Tower_ieta > CTmax_ieta)
326 CTmax_ieta = Tower_ieta;
327 if (Tower_iphi < CTmin_iphi)
328 CTmin_iphi = Tower_iphi;
329 if (Tower_iphi > CTmax_iphi)
330 CTmax_iphi = Tower_iphi;
338 for (
int iEtaRing = 0; iEtaRing < 83; iEtaRing++) {
339 hCT_Minetvsieta->Fill(iEtaRing - 41, MinEt_EtaRing[iEtaRing]);
340 hCT_Maxetvsieta->Fill(iEtaRing - 41, MaxEt_EtaRing[iEtaRing]);
342 if (ActiveRing[iEtaRing]) {
343 if (vMET_EtaRing[iEtaRing].Pt() > METRingMin) {
344 hCT_METPhivsieta->Fill(iEtaRing - 41, vMET_EtaRing[iEtaRing].
Phi());
345 hCT_MExvsieta->Fill(iEtaRing - 41, vMET_EtaRing[iEtaRing].Px());
346 hCT_MEyvsieta->Fill(iEtaRing - 41, vMET_EtaRing[iEtaRing].Py());
347 hCT_METvsieta->Fill(iEtaRing - 41, vMET_EtaRing[iEtaRing].Pt());
349 hCT_SETvsieta->Fill(iEtaRing - 41, SET_EtaRing[iEtaRing]);
350 hCT_Occvsieta->Fill(iEtaRing - 41, NActiveTowers[iEtaRing]);
355 edm::LogInfo(
"OutputInfo") <<
"CT ieta range: " << CTmin_ieta <<
" " << CTmax_ieta;
356 edm::LogInfo(
"OutputInfo") <<
"CT iphi range: " << CTmin_iphi <<
" " << CTmax_iphi;