CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Private Attributes
EcalFenixTcp Class Reference

class representing the Fenix chip, format strip More...

#include <EcalFenixTcp.h>

Public Member Functions

 EcalFenixTcp (bool tcpFormat, bool debug, bool famos, int binOfMax, int maxNrSamples, int nbMaxStrips, bool TPinfoPrintout)
 
EcalFenixEtTotgetAdder () const
 
EcalFenixBypassLingetBypasslin (int i) const
 
EcalFenixFgvbEBgetFGVBEB () const
 
EcalFenixTcpFgvbEEgetFGVBEE () const
 
EcalFenixTcpFormatEBgetFormatterEB () const
 
EcalFenixTcpFormatEEgetFormatterEE () const
 
EcalFenixMaxof2getMaxOf2 () const
 
EcalFenixTcpsFgvbEBgetsFGVBEB () const
 
void process (std::vector< EBDataFrame > &bid, std::vector< std::vector< int >> &tpframetow, int nStr, std::vector< EcalTriggerPrimitiveSample > &tptow, std::vector< EcalTriggerPrimitiveSample > &tptow2, bool isInInnerRings, EcalTrigTowerDetId thisTower)
 
void process (std::vector< EEDataFrame > &bid, std::vector< std::vector< int >> &tpframetow, int nStr, std::vector< EcalTriggerPrimitiveSample > &tptow, std::vector< EcalTriggerPrimitiveSample > &tptow2, bool isInInnerRings, EcalTrigTowerDetId thisTower)
 
void process_part1 (std::vector< std::vector< int >> &tpframetow, int nStr, int bitMask, int bitOddEven)
 
void process_part2_barrel (std::vector< std::vector< int >> &, int nStr, int bitMask, int bitOddEven, const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB, const EcalTPGTowerStatus *ecaltpgBadTT, const EcalTPGSpike *ecaltpgSpike, std::vector< EcalTriggerPrimitiveSample > &tptow, std::vector< EcalTriggerPrimitiveSample > &tptow2, EcalTrigTowerDetId towid)
 
void process_part2_endcap (std::vector< std::vector< int >> &, int nStr, int bitMask, int bitOddEven, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE, const EcalTPGTowerStatus *ecaltpgBadTT, std::vector< EcalTriggerPrimitiveSample > &tptow, std::vector< EcalTriggerPrimitiveSample > &tptow2, bool isInInnerRings, EcalTrigTowerDetId towid)
 
void setPointers (const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB, const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE, const EcalTPGTowerStatus *ecaltpgBadTT, const EcalTPGSpike *ecaltpgSpike, const EcalTPGTPMode *ecaltpgTPMode)
 
virtual ~EcalFenixTcp ()
 

Public Attributes

const EcalTPGTowerStatusecaltpgBadTT_
 
const EcalTPGFineGrainEBGroupecaltpgFgEBGroup_
 
const EcalTPGFineGrainEBIdMapecaltpgFineGrainEB_
 
const EcalTPGFineGrainTowerEEecaltpgFineGrainTowerEE_
 
const EcalTPGLutIdMapecaltpgLut_
 
const EcalTPGLutGroupecaltpgLutGroup_
 
const EcalTPGSpikeecaltpgSpike_
 
const EcalTPGTPModeecaltpgTPMode_
 

Private Attributes

EcalFenixEtTotadder_
 
std::vector< int > adder_even_out_
 
std::vector< int > adder_odd_out_
 
std::vector< EcalFenixBypassLin * > bypasslin_
 
std::vector< std::vector< int > > bypasslin_out_
 
bool debug_
 
std::vector< int > fgvb_out_
 
EcalFenixFgvbEBfgvbEB_
 
EcalFenixTcpFgvbEEfgvbEE_
 
EcalFenixTcpFormatEBformatter_EB_
 
EcalFenixTcpFormatEEformatter_EE_
 
EcalFenixMaxof2maxOf2_
 
std::vector< int > maxOf2_out_
 
int nbMaxStrips_
 
EcalFenixTcpsFgvbEBsfgvbEB_
 
std::vector< int > strip_fgvb_out_
 
bool tpInfoPrintout_
 

Detailed Description

class representing the Fenix chip, format strip

Definition at line 33 of file EcalFenixTcp.h.

Constructor & Destructor Documentation

EcalFenixTcp::EcalFenixTcp ( bool  tcpFormat,
bool  debug,
bool  famos,
int  binOfMax,
int  maxNrSamples,
int  nbMaxStrips,
bool  TPinfoPrintout 
)

Definition at line 16 of file EcalFenixTcp.cc.

