CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
compareRingSums Class Reference

#include <compareRingSums.h>

Public Member Functions

 compareRingSums (const edm::Handle< L1GctHFRingEtSumsCollection > &data, const edm::Handle< L1GctHFRingEtSumsCollection > &emu, const GctErrorAnalyzerMBxInfo &mbxparams)
 
bool doCompare (TH1I *errorFlag_hist_)
 
 ~compareRingSums ()
 

Private Attributes

edm::Handle< L1GctHFRingEtSumsCollectiondata_
 
edm::Handle< L1GctHFRingEtSumsCollectionemu_
 
GctErrorAnalyzerMBxInfo mbxparams_
 

Detailed Description

Definition at line 23 of file compareRingSums.h.

Constructor & Destructor Documentation

◆ compareRingSums()

compareRingSums::compareRingSums ( const edm::Handle< L1GctHFRingEtSumsCollection > &  data,
const edm::Handle< L1GctHFRingEtSumsCollection > &  emu,
const GctErrorAnalyzerMBxInfo mbxparams 
)

Definition at line 18 of file compareRingSums.cc.

21  : data_(data), emu_(emu), mbxparams_(mbxparams) {}

◆ ~compareRingSums()

compareRingSums::~compareRingSums ( )

Definition at line 23 of file compareRingSums.cc.

23 {}

Member Function Documentation

◆ doCompare()

bool compareRingSums::doCompare ( TH1I *  errorFlag_hist_)

Definition at line 25 of file compareRingSums.cc.

25  {
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 }

References data_, emu_, GctErrorAnalyzerMBxInfo::EmuTrigBx, GctErrorAnalyzerMBxInfo::GCTTrigBx, mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, mbxparams_, and NUM_GCT_RINGS.

Referenced by GctErrorAnalyzer::analyze().

Member Data Documentation

◆ data_

edm::Handle<L1GctHFRingEtSumsCollection> compareRingSums::data_
private

Definition at line 33 of file compareRingSums.h.

Referenced by doCompare().

◆ emu_

edm::Handle<L1GctHFRingEtSumsCollection> compareRingSums::emu_
private

Definition at line 33 of file compareRingSums.h.

Referenced by doCompare().

◆ mbxparams_

GctErrorAnalyzerMBxInfo compareRingSums::mbxparams_
private

Definition at line 34 of file compareRingSums.h.

Referenced by doCompare().

mps_fire.i
i
Definition: mps_fire.py:428
NUM_GCT_RINGS
const unsigned int NUM_GCT_RINGS
Definition: GctErrorAnalyzerDefinitions.h:10
compareRingSums::emu_
edm::Handle< L1GctHFRingEtSumsCollection > emu_
Definition: compareRingSums.h:33
dqmdumpme.k
k
Definition: dqmdumpme.py:60
compareRingSums::mbxparams_
GctErrorAnalyzerMBxInfo mbxparams_
Definition: compareRingSums.h:34
GctErrorAnalyzerMBxInfo::GCTTrigBx
int GCTTrigBx
Definition: GctErrorAnalyzerDefinitions.h:16
GctErrorAnalyzerMBxInfo::EmuTrigBx
int EmuTrigBx
Definition: GctErrorAnalyzerDefinitions.h:15
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
compareRingSums::data_
edm::Handle< L1GctHFRingEtSumsCollection > data_
Definition: compareRingSums.h:33