63 std::vector<std::pair<TH1D*, TH1D*>>
histo_;
82 usesResource(
"TFileService");
103 for (
unsigned int k = 0;
k <
ieta.size(); ++
k) {
123 desc.add<
bool>(
"RunNZS",
true);
124 desc.add<
bool>(
"Noise",
false);
125 desc.add<
bool>(
"Ratio",
false);
126 desc.add<
double>(
"ELowHF", 10);
127 desc.add<
double>(
"EHighHF", 150);
128 std::vector<int> idummy;
129 desc.addUntracked<std::vector<int>>(
"TriggerBits", idummy);
130 desc.addUntracked<
bool>(
"IgnoreL1",
false);
131 desc.addUntracked<
bool>(
"FillHisto",
false);
132 desc.addUntracked<std::vector<int>>(
"HcalIeta", idummy);
133 desc.addUntracked<std::vector<int>>(
"HcalIphi", idummy);
134 desc.addUntracked<std::vector<int>>(
"HcalDepth", idummy);
136 descriptions.
add(
"recAnalyzerHF",
desc);
146 for (
int i = 0;
i < 2; ++
i) {
147 sprintf(
name,
"HF%d",
i);
148 sprintf(
title,
"The metric F%d for HF",
i + 1);
152 for (
const auto&
id :
hcalID_) {
154 TH1D *h1(
nullptr), *h2(
nullptr);
155 for (
int i = 0;
i < 2; ++
i) {
157 sprintf(
title,
"The metric F%d for HF i#eta %d i#phi %d depth %d",
i + 1, hid.
ieta(), hid.
iphi(), hid.
depth());
163 histo_.push_back(std::pair<TH1D*, TH1D*>(h1, h2));
196 if (
info.kount > 0) {
211 iphi =
itr.first.second.iphi();
212 ieta =
itr.first.second.ieta();
241 edm::LogWarning(
"RecAnalyzer") <<
"HcalCalibAlgos: Error! can't get hf product!";
254 if (gtObjectMapRecord.
isValid()) {
255 const std::vector<L1GlobalTriggerObjectMap>& objMapVec = gtObjectMapRecord->
gtObjectMap();
256 for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin(); itMap != objMapVec.end();
258 bool resultGt = (*itMap).algoGtlResult();
260 int algoBit = (*itMap).algoBitNumber();
277 if (gtObjectMapRecord.
isValid()) {
278 const std::vector<L1GlobalTriggerObjectMap>& objMapVec = gtObjectMapRecord->
gtObjectMap();
280 for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin(); itMap != objMapVec.end();
282 bool resultGt = (*itMap).algoGtlResult();
284 int algoBit = (*itMap).algoBitNumber();
298 edm::LogVerbatim(
"RecAnalyzer") <<
"Enter analyzeHcal for bit " << algoBit <<
" Fill " <<
fill <<
" Collection size "
302 for (
const auto& hfItr : Hithf) {
304 double e0 = (hfItr.getHFQIE10Info(0) ==
nullptr) ? 0 : hfItr.getHFQIE10Info(0)->energy();
305 double e1 = (hfItr.getHFQIE10Info(1) ==
nullptr) ? 0 : hfItr.getHFQIE10Info(1)->energy();
318 for (
unsigned int i = 0;
i <
hcalID_.size();
i++) {
333 std::map<std::pair<int, HcalDetId>,
myInfo>::iterator itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
334 if (itr1 ==
myMap_.end()) {
336 myMap_[std::pair<int, HcalDetId>(algoBit, hid)] =
info;
337 itr1 =
myMap_.find(std::pair<int, HcalDetId>(algoBit, hid));
339 itr1->second.kount += 1.0;
340 itr1->second.f11 += (
f1);
341 itr1->second.f12 += (
f1 *
f1);
342 itr1->second.f13 += (
f1 *
f1 *
f1);
343 itr1->second.f14 += (
f1 *
f1 *
f1 *
f1);
344 itr1->second.f21 += (
f2);
345 itr1->second.f22 += (
f2 *
f2);
346 itr1->second.f23 += (
f2 *
f2 *
f2);
347 itr1->second.f24 += (
f2 *
f2 *
f2 *
f2);
348 itr1->second.runcheck =
rnnum_;