CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/SimCalorimetry/EcalTrigPrimAlgos/src/EcalFenixEtTot.cc

Go to the documentation of this file.
00001 #include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixEtTot.h>
00002 
00003 //----------------------------------------------------------------------------------------
00004 EcalFenixEtTot::EcalFenixEtTot()
00005 {}
00006 //----------------------------------------------------------------------------------------  
00007 EcalFenixEtTot::~EcalFenixEtTot()
00008 {}
00009 //----------------------------------------------------------------------------------------
00010 std::vector<int> EcalFenixEtTot::process(const std::vector<EBDataFrame *> &calodatafr)
00011 {
00012     std::vector<int> out;
00013     return out;
00014 }
00015 //----------------------------------------------------------------------------------------
00016 void EcalFenixEtTot::process(std::vector<std::vector <int> >  &bypasslinout, int nStr, int bitMask, std::vector<int> & output)
00017 {
00018 
00019   for (unsigned int i=0;i<output.size();i++){
00020     output[i]= 0;
00021   }
00022 
00023   int mask = (1<<bitMask)-1;
00024   for(int istrip=0;istrip<nStr;istrip++){
00025     for (unsigned int i=0;i<bypasslinout[istrip].size();i++) {
00026       output[i]+= (bypasslinout[istrip][i] & mask) ; //fix bug inn case of EE: MSB are set for FG, so need to apply mask in summation.
00027       if (output[i]>mask) output[i]= mask;
00028     }
00029   }
00030   return;
00031 }
00032 //----------------------------------------------------------------------------------------