CMS 3D CMS Logo

Public Member Functions | Private Attributes

EcalFenixStripFgvbEE Class Reference

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

#include <EcalFenixStripFgvbEE.h>

List of all members.

Public Member Functions

 EcalFenixStripFgvbEE ()
bool getMissedStripFlag () const
void process (std::vector< std::vector< int > > &lin_out, std::vector< int > &output)
void setbadStripMissing (bool flag)
void setParameters (int identif, uint32_t id, const EcalTPGFineGrainStripEE *)
virtual ~EcalFenixStripFgvbEE ()

Private Attributes

bool flagBadStripMiss_
int identif_
int lut_fg_
int threshold_fg_

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 7 of file EcalFenixStripFgvbEE.cc.

References flagBadStripMiss_, and identif_.

EcalFenixStripFgvbEE::~EcalFenixStripFgvbEE ( ) [virtual]

Definition at line 13 of file EcalFenixStripFgvbEE.cc.

                                           {
}

Member Function Documentation

bool EcalFenixStripFgvbEE::getMissedStripFlag ( ) const [inline]

Definition at line 36 of file EcalFenixStripFgvbEE.h.

References flagBadStripMiss_.

Referenced by EcalFenixStrip::process().

void EcalFenixStripFgvbEE::process ( std::vector< std::vector< int > > &  lin_out,
std::vector< int > &  output 
)

Definition at line 16 of file EcalFenixStripFgvbEE.cc.

References ecalMGPA::adc(), i, lut_fg_, and threshold_fg_.

Referenced by EcalFenixStrip::process_part1().

{
  std::vector<int> indexLut(output.size());

  for (unsigned int i=0;i<output.size();i++) {
    output[i]=0;
    indexLut[i]=0;
    for (unsigned int ixtal=0;ixtal<linout.size();ixtal++) {
      int adc=linout[ixtal][i];
      int res = (((adc & 0xffff) > threshold_fg_) || ((adc & 0x30000) != 0x0)) ? 1 : 0;
      indexLut[i] = indexLut[i] | (res << ixtal);
    }
    int mask = 1<<(indexLut[i]);
    output[i]= ((lut_fg_ & mask) == 0x0) ? 0 : 1;
    if(i > 0) output[i-1] = output[i]; // Delay one clock
  }
  return;
}  
void EcalFenixStripFgvbEE::setbadStripMissing ( bool  flag) [inline]

Definition at line 35 of file EcalFenixStripFgvbEE.h.

References flagBadStripMiss_.

Referenced by EcalTrigPrimFunctionalAlgo::run_part2().

void EcalFenixStripFgvbEE::setParameters ( int  identif,
uint32_t  id,
const EcalTPGFineGrainStripEE ecaltpgFgStripEE 
)

Definition at line 35 of file EcalFenixStripFgvbEE.cc.

References flagBadStripMiss_, lut_fg_, and threshold_fg_.

Referenced by EcalFenixStrip::process_part1().

{
  const EcalTPGFineGrainStripEEMap &fgmap = ecaltpgFgStripEE -> getMap();
  EcalTPGFineGrainStripEEMapIterator it=fgmap.find(id);
  if (it!=fgmap.end()){
     threshold_fg_ = it->second.threshold;
     lut_fg_ = it->second.lut;
  }
  else
  {
     if (identif == false){
       edm::LogWarning("EcalTPG")<<" could not find EcalTPGFineGrainStripEEMap entry for at least one stripId";
       flagBadStripMiss_ = true;
     }
     
     // Use the FENIX power-up values
     threshold_fg_ = 65535;
     lut_fg_ = 0x0;
  }

}

Member Data Documentation

Definition at line 26 of file EcalFenixStripFgvbEE.h.

Referenced by EcalFenixStripFgvbEE().

Definition at line 25 of file EcalFenixStripFgvbEE.h.

Referenced by process(), and setParameters().

Definition at line 24 of file EcalFenixStripFgvbEE.h.

Referenced by process(), and setParameters().