CMS 3D CMS Logo

Public Member Functions | Private Attributes

compareRingSums Class Reference

#include <compareRingSums.h>

List of all members.

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
< L1GctHFRingEtSumsCollection
data_
edm::Handle
< L1GctHFRingEtSumsCollection
emu_
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.

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

}
compareRingSums::~compareRingSums ( )

Definition at line 26 of file compareRingSums.cc.

                                  {

}

Member Function Documentation

bool compareRingSums::doCompare ( TH1I *  errorFlag_hist_)

Definition at line 30 of file compareRingSums.cc.

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

Referenced by GctErrorAnalyzer::analyze().

                                                     {

  bool errorFlag=0;
  
  for(unsigned int i=0; i < data_->size(); i++) {
    //check that the GCT trig bx is being considered
    if(data_->at(i).bx() != mbxparams_.GCTTrigBx) continue;

    for(unsigned int j=0; j < emu_->size(); j++) {
      //now check that the Emu trig bx is being considered
      if(emu_->at(j).bx() != mbxparams_.EmuTrigBx) continue;
      
      //now loop over each ring and make sure the energy sums match
      for(unsigned int k=0; k < NUM_GCT_RINGS; k++) {
        if(data_->at(i).etSum(k) == emu_->at(j).etSum(k)) {
          errorFlag_hist_->Fill(0); //i.e. the two match
        } else {
          errorFlag_hist_->Fill(1);
          errorFlag=1;
        }
      }
    }
  }
  
  return errorFlag;

}

Member Data Documentation

Definition at line 31 of file compareRingSums.h.

Referenced by doCompare().

Definition at line 31 of file compareRingSums.h.

Referenced by doCompare().

Definition at line 32 of file compareRingSums.h.

Referenced by doCompare().