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 
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,
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 
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
EcalSelectiveReadoutSuppressor::nTriggerTowersInPhi
const static size_t nTriggerTowersInPhi
Definition: EcalSelectiveReadoutSuppressor.h:207
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
EcalSelectiveReadoutSuppressor::getFIRTapCount
static int getFIRTapCount()
Definition: EcalSelectiveReadoutSuppressor.h:30
EcalSelectiveReadoutSuppressor::initCellThresholds
void initCellThresholds(double barrelLowInterest, double endcapLowInterest, double barrelHighInterest, double endcapHighInterest)
helpers for constructors
Definition: EcalSelectiveReadoutSuppressor.cc:111
EcalSelectiveReadoutSuppressor::setGeometry
void setGeometry(const CaloGeometry *caloGeometry)
Definition: EcalSelectiveReadoutSuppressor.cc:105
EcalSelectiveReadoutSuppressor::trigPrimBypassHTH_
double trigPrimBypassHTH_
Definition: EcalSelectiveReadoutSuppressor.h:290
EcalSelectiveReadoutSuppressor::defaultTtf_
EcalSelectiveReadout::ttFlag_t defaultTtf_
Definition: EcalSelectiveReadoutSuppressor.h:302
mtdUncalibratedRecHits_cfi.barrelDigis
barrelDigis
Definition: mtdUncalibratedRecHits_cfi.py:32
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
EcalSelectiveReadoutSuppressor::frame2Energy
double frame2Energy(const T &frame, int timeOffset=0) const
Definition: EcalSelectiveReadoutSuppressor.cc:534
edm::SortedCollection
Definition: SortedCollection.h:49
EcalSelectiveReadoutSuppressor::ievt_
int ievt_
Definition: EcalSelectiveReadoutSuppressor.h:306
EcalSelectiveReadoutSuppressor::getFIRWeigths
std::vector< int > getFIRWeigths()
Definition: EcalSelectiveReadoutSuppressor.cc:421
EcalSelectiveReadoutSuppressor::trigPrimBypassWithPeakFinder_
bool trigPrimBypassWithPeakFinder_
Definition: EcalSelectiveReadoutSuppressor.h:280
EcalSelectiveReadoutSuppressor::setTtFlags
void setTtFlags(const edm::EventSetup &eventSetup, const EBDigiCollection &ebDigis, const EEDigiCollection &eeDigis)
Definition: EcalSelectiveReadoutSuppressor.cc:435
EcalSelectiveReadoutSuppressor::iEta2cIndex
int iEta2cIndex(int iEta) const
Definition: EcalSelectiveReadoutSuppressor.h:142
EcalSelectiveReadout
Definition: EcalSelectiveReadout.h:62
EcalSelectiveReadoutSuppressor::ecalSelectiveReadout
std::unique_ptr< EcalSelectiveReadout > ecalSelectiveReadout
Definition: EcalSelectiveReadoutSuppressor.h:211
EcalSelectiveReadoutSuppressor::trigPrimBypass_
bool trigPrimBypass_
Definition: EcalSelectiveReadoutSuppressor.h:257
EcalSRSettings.h
EcalSelectiveReadoutSuppressor::trigPrimBypassMode_
int trigPrimBypassMode_
Definition: EcalSelectiveReadoutSuppressor.h:264
EcalSelectiveReadoutSuppressor::accept
bool accept(const edm::DataFrame &frame, int thr)
Definition: EcalSelectiveReadoutSuppressor.cc:208
EcalSelectiveReadoutSuppressor::nTriggerTowersInEta
const static size_t nTriggerTowersInEta
Definition: EcalSelectiveReadoutSuppressor.h:203
CaloGeometry
Definition: CaloGeometry.h:21
EcalSelectiveReadoutSuppressor::ENDCAP
Definition: EcalSelectiveReadoutSuppressor.h:25
EcalSelectiveReadoutSuppressor::theTriggerMap
const EcalTrigTowerConstituentsMap * theTriggerMap
Definition: EcalSelectiveReadoutSuppressor.h:213
EcalSelectiveReadoutSuppressor::setTriggerMap
void setTriggerMap(const EcalTrigTowerConstituentsMap *map)
Definition: EcalSelectiveReadoutSuppressor.cc:96
EcalSelectiveReadoutSuppressor::ttFlags
EcalSelectiveReadout::ttFlag_t ttFlags[nTriggerTowersInEta][nTriggerTowersInPhi]
Definition: EcalSelectiveReadoutSuppressor.h:217
EcalDigiCollections.h
EcalSelectiveReadoutSuppressor::printTTFlags
void printTTFlags(std::ostream &os, int iEvent=-1, bool withHeader=true) const
Definition: EcalSelectiveReadoutSuppressor.cc:570
EcalSelectiveReadoutSuppressor::zsThreshold
int zsThreshold[2][8]
Definition: EcalSelectiveReadoutSuppressor.h:247
EcalTrigTowerConstituentsMap
Definition: EcalTrigTowerConstituentsMap.h:19
EcalSelectiveReadoutSuppressor::iPhi2cIndex
int iPhi2cIndex(int iPhi) const
Definition: EcalSelectiveReadoutSuppressor.h:149
edm::ParameterSet
Definition: ParameterSet.h:36
EcalSelectiveReadoutSuppressor::nEndcaps
const static size_t nEndcaps
Definition: EcalSelectiveReadoutSuppressor.h:191
EcalSelectiveReadout.h
EcalSelectiveReadoutSuppressor::trigPrimBypassLTH_
double trigPrimBypassLTH_
Definition: EcalSelectiveReadoutSuppressor.h:285
EcalSelectiveReadoutSuppressor::firstFIRSample
int firstFIRSample
Definition: EcalSelectiveReadoutSuppressor.h:222
EBDigiCollection
Definition: EcalDigiCollections.h:32
EEDigiCollection
Definition: EcalDigiCollections.h:45
EcalElectronicsMapping.h
EcalSelectiveReadoutSuppressor::BARREL
Definition: EcalSelectiveReadoutSuppressor.h:25
iEvent
int iEvent
Definition: GenABIO.cc:224
EcalSelectiveReadoutSuppressor::firWeights
std::vector< int > firWeights
Definition: EcalSelectiveReadoutSuppressor.h:226
EcalSelectiveReadoutSuppressor::iTTEta2cIndex
int iTTEta2cIndex(int iEta) const
Definition: EcalSelectiveReadoutSuppressor.h:156
edm::EventSetup
Definition: EventSetup.h:57
EcalSelectiveReadoutSuppressor::nBarrelTriggerTowersInEta
const static size_t nBarrelTriggerTowersInEta
Definition: EcalSelectiveReadoutSuppressor.h:199
EcalSelectiveReadoutSuppressor::iTTPhi2cIndex
int iTTPhi2cIndex(int iPhi) const
Definition: EcalSelectiveReadoutSuppressor.h:163
EcalSelectiveReadoutSuppressor::EcalSelectiveReadoutSuppressor
EcalSelectiveReadoutSuppressor(const edm::ParameterSet &params, const EcalSRSettings *settings)
Definition: EcalSelectiveReadoutSuppressor.cc:30
EcalSelectiveReadoutSuppressor::getEcalSelectiveReadout
EcalSelectiveReadout * getEcalSelectiveReadout()
Definition: EcalSelectiveReadoutSuppressor.h:83
EcalSelectiveReadoutSuppressor::srFlags
int srFlags[2][8]
Definition: EcalSelectiveReadoutSuppressor.h:298
edm::DataFrame
Definition: DataFrame.h:15
EcalSelectiveReadoutSuppressor::ttThresOnCompressedEt_
bool ttThresOnCompressedEt_
Definition: EcalSelectiveReadoutSuppressor.h:275
EcalSRSettings
Definition: EcalSRSettings.h:29
EcalTrigTowerConstituentsMap.h
EcalSelectiveReadoutSuppressor::nFIRTaps
static const int nFIRTaps
Definition: EcalSelectiveReadoutSuppressor.h:231
EcalSelectiveReadoutSuppressor::thrUnit
double thrUnit[2]
Definition: EcalSelectiveReadoutSuppressor.h:253
CalibratedDigis_cfi.timeOffset
timeOffset
Definition: CalibratedDigis_cfi.py:22
T
long double T
Definition: Basic3DVectorLD.h:48
EcalSelectiveReadoutSuppressor::nEndcapTriggerTowersInEta
const static size_t nEndcapTriggerTowersInEta
Definition: EcalSelectiveReadoutSuppressor.h:195
amptDefault_cfi.frame
frame
Definition: amptDefault_cfi.py:12
EcalSelectiveReadoutSuppressor::setElecMap
void setElecMap(const EcalElectronicsMapping *map)
Definition: EcalSelectiveReadoutSuppressor.cc:101
EcalSelectiveReadoutSuppressor
Definition: EcalSelectiveReadoutSuppressor.h:17
CaloGeometry.h
EcalSelectiveReadoutSuppressor::weights
std::vector< float > weights
Definition: EcalSelectiveReadoutSuppressor.h:235
EcalSelectiveReadoutSuppressor::run
void run(const edm::EventSetup &eventSetup, const EcalTrigPrimDigiCollection &trigPrims, EBDigiCollection &barrelDigis, EEDigiCollection &endcapDigis)
Definition: EcalSelectiveReadoutSuppressor.cc:263
EventSetup.h
EcalSelectiveReadout::ttFlag_t
ttFlag_t
Definition: EcalSelectiveReadout.h:81
L1TowerCalibrationProducer_cfi.iEta
iEta
Definition: L1TowerCalibrationProducer_cfi.py:60
EcalSelectiveReadoutSuppressor::actions_
std::vector< int > actions_
Definition: EcalSelectiveReadoutSuppressor.h:269
EcalSelectiveReadoutSuppressor::internalThreshold
int internalThreshold(double thresholdInGeV, int iSubDet) const
Definition: EcalSelectiveReadoutSuppressor.cc:188
genParticles_cff.map
map
Definition: genParticles_cff.py:11
ParameterSet.h
mtdUncalibratedRecHits_cfi.endcapDigis
endcapDigis
Definition: mtdUncalibratedRecHits_cfi.py:33
SimL1EmulatorDM_cff.eeDigis
eeDigis
Definition: SimL1EmulatorDM_cff.py:18
EcalSelectiveReadoutSuppressor::symetricZS
bool symetricZS
Definition: EcalSelectiveReadoutSuppressor.h:239