KaliVeda
Toolkit for HIC analysis
KVCalibratedSignal.h
1 
4 #ifndef __KVCALIBRATEDSIGNAL_H
5 #define __KVCALIBRATEDSIGNAL_H
6 
7 #include "KVDetectorSignal.h"
8 #include "KVCalibrator.h"
9 
68 
69  friend class KVDetector;
70 
74 
75 protected:
78  {
80  SetTitle(Form("Signal %s calculated from signal %s of detector %s", GetName(), input->GetName(), GetDetector()->GetName()));
81  }
83  : KVDetectorSignal(calib->GetOutputSignalType(), input->GetDetector()), fInputSignal(input), fCalibrator(calib), fInversionFail(false)
84  {
86  SetTitle(Form("Signal %s calculated from signal %s of detector %s", GetName(), input->GetName(), GetDetector()->GetName()));
87  }
88 public:
90  : KVDetectorSignal(), fInputSignal(nullptr), fCalibrator(nullptr), fInversionFail(false)
91  {}
93  {}
94 
95  Double_t GetValue(const KVNameValueList& params = "") const;
96  Double_t GetInverseValue(Double_t out_val, const TString& in_sig, const KVNameValueList& params = "") const;
98  {
99  return fInputSignal;
100  }
101 
103  {
104  return fCalibrator;
105  }
106  Bool_t IsRaw() const
107  {
109  return kFALSE;
110  }
112  {
113  return fInversionFail;
114  }
115  virtual Bool_t IsAvailableFor(const KVNameValueList& params) const
116  {
121 
122  Bool_t ok = kTRUE;
123  if (fInputSignal) ok &= fInputSignal->IsAvailableFor(params);
124  if (fCalibrator) ok &= fCalibrator->IsAvailableFor(params);
125  return ok;
126  }
127 
128  ClassDef(KVCalibratedSignal, 1) //Detector signal produced by a calibrator
129 };
130 
131 #endif
bool Bool_t
constexpr Bool_t kFALSE
double Double_t
constexpr Bool_t kTRUE
#define ClassDef(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
char * Form(const char *fmt,...)
Output signal from detector obtained by calibration.
KVCalibrator * fCalibrator
calibrator used to transform input signal
Bool_t InversionFailure() const
KVCalibratedSignal(KVDetectorSignal *input, KVCalibrator *calib)
KVCalibratedSignal(KVDetectorSignal *input, const KVString &output)
virtual Bool_t IsAvailableFor(const KVNameValueList &params) const
Bool_t fInversionFail
set to true when failing to compute an inverted calibrator
KVCalibrator * GetCalibrator() const
KVDetectorSignal * fInputSignal
signal which is used as input to generate calibrated signal
Double_t GetValue(const KVNameValueList &params="") const
KVDetectorSignal * GetInputSignal() const
Double_t GetInverseValue(Double_t out_val, const TString &in_sig, const KVNameValueList &params="") const
Base class for all detector calibrations.
Definition: KVCalibrator.h:99
virtual Bool_t IsAvailableFor(const KVNameValueList &) const
Definition: KVCalibrator.h:202
Base class for output signal data produced by a detector.
virtual Bool_t IsAvailableFor(const KVNameValueList &) const
const KVDetector * GetDetector() const
Base class for detector geometry description.
Definition: KVDetector.h:160
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
virtual void SetTitle(const char *title="")
const char * GetName() const override