References adder_, adder_even_out_, adder_odd_out_, bypasslin_, bypasslin_out_, debug_, fgvb_out_, fgvbEB_, fgvbEE_, formatter_EB_, formatter_EE_, mps_fire::i, maxOf2_, maxOf2_out_, nbMaxStrips_, sfgvbEB_, and strip_fgvb_out_.

18  : debug_(debug), nbMaxStrips_(nbMaxStrips), tpInfoPrintout_(tpInfoPrintout) {
19  bypasslin_.resize(nbMaxStrips_);
20  for (int i = 0; i < nbMaxStrips_; i++)
22  adder_ = new EcalFenixEtTot();
23  maxOf2_ = new EcalFenixMaxof2(maxNrSamples, nbMaxStrips_);
24  formatter_EB_ = new EcalFenixTcpFormatEB(tcpFormat, debug_, famos, binOfMax);
25  formatter_EE_ = new EcalFenixTcpFormatEE(tcpFormat, debug_, famos, binOfMax);
26  fgvbEB_ = new EcalFenixFgvbEB(maxNrSamples);
27  fgvbEE_ = new EcalFenixTcpFgvbEE(maxNrSamples);
29 
30  // permanent data structures
31  bypasslin_out_.resize(nbMaxStrips_);
32  std::vector<int> vec(maxNrSamples, 0);
33  for (int i = 0; i < nbMaxStrips_; i++)
34  bypasslin_out_[i] = vec;
35 
36  adder_even_out_.resize(maxNrSamples);
37  adder_odd_out_.resize(maxNrSamples);
38  maxOf2_out_.resize(maxNrSamples);
39  fgvb_out_.resize(maxNrSamples);
40  strip_fgvb_out_.resize(maxNrSamples);
41 }
class for calculation of Et for Fenix tcp calculates the sum. As in the firmware the Et sum is splitt...
EcalFenixTcpsFgvbEB * sfgvbEB_
Definition: EcalFenixTcp.h:44
EcalFenixMaxof2 * maxOf2_
Definition: EcalFenixTcp.h:39
calculation of Fgvb for Fenix Tcp, format barrel calculates fgvb for the barrel
std::vector< int > fgvb_out_
Definition: EcalFenixTcp.h:54
EcalFenixTcpFgvbEE * fgvbEE_
Definition: EcalFenixTcp.h:43
std::vector< EcalFenixBypassLin * > bypasslin_
Definition: EcalFenixTcp.h:40
EcalFenixTcpFormatEE * formatter_EE_
Definition: EcalFenixTcp.h:47
std::vector< int > adder_odd_out_
Definition: EcalFenixTcp.h:52
EcalFenixFgvbEB * fgvbEB_
Definition: EcalFenixTcp.h:42
#define debug
Definition: HDRShower.cc:19
calculation of Fgvb for Fenix Tcp, format endcap calculates fgvb for the endcap
std::vector< int > adder_even_out_
Definition: EcalFenixTcp.h:51
std::vector< int > maxOf2_out_
Definition: EcalFenixTcp.h:53
std::vector< int > strip_fgvb_out_
Definition: EcalFenixTcp.h:55
EcalFenixTcpFormatEB * formatter_EB_
Definition: EcalFenixTcp.h:46
bool tpInfoPrintout_
Definition: EcalFenixTcp.h:37
std::vector< std::vector< int > > bypasslin_out_
Definition: EcalFenixTcp.h:50
EcalFenixEtTot * adder_
Definition: EcalFenixTcp.h:41
Linearisation for Tcp input: 16 bits output: 12 bits +1 going to fgvb (???)
calculation of strip Fgvb for Fenix Tcp, format barrel calculates fgvb for the barrel ...
EcalFenixTcp::~EcalFenixTcp ( )
virtual

Definition at line 43 of file EcalFenixTcp.cc.

References adder_, bypasslin_, fgvbEB_, fgvbEE_, formatter_EB_, formatter_EE_, mps_fire::i, maxOf2_, and nbMaxStrips_.

43  {
44  for (int i = 0; i < nbMaxStrips_; i++)
45  delete bypasslin_[i];
46  delete adder_;
47  delete maxOf2_;
48  delete formatter_EB_;
49  delete formatter_EE_;
50  delete fgvbEB_;
51  delete fgvbEE_;
52 }
EcalFenixMaxof2 * maxOf2_
Definition: EcalFenixTcp.h:39
EcalFenixTcpFgvbEE * fgvbEE_
Definition: EcalFenixTcp.h:43
std::vector< EcalFenixBypassLin * > bypasslin_
Definition: EcalFenixTcp.h:40
EcalFenixTcpFormatEE * formatter_EE_
Definition: EcalFenixTcp.h:47
EcalFenixFgvbEB * fgvbEB_
Definition: EcalFenixTcp.h:42
EcalFenixTcpFormatEB * formatter_EB_
Definition: EcalFenixTcp.h:46
EcalFenixEtTot * adder_
Definition: EcalFenixTcp.h:41

