68 myTree =
new TTree(
"RecJet",
"RecJet Tree");
69 myTree->Branch(
"mydet", &
mydet,
"mydet/I");
70 myTree->Branch(
"mysubd", &
mysubd,
"mysubd/I");
71 myTree->Branch(
"cells", &
cells,
"cells");
72 myTree->Branch(
"depth", &
depth,
"depth/I");
73 myTree->Branch(
"ieta", &
ieta,
"ieta/I");
74 myTree->Branch(
"iphi", &
iphi,
"iphi/I");
75 myTree->Branch(
"eta", &
eta,
"eta/F");
76 myTree->Branch(
"phi", &
phi,
"phi/F");
77 myTree->Branch(
"mom0_MB", &
mom0_MB,
"mom0_MB/F");
78 myTree->Branch(
"mom1_MB", &
mom1_MB,
"mom1_MB/F");
79 myTree->Branch(
"mom2_MB", &
mom2_MB,
"mom2_MB/F");
80 myTree->Branch(
"mom3_MB", &
mom3_MB,
"mom3_MB/F");
81 myTree->Branch(
"mom4_MB", &
mom4_MB,
"mom4_MB/F");
82 myTree->Branch(
"mom0_Noise", &
mom0_Noise,
"mom0_Noise/F");
83 myTree->Branch(
"mom1_Noise", &
mom1_Noise,
"mom1_Noise/F");
84 myTree->Branch(
"mom2_Noise", &
mom2_Noise,
"mom2_Noise/F");
85 myTree->Branch(
"mom3_Noise", &
mom2_Noise,
"mom3_Noise/F");
86 myTree->Branch(
"mom4_Noise", &
mom4_Noise,
"mom4_Noise/F");
87 myTree->Branch(
"mom0_Diff", &
mom0_Diff,
"mom0_Diff/F");
88 myTree->Branch(
"mom1_Diff", &
mom1_Diff,
"mom1_Diff/F");
89 myTree->Branch(
"mom2_Diff", &
mom2_Diff,
"mom2_Diff/F");
90 myTree->Branch(
"occup", &
occup,
"occup/F");
91 myTree->Branch(
"trigbit", &
trigbit,
"trigbit/I");
92 myTree->Branch(
"rnnumber", &
rnnumber,
"rnnumber/D");
104 int h = itr->first.first;
105 LogDebug(
"AnalyzerMB") <<
"Fired trigger bit number " <<
h;
106 int i = itr->first.second.subdet();
107 int j = itr->first.second.depth();
108 int k = itr->first.second.iphi();
109 int l = itr->first.second.ieta();
133 <<
" " <<
ieta <<
" " <<
iphi <<
" mom0 "
137 <<
" mom1_Noise " <<
mom1_Noise <<
" mom2_Noise "
139 <<
" mom4_Noise " <<
mom4_Noise <<
" mom0_Diff "
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));
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));
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";
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string fOutputFileName
std::map< std::pair< int, HcalDetId >, myInfo > myMap
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< HBHERecHit >::const_iterator const_iterator
virtual void beginRun(const edm::Run &r, const edm::EventSetup &iSetup)
virtual void endRun(const edm::Run &r, const edm::EventSetup &iSetup)
const Item * getValues(DetId fId, bool throwOnFail=true) const
uint32_t rawId() const
get the raw id
Analyzer_minbias(const edm::ParameterSet &)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
const_iterator end() const
edm::EDGetTokenT< HORecHitCollection > tok_horecoNoise_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
T const * product() const
edm::EDGetTokenT< HORecHitCollection > tok_horecoMB_
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_