#include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixStripFgvbEE.h>
Public Member Functions | |
EcalFenixStripFgvbEE () | |
void | process (std::vector< std::vector< int > > &lin_out, std::vector< int > &output) |
void | setParameters (uint32_t id, const EcalTPGFineGrainStripEE *) |
virtual | ~EcalFenixStripFgvbEE () |
Private Attributes | |
const EcalTPGFineGrainStripEE::Item * | fgparams_ |
input: 5X18 bits output: 1 bit
Definition at line 21 of file EcalFenixStripFgvbEE.h.
EcalFenixStripFgvbEE::EcalFenixStripFgvbEE | ( | ) |
EcalFenixStripFgvbEE::~EcalFenixStripFgvbEE | ( | ) | [virtual] |
void EcalFenixStripFgvbEE::process | ( | std::vector< std::vector< int > > & | lin_out, | |
std::vector< int > & | output | |||
) |
Definition at line 13 of file EcalFenixStripFgvbEE.cc.
References ecalMGPA::adc(), fgparams_, i, EcalTPGFineGrainStripEE::Item::lut, res, and EcalTPGFineGrainStripEE::Item::threshold.
Referenced by EcalFenixStrip::process_part2_endcap().
00014 { 00015 unsigned int maskFgvb[]={1,2,4,8,0x10}; 00016 00017 // int threshold_fg = (*params_)[6]; 00018 // int lut_fg = (*params_)[7]; 00019 00020 int threshold_fg = fgparams_->threshold ; 00021 int lut_fg = fgparams_->lut ; 00022 00023 00024 std::vector<int> indexLut(output.size()); 00025 00026 for (unsigned int i=0;i<output.size();i++) { 00027 output[i]=0; 00028 indexLut[i]=0; 00029 for (unsigned int ixtal=0;ixtal<linout.size();ixtal++) { 00030 int adc=linout[ixtal][i]; 00031 int res= (adc>threshold_fg) ? 1 : 0; 00032 indexLut[i]=indexLut[i] | (res <<ixtal & maskFgvb[ixtal]); 00033 } 00034 int mask = 1<<indexLut[i]; 00035 output[i]= lut_fg & mask; 00036 if (output[i]>0) output[i]=1; 00037 } 00038 return; 00039 }
void EcalFenixStripFgvbEE::setParameters | ( | uint32_t | id, | |
const EcalTPGFineGrainStripEE * | ecaltpgFgStripEE | |||
) |
Definition at line 41 of file EcalFenixStripFgvbEE.cc.
Referenced by EcalFenixStrip::process_part2_endcap().
00042 { 00043 const EcalTPGFineGrainStripEEMap &fgmap = ecaltpgFgStripEE -> getMap(); 00044 EcalTPGFineGrainStripEEMapIterator it=fgmap.find(id); 00045 if (it!=fgmap.end()) fgparams_=&(*it).second; 00046 else edm::LogWarning("EcalTPG")<<" could not find EcalTPGFineGrainStripEEMap entry for "<<id; 00047 00048 00049 00050 }
const EcalTPGFineGrainStripEE::Item* EcalFenixStripFgvbEE::fgparams_ [private] |