Member Function Documentation

EcalFenixEtTot* EcalFenixTcp::getAdder ( ) const
inline

Definition at line 127 of file EcalFenixTcp.h.

References adder_.

Referenced by process_part1().

127 { return adder_; }
EcalFenixEtTot * adder_
Definition: EcalFenixTcp.h:41
EcalFenixBypassLin* EcalFenixTcp::getBypasslin ( int  i) const
inline

Definition at line 126 of file EcalFenixTcp.h.

References bypasslin_, and mps_fire::i.

126 { return bypasslin_[i]; }
std::vector< EcalFenixBypassLin * > bypasslin_
Definition: EcalFenixTcp.h:40
EcalFenixFgvbEB* EcalFenixTcp::getFGVBEB ( ) const
inline

Definition at line 131 of file EcalFenixTcp.h.

References fgvbEB_.

Referenced by process_part2_barrel().

131 { return fgvbEB_; }
EcalFenixFgvbEB * fgvbEB_
Definition: EcalFenixTcp.h:42
EcalFenixTcpFgvbEE* EcalFenixTcp::getFGVBEE ( ) const
inline

Definition at line 132 of file EcalFenixTcp.h.

References fgvbEE_.

Referenced by process_part2_endcap().

132 { return fgvbEE_; }
EcalFenixTcpFgvbEE * fgvbEE_
Definition: EcalFenixTcp.h:43
EcalFenixTcpFormatEB* EcalFenixTcp::getFormatterEB ( ) const
inline

Definition at line 129 of file EcalFenixTcp.h.

References formatter_EB_.

Referenced by process_part2_barrel().

129 { return formatter_EB_; }
EcalFenixTcpFormatEB * formatter_EB_
Definition: EcalFenixTcp.h:46
EcalFenixTcpFormatEE* EcalFenixTcp::getFormatterEE ( ) const
inline

Definition at line 130 of file EcalFenixTcp.h.

References formatter_EE_.

Referenced by process_part2_endcap().

130 { return formatter_EE_; }
EcalFenixTcpFormatEE * formatter_EE_
Definition: EcalFenixTcp.h:47
EcalFenixMaxof2* EcalFenixTcp::getMaxOf2 ( ) const
inline

Definition at line 128 of file EcalFenixTcp.h.

References maxOf2_.

Referenced by process_part2_barrel().

128 { return maxOf2_; }
EcalFenixMaxof2 * maxOf2_
Definition: EcalFenixTcp.h:39
EcalFenixTcpsFgvbEB* EcalFenixTcp::getsFGVBEB ( ) const
inline

Definition at line 133 of file EcalFenixTcp.h.

References sfgvbEB_.

Referenced by process_part2_barrel().

133 { return sfgvbEB_; }
EcalFenixTcpsFgvbEB * sfgvbEB_
Definition: EcalFenixTcp.h:44
void EcalFenixTcp::process ( std::vector< EBDataFrame > &  bid,
std::vector< std::vector< int >> &  tpframetow,
int  nStr,
std::vector< EcalTriggerPrimitiveSample > &  tptow,
std::vector< EcalTriggerPrimitiveSample > &  tptow2,
bool  isInInnerRings,
EcalTrigTowerDetId  thisTower 
)

Definition at line 55 of file EcalFenixTcp.cc.

References ecaltpgBadTT_, ecaltpgFgEBGroup_, ecaltpgFineGrainEB_, ecaltpgLut_, ecaltpgLutGroup_, ecaltpgSpike_, process_part1(), and process_part2_barrel().

