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 ( 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) {}
edm::Handle< L1GctHFRingEtSumsCollection > emu_
GctErrorAnalyzerMBxInfo mbxparams_
edm::Handle< L1GctHFRingEtSumsCollection > data_
compareRingSums::~compareRingSums ( )

Definition at line 23 of file compareRingSums.cc.

23 {}

Member Function Documentation

bool compareRingSums::doCompare ( TH1I *  errorFlag_hist_)

Definition at line 25 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().

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 }
edm::Handle< L1GctHFRingEtSumsCollection > emu_
GctErrorAnalyzerMBxInfo mbxparams_
const unsigned int NUM_GCT_RINGS
edm::Handle< L1GctHFRingEtSumsCollection > data_

Member Data Documentation

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

Definition at line 33 of file compareRingSums.h.

Referenced by doCompare().

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

Definition at line 33 of file compareRingSums.h.

Referenced by doCompare().

GctErrorAnalyzerMBxInfo compareRingSums::mbxparams_
private

Definition at line 34 of file compareRingSums.h.

Referenced by doCompare().