CMS 3D CMS Logo

Public Member Functions | Private Attributes

EcalFenixTcpFgvbEE Class Reference

calculation of Fgvb for Fenix Tcp, format endcap calculates fgvb for the endcap More...

#include <EcalFenixTcpFgvbEE.h>

List of all members.

Public Member Functions

 EcalFenixTcpFgvbEE (int maxNrSamples)
void process (std::vector< std::vector< int > > &bypasslin_out, int nStr, int bitMask, std::vector< int > &output)
void setParameters (uint32_t towid, const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE)
virtual ~EcalFenixTcpFgvbEE ()

Private Attributes

uint32_t fgee_lut_
std::vector< int > indexLut_

Detailed Description

calculation of Fgvb for Fenix Tcp, format endcap calculates fgvb for the endcap

input : 5x 11th bit of Bypasslin ouput output: 1 bit

the five bit_strips + 3 bits (nb of strips) (are used to make a LUT_tower address (max size :2**8=256) the output is 1 value.

Definition at line 23 of file EcalFenixTcpFgvbEE.h.


Constructor & Destructor Documentation

EcalFenixTcpFgvbEE::EcalFenixTcpFgvbEE ( int  maxNrSamples)

Definition at line 7 of file EcalFenixTcpFgvbEE.cc.

References indexLut_.

{
  indexLut_.resize(maxNrSamples); 
}//---------------------------------------------------------------
EcalFenixTcpFgvbEE::~EcalFenixTcpFgvbEE ( ) [virtual]

Definition at line 11 of file EcalFenixTcpFgvbEE.cc.

{
}

Member Function Documentation

void EcalFenixTcpFgvbEE::process ( std::vector< std::vector< int > > &  bypasslin_out,
int  nStr,
int  bitMask,
std::vector< int > &  output 
)

Definition at line 15 of file EcalFenixTcpFgvbEE.cc.

References fgee_lut_, i, and indexLut_.

Referenced by EcalFenixTcp::process_part2_endcap().

{
  //  std::vector<int> indexLut(output.size());
  
  for (unsigned int i=0;i<output.size();i++) {
    output[i]=0;
    indexLut_[i]=0;
  }
    
  for (unsigned int i=0;i<output.size();i++) {
    for (int istrip=0;istrip<nStr;istrip++) {
      int res = (bypasslin_out[istrip])[i]; 
      res = (res >>bitMask) & 1; //res is FGVB at this stage
      indexLut_[i]= indexLut_[i] | (res << istrip);
    }
    indexLut_[i]= indexLut_[i] | (nStr << 5);
     
    int mask = 1<<indexLut_[i];
    output[i]= fgee_lut_ & mask;
    if (output[i]>0) output[i]=1;
  }
  return;
} 
void EcalFenixTcpFgvbEE::setParameters ( uint32_t  towid,
const EcalTPGFineGrainTowerEE ecaltpgFineGrainTowerEE 
)

Definition at line 41 of file EcalFenixTcpFgvbEE.cc.

References fgee_lut_.

Referenced by EcalFenixTcp::process_part2_endcap().

{

  const  EcalTPGFineGrainTowerEEMap &fgee_map = ecaltpgFineGrainTowerEE -> getMap();

  EcalTPGFineGrainTowerEEMapIterator it=fgee_map.find(towid);
  if (it!=fgee_map.end()) fgee_lut_=(*it).second;
  else edm::LogWarning("EcalTPG")<<" could not find EcalTPGFineGrainTowerEEMap for "<<towid;
}

Member Data Documentation

uint32_t EcalFenixTcpFgvbEE::fgee_lut_ [private]

Definition at line 26 of file EcalFenixTcpFgvbEE.h.

Referenced by process(), and setParameters().

std::vector<int> EcalFenixTcpFgvbEE::indexLut_ [private]

Definition at line 27 of file EcalFenixTcpFgvbEE.h.

Referenced by EcalFenixTcpFgvbEE(), and process().