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 }
compareRingSums.h
mps_fire.i
i
Definition: mps_fire.py:428
L1GctCollections.h
NUM_GCT_RINGS
const unsigned int NUM_GCT_RINGS
Definition: GctErrorAnalyzerDefinitions.h:10
EDAnalyzer.h
compareRingSums::compareRingSums
compareRingSums(const edm::Handle< L1GctHFRingEtSumsCollection > &data, const edm::Handle< L1GctHFRingEtSumsCollection > &emu, const GctErrorAnalyzerMBxInfo &mbxparams)
Definition: compareRingSums.cc:18
edm::Handle< L1GctHFRingEtSumsCollection >
MakerMacros.h
compareRingSums::emu_
edm::Handle< L1GctHFRingEtSumsCollection > emu_
Definition: compareRingSums.h:33
Service.h
dqmdumpme.k
k
Definition: dqmdumpme.py:60
TFileService.h
Event.h
compareRingSums::mbxparams_
GctErrorAnalyzerMBxInfo mbxparams_
Definition: compareRingSums.h:34
compareRingSums::doCompare
bool doCompare(TH1I *errorFlag_hist_)
Definition: compareRingSums.cc:25
L1CaloCollections.h
GctErrorAnalyzerMBxInfo::GCTTrigBx
int GCTTrigBx
Definition: GctErrorAnalyzerDefinitions.h:16
InputTag.h
GctErrorAnalyzerMBxInfo::EmuTrigBx
int EmuTrigBx
Definition: GctErrorAnalyzerDefinitions.h:15
Frameworkfwd.h
compareRingSums::~compareRingSums
~compareRingSums()
Definition: compareRingSums.cc:23
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
ParameterSet.h
GctErrorAnalyzerMBxInfo
Definition: GctErrorAnalyzerDefinitions.h:13
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
compareRingSums::data_
edm::Handle< L1GctHFRingEtSumsCollection > data_
Definition: compareRingSums.h:33