#include <SimCalorimetry/HcalZeroSuppressionAlgos/interface/HcalZeroSuppressionAlgo.h>
Public Types | |
enum | ZSMode { zs_SingleChannel = 0, zs_TriggerTowerOR = 1, zs_AllDepthsOR = 2 } |
Public Member Functions | |
virtual bool | shouldKeep (const HFDataFrame &digi) const =0 |
virtual bool | shouldKeep (const HODataFrame &digi) const =0 |
virtual bool | shouldKeep (const HBHEDataFrame &digi) const =0 |
void | suppress (const HFDigiCollection &input, HFDigiCollection &output) |
void | suppress (const HODigiCollection &input, HODigiCollection &output) |
void | suppress (const HBHEDigiCollection &input, HBHEDigiCollection &output) |
Protected Member Functions | |
HcalZeroSuppressionAlgo (ZSMode mode) | |
Private Attributes | |
ZSMode | m_mode |
Definition at line 12 of file HcalZeroSuppressionAlgo.h.
Definition at line 14 of file HcalZeroSuppressionAlgo.h.
00014 { zs_SingleChannel=0, zs_TriggerTowerOR=1, zs_AllDepthsOR=2 };
HcalZeroSuppressionAlgo::HcalZeroSuppressionAlgo | ( | ZSMode | mode | ) | [protected] |
virtual bool HcalZeroSuppressionAlgo::shouldKeep | ( | const HFDataFrame & | digi | ) | const [pure virtual] |
Implemented in HcalZSAlgoEnergy, and HcalZSAlgoRealistic.
virtual bool HcalZeroSuppressionAlgo::shouldKeep | ( | const HODataFrame & | digi | ) | const [pure virtual] |
Implemented in HcalZSAlgoEnergy, and HcalZSAlgoRealistic.
virtual bool HcalZeroSuppressionAlgo::shouldKeep | ( | const HBHEDataFrame & | digi | ) | const [pure virtual] |
void HcalZeroSuppressionAlgo::suppress | ( | const HFDigiCollection & | input, | |
HFDigiCollection & | output | |||
) |
void HcalZeroSuppressionAlgo::suppress | ( | const HODigiCollection & | input, | |
HODigiCollection & | output | |||
) |
void HcalZeroSuppressionAlgo::suppress | ( | const HBHEDigiCollection & | input, | |
HBHEDigiCollection & | output | |||
) |
Definition at line 8 of file HcalZeroSuppressionAlgo.cc.
References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), i, m_mode, edm::SortedCollection< T, SORT >::push_back(), shouldKeep(), HcalTrigTowerGeometry::towerIds(), zs_AllDepthsOR, zs_SingleChannel, and zs_TriggerTowerOR.
00008 { 00009 HBHEDigiCollection::const_iterator i; 00010 if (m_mode==zs_SingleChannel) { 00011 for (i=input.begin(); i!=input.end(); ++i) 00012 if (shouldKeep(*i)) output.push_back(*i); 00013 } else if (m_mode==zs_TriggerTowerOR || m_mode==zs_AllDepthsOR) { 00014 HcalTrigTowerGeometry ttg; 00015 std::set<HcalTrigTowerDetId> passed; 00016 // get list of above-threshold trigger tower ids 00017 for (i=input.begin(); i!=input.end(); ++i) 00018 if (shouldKeep(*i)) { 00019 std::vector<HcalTrigTowerDetId> tids=ttg.towerIds(i->id()); 00020 if (!tids.empty()) passed.insert(tids[0]); // only use the first (order is stable for all channels) 00021 } 00022 // loop over digis again, checking to see if trig tower had passed 00023 for (i=input.begin(); i!=input.end(); ++i) { 00024 std::vector<HcalTrigTowerDetId> tids=ttg.towerIds(i->id()); 00025 if (!tids.empty() && passed.find(tids[0])!=passed.end()) output.push_back(*i); 00026 } 00027 } 00028 }
ZSMode HcalZeroSuppressionAlgo::m_mode [private] |