167 myRecalib = recalibCorrs.
product();
172 std::map<std::pair<int,HcalDetId>,myInfo> tmpMap;
180 LogDebug(
"AnalyzerMB") <<
" The size of the normal collection "
181 << hbheNormal->size();
186 edm::LogInfo(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hbhe product!";
191 LogDebug(
"AnalyzerMB") <<
"HBHE NS size of collection " << HithbheNS.
size();
192 if (HithbheNS.
size() < 5100) {
202 edm::LogInfo(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hbhe product!";
207 LogDebug(
"AnalyzerMB") <<
"HBHE MB size of collection " << HithbheMB.
size();
208 if(HithbheMB.
size() < 5100) {
218 edm::LogInfo(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hbhe product!";
223 LogDebug(
"AnalyzerMB") <<
"HF NS size of collection "<< HithfNS.
size();
224 if (HithfNS.
size() < 1700) {
234 edm::LogInfo(
"AnalyzerMB") <<
"HcalCalibAlgos: Error! can't get hbhe product!";
239 LogDebug(
"AnalyzerMB") <<
"HF MB size of collection " << HithfMB.
size();
240 if(HithfMB.
size() < 1700) {
249 if (gtObjectMapRecord.
isValid()) {
250 const std::vector<L1GlobalTriggerObjectMap>& objMapVec = gtObjectMapRecord->gtObjectMap();
253 for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin();
254 itMap != objMapVec.end(); ++itMap, ++
ii) {
255 float algoBit = (*itMap).algoBitNumber();
256 bool resultGt = (*itMap).algoGtlResult();
268 HBHERecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
270 double energyhit = aHit.
energy();
272 DetId id = (*hbheItr).detid();
274 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr1 =
myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
275 if (itr1 ==
myMap.end()) {
277 myMap[std::pair<int,HcalDetId>(algoBit,hid)] = info;
278 itr1 =
myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
280 itr1->second.theNS0++;
281 itr1->second.theNS1 += energyhit;
282 itr1->second.theNS2 += (energyhit*energyhit);
283 itr1->second.theNS4 += (energyhit*energyhit*energyhit*energyhit);
284 itr1->second.runcheck =
rnnum;
286 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
287 if (itr2 == tmpMap.end()) {
289 tmpMap[std::pair<int,HcalDetId>(algoBit,hid)] = info;
290 itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
292 itr2->second.theNS0++;
293 itr2->second.theNS1 += energyhit;
294 itr2->second.theNS2 += (energyhit*energyhit);
295 itr2->second.theNS4 += (energyhit*energyhit*energyhit*energyhit);
296 itr2->second.runcheck =
rnnum;
308 HBHERecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
309 double energyhit = aHit.
energy();
311 DetId id = (*hbheItr).detid();
314 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr1 =
myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
315 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
317 if (itr1 ==
myMap.end()) {
319 myMap[std::pair<int,HcalDetId>(algoBit,hid)] = info;
320 itr1 =
myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
322 itr1->second.theMB0++;
323 itr1->second.theDif0 = 0;
324 itr1->second.theMB1 += energyhit;
325 itr1->second.theMB2 += (energyhit*energyhit);
326 itr1->second.theMB3 += (energyhit*energyhit*energyhit);
327 itr1->second.theMB4 += (energyhit*energyhit*energyhit*energyhit);
328 itr1->second.runcheck =
rnnum;
330 if (itr2 !=tmpMap.end()) {
331 mydiff = energyhit - (itr2->second.theNS1);
332 itr1->second.theDif0++;
333 itr1->second.theDif1 += mydiff;
334 itr1->second.theDif2 += (mydiff*mydiff);
346 HFRecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
347 double energyhit = aHit.
energy();
349 if(fabs(energyhit) > 40. )
continue;
351 DetId id = (*hbheItr).detid();
354 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr1 =
myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
356 if (itr1 ==
myMap.end()) {
358 myMap[std::pair<int,HcalDetId>(algoBit,hid)] = info;
359 itr1 =
myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
361 itr1->second.theNS0++;
362 itr1->second.theNS1 += energyhit;
363 itr1->second.theNS2 += (energyhit*energyhit);
364 itr1->second.theNS4 += (energyhit*energyhit*energyhit*energyhit);
365 itr1->second.runcheck =
rnnum;
367 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
368 if (itr2 == tmpMap.end()) {
370 tmpMap[std::pair<int,HcalDetId>(algoBit,hid)] = info;
371 itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
373 itr2->second.theNS0++;
374 itr2->second.theNS1 += energyhit;
375 itr2->second.theNS2 += (energyhit*energyhit);
376 itr2->second.theNS4 += (energyhit*energyhit*energyhit*energyhit);
377 itr2->second.runcheck =
rnnum;
389 HFRecHit aHit(hbheItr->id(),hbheItr->energy()*icalconst,hbheItr->time());
391 double energyhit = aHit.
energy();
393 if(fabs(energyhit) > 40. )
continue;
395 DetId id = (*hbheItr).detid();
398 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr1 =
myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
399 std::map<std::pair<int,HcalDetId>,myInfo>::iterator itr2 = tmpMap.find(std::pair<int,HcalDetId>(algoBit,hid));
401 if (itr1 ==
myMap.end()) {
403 myMap[std::pair<int,HcalDetId>(algoBit,hid)] = info;
404 itr1 =
myMap.find(std::pair<int,HcalDetId>(algoBit,hid));
406 itr1->second.theMB0++;
407 itr1->second.theDif0 = 0;
408 itr1->second.theMB1 += energyhit;
409 itr1->second.theMB2 += (energyhit*energyhit);
410 itr1->second.theMB3 += (energyhit*energyhit*energyhit);
411 itr1->second.theMB4 += (energyhit*energyhit*energyhit*energyhit);
412 itr1->second.runcheck =
rnnum;
414 if (itr2 !=tmpMap.end()) {
415 mydiff = energyhit - (itr2->second.theNS1);
416 itr1->second.theDif0++;
417 itr1->second.theDif1 += mydiff;
418 itr1->second.theDif2 += (mydiff*mydiff);
423 if (!
ok)
LogDebug(
"AnalyzerMB") <<
"No passed L1 Triggers";
std::map< std::pair< int, HcalDetId >, myInfo > myMap
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< HBHERecHit >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
uint32_t rawId() const
get the raw id
const_iterator end() const
T const * product() const
T const * product() const
edm::EDGetTokenT< HFRecHitCollection > tok_hfrecoNoise_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbheNormal_
edm::EDGetTokenT< L1GlobalTriggerObjectMapRecord > tok_hltL1GtMap_
edm::EDGetTokenT< HFRecHitCollection > tok_hfrecoMB_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbherecoMB_
const_iterator begin() const
edm::EDGetTokenT< HBHERecHitCollection > tok_hbherecoNoise_