CMS 3D CMS Logo

HcalFlagHFDigiTimeParam.h
Go to the documentation of this file.
1 #ifndef GUARD_HcalFlagHFDigiTimeParam
2 #define GUARD_HcalFlagHFDigiTimeParam
3 
21 
22 #include <vector>
23 #include <cstdint>
24 
26  // Default constructor sets parameters according to 6-TS digis
27  // (Is there a way to pass in default vector arguments directly, rather than by using push_back?)
28 public:
30  : mId(0),
36  mHFdigiflagCoefficients.push_back(0.93);
37  mHFdigiflagCoefficients.push_back(-0.38275);
38  mHFdigiflagCoefficients.push_back(-0.012667);
39  }
40 
41  // Set parameters based on input
42  HcalFlagHFDigiTimeParam(unsigned long fId,
43  unsigned int fFirstSample,
44  unsigned int fSamplesToAdd,
45  unsigned int fExpectedPeak,
46  double fminEThreshold,
47  const std::vector<double>& fcoef)
48  : mId(fId),
49  mHFdigiflagFirstSample(fFirstSample),
50  mHFdigiflagSamplesToAdd(fSamplesToAdd),
51  mHFdigiflagExpectedPeak(fExpectedPeak),
52  mHFdigiflagMinEthreshold(fminEThreshold),
53  mHFdigiflagCoefficients(fcoef) {}
54 
55  uint32_t rawId() const { return mId; }
56 
57  // Return flag parameter values
58  uint32_t HFdigiflagFirstSample() const { return mHFdigiflagFirstSample; }
59  uint32_t HFdigiflagSamplesToAdd() const { return mHFdigiflagSamplesToAdd; }
60  uint32_t HFdigiflagExpectedPeak() const { return mHFdigiflagExpectedPeak; }
62  std::vector<double> HFdigiflagCoefficients() const { return mHFdigiflagCoefficients; }
63 
64 private:
65  uint32_t mId; // detector ID
66  uint32_t mHFdigiflagFirstSample; // first sample used in NTS calculation
67  uint32_t mHFdigiflagSamplesToAdd; // # of sampels to use in NTS calculation
68  uint32_t mHFdigiflagExpectedPeak; // expected peak position; used for calculating TS(peak)
69  double mHFdigiflagMinEthreshold; // minimum energy for flagged rechit
70  std::vector<double>
71  mHFdigiflagCoefficients; // coefficients used to parameterize TS(peak)/NTS threshold: [0]-exp([1]+[2]*E+....)
72 
74 };
75 
76 #endif
std::vector< double > mHFdigiflagCoefficients
uint32_t HFdigiflagSamplesToAdd() const
HcalFlagHFDigiTimeParam(unsigned long fId, unsigned int fFirstSample, unsigned int fSamplesToAdd, unsigned int fExpectedPeak, double fminEThreshold, const std::vector< double > &fcoef)
uint32_t HFdigiflagExpectedPeak() const
std::vector< double > HFdigiflagCoefficients() const
uint32_t HFdigiflagFirstSample() const
#define COND_SERIALIZABLE
Definition: Serializable.h:38
double HFdigiflagMinEThreshold() const