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::EcalFenixTcpFgvbEE ( int  maxNrSamples)

Definition at line 7 of file EcalFenixTcpFgvbEE.cc.

7  {
8  indexLut_.resize(maxNrSamples);
9 } //---------------------------------------------------------------

References indexLut_.

◆ ~EcalFenixTcpFgvbEE()

EcalFenixTcpFgvbEE::~EcalFenixTcpFgvbEE ( )
virtual

Definition at line 10 of file EcalFenixTcpFgvbEE.cc.

10 {}

Member Function Documentation

◆ process()

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.

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

References fgee_lut_, mps_fire::i, indexLut_, and convertSQLitetoXML_cfg::output.

Referenced by EcalFenixTcp::process_part2_endcap().

◆ setParameters()

void EcalFenixTcpFgvbEE::setParameters ( uint32_t  towid,
const EcalTPGFineGrainTowerEE ecaltpgFineGrainTowerEE 
)

Definition at line 41 of file EcalFenixTcpFgvbEE.cc.

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

References fgee_lut_, and EcalTPGFineGrainTowerEE::getMap().

Referenced by EcalFenixTcp::process_part2_endcap().

Member Data Documentation

◆ fgee_lut_

uint32_t EcalFenixTcpFgvbEE::fgee_lut_
private

Definition at line 26 of file EcalFenixTcpFgvbEE.h.

Referenced by process(), and setParameters().

◆ indexLut_

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

Definition at line 27 of file EcalFenixTcpFgvbEE.h.

Referenced by EcalFenixTcpFgvbEE(), and process().

mps_fire.i
i
Definition: mps_fire.py:355
EcalFenixTcpFgvbEE::indexLut_
std::vector< int > indexLut_
Definition: EcalFenixTcpFgvbEE.h:27
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
EcalTPGFineGrainTowerEE::getMap
const std::map< uint32_t, uint32_t > & getMap() const
Definition: EcalTPGFineGrainTowerEE.h:15
EcalTPGFineGrainTowerEEMapIterator
std::map< uint32_t, uint32_t >::const_iterator EcalTPGFineGrainTowerEEMapIterator
Definition: EcalTPGFineGrainTowerEE.h:25
EcalTPGFineGrainTowerEEMap
std::map< uint32_t, uint32_t > EcalTPGFineGrainTowerEEMap
Definition: EcalTPGFineGrainTowerEE.h:24
edm::LogWarning
Definition: MessageLogger.h:141
EcalFenixTcpFgvbEE::fgee_lut_
uint32_t fgee_lut_
Definition: EcalFenixTcpFgvbEE.h:26
res
Definition: Electron.h:6