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.

18  :
19  data_(data),
20  emu_(emu),
21  mbxparams_(mbxparams)
22 {
23 
24 }
edm::Handle< L1GctHFRingEtSumsCollection > emu_
GctErrorAnalyzerMBxInfo mbxparams_
edm::Handle< L1GctHFRingEtSumsCollection > data_
compareRingSums::~compareRingSums ( )

Definition at line 26 of file compareRingSums.cc.

26  {
27 
28 }

Member Function Documentation

bool compareRingSums::doCompare ( TH1I *  errorFlag_hist_)

Definition at line 30 of file compareRingSums.cc.

References data_, emu_, GctErrorAnalyzerMBxInfo::EmuTrigBx, GctErrorAnalyzerMBxInfo::GCTTrigBx, mps_fire::i, gen::k, mbxparams_, and NUM_GCT_RINGS.

Referenced by GctErrorAnalyzer::analyze().

30  {
31 
32  bool errorFlag=false;
33 
34  for(unsigned int i=0; i < data_->size(); i++) {
35  //check that the GCT trig bx is being considered
36  if(data_->at(i).bx() != mbxparams_.GCTTrigBx) continue;
37 
38  for(unsigned int j=0; j < emu_->size(); j++) {
39  //now check that the Emu trig bx is being considered
40  if(emu_->at(j).bx() != mbxparams_.EmuTrigBx) continue;
41 
42  //now loop over each ring and make sure the energy sums match
43  for(unsigned int k=0; k < NUM_GCT_RINGS; k++) {
44  if(data_->at(i).etSum(k) == emu_->at(j).etSum(k)) {
45  errorFlag_hist_->Fill(0); //i.e. the two match
46  } else {
47  errorFlag_hist_->Fill(1);
48  errorFlag=true;
49  }
50  }
51  }
52  }
53 
54  return errorFlag;
55 
56 }
edm::Handle< L1GctHFRingEtSumsCollection > emu_
GctErrorAnalyzerMBxInfo mbxparams_
int k[5][pyjets_maxn]
const unsigned int NUM_GCT_RINGS
edm::Handle< L1GctHFRingEtSumsCollection > data_

Member Data Documentation

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

Definition at line 31 of file compareRingSums.h.

Referenced by doCompare().

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

Definition at line 31 of file compareRingSums.h.

Referenced by doCompare().

GctErrorAnalyzerMBxInfo compareRingSums::mbxparams_
private

Definition at line 32 of file compareRingSums.h.

Referenced by doCompare().