CMS 3D CMS Logo

HcalZeroSuppressionAlgo Class Reference

#include <SimCalorimetry/HcalZeroSuppressionAlgos/interface/HcalZeroSuppressionAlgo.h>

Inheritance diagram for HcalZeroSuppressionAlgo:

HcalZSAlgoEnergy HcalZSAlgoRealistic

List of all members.

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


Detailed Description

Definition at line 12 of file HcalZeroSuppressionAlgo.h.


Member Enumeration Documentation

enum HcalZeroSuppressionAlgo::ZSMode

Enumerator:
zs_SingleChannel 
zs_TriggerTowerOR 
zs_AllDepthsOR 

Definition at line 14 of file HcalZeroSuppressionAlgo.h.


Constructor & Destructor Documentation

HcalZeroSuppressionAlgo::HcalZeroSuppressionAlgo ( ZSMode  mode  )  [protected]

Definition at line 4 of file HcalZeroSuppressionAlgo.cc.

00004                                                             : m_mode(mode) {
00005 }


Member Function Documentation

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]

Implemented in HcalZSAlgoEnergy, and HcalZSAlgoRealistic.

Referenced by suppress().

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 }


Member Data Documentation

ZSMode HcalZeroSuppressionAlgo::m_mode [private]

Definition at line 24 of file HcalZeroSuppressionAlgo.h.

Referenced by suppress().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:24:07 2009 for CMSSW by  doxygen 1.5.4