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.

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

References flagBadStripMiss_, and identif_.

◆ ~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.

35 { return flagBadStripMiss_; }

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.

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 }

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

Referenced by EcalFenixStrip::process_part1().

◆ 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.

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 }

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

Referenced by EcalFenixStrip::process_part1().

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().

ecalMGPA::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: EcalMGPASample.h:11
EcalTPGFineGrainStripEEMapIterator
std::map< uint32_t, EcalTPGFineGrainStripEE::Item >::const_iterator EcalTPGFineGrainStripEEMapIterator
Definition: EcalTPGFineGrainStripEE.h:31
EcalFenixStripFgvbEE::threshold_fg_
int threshold_fg_
Definition: EcalFenixStripFgvbEE.h:23
mps_fire.i
i
Definition: mps_fire.py:355
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
edm::LogWarning
Definition: MessageLogger.h:141
EcalTPGFineGrainStripEE::getMap
const std::map< uint32_t, Item > & getMap() const
Definition: EcalTPGFineGrainStripEE.h:21
EcalFenixStripFgvbEE::lut_fg_
int lut_fg_
Definition: EcalFenixStripFgvbEE.h:24
EcalTPGFineGrainStripEEMap
std::map< uint32_t, EcalTPGFineGrainStripEE::Item > EcalTPGFineGrainStripEEMap
Definition: EcalTPGFineGrainStripEE.h:30
res
Definition: Electron.h:6
EcalFenixStripFgvbEE::flagBadStripMiss_
bool flagBadStripMiss_
Definition: EcalFenixStripFgvbEE.h:26
EcalFenixStripFgvbEE::identif_
int identif_
Definition: EcalFenixStripFgvbEE.h:25
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116