![]() |
![]() |
#include <HcalZSAlgoRealistic.h>
Public Member Functions | |
HcalZSAlgoRealistic (bool markAndPass) | |
HcalZSAlgoRealistic (bool markAndPass, int levelHB, int levelHE, int levelHO, int levelHF) | |
Protected Member Functions | |
virtual bool | shouldKeep (const HBHEDataFrame &digi) const |
virtual bool | shouldKeep (const HFDataFrame &digi) const |
virtual bool | shouldKeep (const HODataFrame &digi) const |
Private Member Functions | |
bool | keepMe (const HBHEDataFrame &inp, int threshold, uint32_t hbhezsmask) const |
bool | keepMe (const HFDataFrame &inp, int threshold, uint32_t hfzsmask) const |
bool | keepMe (const HODataFrame &inp, int threshold, uint32_t hozsmask) const |
Private Attributes | |
int | thresholdHB_ |
int | thresholdHE_ |
int | thresholdHF_ |
int | thresholdHO_ |
bool | usingDBvalues |
Simple amplitude-based zero suppression algorithm. For each digi, add up consecutive 2 samples in a slice of 10 time samples, beginning with (start) sample. If any of the sums are greater then the threshold, keep the event.
Definition at line 16 of file HcalZSAlgoRealistic.h.
HcalZSAlgoRealistic::HcalZSAlgoRealistic | ( | bool | markAndPass | ) |
Definition at line 14 of file HcalZSAlgoRealistic.cc.
References thresholdHB_, thresholdHE_, thresholdHF_, thresholdHO_, and usingDBvalues.
: HcalZeroSuppressionAlgo(mp) { thresholdHB_ = -1; thresholdHE_ = -1; thresholdHO_ = -1; thresholdHF_ = -1; usingDBvalues = true; }
HcalZSAlgoRealistic::HcalZSAlgoRealistic | ( | bool | markAndPass, |
int | levelHB, | ||
int | levelHE, | ||
int | levelHO, | ||
int | levelHF | ||
) |
Definition at line 4 of file HcalZSAlgoRealistic.cc.
References usingDBvalues.
: HcalZeroSuppressionAlgo(mp), thresholdHB_(levelHB), thresholdHE_(levelHE), thresholdHO_(levelHO), thresholdHF_(levelHF) { usingDBvalues = false; }
bool HcalZSAlgoRealistic::keepMe | ( | const HBHEDataFrame & | inp, |
int | threshold, | ||
uint32_t | hbhezsmask | ||
) | const [private] |
Definition at line 28 of file HcalZSAlgoRealistic.cc.
References HcalDbService::getHcalZSThreshold(), i, HBHEDataFrame::id(), j, HcalZeroSuppressionAlgo::m_dbService, HBHEDataFrame::size(), and usingDBvalues.
Referenced by shouldKeep().
{ bool keepIt=false; //int mask = 999; if ((usingDBvalues) && (threshold < 0) && (m_dbService != 0)){ threshold = (m_dbService->getHcalZSThreshold(inp.id()))->getValue(); } //determine the sum of 2 timeslices for (int i=0; i< inp.size()-1 && !keepIt; i++) { int sum=0; for (int j=i; j<(i+2); j++){ sum+=inp[j].adc(); //pedsum+=pedave; } if ((hbhezsmask&(1<<i)) !=0) continue; else if (sum>=threshold) keepIt=true; } return keepIt; }
bool HcalZSAlgoRealistic::keepMe | ( | const HODataFrame & | inp, |
int | threshold, | ||
uint32_t | hozsmask | ||
) | const [private] |
Definition at line 51 of file HcalZSAlgoRealistic.cc.
References HcalDbService::getHcalZSThreshold(), i, HODataFrame::id(), j, HcalZeroSuppressionAlgo::m_dbService, HODataFrame::size(), and usingDBvalues.
{ bool keepIt=false; // int mask = 999; if ((usingDBvalues) && (threshold < 0) && (m_dbService != 0)){ threshold = (m_dbService->getHcalZSThreshold(inp.id()))->getValue(); } //determine the sum of 2 timeslices for (int i=0; i< inp.size()-1 && !keepIt; i++) { int sum=0; for (int j=i; j<(i+2); j++){ sum+=inp[j].adc(); //pedsum+=pedave; } if ((hozsmask&(1<<i)) !=0) continue; else if (sum>=threshold) keepIt=true; } return keepIt; }
bool HcalZSAlgoRealistic::keepMe | ( | const HFDataFrame & | inp, |
int | threshold, | ||
uint32_t | hfzsmask | ||
) | const [private] |
Definition at line 74 of file HcalZSAlgoRealistic.cc.
References HcalDbService::getHcalZSThreshold(), i, HFDataFrame::id(), j, HcalZeroSuppressionAlgo::m_dbService, HFDataFrame::size(), and usingDBvalues.
{ bool keepIt=false; // int mask = 999; if ((usingDBvalues) && (threshold < 0) && (m_dbService != 0)){ threshold = (m_dbService->getHcalZSThreshold(inp.id()))->getValue(); } //determine the sum of 2 timeslices for (int i=0; i< inp.size()-1 && !keepIt; i++) { int sum=0; for (int j=i; j<(i+2); j++){ sum+=inp[j].adc(); //pedsum+=pedave; } if ((hfzsmask&(1<<i)) !=0) continue; else if (sum>=threshold) keepIt=true; } return keepIt; }
bool HcalZSAlgoRealistic::shouldKeep | ( | const HODataFrame & | digi | ) | const [protected, virtual] |
Implements HcalZeroSuppressionAlgo.
Definition at line 104 of file HcalZSAlgoRealistic.cc.
References keepMe(), thresholdHO_, and HODataFrame::zsCrossingMask().
{ return keepMe(digi,thresholdHO_,digi.zsCrossingMask()); }
bool HcalZSAlgoRealistic::shouldKeep | ( | const HBHEDataFrame & | digi | ) | const [protected, virtual] |
Implements HcalZeroSuppressionAlgo.
Definition at line 97 of file HcalZSAlgoRealistic.cc.
References HcalBarrel, HBHEDataFrame::id(), keepMe(), HcalDetId::subdet(), thresholdHB_, thresholdHE_, and HBHEDataFrame::zsCrossingMask().
{ // uint32_t hbhezsmask = digi.zsCrossingMask(); if (digi.id().subdet()==HcalBarrel) return keepMe(digi,thresholdHB_,digi.zsCrossingMask()); else return keepMe(digi,thresholdHE_,digi.zsCrossingMask()); }
bool HcalZSAlgoRealistic::shouldKeep | ( | const HFDataFrame & | digi | ) | const [protected, virtual] |
Implements HcalZeroSuppressionAlgo.
Definition at line 108 of file HcalZSAlgoRealistic.cc.
References keepMe(), thresholdHF_, and HFDataFrame::zsCrossingMask().
{ return keepMe(digi,thresholdHF_,digi.zsCrossingMask()); }
int HcalZSAlgoRealistic::thresholdHB_ [private] |
Definition at line 27 of file HcalZSAlgoRealistic.h.
Referenced by HcalZSAlgoRealistic(), and shouldKeep().
int HcalZSAlgoRealistic::thresholdHE_ [private] |
Definition at line 27 of file HcalZSAlgoRealistic.h.
Referenced by HcalZSAlgoRealistic(), and shouldKeep().
int HcalZSAlgoRealistic::thresholdHF_ [private] |
Definition at line 27 of file HcalZSAlgoRealistic.h.
Referenced by HcalZSAlgoRealistic(), and shouldKeep().
int HcalZSAlgoRealistic::thresholdHO_ [private] |
Definition at line 27 of file HcalZSAlgoRealistic.h.
Referenced by HcalZSAlgoRealistic(), and shouldKeep().
bool HcalZSAlgoRealistic::usingDBvalues [private] |
Definition at line 26 of file HcalZSAlgoRealistic.h.
Referenced by HcalZSAlgoRealistic(), and keepMe().