CMS 3D CMS Logo

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 
162  bool getbadStripMissing() const { return identif_; }
163 };
164 #endif
EcalFenixStrip::ecaltpPed_
const EcalTPGPedestals * ecaltpPed_
Definition: EcalFenixStrip.h:81
EcalFenixStrip::ecaltpgOddWeightGroup_
const EcalTPGOddWeightGroup * ecaltpgOddWeightGroup_
Definition: EcalFenixStrip.h:86
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
EcalTPGWeightIdMap
Definition: EcalTPGWeightIdMap.h:10
EcalFenixStrip::debug_
bool debug_
Definition: EcalFenixStrip.h:45
mps_fire.i
i
Definition: mps_fire.py:428
EcalTPGTPMode
Definition: EcalTPGTPMode.h:12
EcalFenixStrip::getLinearizer
EcalFenixLinearizer * getLinearizer(int i) const
Definition: EcalFenixStrip.h:150
EcalFenixEtStrip.h
EcalFenixStripFgvbEE.h
EcalFenixStrip::add_out_
std::vector< int > add_out_
Definition: EcalFenixStrip.h:67
EcalFenixStrip::~EcalFenixStrip
virtual ~EcalFenixStrip()
Definition: EcalFenixStrip.cc:52
EcalFenixStrip::even_filt_out_
std::vector< int > even_filt_out_
Definition: EcalFenixStrip.h:70
EBDataFrame
Definition: EBDataFrame.h:11
EcalTPGFineGrainStripEE
Definition: EcalTPGFineGrainStripEE.h:9
EcalFenixStrip::ecaltpgStripStatus_
const EcalTPGStripStatus * ecaltpgStripStatus_
Definition: EcalFenixStrip.h:90
EcalFenixStrip::amplitude_filter_
EcalFenixAmplitudeFilter * amplitude_filter_
Definition: EcalFenixStrip.h:52
EcalFenixPeakFinder
calculates the peak for Fenix strip, barrel input : 18 bits output: boolean
Definition: EcalFenixPeakFinder.h:17
EcalFenixStrip::process_part2_endcap
void process_part2_endcap(uint32_t stripid, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE, const EcalTPGStripStatus *ecaltpgStripStatus)
Definition: EcalFenixStrip.cc:284
EcalFenixStrip::ecaltpgWeightMap_
const EcalTPGWeightIdMap * ecaltpgWeightMap_
Definition: EcalFenixStrip.h:83
EcalFenixStrip::getFormatterEE
EcalFenixStripFormatEE * getFormatterEE() const
Definition: EcalFenixStrip.h:157
EcalFenixStrip::ecaltpgWeightGroup_
const EcalTPGWeightGroup * ecaltpgWeightGroup_
Definition: EcalFenixStrip.h:84
EcalTPGWeightGroup
Definition: EcalTPGWeightGroup.h:8
EcalCondObjectContainer
Definition: EcalCondObjectContainer.h:13
EcalFenixPeakFinder.h
EgammaValidation_cff.samples
samples
Definition: EgammaValidation_cff.py:19
EcalFenixStrip::fgvb_out_temp_
std::vector< int > fgvb_out_temp_
Definition: EcalFenixStrip.h:79
EcalFenixStrip::ecaltpgBadX_
const EcalTPGCrystalStatus * ecaltpgBadX_
Definition: EcalFenixStrip.h:89
EcalTPGSlidingWindow
Definition: EcalTPGSlidingWindow.h:9
debug
#define debug
Definition: HDRShower.cc:19
EcalFenixStrip::fenixFormatterEB_
EcalFenixStripFormatEB * fenixFormatterEB_
Definition: EcalFenixStrip.h:57
EcalTPGOddWeightIdMap
Definition: EcalTPGOddWeightIdMap.h:10
EcalFenixStrip::getAdder
EcalFenixEtStrip * getAdder() const
Definition: EcalFenixStrip.h:151
EcalFenixStrip::getOddFilter
EcalFenixOddAmplitudeFilter * getOddFilter() const
Definition: EcalFenixStrip.h:153
EcalFenixStrip::famos_
bool famos_
Definition: EcalFenixStrip.h:46
EcalFenixStrip::nbMaxXtals_
int nbMaxXtals_
Definition: EcalFenixStrip.h:47
EcalFenixStrip::setPointers
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)
Definition: EcalFenixStrip.h:96
EcalFenixStrip::adder_
EcalFenixEtStrip * adder_
Definition: EcalFenixStrip.h:61
EcalFenixStrip::format_out_
std::vector< int > format_out_
Definition: EcalFenixStrip.h:77
EcalFenixEtStrip
Definition: EcalFenixEtStrip.h:20
EcalFenixStrip::fgvbEE_
EcalFenixStripFgvbEE * fgvbEE_
Definition: EcalFenixStrip.h:63
EcalFenixStrip::process
void process(std::vector< EBDataFrame > &samples, int nrXtals, std::vector< int > &out)
Definition: EcalFenixStrip.cc:64
EcalFenixStrip::getFormatterEB
EcalFenixStripFormatEB * getFormatterEB() const
Definition: EcalFenixStrip.h:156
EcalFenixStripFormatEE
Formatting for Fenix strip input: 18 bits + 3x 1bit (fgvb, gapflagbit, output from peakfinder) output...
Definition: EcalFenixStripFormatEE.h:20
EcalFenixStrip::process_part2_barrel
void process_part2_barrel(uint32_t stripid, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE)
Definition: EcalFenixStrip.cc:261
EcalFenixAmplitudeFilter.h
EcalElectronicsMapping.h
EcalFenixLinearizer
Linearisation for Fenix strip input: 16 bits corresponding to input EBDataFrame output: 18 bits.
Definition: EcalFenixLinearizer.h:19
EcalFenixStrip::ecaltpgSlidW_
const EcalTPGSlidingWindow * ecaltpgSlidW_
Definition: EcalFenixStrip.h:87
EcalFenixStripFgvbEE
calculation of Fgvb for the endcap in Fenix Strip calculates fgvb for the endcap in Fenix Strip
Definition: EcalFenixStripFgvbEE.h:21
EcalFenixStrip::getFGVB
EcalFenixStripFgvbEE * getFGVB() const
Definition: EcalFenixStrip.h:159
EcalTriggerElectronicsId.h
EcalFenixOddAmplitudeFilter
Definition: EcalFenixOddAmplitudeFilter.h:19
EcalFenixStrip
class representing the Fenix chip, format strip
Definition: EcalFenixStrip.h:31
EBDataFrame.h
EcalFenixStrip::EcalFenixStrip
EcalFenixStrip(const EcalElectronicsMapping *theMapping, bool debug, bool famos, int maxNrSamples, int nbMaxXtals, bool TPinfoPrintout)
Definition: EcalFenixStrip.cc:15
EcalFenixStrip::ecaltpgOddWeightMap_
const EcalTPGOddWeightIdMap * ecaltpgOddWeightMap_
Definition: EcalFenixStrip.h:85
EcalFenixStrip::setbadStripMissing
void setbadStripMissing(bool flag)
Definition: EcalFenixStrip.h:161
EcalFenixStrip::lin_out_
std::vector< std::vector< int > > lin_out_
Definition: EcalFenixStrip.h:66
EcalFenixStrip::odd_peak_out_
std::vector< int > odd_peak_out_
Definition: EcalFenixStrip.h:75
EEDataFrame.h
EcalFenixStrip::getPeakFinder
EcalFenixPeakFinder * getPeakFinder() const
Definition: EcalFenixStrip.h:154
EcalFenixStrip::ecaltpgTPMode_
const EcalTPGTPMode * ecaltpgTPMode_
Definition: EcalFenixStrip.h:91
EcalFenixStrip::tpInfoPrintout_
bool tpInfoPrintout_
Definition: EcalFenixStrip.h:48
hgcalPerformanceValidation.df
df
Definition: hgcalPerformanceValidation.py:733
EcalFenixStrip::identif_
bool identif_
Definition: EcalFenixStrip.h:93
EcalFenixStrip::linearizer_
std::vector< EcalFenixLinearizer * > linearizer_
Definition: EcalFenixStrip.h:50
EcalFenixStrip::getEvenFilter
EcalFenixAmplitudeFilter * getEvenFilter() const
Definition: EcalFenixStrip.h:152
EcalFenixAmplitudeFilter
calculates .... for Fenix strip, barrel input: 18 bits output: 18 bits
Definition: EcalFenixAmplitudeFilter.h:17
EcalFenixStrip::oddAmplitude_filter_
EcalFenixOddAmplitudeFilter * oddAmplitude_filter_
Definition: EcalFenixStrip.h:53
EcalFenixStrip::ecaltpgFgStripEE_
const EcalTPGFineGrainStripEE * ecaltpgFgStripEE_
Definition: EcalFenixStrip.h:88
EcalFenixOddAmplitudeFilter.h
EcalFenixStrip::fenixFormatterEE_
EcalFenixStripFormatEE * fenixFormatterEE_
Definition: EcalFenixStrip.h:59
EcalFenixLinearizer.h
EcalTPGStripStatus
Definition: EcalTPGStripStatus.h:9
EcalFenixStrip::theMapping_
const EcalElectronicsMapping * theMapping_
Definition: EcalFenixStrip.h:43
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
EcalTriggerPrimitiveSample
Definition: EcalTriggerPrimitiveSample.h:12
EcalFenixStrip::even_peak_out_
std::vector< int > even_peak_out_
Definition: EcalFenixStrip.h:71
EcalFenixStrip::fgvb_out_
std::vector< int > fgvb_out_
Definition: EcalFenixStrip.h:78
EcalFenixStrip::getbadStripMissing
bool getbadStripMissing() const
Definition: EcalFenixStrip.h:162
EcalFenixStripFormatEB
Formatting for Fenix strip input: 18 bits + 3x 1bit (fgvb, gapflagbit, output from peakfinder) output...
Definition: EcalFenixStripFormatEB.h:19
EcalFenixStrip::process_part1
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)
Definition: EcalFenixStrip.cc:124
EcalTPGOddWeightGroup
Definition: EcalTPGOddWeightGroup.h:13
EcalFenixStrip::ecaltpLin_
const EcalTPGLinearizationConst * ecaltpLin_
Definition: EcalFenixStrip.h:82
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
EcalFenixStrip::peak_finder_
EcalFenixPeakFinder * peak_finder_
Definition: EcalFenixStrip.h:55
EcalFenixStrip::odd_filt_out_
std::vector< int > odd_filt_out_
Definition: EcalFenixStrip.h:74