KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVCalibratedSignal.h
1
3
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
75protected:
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 }
88public:
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
KVDetectorSignal * fInputSignal
signal which is used as input to generate calibrated signal
KVDetectorSignal * GetInputSignal() const
KVCalibrator * GetCalibrator() const
Double_t GetValue(const KVNameValueList &params="") const
Double_t GetInverseValue(Double_t out_val, const TString &in_sig, const KVNameValueList &params="") const
Base class for all detector calibrations.
virtual Bool_t IsAvailableFor(const KVNameValueList &) const
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