CMS 3D CMS Logo

EcalFenixStripFgvbEE Class Reference

calculation of Fgvb for the endcap in Fenix Strip calculates fgvb for the endcap in Fenix Strip More...

#include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixStripFgvbEE.h>

List of all members.

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_


Detailed Description

calculation of Fgvb for the endcap in Fenix Strip calculates fgvb for the endcap in Fenix Strip

input: 5X18 bits output: 1 bit

Definition at line 21 of file EcalFenixStripFgvbEE.h.


Constructor & Destructor Documentation

EcalFenixStripFgvbEE::EcalFenixStripFgvbEE (  ) 

Definition at line 6 of file EcalFenixStripFgvbEE.cc.

00007 {
00008 }

EcalFenixStripFgvbEE::~EcalFenixStripFgvbEE (  )  [virtual]

Definition at line 10 of file EcalFenixStripFgvbEE.cc.

00010                                            {
00011 }


Member Function Documentation

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.

References fgparams_, and it.

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 }


Member Data Documentation

const EcalTPGFineGrainStripEE::Item* EcalFenixStripFgvbEE::fgparams_ [private]

Definition at line 25 of file EcalFenixStripFgvbEE.h.

Referenced by process(), and setParameters().


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