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

Definition at line 7 of file EcalFenixStripFgvbEE.cc.

References flagBadStripMiss_, and identif_.

7  {
8  identif_ = 0;
9  flagBadStripMiss_ = false;
10 }
EcalFenixStripFgvbEE::~EcalFenixStripFgvbEE ( )
virtual

Definition at line 12 of file EcalFenixStripFgvbEE.cc.

12 {}

Member Function Documentation

bool EcalFenixStripFgvbEE::getMissedStripFlag ( ) const
inline

Definition at line 37 of file EcalFenixStripFgvbEE.h.

References flagBadStripMiss_.

Referenced by EcalFenixStrip::process().

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

Definition at line 14 of file EcalFenixStripFgvbEE.cc.

References ecalMGPA::adc(), mps_fire::i, lut_fg_, RecoTauDiscriminantConfiguration::mask, and threshold_fg_.

Referenced by EcalFenixStrip::process_part1().

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  for (unsigned int ixtal = 0; ixtal < linout.size(); ixtal++) {
22  int adc = linout[ixtal][i];
23  int res = (((adc & 0xffff) > threshold_fg_) || ((adc & 0x30000) != 0x0))
24  ? 1
25  : 0;
26  indexLut[i] = indexLut[i] | (res << ixtal);
27  }
28  int mask = 1 << (indexLut[i]);
29  output[i] = ((lut_fg_ & mask) == 0x0) ? 0 : 1;
30  if (i > 0)
31  output[i - 1] = output[i]; // Delay one clock
32  }
33  return;
34 }
Definition: Electron.h:6
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
void EcalFenixStripFgvbEE::setbadStripMissing ( bool  flag)
inline
void EcalFenixStripFgvbEE::setParameters ( int  identif,
uint32_t  id,
const EcalTPGFineGrainStripEE ecaltpgFgStripEE 
)

Definition at line 36 of file EcalFenixStripFgvbEE.cc.

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

Referenced by EcalFenixStrip::process_part1().

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

Member Data Documentation

bool EcalFenixStripFgvbEE::flagBadStripMiss_
private

Definition at line 27 of file EcalFenixStripFgvbEE.h.

Referenced by EcalFenixStripFgvbEE(), getMissedStripFlag(), and setParameters().

int EcalFenixStripFgvbEE::identif_
private

Definition at line 26 of file EcalFenixStripFgvbEE.h.

Referenced by EcalFenixStripFgvbEE().

int EcalFenixStripFgvbEE::lut_fg_
private

Definition at line 25 of file EcalFenixStripFgvbEE.h.

Referenced by process(), and setParameters().

int EcalFenixStripFgvbEE::threshold_fg_
private

Definition at line 24 of file EcalFenixStripFgvbEE.h.

Referenced by process(), and setParameters().