CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalFenixStrip.h
Go to the documentation of this file.
1 #ifndef SIMCALORIMETRY_ECALTRIGPRIMALGOS_ECALFENIXSTRIP_H
2 #define SIMCALORIMETRY_ECALTRIGPRIMALGOS_ECALFENIXSTRIP_H
3 
10 
15 #include <string>
16 
17 class EBDataFrame;
24 class EcalTPGStripStatus;
25 class EcalTPGTPMode;
26 
32 public:
33  // constructor, destructor
34  EcalFenixStrip(const EcalElectronicsMapping *theMapping,
35  bool debug,
36  bool famos,
37  int maxNrSamples,
38  int nbMaxXtals,
39  bool TPinfoPrintout);
40  virtual ~EcalFenixStrip();
41 
42 private:
44 
45  bool debug_;
46  bool famos_;
49 
50  std::vector<EcalFenixLinearizer *> linearizer_;
51 
54 
56 
58 
60 
62 
64 
65  // data formats for each event
66  std::vector<std::vector<int>> lin_out_;
67  std::vector<int> add_out_;
68 
69  // Data formats for even filter. Up to the adder only 1 path, then splitted.
70  std::vector<int> even_filt_out_;
71  std::vector<int> even_peak_out_;
72 
73  // Data formats for odd filter, as data path is duplicated for odd filter
74  std::vector<int> odd_filt_out_;
75  std::vector<int> odd_peak_out_;
76 
77  std::vector<int> format_out_;
78  std::vector<int> fgvb_out_;
79  std::vector<int> fgvb_out_temp_;
80 
92 
93  bool identif_;
94 
95 public:
96  void setPointers(const EcalTPGPedestals *ecaltpPed,
97  const EcalTPGLinearizationConst *ecaltpLin,
98  const EcalTPGWeightIdMap *ecaltpgWeightMap,
99  const EcalTPGWeightGroup *ecaltpgWeightGroup,
100  const EcalTPGOddWeightIdMap *ecaltpgOddWeightMap,
101  const EcalTPGOddWeightGroup *ecaltpgOddWeightGroup,
102  const EcalTPGSlidingWindow *ecaltpgSlidW,
103  const EcalTPGFineGrainStripEE *ecaltpgFgStripEE,
104  const EcalTPGCrystalStatus *ecaltpgBadX,
105  const EcalTPGStripStatus *ecaltpgStripStatus,
106  const EcalTPGTPMode *ecaltpgTPMode) {
107  ecaltpPed_ = ecaltpPed;
108  ecaltpLin_ = ecaltpLin;
109  ecaltpgWeightMap_ = ecaltpgWeightMap;
110  ecaltpgWeightGroup_ = ecaltpgWeightGroup;
111  ecaltpgOddWeightMap_ = ecaltpgOddWeightMap;
112  ecaltpgOddWeightGroup_ = ecaltpgOddWeightGroup;
113  ecaltpgSlidW_ = ecaltpgSlidW;
114  ecaltpgFgStripEE_ = ecaltpgFgStripEE;
115  ecaltpgBadX_ = ecaltpgBadX;
116  ecaltpgStripStatus_ = ecaltpgStripStatus;
117  ecaltpgTPMode_ = ecaltpgTPMode;
118  }
119 
120  // main methods
121  void process(std::vector<EBDataFrame> &samples, int nrXtals, std::vector<int> &out);
122  void process(std::vector<EEDataFrame> &samples, int nrXtals, std::vector<int> &out);
123 
124  template <class T>
125  void process_part1(int identif,
126  std::vector<T> &df,
127  int nrXtals,
128  uint32_t stripid,
129  const EcalTPGPedestals *ecaltpPed,
130  const EcalTPGLinearizationConst *ecaltpLin,
131  const EcalTPGWeightIdMap *ecaltpgWeightMap,
132  const EcalTPGWeightGroup *ecaltpgWeightGroup,
133  const EcalTPGOddWeightIdMap *ecaltpgOddWeightMap,
134  const EcalTPGOddWeightGroup *ecaltpgOddWeightGroup,
135  const EcalTPGCrystalStatus *ecaltpBadX);
136  // process method is splitted in 2 parts:
137  // the first one is overloaded, the same except input
138  // the second part is slightly different for barrel/endcap
139  void process_part2_barrel(uint32_t stripid,
140  const EcalTPGSlidingWindow *ecaltpgSlidW,
141  const EcalTPGFineGrainStripEE *ecaltpgFgStripEE);
142 
143  void process_part2_endcap(uint32_t stripid,
144  const EcalTPGSlidingWindow *ecaltpgSlidW,
145  const EcalTPGFineGrainStripEE *ecaltpgFgStripEE,
146  const EcalTPGStripStatus *ecaltpgStripStatus);
147 
148  // getters for the algorithms ;
149 
151  EcalFenixEtStrip *getAdder() const { return adder_; }
155 
158 
159  EcalFenixStripFgvbEE *getFGVB() const { return fgvbEE_; }
160 
161  void setbadStripMissing(bool flag) { identif_ = flag; }
162  bool getbadStripMissing() const { return identif_; }
163 };
164 #endif
EcalFenixOddAmplitudeFilter * oddAmplitude_filter_
EcalFenixStripFgvbEE * fgvbEE_
std::vector< std::vector< int > > lin_out_
std::vector< int > add_out_
std::vector< int > even_peak_out_
std::vector< EcalFenixLinearizer * > linearizer_
EcalFenixStripFormatEB * fenixFormatterEB_
void process_part2_barrel(uint32_t stripid, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE)
void process(std::vector< EBDataFrame > &samples, int nrXtals, std::vector< int > &out)
class representing the Fenix chip, format strip
const EcalTPGOddWeightGroup * ecaltpgOddWeightGroup_
void process_part1(int identif, std::vector< T > &df, int nrXtals, uint32_t stripid, const EcalTPGPedestals *ecaltpPed, const EcalTPGLinearizationConst *ecaltpLin, const EcalTPGWeightIdMap *ecaltpgWeightMap, const EcalTPGWeightGroup *ecaltpgWeightGroup, const EcalTPGOddWeightIdMap *ecaltpgOddWeightMap, const EcalTPGOddWeightGroup *ecaltpgOddWeightGroup, const EcalTPGCrystalStatus *ecaltpBadX)
EcalFenixPeakFinder * getPeakFinder() const
const EcalElectronicsMapping * theMapping_
calculates the peak for Fenix strip, barrel input : 18 bits output: boolean
std::vector< int > odd_filt_out_
const EcalTPGSlidingWindow * ecaltpgSlidW_
calculation of Fgvb for the endcap in Fenix Strip calculates fgvb for the endcap in Fenix Strip ...
void process_part2_endcap(uint32_t stripid, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE, const EcalTPGStripStatus *ecaltpgStripStatus)
Formatting for Fenix strip input: 18 bits + 3x 1bit (fgvb, gapflagbit, output from peakfinder) output...
const EcalTPGOddWeightIdMap * ecaltpgOddWeightMap_
EcalFenixAmplitudeFilter * getEvenFilter() const
bool getbadStripMissing() const
const EcalTPGLinearizationConst * ecaltpLin_
const EcalTPGStripStatus * ecaltpgStripStatus_
Linearisation for Fenix strip input: 16 bits corresponding to input EBDataFrame output: 18 bits...
virtual ~EcalFenixStrip()
EcalFenixStrip(const EcalElectronicsMapping *theMapping, bool debug, bool famos, int maxNrSamples, int nbMaxXtals, bool TPinfoPrintout)
const EcalTPGCrystalStatus * ecaltpgBadX_
std::vector< int > even_filt_out_
EcalFenixStripFgvbEE * getFGVB() const
EcalFenixPeakFinder * peak_finder_
const EcalTPGWeightIdMap * ecaltpgWeightMap_
const EcalTPGWeightGroup * ecaltpgWeightGroup_
calculates .... for Fenix strip, barrel input: 18 bits output: 18 bits
std::vector< int > odd_peak_out_
EcalFenixOddAmplitudeFilter * getOddFilter() const
#define debug
Definition: HDRShower.cc:19
Formatting for Fenix strip input: 18 bits + 3x 1bit (fgvb, gapflagbit, output from peakfinder) output...
const EcalTPGPedestals * ecaltpPed_
std::vector< int > fgvb_out_
EcalFenixEtStrip * getAdder() const
void setbadStripMissing(bool flag)
const EcalTPGFineGrainStripEE * ecaltpgFgStripEE_
EcalFenixStripFormatEB * getFormatterEB() const
const EcalTPGTPMode * ecaltpgTPMode_
std::vector< int > format_out_
EcalFenixStripFormatEE * getFormatterEE() const
EcalFenixAmplitudeFilter * amplitude_filter_
EcalFenixStripFormatEE * fenixFormatterEE_
EcalFenixLinearizer * getLinearizer(int i) const
EcalFenixEtStrip * adder_
std::vector< int > fgvb_out_temp_
void setPointers(const EcalTPGPedestals *ecaltpPed, const EcalTPGLinearizationConst *ecaltpLin, const EcalTPGWeightIdMap *ecaltpgWeightMap, const EcalTPGWeightGroup *ecaltpgWeightGroup, const EcalTPGOddWeightIdMap *ecaltpgOddWeightMap, const EcalTPGOddWeightGroup *ecaltpgOddWeightGroup, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE, const EcalTPGCrystalStatus *ecaltpgBadX, const EcalTPGStripStatus *ecaltpgStripStatus, const EcalTPGTPMode *ecaltpgTPMode)