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 <boost/cstdint.hpp>
7 #include <sstream>
8 #include <vector>
9 #include <map>
10 #include "TGraph.h"
11 #include "TGraph2D.h"
12 
20 
21  public:
22 
23  CalibrationScanAnalysis(const uint32_t & key, const bool & deconv);
24  CalibrationScanAnalysis(const bool & deconv);
25 
26  ~CalibrationScanAnalysis() override {;}
27 
28  void addOneCalibrationPoint(const std::string & key);
29 
31 
32  inline const VBool isValid(const std::string & key) {return isvalid_[key];} // analysis validity
33  bool isValid() const override;
34 
35  inline const VFloat& amplitude(const std::string & key) { return amplitude_[key]; } // 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:
91 
93  std::map<std::string,VFloat> amplitude_;
94  std::map<std::string,VFloat> tail_;
95  std::map<std::string,VFloat> riseTime_;
96  std::map<std::string,VFloat> decayTime_;
97  std::map<std::string,VFloat> turnOn_;
98  std::map<std::string,VFloat> peakTime_;
99  std::map<std::string,VFloat> undershoot_;
100  std::map<std::string,VFloat> baseline_;
101  std::map<std::string,VFloat> smearing_;
102  std::map<std::string,VFloat> chi2_;
103  std::map<std::string,VBool> isvalid_;
104 
105  bool deconv_;
106 
108  std::vector<TGraph*> decayTime_vs_vfs_;
109  std::vector<TGraph*> riseTime_vs_isha_;
110  std::vector<TGraph2D*> riseTime_vs_isha_vfs_;
111  std::vector<TGraph2D*> decayTime_vs_isha_vfs_;
112 
115 
123 
124 };
125 
126 #endif // CondFormats_SiStripObjects_CalibrationScanAnalysis_H
127 
const std::vector< TGraph2D * > & decayTimeVsISHAVsVFS()
const VFloat & turnOn(const std::string &key)
static const float maxDecayTimeThreshold_
std::map< std::string, VFloat > smearing_
std::map< std::string, VFloat > undershoot_
std::vector< TGraph * > riseTime_vs_isha_
std::map< std::string, VFloat > decayTime_
static const float minAmplitudeThreshold_
const std::vector< TGraph * > & decayTimeVsVFS()
std::map< std::string, VFloat > tail_
const VFloat & tail(const std::string &key)
std::map< std::string, VFloat > peakTime_
static const float minBaselineThreshold_
const VFloat & chi2(const std::string &key)
const VFloat & amplitude(const std::string &key)
static const float minDecayTimeThreshold_
std::map< std::string, VFloat > chi2_
static const float maxTurnOnThreshold_
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)
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)
std::map< std::string, VFloat > amplitude_
std::map< std::string, VFloat > riseTime_
void addOneCalibrationPoint(const std::string &key)
std::vector< TGraph * > decayTime_vs_vfs_
std::map< std::string, VFloat > turnOn_
void print(std::stringstream &, uint32_t not_used=0) override
CalibrationScanAnalysis(const uint32_t &key, const bool &deconv)
static const float minPeakTimeThreshold_
const VFloat & riseTime(const std::string &key)
const std::vector< TGraph2D * > & riseTimeVsISHAVsVFS()
std::map< std::string, VBool > isvalid_
static const float minRiseTimeThreshold_
Abstract base for derived classes that provide analysis of commissioning histograms.
static const float maxBaselineThreshold_
std::map< std::string, VFloat > baseline_
static const float minTurnOnThreshold_
const std::vector< TGraph * > & riseTimeVsISHA()