CMS 3D CMS Logo

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

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::EcalFenixStripFgvbEE ( )

Definition at line 7 of file EcalFenixStripFgvbEE.cc.

References flagBadStripMiss_, and identif_.

7  {
8  identif_ = 0;
9  flagBadStripMiss_ = false;
10 }

◆ ~EcalFenixStripFgvbEE()

EcalFenixStripFgvbEE::~EcalFenixStripFgvbEE ( )
virtual

Definition at line 12 of file EcalFenixStripFgvbEE.cc.

12 {}

Member Function Documentation

◆ getMissedStripFlag()

bool EcalFenixStripFgvbEE::getMissedStripFlag ( ) const
inline

Definition at line 35 of file EcalFenixStripFgvbEE.h.

References flagBadStripMiss_.

Referenced by EcalFenixStrip::process().

◆ process()

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

Definition at line 14 of file EcalFenixStripFgvbEE.cc.

References gpuClustering::adc, mps_fire::i, lut_fg_, gpuClustering::pixelStatus::mask, convertSQLitetoXML_cfg::output, and threshold_fg_.

Referenced by EcalFenixStrip::process_part1().

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  for (unsigned int ixtal = 0; ixtal < linout.size(); ixtal++) {
21  int adc = linout[ixtal][i];
22  int res = (((adc & 0xffff) > threshold_fg_) || ((adc & 0x30000) != 0x0)) ? 1 : 0;
23  indexLut[i] = indexLut[i] | (res << ixtal);
24  }
25  int mask = 1 << (indexLut[i]);
26  output[i] = ((lut_fg_ & mask) == 0x0) ? 0 : 1;
27  if (i > 0)
28  output[i - 1] = output[i]; // Delay one clock
29  }
30  return;
31 }
Definition: Electron.h:6
constexpr uint32_t mask
Definition: gpuClustering.h:24
uint16_t *__restrict__ uint16_t const *__restrict__ adc

◆ setbadStripMissing()

void EcalFenixStripFgvbEE::setbadStripMissing ( bool  flag)
inline

◆ setParameters()

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

Definition at line 33 of file EcalFenixStripFgvbEE.cc.

References flagBadStripMiss_, EcalTPGFineGrainStripEE::getMap(), lut_fg_, and threshold_fg_.

Referenced by EcalFenixStrip::process_part1().

33  {
34  const EcalTPGFineGrainStripEEMap &fgmap = ecaltpgFgStripEE->getMap();
35  EcalTPGFineGrainStripEEMapIterator it = fgmap.find(id);
36  if (it != fgmap.end()) {
37  threshold_fg_ = it->second.threshold;
38  lut_fg_ = it->second.lut;
39  } else {
40  if (identif == false) {
41  edm::LogWarning("EcalTPG") << " could not find EcalTPGFineGrainStripEEMap entry for at least "
42  "one stripId";
43  flagBadStripMiss_ = true;
44  }
45 
46  // Use the FENIX power-up values
47  threshold_fg_ = 65535;
48  lut_fg_ = 0x0;
49  }
50 }
std::map< uint32_t, EcalTPGFineGrainStripEE::Item > EcalTPGFineGrainStripEEMap
std::map< uint32_t, EcalTPGFineGrainStripEE::Item >::const_iterator EcalTPGFineGrainStripEEMapIterator
const std::map< uint32_t, Item > & getMap() const
Log< level::Warning, false > LogWarning

Member Data Documentation

◆ flagBadStripMiss_

bool EcalFenixStripFgvbEE::flagBadStripMiss_
private

◆ identif_

int EcalFenixStripFgvbEE::identif_
private

Definition at line 25 of file EcalFenixStripFgvbEE.h.

Referenced by EcalFenixStripFgvbEE().

◆ lut_fg_

int EcalFenixStripFgvbEE::lut_fg_
private

Definition at line 24 of file EcalFenixStripFgvbEE.h.

Referenced by process(), and setParameters().

◆ threshold_fg_

int EcalFenixStripFgvbEE::threshold_fg_
private

Definition at line 23 of file EcalFenixStripFgvbEE.h.

Referenced by process(), and setParameters().