CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/SimCalorimetry/HcalZeroSuppressionAlgos/src/HcalZeroSuppressionAlgo.cc

Go to the documentation of this file.
00001 #include "SimCalorimetry/HcalZeroSuppressionAlgos/interface/HcalZeroSuppressionAlgo.h"
00002 
00003 HcalZeroSuppressionAlgo::HcalZeroSuppressionAlgo(bool mp) : m_markAndPass(mp) {
00004    m_dbService=0;
00005 }
00006 
00007 
00008 void HcalZeroSuppressionAlgo::suppress(const HBHEDigiCollection& input, HBHEDigiCollection& output) {
00009   HBHEDigiCollection::const_iterator i;
00010 
00011   for (i=input.begin(); i!=input.end(); ++i) 
00012     if (shouldKeep((*i))) {
00013       if (!m_markAndPass) output.push_back(*i);
00014       else {
00015         HBHEDataFrame df(*i);
00016         df.setZSInfo(true,false);
00017         output.push_back(df);
00018       }
00019     } else if (m_markAndPass) {
00020       HBHEDataFrame df(*i);
00021       df.setZSInfo(true,true);
00022       output.push_back(df);
00023     }
00024 }
00025 
00026 void HcalZeroSuppressionAlgo::suppress(const HFDigiCollection& input, HFDigiCollection& output) {
00027   HFDigiCollection::const_iterator i;
00028 
00029 
00030   for (i=input.begin(); i!=input.end(); ++i) 
00031     if (shouldKeep((*i))) {
00032       if (!m_markAndPass) output.push_back(*i);
00033       else {
00034         HFDataFrame df(*i);
00035         df.setZSInfo(true,false);
00036         output.push_back(df);
00037       }
00038     } else if (m_markAndPass) {
00039       HFDataFrame df(*i);
00040       df.setZSInfo(true,true);
00041       output.push_back(df);
00042     }
00043 }
00044 
00045 void HcalZeroSuppressionAlgo::suppress(const HODigiCollection& input, HODigiCollection& output) {
00046  HODigiCollection::const_iterator i;
00047 
00048 
00049   for (i=input.begin(); i!=input.end(); ++i) 
00050     if (shouldKeep((*i))) {
00051       if (!m_markAndPass) output.push_back(*i);
00052       else {
00053         HODataFrame df(*i);
00054         df.setZSInfo(true,false);
00055         output.push_back(df);
00056       }
00057     } else if (m_markAndPass) {
00058       HODataFrame df(*i);
00059       df.setZSInfo(true,true);
00060       output.push_back(df);
00061     }
00062 }
00063 
00064 
00065 
00066