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
HcalFlagHFDigiTimeParam::HFdigiflagCoefficients
std::vector< double > HFdigiflagCoefficients() const
Definition: HcalFlagHFDigiTimeParam.h:62
HcalFlagHFDigiTimeParam::HFdigiflagSamplesToAdd
uint32_t HFdigiflagSamplesToAdd() const
Definition: HcalFlagHFDigiTimeParam.h:59
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
HcalFlagHFDigiTimeParam::HcalFlagHFDigiTimeParam
HcalFlagHFDigiTimeParam(unsigned long fId, unsigned int fFirstSample, unsigned int fSamplesToAdd, unsigned int fExpectedPeak, double fminEThreshold, const std::vector< double > &fcoef)
Definition: HcalFlagHFDigiTimeParam.h:42
HcalFlagHFDigiTimeParam::HFdigiflagExpectedPeak
uint32_t HFdigiflagExpectedPeak() const
Definition: HcalFlagHFDigiTimeParam.h:60
HcalFlagHFDigiTimeParam::HcalFlagHFDigiTimeParam
HcalFlagHFDigiTimeParam()
Definition: HcalFlagHFDigiTimeParam.h:29
HcalFlagHFDigiTimeParam::mHFdigiflagExpectedPeak
uint32_t mHFdigiflagExpectedPeak
Definition: HcalFlagHFDigiTimeParam.h:68
HcalFlagHFDigiTimeParam::mId
uint32_t mId
Definition: HcalFlagHFDigiTimeParam.h:65
HcalFlagHFDigiTimeParam
Definition: HcalFlagHFDigiTimeParam.h:25
HcalFlagHFDigiTimeParam::mHFdigiflagFirstSample
uint32_t mHFdigiflagFirstSample
Definition: HcalFlagHFDigiTimeParam.h:66
Serializable.h
HcalFlagHFDigiTimeParam::mHFdigiflagSamplesToAdd
uint32_t mHFdigiflagSamplesToAdd
Definition: HcalFlagHFDigiTimeParam.h:67
HcalFlagHFDigiTimeParam::rawId
uint32_t rawId() const
Definition: HcalFlagHFDigiTimeParam.h:55
HcalFlagHFDigiTimeParam::HFdigiflagFirstSample
uint32_t HFdigiflagFirstSample() const
Definition: HcalFlagHFDigiTimeParam.h:58
HcalFlagHFDigiTimeParam::mHFdigiflagMinEthreshold
double mHFdigiflagMinEthreshold
Definition: HcalFlagHFDigiTimeParam.h:69
HcalFlagHFDigiTimeParam::HFdigiflagMinEThreshold
double HFdigiflagMinEThreshold() const
Definition: HcalFlagHFDigiTimeParam.h:61
HcalFlagHFDigiTimeParam::mHFdigiflagCoefficients
std::vector< double > mHFdigiflagCoefficients
Definition: HcalFlagHFDigiTimeParam.h:71