CMS 3D CMS Logo

List of all members | 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>

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 24 of file EcalFenixTcpFgvbEE.h.

Constructor & Destructor Documentation

EcalFenixTcpFgvbEE::EcalFenixTcpFgvbEE ( int  maxNrSamples)

Definition at line 7 of file EcalFenixTcpFgvbEE.cc.

References indexLut_.

7  {
8  indexLut_.resize(maxNrSamples);
9 } //---------------------------------------------------------------
std::vector< int > indexLut_
EcalFenixTcpFgvbEE::~EcalFenixTcpFgvbEE ( )
virtual

Definition at line 10 of file EcalFenixTcpFgvbEE.cc.

10 {}

Member Function Documentation

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

Definition at line 12 of file EcalFenixTcpFgvbEE.cc.

References fgee_lut_, mps_fire::i, indexLut_, and RecoTauDiscriminantConfiguration::mask.

Referenced by EcalFenixTcp::process_part2_endcap().

14  {
15  // std::vector<int> indexLut(output.size());
16 
17  for (unsigned int i = 0; i < output.size(); i++) {
18  output[i] = 0;
19  indexLut_[i] = 0;
20  }
21 
22  for (unsigned int i = 0; i < output.size(); i++) {
23  for (int istrip = 0; istrip < nStr; istrip++) {
24  int res = (bypasslin_out[istrip])[i];
25  res = (res >> bitMask) & 1; // res is FGVB at this stage
26  indexLut_[i] = indexLut_[i] | (res << istrip);
27  }
28  indexLut_[i] = indexLut_[i] | (nStr << 5);
29 
30  int mask = 1 << indexLut_[i];
31  output[i] = fgee_lut_ & mask;
32  if (output[i] > 0)
33  output[i] = 1;
34  }
35  return;
36 }
Definition: Electron.h:6
std::vector< int > indexLut_
void EcalFenixTcpFgvbEE::setParameters ( uint32_t  towid,
const EcalTPGFineGrainTowerEE ecaltpgFineGrainTowerEE 
)

Definition at line 40 of file EcalFenixTcpFgvbEE.cc.

References fgee_lut_, and EcalTPGFineGrainTowerEE::getMap().

Referenced by EcalFenixTcp::process_part2_endcap().

41  {
42 
43  const EcalTPGFineGrainTowerEEMap &fgee_map =
44  ecaltpgFineGrainTowerEE->getMap();
45 
46  EcalTPGFineGrainTowerEEMapIterator it = fgee_map.find(towid);
47  if (it != fgee_map.end())
48  fgee_lut_ = (*it).second;
49  else
50  edm::LogWarning("EcalTPG")
51  << " could not find EcalTPGFineGrainTowerEEMap for " << towid;
52 }
std::map< uint32_t, uint32_t >::const_iterator EcalTPGFineGrainTowerEEMapIterator
const std::map< uint32_t, uint32_t > & getMap() const
std::map< uint32_t, uint32_t > EcalTPGFineGrainTowerEEMap

Member Data Documentation

uint32_t EcalFenixTcpFgvbEE::fgee_lut_
private

Definition at line 27 of file EcalFenixTcpFgvbEE.h.

Referenced by process(), and setParameters().

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

Definition at line 28 of file EcalFenixTcpFgvbEE.h.

Referenced by EcalFenixTcpFgvbEE(), and process().