CMS 3D CMS Logo

List of all members | Public Member Functions
EcalFenixEtTot Class Reference

class for calculation of Et for Fenix tcp calculates the sum. As in the firmware the Et sum is splitted in even and odd sum according to the OddEvenBit. The bit (14th) is handled by strip. More...

#include <EcalFenixEtTot.h>

Public Member Functions

 EcalFenixEtTot ()
 
virtual std::vector< int > process (const std::vector< EBDataFrame *> &)
 
void process (std::vector< std::vector< int >> &, int nStr, int bitMask, int bitOddEven, std::vector< int > &out_even, std::vector< int > &out_odd)
 
virtual ~EcalFenixEtTot ()
 

Detailed Description

class for calculation of Et for Fenix tcp calculates the sum. As in the firmware the Et sum is splitted in even and odd sum according to the OddEvenBit. The bit (14th) is handled by strip.

inputs: -5x 12 bits (12 first bits of output of passlin or take 13 bits and select the first 12 ones in the class... for EBDataFrame 5X 10 bits (10 first bits) according to the second parameter) -number of interesting bits according EE or EBDataFrame -mask to apply before checking for oddEven flaf

output :12 bits (EB) or 10(EE)

in case of overflow, result is set to (2**12)-1 or (2**10)-1

Definition at line 28 of file EcalFenixEtTot.h.

Constructor & Destructor Documentation

◆ EcalFenixEtTot()

EcalFenixEtTot::EcalFenixEtTot ( )

Definition at line 4 of file EcalFenixEtTot.cc.

4 {}

◆ ~EcalFenixEtTot()

EcalFenixEtTot::~EcalFenixEtTot ( )
virtual

Definition at line 6 of file EcalFenixEtTot.cc.

6 {}

Member Function Documentation

◆ process() [1/2]

std::vector< int > EcalFenixEtTot::process ( const std::vector< EBDataFrame *> &  calodatafr)
virtual

Definition at line 8 of file EcalFenixEtTot.cc.

References MillePedeFileConverter_cfg::out.

Referenced by EcalFenixTcp::process_part1().

8  {
9  std::vector<int> out;
10  return out;
11 }

◆ process() [2/2]

void EcalFenixEtTot::process ( std::vector< std::vector< int >> &  bypasslinout,
int  nStr,
int  bitMask,
int  bitOddEven,
std::vector< int > &  out_even,
std::vector< int > &  out_odd 
)

Definition at line 13 of file EcalFenixEtTot.cc.

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

18  {
19  for (unsigned int i = 0; i < output_even.size(); i++) {
20  output_even[i] = 0;
21  output_odd[i] = 0;
22  }
23 
24  int mask = (1 << bitMask) - 1;
25  for (int istrip = 0; istrip < nStr; istrip++) {
26  for (unsigned int i = 0; i < bypasslinout[istrip].size(); i++) {
27  int output = (bypasslinout[istrip][i] & mask); // fix bug inn case of EE: MSB are set for FG, so
28  // need to apply mask in summation.
29  if (output > mask)
30  output = mask;
31  // Check the oddeven flag to assign the amplitude to the correct sum
32  // If the feature is off in the strip fenix the bit will be always 0 and only the even sum will be summed
33  if ((bypasslinout[istrip][i] >> bitOddEven) & 1) {
34  output_odd[i] += output;
35  } else {
36  output_even[i] += output;
37  }
38  }
39  }
40  return;
41 }
constexpr uint32_t mask
Definition: gpuClustering.h:26
Definition: output.py:1