CbmRoot
Loading...
Searching...
No Matches
CbmTrdRawToDigiFitR.h
Go to the documentation of this file.
1/* Copyright (C) 2021 Goethe-University Frankfurt, Frankfurt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pascal Raisig [committer] */
4
19#ifndef CbmTrdRawToDigiFitR_H
20#define CbmTrdRawToDigiFitR_H
21
23
24#include <Rtypes.h> // for types and classdef
25#include <RtypesCore.h>
26#include <TObject.h> // for TObject inheritance
27
28#include <cstddef>
29#include <cstdint>
30
32
33
34 public:
38
44
51
53 virtual ~CbmTrdRawToDigiFitR() { ; }
54
61 ULong64_t GetBinTimeShift(const std::vector<std::int16_t>* /*samples*/);
62
69 Float_t GetMaxAdcValue(const std::vector<std::int16_t>* /*samples*/);
70
76 std::shared_ptr<TF1> GetResponseFunc() { return fResponseFunc; }
77
83 virtual void SetNrOfPresamples(UInt_t value)
84 {
85 fNrOfPresamples = value;
87 }
88
94 virtual void SetShapingOrder(std::uint8_t value)
95 {
96 fResponseFunc->FixParameter(static_cast<size_t>(CbmTrdSpadic::eResponsePars::kShapingOrder), value);
97 }
98
104 virtual void SetShapingTime(Double_t value)
105 {
106 fResponseFunc->FixParameter(static_cast<size_t>(CbmTrdSpadic::eResponsePars::kShapingTime), value);
107 }
108
114 virtual void SetBinTimeshift(Double_t value)
115 {
116 fResponseFunc->FixParameter(static_cast<size_t>(CbmTrdSpadic::eResponsePars::kBinTimeshift), value);
117 }
118
124 virtual void SetChargeToMaxAdcCal(Double_t value)
125 {
126 fResponseFunc->FixParameter(static_cast<size_t>(CbmTrdSpadic::eResponsePars::kChargeToMaxAdcCal), value);
127 }
128
135 void SetFitRange(UInt_t start, UInt_t end)
136 {
137 fFitRangeStart = start;
138 fFitRangeEnd = end;
139 }
140
141
142 private:
148 void fitResponse(const std::vector<std::int16_t>* samples);
149
158
165 void fixExtractionPars();
166
172
173 // Data member
174
180
185 UInt_t fFitRangeEnd = 10;
186
187
188 protected:
189 public:
191};
192
193#endif
Base class for extracting of information from raw signals to digi level.
UInt_t fNrOfPresamples
Number of presamples before the signal starts (SPADIC default 2)
void fixExtractionPars()
Fix the extraction parameters to the default values.
void SetFitRange(UInt_t start, UInt_t end)
Set the Fit Range.
virtual void SetBinTimeshift(Double_t value)
Set and fix the Bin Timeshift value.
CbmTrdRawToDigiFitR operator=(const CbmTrdRawToDigiFitR &)
Assignment operator - not implemented!
virtual void SetChargeToMaxAdcCal(Double_t value)
Set the Charge Calibration.
UInt_t fFitRangeStart
First sample that is used for the fit.
CbmTrdRawToDigiFitR(const CbmTrdRawToDigiFitR &)=delete
Copy constructor - not implemented!
ULong64_t GetBinTimeShift(const std::vector< std::int16_t > *)
Get the Bin Time Shift value.
std::shared_ptr< TF1 > GetResponseFunc()
Get the Response Function object.
void fitResponse(const std::vector< std::int16_t > *samples)
Perform the fit of the input signal.
UInt_t fFitRangeEnd
Last sample that is used for the fit.
ClassDef(CbmTrdRawToDigiFitR, 2)
virtual void SetShapingTime(Double_t value)
Set and fix the Shaping Time.
virtual void SetShapingOrder(std::uint8_t value)
Set the Shaping Order.
CbmTrdRawToDigiFitR()
default Constructor with messages
std::shared_ptr< TF1 > fResponseFunc
Response function.
virtual void SetNrOfPresamples(UInt_t value)
Set the Nr Of Presamples.
void fixExtractionPar(CbmTrdSpadic::eResponsePars ipar)
Fix the passed extraction parameter (wrapper function)
virtual ~CbmTrdRawToDigiFitR()
Destructor.
Float_t GetMaxAdcValue(const std::vector< std::int16_t > *)
Get the MaxAdc value.
eResponsePars
enum for response parameters
static std::shared_ptr< TF1 > GetResponseFunc()
Get a TF1 response function object.