#include <compareMissingEnergySums.h>
Public Member Functions | |
compareMissingEnergySums (const T &data, const T &emu, const GctErrorAnalyzerMBxInfo &mbxparams) | |
bool | doCompare (TH1I *errorFlag_hist_) |
~compareMissingEnergySums () | |
Private Attributes | |
T | data_ |
T | emu_ |
GctErrorAnalyzerMBxInfo | mbxparams_ |
Definition at line 24 of file compareMissingEnergySums.h.
compareMissingEnergySums< T >::compareMissingEnergySums | ( | const T & | data, |
const T & | emu, | ||
const GctErrorAnalyzerMBxInfo & | mbxparams | ||
) |
Definition at line 37 of file compareMissingEnergySums.h.
: data_(data), emu_(emu), mbxparams_(mbxparams) { }
compareMissingEnergySums< T >::~compareMissingEnergySums | ( | ) |
Definition at line 46 of file compareMissingEnergySums.h.
{ }
bool compareMissingEnergySums< T >::doCompare | ( | TH1I * | errorFlag_hist_ | ) |
Definition at line 51 of file compareMissingEnergySums.h.
Referenced by GctErrorAnalyzer::analyze().
{ bool errorFlag=0; for(unsigned int i=0; i < data_->size(); i++) { if(data_->at(i).bx() != mbxparams_.GCTTrigBx) continue; for(unsigned int j=0; j < emu_->size(); j++) { if(emu_->at(j).bx() != mbxparams_.EmuTrigBx) continue; if(data_->at(i).overFlow() && emu_->at(j).overFlow()) { //if both overflow bits are set then = match errorFlag_hist_->Fill(0); return errorFlag; } //check that we consider non-zero candidates - if we don't, return (don't fill hist) if(!data_->at(i).overFlow() && !emu_->at(j).overFlow() && data_->at(i).et() == 0 && emu_->at(j).et() == 0) return errorFlag; if(!data_->at(i).overFlow() && !emu_->at(j).overFlow() && data_->at(i).et() == emu_->at(j).et() && data_->at(i).phi() == emu_->at(j).phi()) { //similarly, if the overflow bits are both off but the mag/phi agree = match errorFlag_hist_->Fill(0); return errorFlag; } if(!data_->at(i).overFlow() && !emu_->at(j).overFlow() && data_->at(i).et() == emu_->at(j).et() && data_->at(i).phi() != emu_->at(j).phi()) { //if the overflow bits are both off but only the mag agree = mag match errorFlag_hist_->Fill(1); return errorFlag=1; } if(!data_->at(i).overFlow() && !emu_->at(j).overFlow() && data_->at(i).et() != emu_->at(j).et() && data_->at(i).phi() == emu_->at(j).phi()) { //if the overflow bits are both off but only the phi agree = phi match errorFlag_hist_->Fill(2); return errorFlag=1; } //otherwise it's a total unmatch errorFlag_hist_->Fill(3); errorFlag=1; return errorFlag; } } return errorFlag; }
T compareMissingEnergySums< T >::data_ [private] |
Definition at line 32 of file compareMissingEnergySums.h.
T compareMissingEnergySums< T >::emu_ [private] |
Definition at line 32 of file compareMissingEnergySums.h.
GctErrorAnalyzerMBxInfo compareMissingEnergySums< T >::mbxparams_ [private] |
Definition at line 33 of file compareMissingEnergySums.h.