File indexing completed on 2024-04-06 12:02:38
0001 #ifndef CondFormats_SiStripObjects_CalibrationAnalysis_H
0002 #define CondFormats_SiStripObjects_CalibrationAnalysis_H
0003
0004 #include "CondFormats/SiStripObjects/interface/CommissioningAnalysis.h"
0005 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
0006 #include <sstream>
0007 #include <vector>
0008 #include <cstdint>
0009
0010
0011
0012
0013
0014
0015
0016 class CalibrationAnalysis : public CommissioningAnalysis {
0017 public:
0018 CalibrationAnalysis(const uint32_t& key, const bool& deconv);
0019 CalibrationAnalysis(const bool& deconv);
0020
0021 ~CalibrationAnalysis() override { ; }
0022
0023 friend class CalibrationAlgorithm;
0024
0025
0026 inline const VVFloat& amplitude() { return amplitude_; }
0027 inline const VVFloat& tail() { return tail_; }
0028 inline const VVFloat& riseTime() { return riseTime_; }
0029 inline const VVFloat& decayTime() { return decayTime_; }
0030 inline const VVFloat& turnOn() { return turnOn_; }
0031 inline const VVFloat& peakTime() { return peakTime_; }
0032 inline const VVFloat& undershoot() { return undershoot_; }
0033 inline const VVFloat& baseline() { return baseline_; }
0034 inline const VVFloat& smearing() { return smearing_; }
0035 inline const VVFloat& chi2() { return chi2_; }
0036
0037 inline const VVBool isValidStrip() { return isvalid_; }
0038 bool isValid() const override;
0039
0040
0041 inline const VFloat& amplitudeMean() { return mean_amplitude_; }
0042 inline const VFloat& tailMean() { return mean_tail_; }
0043 inline const VFloat& riseTimeMean() { return mean_riseTime_; }
0044 inline const VFloat& decayTimeMean() { return mean_decayTime_; }
0045 inline const VFloat& smearingMean() { return mean_smearing_; }
0046 inline const VFloat& turnOnMean() { return mean_turnOn_; }
0047 inline const VFloat& peakTimeMean() { return mean_peakTime_; }
0048 inline const VFloat& undershootMean() { return mean_undershoot_; }
0049 inline const VFloat& baselineMean() { return mean_baseline_; }
0050 inline const VFloat& chi2Mean() { return mean_chi2_; }
0051
0052
0053 inline const VFloat& amplitudeSpread() { return spread_amplitude_; }
0054 inline const VFloat& amplitudeMin() { return min_amplitude_; }
0055 inline const VFloat& amplitudeMax() { return max_amplitude_; }
0056
0057 inline const VFloat& tailSpread() { return spread_tail_; }
0058 inline const VFloat& tailMin() { return min_tail_; }
0059 inline const VFloat& tailMax() { return max_tail_; }
0060
0061 inline const VFloat& riseTimeSpread() { return spread_riseTime_; }
0062 inline const VFloat& riseTimeMin() { return min_riseTime_; }
0063 inline const VFloat& riseTimeMax() { return max_riseTime_; }
0064
0065 inline const VFloat& decayTimeSpread() { return spread_decayTime_; }
0066 inline const VFloat& decayTimeMin() { return min_decayTime_; }
0067 inline const VFloat& decayTimeMax() { return max_decayTime_; }
0068
0069 inline const VFloat& smearingSpread() { return spread_smearing_; }
0070 inline const VFloat& smearingMin() { return min_smearing_; }
0071 inline const VFloat& smearingMax() { return max_smearing_; }
0072
0073 inline const VFloat& turnOnSpread() { return spread_turnOn_; }
0074 inline const VFloat& turnOnMin() { return min_turnOn_; }
0075 inline const VFloat& turnOnMax() { return max_turnOn_; }
0076
0077 inline const VFloat& peakTimeSpread() { return spread_peakTime_; }
0078 inline const VFloat& peakTimeMin() { return min_peakTime_; }
0079 inline const VFloat& peakTimeMax() { return max_peakTime_; }
0080
0081 inline const VFloat& undershootSpread() { return spread_undershoot_; }
0082 inline const VFloat& undershootMin() { return min_undershoot_; }
0083 inline const VFloat& undershootMax() { return max_undershoot_; }
0084
0085 inline const VFloat& baselineSpread() { return spread_baseline_; }
0086 inline const VFloat& baselineMin() { return min_baseline_; }
0087 inline const VFloat& baselineMax() { return max_baseline_; }
0088
0089 inline const VFloat& chi2Spread() { return spread_chi2_; }
0090 inline const VFloat& chi2Min() { return min_chi2_; }
0091 inline const VFloat& chi2Max() { return max_chi2_; }
0092
0093 inline int calChan() { return calChan_; }
0094 inline bool deconvMode() { return deconv_; }
0095
0096 void print(std::stringstream&, uint32_t not_used = 0) override;
0097 void reset() override;
0098
0099 private:
0100
0101 static const float minAmplitudeThreshold_;
0102 static const float minBaselineThreshold_;
0103 static const float maxBaselineThreshold_;
0104 static const float maxChi2Threshold_;
0105
0106 static const float minDecayTimeThreshold_;
0107 static const float maxDecayTimeThreshold_;
0108 static const float minPeakTimeThreshold_;
0109 static const float maxPeakTimeThreshold_;
0110 static const float minRiseTimeThreshold_;
0111 static const float maxRiseTimeThreshold_;
0112 static const float minTurnOnThreshold_;
0113 static const float maxTurnOnThreshold_;
0114
0115 static const float minDecayTimeThresholdDeco_;
0116 static const float maxDecayTimeThresholdDeco_;
0117 static const float minPeakTimeThresholdDeco_;
0118 static const float maxPeakTimeThresholdDeco_;
0119 static const float minRiseTimeThresholdDeco_;
0120 static const float maxRiseTimeThresholdDeco_;
0121 static const float minTurnOnThresholdDeco_;
0122 static const float maxTurnOnThresholdDeco_;
0123
0124 private:
0125
0126 VVFloat amplitude_, tail_, riseTime_, decayTime_, turnOn_, peakTime_, undershoot_, baseline_, smearing_, chi2_;
0127 VVBool isvalid_;
0128 VFloat mean_amplitude_, mean_tail_, mean_riseTime_, mean_decayTime_, mean_turnOn_, mean_peakTime_, mean_undershoot_,
0129 mean_baseline_, mean_smearing_, mean_chi2_;
0130 VFloat min_amplitude_, min_tail_, min_riseTime_, min_decayTime_, min_turnOn_, min_peakTime_, min_undershoot_,
0131 min_baseline_, min_smearing_, min_chi2_;
0132 VFloat max_amplitude_, max_tail_, max_riseTime_, max_decayTime_, max_turnOn_, max_peakTime_, max_undershoot_,
0133 max_baseline_, max_smearing_, max_chi2_;
0134 VFloat spread_amplitude_, spread_tail_, spread_riseTime_, spread_decayTime_, spread_turnOn_, spread_peakTime_,
0135 spread_undershoot_, spread_baseline_, spread_smearing_, spread_chi2_;
0136
0137
0138 bool deconv_;
0139
0140
0141 int calChan_;
0142 };
0143
0144 #endif