CMS 3D CMS Logo

EcalSelectiveReadoutSuppressor.h
Go to the documentation of this file.
1 #ifndef EcalSelectiveReadoutSuppressor_h
2 #define EcalSelectiveReadoutSuppressor_h
3 
4 #include <vector>
5 #include "boost/multi_array.hpp"
14 
15 #include <memory>
16 
18 public:
24 
25  enum { BARREL, ENDCAP };
26 
30  static int getFIRTapCount() { return nFIRTaps; }
31 
36 
40  void setElecMap(const EcalElectronicsMapping* map);
41 
44  void setGeometry(const CaloGeometry* caloGeometry);
45 
53  void run(const edm::EventSetup& eventSetup,
54  const EcalTrigPrimDigiCollection& trigPrims,
57 
72  void run(const edm::EventSetup& eventSetup,
73  const EcalTrigPrimDigiCollection& trigPrims,
74  const EBDigiCollection& barrelDigis,
75  const EEDigiCollection& endcapDigis,
76  EBDigiCollection* selectedBarrelDigis,
77  EEDigiCollection* selectedEndcapDigis,
78  EBSrFlagCollection* ebSrFlags,
79  EESrFlagCollection* eeSrFlags);
80 
84 
91  void printTTFlags(std::ostream& os, int iEvent = -1, bool withHeader = true) const;
92 
93 private:
100  bool accept(const edm::DataFrame& frame, int thr);
101 
103 
105  void initCellThresholds(double barrelLowInterest,
106  double endcapLowInterest,
107  double barrelHighInterest,
108  double endcapHighInterest);
116  int internalThreshold(double thresholdInGeV, int iSubDet) const;
117 
135  std::vector<int> getFIRWeigths();
136 
142  int iEta2cIndex(int iEta) const { return (iEta < 0) ? iEta + 85 : iEta + 84; }
143 
149  int iPhi2cIndex(int iPhi) const { return iPhi - 1; }
150 
156  int iTTEta2cIndex(int iEta) const { return (iEta < 0) ? iEta + 28 : iEta + 27; }
157 
163  int iTTPhi2cIndex(int iPhi) const { return iPhi - 1; }
164 
170  void setTtFlags(const edm::EventSetup& eventSetup, const EBDigiCollection& ebDigis, const EEDigiCollection& eeDigis);
171 
175  void setTtFlags(const EcalTrigPrimDigiCollection& trigPrims);
176 
177  template <class T>
178  double frame2Energy(const T& frame, int timeOffset = 0) const;
179 
180  // /** Help function to get SR flag from ZS threshold using min/max convention
181  // * for SUPPRESS and FULL_READOUT: see zsThreshold.
182  // * @param thr ZS threshold in thrUnit
183  // * @param flag for Zero suppression: EcalSrFlag::SRF_ZS1 or
184  // * EcalSrFlag::SRF_ZS2
185  // * @return the SR flag
186  // */
187  // int thr2Srf(int thr, int zsFlag) const;
188 
191  const static size_t nEndcaps = 2;
192 
195  const static size_t nEndcapTriggerTowersInEta = 11;
196 
199  const static size_t nBarrelTriggerTowersInEta = 34;
200 
203  const static size_t nTriggerTowersInEta = 2 * nEndcapTriggerTowersInEta + nBarrelTriggerTowersInEta;
204 
207  const static size_t nTriggerTowersInPhi = 72;
208 
211  std::unique_ptr<EcalSelectiveReadout> ecalSelectiveReadout;
212 
214 
218 
223 
226  std::vector<int> firWeights;
227 
231  static const int nFIRTaps;
232 
235  std::vector<float> weights;
236 
240 
247  int zsThreshold[2][8];
248 
253  double thrUnit[2];
254 
258 
265 
269  std::vector<int> actions_;
270 
276 
281 
286 
291 
298  int srFlags[2][8];
299 
303 
306  int ievt_;
307 };
308 #endif
void setGeometry(const CaloGeometry *caloGeometry)
EcalSelectiveReadoutSuppressor(const edm::ParameterSet &params, const EcalSRSettings *settings)
void initCellThresholds(double barrelLowInterest, double endcapLowInterest, double barrelHighInterest, double endcapHighInterest)
helpers for constructors
EcalSelectiveReadout * getEcalSelectiveReadout()
void printTTFlags(std::ostream &os, int iEvent=-1, bool withHeader=true) const
double frame2Energy(const T &frame, int timeOffset=0) const
void setTriggerMap(const EcalTrigTowerConstituentsMap *map)
std::unique_ptr< EcalSelectiveReadout > ecalSelectiveReadout
EcalSelectiveReadout::ttFlag_t ttFlags[nTriggerTowersInEta][nTriggerTowersInPhi]
void run(const edm::EventSetup &eventSetup, const EcalTrigPrimDigiCollection &trigPrims, EBDigiCollection &barrelDigis, EEDigiCollection &endcapDigis)
int internalThreshold(double thresholdInGeV, int iSubDet) const
int iEvent
Definition: GenABIO.cc:224
EcalSelectiveReadout::ttFlag_t defaultTtf_
bool accept(const edm::DataFrame &frame, int thr)
void setTtFlags(const edm::EventSetup &eventSetup, const EBDigiCollection &ebDigis, const EEDigiCollection &eeDigis)
void setElecMap(const EcalElectronicsMapping *map)
const EcalTrigTowerConstituentsMap * theTriggerMap
long double T