61  {
62  int bitMask = 12;
63  // The 14th bit is always used for the odd>even flag. If the flagging is off in the Strip fenix the feature will be not used.
64  int bitOddEven = 13;
65  process_part1(tpframetow, nStr, bitMask, bitOddEven);
66 
67  process_part2_barrel(tpframetow,
68  nStr,
69  bitMask,
70  bitOddEven,
77  tptow,
78  tptow2,
79  towid);
80 }
const EcalTPGFineGrainEBIdMap * ecaltpgFineGrainEB_
Definition: EcalFenixTcp.h:138
void process_part1(std::vector< std::vector< int >> &tpframetow, int nStr, int bitMask, int bitOddEven)
const EcalTPGSpike * ecaltpgSpike_
Definition: EcalFenixTcp.h:141
const EcalTPGTowerStatus * ecaltpgBadTT_
Definition: EcalFenixTcp.h:140
const EcalTPGFineGrainEBGroup * ecaltpgFgEBGroup_
Definition: EcalFenixTcp.h:135
const EcalTPGLutIdMap * ecaltpgLut_
Definition: EcalFenixTcp.h:137
void process_part2_barrel(std::vector< std::vector< int >> &, int nStr, int bitMask, int bitOddEven, const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB, const EcalTPGTowerStatus *ecaltpgBadTT, const EcalTPGSpike *ecaltpgSpike, std::vector< EcalTriggerPrimitiveSample > &tptow, std::vector< EcalTriggerPrimitiveSample > &tptow2, EcalTrigTowerDetId towid)
const EcalTPGLutGroup * ecaltpgLutGroup_
Definition: EcalFenixTcp.h:136
void EcalFenixTcp::process ( std::vector< EEDataFrame > &  bid,
std::vector< std::vector< int >> &  tpframetow,
int  nStr,
std::vector< EcalTriggerPrimitiveSample > &  tptow,
std::vector< EcalTriggerPrimitiveSample > &  tptow2,
bool  isInInnerRings,
EcalTrigTowerDetId  thisTower 
)

Definition at line 83 of file EcalFenixTcp.cc.

References ecaltpgBadTT_, ecaltpgFineGrainTowerEE_, ecaltpgLut_, ecaltpgLutGroup_, process_part1(), and process_part2_endcap().

89  {
90  int bitMask = 12; // Pascal: endcap has 12 bits as in EB (bug in FENIX!!!!)
91  // The 14th bit is always used for the odd>even flag. If the flagging is off in the Strip fenix the feature will be not used.
92  int bitOddEven = 13;
93 
94  process_part1(tpframetow, nStr, bitMask, bitOddEven);
95 
96  process_part2_endcap(tpframetow,
97  nStr,
98  bitMask,
99  bitOddEven,
101  ecaltpgLut_,
104  tptow,
105  tptow2,
106  isInInnerRing,
107  towid);
108 }
void process_part2_endcap(std::vector< std::vector< int >> &, int nStr, int bitMask, int bitOddEven, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE, const EcalTPGTowerStatus *ecaltpgBadTT, std::vector< EcalTriggerPrimitiveSample > &tptow, std::vector< EcalTriggerPrimitiveSample > &tptow2, bool isInInnerRings, EcalTrigTowerDetId towid)
void process_part1(std::vector< std::vector< int >> &tpframetow, int nStr, int bitMask, int bitOddEven)
const EcalTPGTowerStatus * ecaltpgBadTT_
Definition: EcalFenixTcp.h:140
const EcalTPGLutIdMap * ecaltpgLut_
Definition: EcalFenixTcp.h:137
const EcalTPGFineGrainTowerEE * ecaltpgFineGrainTowerEE_
Definition: EcalFenixTcp.h:139
const EcalTPGLutGroup * ecaltpgLutGroup_
Definition: EcalFenixTcp.h:136
void EcalFenixTcp::process_part1 ( std::vector< std::vector< int >> &  tpframetow,
int  nStr,
int  bitMask,
int  bitOddEven 
)

Definition at line 110 of file EcalFenixTcp.cc.

