62 std::vector<std::pair<TH1D*, TH1D*>>
histo_;
81 usesResource(
"TFileService");
102 for (
unsigned int k = 0;
k <
ieta.size(); ++
k) {
122 desc.add<
bool>(
"RunNZS",
true);
123 desc.add<
bool>(
"Noise",
false);
124 desc.add<
bool>(
"Ratio",
false);
125 desc.add<
double>(
"ELowHF", 10);
126 desc.add<
double>(
"EHighHF", 150);
127 std::vector<int> idummy;
128 desc.addUntracked<std::vector<int>>(
"TriggerBits", idummy);
129 desc.addUntracked<
bool>(
"IgnoreL1",
false);
130 desc.addUntracked<
bool>(
"FillHisto",
false);
131 desc.addUntracked<std::vector<int>>(
"HcalIeta", idummy);
132 desc.addUntracked<std::vector<int>>(
"HcalIphi", idummy);
133 desc.addUntracked<std::vector<int>>(
"HcalDepth", idummy);
135 descriptions.
add(
"recAnalyzerHF",
desc);
145 for (
int i = 0;
i < 2; ++
i) {
146 sprintf(
name,
"HF%d",
i);
147 sprintf(
title,
"The metric F%d for HF",
i + 1);
151 for (
const auto&
id :
hcalID_) {
153 TH1D *h1(
nullptr), *h2(
nullptr);
154 for (
int i = 0;
i < 2; ++
i) {
156 sprintf(
title,
"The metric F%d for HF i#eta %d i#phi %d depth %d",
i + 1, hid.
ieta(), hid.
iphi(), hid.
depth());
162 histo_.push_back(std::pair<TH1D*, TH1D*>(h1, h2));
192 for (
const auto& itr :
myMap_) {
193 edm::LogVerbatim(
"RecAnalyzer") <<
"Fired trigger bit number " << itr.first.first;
195 if (
info.kount > 0) {
208 mysubd = itr.first.second.subdet();
209 depth = itr.first.second.depth();
210 iphi = itr.first.second.iphi();
211 ieta = itr.first.second.ieta();
240 edm::LogWarning(
"RecAnalyzer") <<
"HcalCalibAlgos: Error! can't get hf product!";
253 if (gtObjectMapRecord.
isValid()) {
254 const std::vector<L1GlobalTriggerObjectMap>& objMapVec = gtObjectMapRecord->
gtObjectMap();
255 for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin(); itMap != objMapVec.end();
257 bool resultGt = (*itMap).algoGtlResult();
259 int algoBit = (*itMap).algoBitNumber();
276 if (gtObjectMapRecord.
isValid()) {
277 const std::vector<L1GlobalTriggerObjectMap>& objMapVec = gtObjectMapRecord->
gtObjectMap();
279 for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin(); itMap != objMapVec.end();
281 bool resultGt = (*itMap).algoGtlResult();
283 int algoBit = (*itMap).algoBitNumber();
297 edm::LogVerbatim(
"RecAnalyzer") <<
"Enter analyzeHcal for bit " << algoBit <<
" Fill " <<
fill <<
" Collection size "
301 for (
const auto& hfItr : Hithf) {
303 double e0 = (hfItr.getHFQIE10Info(0) ==
nullptr) ? 0 : hfItr.getHFQIE10Info(0)->energy();
304 double e1 = (hfItr.getHFQIE10Info(1) ==
nullptr) ? 0 : hfItr.getHFQIE10Info(1)->energy();
317 for (
unsigned int i = 0;
i <
hcalID_.size();
i++) {
332 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
333 if (itr1 ==
myMap_.end()) {
335 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
336 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
338 itr1->second.kount += 1.0;
339 itr1->second.f11 += (
f1);
340 itr1->second.f12 += (
f1 *
f1);
341 itr1->second.f13 += (
f1 *
f1 *
f1);
342 itr1->second.f14 += (
f1 *
f1 *
f1 *
f1);
343 itr1->second.f21 += (
f2);
344 itr1->second.f22 += (
f2 *
f2);
345 itr1->second.f23 += (
f2 *
f2 *
f2);
346 itr1->second.f24 += (
f2 *
f2 *
f2 *
f2);
347 itr1->second.runcheck =
rnnum_;