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 14 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 5 of file compareRingSums.cc.

8  : data_(data), emu_(emu), mbxparams_(mbxparams) {}
edm::Handle< L1GctHFRingEtSumsCollection > emu_
GctErrorAnalyzerMBxInfo mbxparams_
edm::Handle< L1GctHFRingEtSumsCollection > data_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ ~compareRingSums()

compareRingSums::~compareRingSums ( )

Definition at line 10 of file compareRingSums.cc.

10 {}

Member Function Documentation

◆ doCompare()

bool compareRingSums::doCompare ( TH1I *  errorFlag_hist_)

Definition at line 12 of file compareRingSums.cc.

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

Referenced by GctErrorAnalyzer::analyze().

12  {
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_
const unsigned int NUM_GCT_RINGS
edm::Handle< L1GctHFRingEtSumsCollection > data_

Member Data Documentation

◆ data_

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

Definition at line 24 of file compareRingSums.h.

Referenced by doCompare().

◆ emu_

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

Definition at line 24 of file compareRingSums.h.

Referenced by doCompare().

◆ mbxparams_

GctErrorAnalyzerMBxInfo compareRingSums::mbxparams_
private

Definition at line 25 of file compareRingSums.h.

Referenced by doCompare().