References adder_even_out_, adder_odd_out_, debug_, getAdder(), mps_fire::i, EcalFenixEtTot::process(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by process().

110  {
111  // call adder
112  this->getAdder()->process(tpframetow, nStr, bitMask, bitOddEven, adder_even_out_, adder_odd_out_);
113  if (debug_) {
114  edm::LogVerbatim("EcalTPG") << "output of TCP adder is a vector of size: " << adder_even_out_.size();
115  edm::LogVerbatim("EcalTPG") << "EVEN sum : ";
116  std::string even_adder_outputs;
117  for (unsigned int i = 0; i < adder_even_out_.size(); i++) {
118  even_adder_outputs.append(" ");
119  even_adder_outputs.append(std::to_string(adder_even_out_[i]));
120  }
121  edm::LogVerbatim("EcalTPG") << even_adder_outputs << "\n";
122 
123  edm::LogVerbatim("EcalTPG") << "ODD sum : ";
124  std::string odd_adder_outputs;
125  for (unsigned int i = 0; i < adder_odd_out_.size(); i++) {
126  odd_adder_outputs.append(" ");
127  odd_adder_outputs.append(std::to_string(adder_odd_out_[i]));
128  }
129  edm::LogVerbatim("EcalTPG") << odd_adder_outputs << "\n";
130  }
131  return;
132 }
Log< level::Info, true > LogVerbatim
EcalFenixEtTot * getAdder() const
Definition: EcalFenixTcp.h:127
std::vector< int > adder_odd_out_
Definition: EcalFenixTcp.h:52
std::vector< int > adder_even_out_
Definition: EcalFenixTcp.h:51
virtual std::vector< int > process(const std::vector< EBDataFrame * > &)
void EcalFenixTcp::process_part2_barrel ( std::vector< std::vector< int >> &  bypasslinout,
int  nStr,
int  bitMask,
int  bitOddEven,
const EcalTPGFineGrainEBGroup ecaltpgFgEBGroup,
const EcalTPGLutGroup ecaltpgLutGroup,
const EcalTPGLutIdMap ecaltpgLut,
const EcalTPGFineGrainEBIdMap ecaltpgFineGrainEB,
const EcalTPGTowerStatus ecaltpgBadTT,
const EcalTPGSpike ecaltpgSpike,
std::vector< EcalTriggerPrimitiveSample > &  tptow,
std::vector< EcalTriggerPrimitiveSample > &  tptow2,
EcalTrigTowerDetId  towid 
)

Definition at line 134 of file EcalFenixTcp.cc.

References adder_even_out_, adder_odd_out_, debug_, ecaltpgTPMode_, fgvb_out_, getFGVBEB(), getFormatterEB(), getMaxOf2(), getsFGVBEB(), mps_fire::i, maxOf2_out_, EcalFenixTcpsFgvbEB::process(), EcalFenixMaxof2::process(), EcalFenixTcpFormatEB::process(), EcalFenixFgvbEB::process(), DetId::rawId(), EcalFenixFgvbEB::setParameters(), EcalFenixTcpFormatEB::setParameters(), AlCaHLTBitMon_QueryRunRegistry::string, strip_fgvb_out_, and tpInfoPrintout_.

Referenced by process().

146  {
147  // call maxof2
148  // the oddEven flag is used to exclude "odd" strip from the computation of the maxof2 as in the fenix firmware
149  this->getMaxOf2()->process(bypasslinout, nStr, bitMask, bitOddEven, maxOf2_out_);
150 
151  if (debug_) {
152  edm::LogVerbatim("EcalTPG") << "output of maxof2 is a vector of size: " << maxOf2_out_.size();
153  edm::LogVerbatim("EcalTPG") << "value : ";
154  std::string maxOf2_outputs;
155  for (unsigned int i = 0; i < maxOf2_out_.size(); i++) {
156  maxOf2_outputs.append(" ");
157  maxOf2_outputs.append(std::to_string(maxOf2_out_[i]));
158  }
159  edm::LogVerbatim("EcalTPG") << maxOf2_outputs << "\n";
160  }
161 
162  // call fgvb
163  this->getFGVBEB()->setParameters(towid.rawId(), ecaltpgFgEBGroup, ecaltpgFineGrainEB);
164  // The FGVB is computed only on the even sum, as in the firmware
166 
167  // Call sFGVB
168  this->getsFGVBEB()->process(bypasslinout, nStr, bitMask, strip_fgvb_out_);
169 
170  if (debug_) {
171  edm::LogVerbatim("EcalTPG") << "output of fgvb is a vector of size: " << fgvb_out_.size();
172  edm::LogVerbatim("EcalTPG") << "value : ";
173  std::string fgvb_output;
174  for (unsigned int i = 0; i < fgvb_out_.size(); i++) {
175  fgvb_output.append(" ");
176  fgvb_output.append(std::to_string(fgvb_out_[i]));
177  }
178  edm::LogVerbatim("EcalTPG") << fgvb_output;
179  }
180 
181  // call formatter
182  int eTTotShift = 2;
183 
184  this->getFormatterEB()->setParameters(
185  towid.rawId(), ecaltpgLutGroup, ecaltpgLut, ecaltpgBadTT, ecaltpgSpike, ecaltpgTPMode_);
186  this->getFormatterEB()->process(
187  adder_even_out_, adder_odd_out_, fgvb_out_, strip_fgvb_out_, eTTotShift, tcp_out, tcp_outTcc);
188 
189  if (tpInfoPrintout_) {
190  for (unsigned int i = 3; i < tcp_out.size(); i++) {
191  edm::LogVerbatim("EcalTPG") << " " << i << " " << tcp_out[i];
192  }
193  }
194 
195  if (debug_) {
196  edm::LogVerbatim("EcalTPG") << "\noutput of TCP formatter Barrel is a vector of size: " << tcp_out.size();
197  edm::LogVerbatim("EcalTPG") << "value : ";
198  for (unsigned int i = 0; i < tcp_out.size(); i++) {
199  edm::LogVerbatim("EcalTPG") << " " << i << " " << tcp_out[i];
200  }
201  edm::LogVerbatim("EcalTPG");
202  }
203 
204  return;
205 }
Log< level::Info, true > LogVerbatim
void setParameters(uint32_t towid, const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup, const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB)
EcalFenixTcpFormatEB * getFormatterEB() const
Definition: EcalFenixTcp.h:129
void setParameters(uint32_t towid, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGTowerStatus *ecaltpgbadTT, const EcalTPGSpike *ecaltpgSpike, const EcalTPGTPMode *ecaltpgTPMode)
const EcalTPGTPMode * ecaltpgTPMode_
Definition: EcalFenixTcp.h:142
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
EcalFenixFgvbEB * getFGVBEB() const
Definition: EcalFenixTcp.h:131
void process(std::vector< int > &add_out, std::vector< int > &maxof2_out, std::vector< int > &output)
EcalFenixMaxof2 * getMaxOf2() const
Definition: EcalFenixTcp.h:128
void process(std::vector< std::vector< int >> &, int nStr, int bitMask, int bitOddEven, std::vector< int > &out)
std::vector< int > fgvb_out_
Definition: EcalFenixTcp.h:54
void process(std::vector< std::vector< int >> &bypasslin_out, int nStr, int bitMask, std::vector< int > &output)
virtual std::vector< int > process(const std::vector< int > &, const std::vector< int > &)
EcalFenixTcpsFgvbEB * getsFGVBEB() const
Definition: EcalFenixTcp.h:133
std::vector< int > adder_odd_out_
Definition: EcalFenixTcp.h:52
std::vector< int > adder_even_out_
Definition: EcalFenixTcp.h:51
std::vector< int > maxOf2_out_
Definition: EcalFenixTcp.h:53
std::vector< int > strip_fgvb_out_
Definition: EcalFenixTcp.h:55
bool tpInfoPrintout_
Definition: EcalFenixTcp.h:37
void EcalFenixTcp::process_part2_endcap ( std::vector< std::vector< int >> &  bypasslinout,
int  nStr,
int  bitMask,
int  bitOddEven,
const EcalTPGLutGroup ecaltpgLutGroup,
const EcalTPGLutIdMap ecaltpgLut,
const EcalTPGFineGrainTowerEE ecaltpgFineGrainTowerEE,
const EcalTPGTowerStatus ecaltpgBadTT,
std::vector< EcalTriggerPrimitiveSample > &  tptow,
std::vector< EcalTriggerPrimitiveSample > &  tptow2,
bool  isInInnerRings,
EcalTrigTowerDetId  towid 
)

Definition at line 207 of file EcalFenixTcp.cc.

References adder_even_out_, adder_odd_out_, debug_, ecaltpgTPMode_, fgvb_out_, fgvbEE_, getFGVBEE(), getFormatterEE(), mps_fire::i, EcalFenixTcpFormatEE::process(), EcalFenixTcpFgvbEE::process(), DetId::rawId(), EcalFenixTcpFgvbEE::setParameters(), EcalFenixTcpFormatEE::setParameters(), and strip_fgvb_out_.

Referenced by process().

220 {
221  // Zero EB strip records
222  for (unsigned int i = 0; i < strip_fgvb_out_.size(); ++i) {
223  strip_fgvb_out_[i] = 0;
224  }
225 
226  // call fgvb
227  this->getFGVBEE()->setParameters(towid.rawId(), ecaltpgFineGrainTowerEE);
228  // fgvbEE_->process(bypasslin_out_,nStr,bitMask,fgvb_out_);
229  fgvbEE_->process(bypasslinout, nStr, bitMask, fgvb_out_);
230 
231  // call formatter
232  int eTTotShift = 2; // Pascal: endcap has 12 bits as in EB (bug in FENIX!!!!)
233  // so shift must be applied to just keep [11:2]
234 
235  this->getFormatterEE()->setParameters(
236  towid.rawId(), ecaltpgLutGroup, ecaltpgLut, ecaltpgbadTT, nullptr, ecaltpgTPMode_);
237 
238  // Pass both the even and the odd Et sums to the EE formatter also if there is not TCP in the electronics.
239  // The feature can be implemented in the TCC in the future: the emulator is kept generic.
240  this->getFormatterEE()->process(
241  adder_even_out_, adder_odd_out_, fgvb_out_, strip_fgvb_out_, eTTotShift, tcp_out, tcp_outTcc, isInInnerRings);
242  if (debug_) {
243  edm::LogVerbatim("EcalTPG") << "\noutput of TCP formatter(endcap) is a vector of size: " << tcp_out.size();
244  edm::LogVerbatim("EcalTPG") << "value : ";
245  for (unsigned int i = 0; i < tcp_out.size(); i++) {
246  edm::LogVerbatim("EcalTPG") << " " << i << " " << tcp_out[i];
247  }
248  edm::LogVerbatim("EcalTPG");
249  }
250  return;
251 }
Log< level::Info, true > LogVerbatim
const EcalTPGTPMode * ecaltpgTPMode_
Definition: EcalFenixTcp.h:142
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
EcalFenixTcpFgvbEE * getFGVBEE() const
Definition: EcalFenixTcp.h:132
std::vector< int > fgvb_out_
Definition: EcalFenixTcp.h:54
EcalFenixTcpFgvbEE * fgvbEE_
Definition: EcalFenixTcp.h:43
void setParameters(uint32_t towid, const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE)
void setParameters(uint32_t towid, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGTowerStatus *ecaltpgbadTT, const EcalTPGSpike *ecaltpgSpike, const EcalTPGTPMode *ecaltpgTPMode)
std::vector< int > adder_odd_out_
Definition: EcalFenixTcp.h:52
std::vector< int > adder_even_out_
Definition: EcalFenixTcp.h:51
EcalFenixTcpFormatEE * getFormatterEE() const
Definition: EcalFenixTcp.h:130
std::vector< int > strip_fgvb_out_
Definition: EcalFenixTcp.h:55
void process(std::vector< std::vector< int >> &bypasslin_out, int nStr, int bitMask, std::vector< int > &output)
virtual std::vector< int > process(const std::vector< int > &, const std::vector< int > &)
void EcalFenixTcp::setPointers ( const EcalTPGFineGrainEBGroup ecaltpgFgEBGroup,
const EcalTPGLutGroup ecaltpgLutGroup,
const EcalTPGLutIdMap ecaltpgLut,
const EcalTPGFineGrainEBIdMap ecaltpgFineGrainEB,
const EcalTPGFineGrainTowerEE ecaltpgFineGrainTowerEE,
const EcalTPGTowerStatus ecaltpgBadTT,
const EcalTPGSpike ecaltpgSpike,
const EcalTPGTPMode ecaltpgTPMode 
)
inline

Definition at line 59 of file EcalFenixTcp.h.

References ecaltpgBadTT_, ecaltpgFgEBGroup_, ecaltpgFineGrainEB_, ecaltpgFineGrainTowerEE_, ecaltpgLut_, ecaltpgLutGroup_, ecaltpgSpike_, and ecaltpgTPMode_.

66  {
67  ecaltpgFgEBGroup_ = ecaltpgFgEBGroup;
68  ecaltpgLutGroup_ = ecaltpgLutGroup;
69  ecaltpgLut_ = ecaltpgLut;
70  ecaltpgFineGrainEB_ = ecaltpgFineGrainEB;
71  ecaltpgFineGrainTowerEE_ = ecaltpgFineGrainTowerEE;
72  ecaltpgBadTT_ = ecaltpgBadTT;
73  ecaltpgSpike_ = ecaltpgSpike;
74  ecaltpgTPMode_ = ecaltpgTPMode;
75  }
const EcalTPGFineGrainEBIdMap * ecaltpgFineGrainEB_
Definition: EcalFenixTcp.h:138
const EcalTPGTPMode * ecaltpgTPMode_
Definition: EcalFenixTcp.h:142
const EcalTPGSpike * ecaltpgSpike_
Definition: EcalFenixTcp.h:141
const EcalTPGTowerStatus * ecaltpgBadTT_
Definition: EcalFenixTcp.h:140
const EcalTPGFineGrainEBGroup * ecaltpgFgEBGroup_
Definition: EcalFenixTcp.h:135
const EcalTPGLutIdMap * ecaltpgLut_
Definition: EcalFenixTcp.h:137
const EcalTPGFineGrainTowerEE * ecaltpgFineGrainTowerEE_
Definition: EcalFenixTcp.h:139
const EcalTPGLutGroup * ecaltpgLutGroup_
Definition: EcalFenixTcp.h:136

Member Data Documentation

EcalFenixEtTot* EcalFenixTcp::adder_
private

Definition at line 41 of file EcalFenixTcp.h.

Referenced by EcalFenixTcp(), getAdder(), and ~EcalFenixTcp().

std::vector<int> EcalFenixTcp::adder_even_out_
private
std::vector<int> EcalFenixTcp::adder_odd_out_
private
std::vector<EcalFenixBypassLin *> EcalFenixTcp::bypasslin_
private

Definition at line 40 of file EcalFenixTcp.h.

Referenced by EcalFenixTcp(), getBypasslin(), and ~EcalFenixTcp().

std::vector<std::vector<int> > EcalFenixTcp::bypasslin_out_
private

Definition at line 50 of file EcalFenixTcp.h.

Referenced by EcalFenixTcp().

bool EcalFenixTcp::debug_
private
const EcalTPGTowerStatus* EcalFenixTcp::ecaltpgBadTT_

Definition at line 140 of file EcalFenixTcp.h.

Referenced by process(), and setPointers().

const EcalTPGFineGrainEBGroup* EcalFenixTcp::ecaltpgFgEBGroup_

Definition at line 135 of file EcalFenixTcp.h.

Referenced by process(), and setPointers().

const EcalTPGFineGrainEBIdMap* EcalFenixTcp::ecaltpgFineGrainEB_

Definition at line 138 of file EcalFenixTcp.h.

Referenced by process(), and setPointers().

const EcalTPGFineGrainTowerEE* EcalFenixTcp::ecaltpgFineGrainTowerEE_

Definition at line 139 of file EcalFenixTcp.h.

Referenced by process(), and setPointers().

const EcalTPGLutIdMap* EcalFenixTcp::ecaltpgLut_

Definition at line 137 of file EcalFenixTcp.h.

Referenced by process(), and setPointers().

const EcalTPGLutGroup* EcalFenixTcp::ecaltpgLutGroup_

Definition at line 136 of file EcalFenixTcp.h.

Referenced by process(), and setPointers().

const EcalTPGSpike* EcalFenixTcp::ecaltpgSpike_

Definition at line 141 of file EcalFenixTcp.h.

Referenced by process(), and setPointers().

const EcalTPGTPMode* EcalFenixTcp::ecaltpgTPMode_

Definition at line 142 of file EcalFenixTcp.h.

Referenced by process_part2_barrel(), process_part2_endcap(), and setPointers().

std::vector<int> EcalFenixTcp::fgvb_out_
private

Definition at line 54 of file EcalFenixTcp.h.

Referenced by EcalFenixTcp(), process_part2_barrel(), and process_part2_endcap().

EcalFenixFgvbEB* EcalFenixTcp::fgvbEB_
private

Definition at line 42 of file EcalFenixTcp.h.

Referenced by EcalFenixTcp(), getFGVBEB(), and ~EcalFenixTcp().

EcalFenixTcpFgvbEE* EcalFenixTcp::fgvbEE_
private

Definition at line 43 of file EcalFenixTcp.h.

Referenced by EcalFenixTcp(), getFGVBEE(), process_part2_endcap(), and ~EcalFenixTcp().

EcalFenixTcpFormatEB* EcalFenixTcp::formatter_EB_
private

Definition at line 46 of file EcalFenixTcp.h.

Referenced by EcalFenixTcp(), getFormatterEB(), and ~EcalFenixTcp().

EcalFenixTcpFormatEE* EcalFenixTcp::formatter_EE_
private

Definition at line 47 of file EcalFenixTcp.h.

Referenced by EcalFenixTcp(), getFormatterEE(), and ~EcalFenixTcp().

EcalFenixMaxof2* EcalFenixTcp::maxOf2_
private

Definition at line 39 of file EcalFenixTcp.h.

Referenced by EcalFenixTcp(), getMaxOf2(), and ~EcalFenixTcp().

std::vector<int> EcalFenixTcp::maxOf2_out_
private

Definition at line 53 of file EcalFenixTcp.h.

Referenced by EcalFenixTcp(), and process_part2_barrel().

int EcalFenixTcp::nbMaxStrips_
private

Definition at line 36 of file EcalFenixTcp.h.

Referenced by EcalFenixTcp(), and ~EcalFenixTcp().

EcalFenixTcpsFgvbEB* EcalFenixTcp::sfgvbEB_
private

Definition at line 44 of file EcalFenixTcp.h.

Referenced by EcalFenixTcp(), and getsFGVBEB().

std::vector<int> EcalFenixTcp::strip_fgvb_out_
private

Definition at line 55 of file EcalFenixTcp.h.

Referenced by EcalFenixTcp(), process_part2_barrel(), and process_part2_endcap().

bool EcalFenixTcp::tpInfoPrintout_
private

Definition at line 37 of file EcalFenixTcp.h.

Referenced by process_part2_barrel().