CMS 3D CMS Logo

CalibrationScanAnalysis.h
Go to the documentation of this file.
1 #ifndef CondFormats_SiStripObjects_CalibrationScanAnalysis_H
2 #define CondFormats_SiStripObjects_CalibrationScanAnalysis_H
3 
6 #include <sstream>
7 #include <vector>
8 #include <map>
9 #include "TGraph.h"
10 #include "TGraph2D.h"
11 #include <cstdint>
12 
20 public:
21  CalibrationScanAnalysis(const uint32_t& key, const bool& deconv);
22  CalibrationScanAnalysis(const bool& deconv);
23 
24  ~CalibrationScanAnalysis() override { ; }
25 
27 
29 
30  inline const VBool isValid(const std::string& key) { return isvalid_[key]; } // analysis validity
31  bool isValid() const override;
32 
33  inline const VFloat& amplitude(const std::string& key) {
34  return amplitude_[key];
35  } // key stands for isha_%d_vfs_%d values
36  inline const VFloat& tail(const std::string& key) { return tail_[key]; }
37  inline const VFloat& riseTime(const std::string& key) { return riseTime_[key]; }
38  inline const VFloat& decayTime(const std::string& key) { return decayTime_[key]; }
39  inline const VFloat& turnOn(const std::string& key) { return turnOn_[key]; }
40  inline const VFloat& peakTime(const std::string& key) { return peakTime_[key]; }
41  inline const VFloat& undershoot(const std::string& key) { return undershoot_[key]; }
42  inline const VFloat& baseline(const std::string& key) { return baseline_[key]; }
43  inline const VFloat& smearing(const std::string& key) { return smearing_[key]; }
44  inline const VFloat& chi2(const std::string& key) { return chi2_[key]; }
45 
46  inline const VFloat& tunedAmplitude() { return tunedAmplitude_; }
47  inline const VFloat& tunedTail() { return tunedTail_; }
48  inline const VFloat& tunedRiseTime() { return tunedRiseTime_; }
49  inline const VFloat& tunedDecayTime() { return tunedDecayTime_; }
50  inline const VFloat& tunedTurnOn() { return tunedTurnOn_; }
51  inline const VFloat& tunedPeakTime() { return tunedPeakTime_; }
52  inline const VFloat& tunedUndershoot() { return tunedUndershoot_; }
53  inline const VFloat& tunedBaseline() { return tunedBaseline_; }
54  inline const VFloat& tunedSmearing() { return tunedSmearing_; }
55  inline const VFloat& tunedChi2() { return tunedChi2_; }
56 
57  inline const VInt& tunedISHA() { return tunedISHA_; }
58  inline const VInt& tunedVFS() { return tunedVFS_; }
59 
60  inline const std::vector<TGraph*>& decayTimeVsVFS() { return decayTime_vs_vfs_; }
61  inline const std::vector<TGraph*>& riseTimeVsISHA() { return riseTime_vs_isha_; }
62  inline const std::vector<TGraph2D*>& decayTimeVsISHAVsVFS() { return decayTime_vs_isha_vfs_; }
63  inline const std::vector<TGraph2D*>& riseTimeVsISHAVsVFS() { return riseTime_vs_isha_vfs_; }
64 
65  inline const VInt& bestISHA() { return isha_; }
66  inline const VInt& bestVFS() { return vfs_; }
67 
68  inline bool deconvMode() { return deconv_; }
69 
70  void print(std::stringstream&, uint32_t not_used = 0) override;
71  void reset() override;
72 
74  static const float minAmplitudeThreshold_;
75  static const float minBaselineThreshold_;
76  static const float maxBaselineThreshold_;
77  static const float maxChi2Threshold_;
78  static const float minDecayTimeThreshold_;
79  static const float maxDecayTimeThreshold_;
80  static const float minPeakTimeThreshold_;
81  static const float maxPeakTimeThreshold_;
82  static const float minRiseTimeThreshold_;
83  static const float maxRiseTimeThreshold_;
84  static const float minTurnOnThreshold_;
85  static const float maxTurnOnThreshold_;
86  static const float minISHAforVFSTune_;
87  static const float maxISHAforVFSTune_;
88  static const float VFSrange_;
89 
90 private:
92  std::map<std::string, VFloat> amplitude_;
93  std::map<std::string, VFloat> tail_;
94  std::map<std::string, VFloat> riseTime_;
95  std::map<std::string, VFloat> decayTime_;
96  std::map<std::string, VFloat> turnOn_;
97  std::map<std::string, VFloat> peakTime_;
98  std::map<std::string, VFloat> undershoot_;
99  std::map<std::string, VFloat> baseline_;
100  std::map<std::string, VFloat> smearing_;
101  std::map<std::string, VFloat> chi2_;
102  std::map<std::string, VBool> isvalid_;
103 
104  bool deconv_;
105 
107  std::vector<TGraph*> decayTime_vs_vfs_;
108  std::vector<TGraph*> riseTime_vs_isha_;
109  std::vector<TGraph2D*> riseTime_vs_isha_vfs_;
110  std::vector<TGraph2D*> decayTime_vs_isha_vfs_;
111 
114 
122 };
123 
124 #endif // CondFormats_SiStripObjects_CalibrationScanAnalysis_H
const std::vector< TGraph2D * > & decayTimeVsISHAVsVFS()
const VFloat & turnOn(const std::string &key)
static const float maxDecayTimeThreshold_
std::vector< TGraph * > riseTime_vs_isha_
static const float minAmplitudeThreshold_
std::map< std::string, VFloat > turnOn_
const std::vector< TGraph * > & decayTimeVsVFS()
std::map< std::string, VFloat > tail_
const VFloat & tail(const std::string &key)
static const float minBaselineThreshold_
const VFloat & chi2(const std::string &key)
std::map< std::string, VFloat > decayTime_
const VFloat & amplitude(const std::string &key)
static const float minDecayTimeThreshold_
static const float maxTurnOnThreshold_
std::map< std::string, VFloat > amplitude_
std::map< std::string, VBool > isvalid_
std::vector< TGraph2D * > riseTime_vs_isha_vfs_
const VBool isValid(const std::string &key)
static const float maxISHAforVFSTune_
static const float maxPeakTimeThreshold_
std::vector< float > VFloat
const VFloat & baseline(const std::string &key)
static const float maxChi2Threshold_
const VFloat & decayTime(const std::string &key)
std::map< std::string, VFloat > riseTime_
Analysis for calibration scans.
std::vector< bool > VBool
Algorithm for calibration runs.
std::vector< TGraph2D * > decayTime_vs_isha_vfs_
static const float maxRiseTimeThreshold_
const VFloat & peakTime(const std::string &key)
static const float minISHAforVFSTune_
std::vector< uint16_t > VInt
const VFloat & undershoot(const std::string &key)
const VFloat & smearing(const std::string &key)
void addOneCalibrationPoint(const std::string &key)
std::vector< TGraph * > decayTime_vs_vfs_
std::map< std::string, VFloat > smearing_
void print(std::stringstream &, uint32_t not_used=0) override
CalibrationScanAnalysis(const uint32_t &key, const bool &deconv)
std::map< std::string, VFloat > baseline_
static const float minPeakTimeThreshold_
const VFloat & riseTime(const std::string &key)
const std::vector< TGraph2D * > & riseTimeVsISHAVsVFS()
std::map< std::string, VFloat > peakTime_
static const float minRiseTimeThreshold_
std::map< std::string, VFloat > undershoot_
Abstract base for derived classes that provide analysis of commissioning histograms.
static const float maxBaselineThreshold_
std::map< std::string, VFloat > chi2_
static const float minTurnOnThreshold_
const std::vector< TGraph * > & riseTimeVsISHA()