CMS 3D CMS Logo

compareRingSums.cc
Go to the documentation of this file.
4 
7 
10 
12 
14 
15 #include "FWCore/ServiceRegistry/interface/Service.h" // Framework services
16 #include "CommonTools/UtilAlgos/interface/TFileService.h" // Framework service for histograms
17 
20  const GctErrorAnalyzerMBxInfo &mbxparams)
21  : data_(data), emu_(emu), mbxparams_(mbxparams) {}
22 
24 
25 bool compareRingSums::doCompare(TH1I *errorFlag_hist_) {
26  bool errorFlag = false;
27 
28  for (unsigned int i = 0; i < data_->size(); i++) {
29  //check that the GCT trig bx is being considered
30  if (data_->at(i).bx() != mbxparams_.GCTTrigBx)
31  continue;
32 
33  for (unsigned int j = 0; j < emu_->size(); j++) {
34  //now check that the Emu trig bx is being considered
35  if (emu_->at(j).bx() != mbxparams_.EmuTrigBx)
36  continue;
37 
38  //now loop over each ring and make sure the energy sums match
39  for (unsigned int k = 0; k < NUM_GCT_RINGS; k++) {
40  if (data_->at(i).etSum(k) == emu_->at(j).etSum(k)) {
41  errorFlag_hist_->Fill(0); //i.e. the two match
42  } else {
43  errorFlag_hist_->Fill(1);
44  errorFlag = true;
45  }
46  }
47  }
48  }
49 
50  return errorFlag;
51 }
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:79