CMS 3D CMS Logo

compareRingSums.cc
Go to the documentation of this file.
4 
7  const GctErrorAnalyzerMBxInfo &mbxparams)
8  : data_(data), emu_(emu), mbxparams_(mbxparams) {}
9 
11 
12 bool compareRingSums::doCompare(TH1I *errorFlag_hist_) {
13  bool errorFlag = false;
14 
15  for (unsigned int i = 0; i < data_->size(); i++) {
16  //check that the GCT trig bx is being considered
17  if (data_->at(i).bx() != mbxparams_.GCTTrigBx)
18  continue;
19 
20  for (unsigned int j = 0; j < emu_->size(); j++) {
21  //now check that the Emu trig bx is being considered
22  if (emu_->at(j).bx() != mbxparams_.EmuTrigBx)
23  continue;
24 
25  //now loop over each ring and make sure the energy sums match
26  for (unsigned int k = 0; k < NUM_GCT_RINGS; k++) {
27  if (data_->at(i).etSum(k) == emu_->at(j).etSum(k)) {
28  errorFlag_hist_->Fill(0); //i.e. the two match
29  } else {
30  errorFlag_hist_->Fill(1);
31  errorFlag = true;
32  }
33  }
34  }
35  }
36 
37  return errorFlag;
38 }
edm::Handle< L1GctHFRingEtSumsCollection > emu_
GctErrorAnalyzerMBxInfo mbxparams_
bool doCompare(TH1I *errorFlag_hist_)
const unsigned int NUM_GCT_RINGS
edm::Handle< L1GctHFRingEtSumsCollection > data_
compareRingSums(const edm::Handle< L1GctHFRingEtSumsCollection > &data, const edm::Handle< L1GctHFRingEtSumsCollection > &emu, const GctErrorAnalyzerMBxInfo &mbxparams)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80