CbmRoot
Loading...
Searching...
No Matches
CbmTrdRawToDigiFitR Class Reference

#include <CbmTrdRawToDigiFitR.h>

Inheritance diagram for CbmTrdRawToDigiFitR:
[legend]
Collaboration diagram for CbmTrdRawToDigiFitR:
[legend]

Public Member Functions

 CbmTrdRawToDigiFitR ()
 default Constructor with messages
 
 CbmTrdRawToDigiFitR (const CbmTrdRawToDigiFitR &)=delete
 Copy constructor - not implemented!
 
CbmTrdRawToDigiFitR operator= (const CbmTrdRawToDigiFitR &)
 Assignment operator - not implemented!
 
virtual ~CbmTrdRawToDigiFitR ()
 Destructor.
 
ULong64_t GetBinTimeShift (const std::vector< std::int16_t > *)
 Get the Bin Time Shift value.
 
Float_t GetMaxAdcValue (const std::vector< std::int16_t > *)
 Get the MaxAdc value.
 
std::shared_ptr< TF1 > GetResponseFunc ()
 Get the Response Function object.
 
virtual void SetNrOfPresamples (UInt_t value)
 Set the Nr Of Presamples.
 
virtual void SetShapingOrder (std::uint8_t value)
 Set the Shaping Order.
 
virtual void SetShapingTime (Double_t value)
 Set and fix the Shaping Time.
 
virtual void SetBinTimeshift (Double_t value)
 Set and fix the Bin Timeshift value.
 
virtual void SetChargeToMaxAdcCal (Double_t value)
 Set the Charge Calibration.
 
void SetFitRange (UInt_t start, UInt_t end)
 Set the Fit Range.
 
 ClassDef (CbmTrdRawToDigiFitR, 2)
 
std::unique_ptr< CbmTrdDigiMakeDigi (const std::vector< std::int16_t > *samples, Int_t padChNr, Int_t uniqueModuleId, ULong64_t time, CbmTrdDigi::eTriggerType triggerType, Int_t errClass)
 Get digi from input values. Implemented in the derived classes.
 
Float_t GetBaseline (const std::vector< std::int16_t > *samples)
 Get the Baseline value.
 
std::shared_ptr< CbmTrdSpadicGetSpadicObject ()
 Get the spadic class.
 
UInt_t GetNrOfPresamples ()
 Get the Nr Of Presamples.
 
void SetSpadicObject (std::shared_ptr< CbmTrdSpadic > spadic)
 Set the spadic class.
 
 ClassDef (CbmTrdRawToDigiBaseR, 2)
 

Static Public Member Functions

static CbmTrdDigi::eTriggerType GetDigiTriggerType (Spadic::eTriggerType tt)
 Get the Digi Trigger Type from the raw message triggertype.
 

Protected Attributes

UInt_t fNrOfPresamples = CbmTrdSpadic::GetNrOfPresamples()
 Number of presamples before the signal starts (SPADIC default 2)
 
ULong64_t fCurrentTimeshift = 0
 Bin timeshift for the current sample set in [ns].
 
std::shared_ptr< CbmTrdSpadicfSpadic = std::make_shared<CbmTrdSpadic>()
 

Private Member Functions

void fitResponse (const std::vector< std::int16_t > *samples)
 Perform the fit of the input signal.
 
void fixExtractionPars ()
 Fix the extraction parameters to the default values.
 
void fixExtractionPar (CbmTrdSpadic::eResponsePars ipar)
 Fix the passed extraction parameter (wrapper function)
 

Private Attributes

std::shared_ptr< TF1 > fResponseFunc = CbmTrdSpadic::GetResponseFunc()
 Response function.
 
UInt_t fFitRangeStart = fNrOfPresamples
 First sample that is used for the fit.
 
UInt_t fFitRangeEnd = 10
 Last sample that is used for the fit.
 

Detailed Description

Definition at line 31 of file CbmTrdRawToDigiFitR.h.

Constructor & Destructor Documentation

◆ CbmTrdRawToDigiFitR() [1/2]

CbmTrdRawToDigiFitR::CbmTrdRawToDigiFitR ( )

default Constructor with messages

Definition at line 15 of file CbmTrdRawToDigiFitR.cxx.

References fixExtractionPars().

◆ CbmTrdRawToDigiFitR() [2/2]

CbmTrdRawToDigiFitR::CbmTrdRawToDigiFitR ( const CbmTrdRawToDigiFitR & )
delete

Copy constructor - not implemented!

◆ ~CbmTrdRawToDigiFitR()

virtual CbmTrdRawToDigiFitR::~CbmTrdRawToDigiFitR ( )
inlinevirtual

Destructor.

Definition at line 53 of file CbmTrdRawToDigiFitR.h.

Member Function Documentation

◆ ClassDef() [1/2]

CbmTrdRawToDigiBaseR::ClassDef ( CbmTrdRawToDigiBaseR ,
2  )
inherited

◆ ClassDef() [2/2]

CbmTrdRawToDigiFitR::ClassDef ( CbmTrdRawToDigiFitR ,
2  )

◆ fitResponse()

void CbmTrdRawToDigiFitR::fitResponse ( const std::vector< std::int16_t > * samples)
private

Perform the fit of the input signal.

Parameters
samples

Definition at line 58 of file CbmTrdRawToDigiFitR.cxx.

References fFitRangeEnd, fFitRangeStart, fResponseFunc, CbmTrdRawToDigiBaseR::GetBaseline(), CbmTrdSpadic::kBinTimeshift, and CbmTrdSpadic::kInputCharge.

Referenced by GetBinTimeShift().

◆ fixExtractionPar()

void CbmTrdRawToDigiFitR::fixExtractionPar ( CbmTrdSpadic::eResponsePars ipar)
private

Fix the passed extraction parameter (wrapper function)

Definition at line 52 of file CbmTrdRawToDigiFitR.cxx.

References fResponseFunc.

Referenced by fixExtractionPars().

◆ fixExtractionPars()

void CbmTrdRawToDigiFitR::fixExtractionPars ( )
private

Fix the extraction parameters to the default values.

Fix NrPresamples, ShapingOrder and ShapingTime to the default values Can still be overwritten by the setter functions

Definition at line 37 of file CbmTrdRawToDigiFitR.cxx.

References fixExtractionPar(), fResponseFunc, CbmTrdSpadic::GetClockCycle(), CbmTrdSpadic::kBinTimeshift, CbmTrdSpadic::kChargeToMaxAdcCal, CbmTrdSpadic::kNrPresamples, CbmTrdSpadic::kShapingOrder, and CbmTrdSpadic::kShapingTime.

Referenced by CbmTrdRawToDigiFitR().

◆ GetBaseline()

Float_t CbmTrdRawToDigiBaseR::GetBaseline ( const std::vector< std::int16_t > * samples)
inherited

Get the Baseline value.

The digi charge is an unsigned. Hence, we need to get the baseline to 0

Parameters
samples
Returns
Float_t

Definition at line 17 of file CbmTrdRawToDigiBaseR.cxx.

References CbmTrdRawToDigiBaseR::fNrOfPresamples, and CbmTrdRawToDigiBaseR::fSpadic.

Referenced by fitResponse(), CbmTrdRawToDigiLookUpCorrR::GetBinTimeShift(), and CbmTrdRawToDigiMaxAdcR::GetMaxAdcValue().

◆ GetBinTimeShift()

ULong64_t CbmTrdRawToDigiFitR::GetBinTimeShift ( const std::vector< std::int16_t > * samples)
virtual

Get the Bin Time Shift value.

Parameters
samples
Returns
ULong64_t

Implements CbmTrdRawToDigiBaseR.

Definition at line 26 of file CbmTrdRawToDigiFitR.cxx.

References fitResponse(), fResponseFunc, and CbmTrdSpadic::kBinTimeshift.

◆ GetDigiTriggerType()

CbmTrdDigi::eTriggerType CbmTrdRawToDigiBaseR::GetDigiTriggerType ( Spadic::eTriggerType tt)
staticinherited

◆ GetMaxAdcValue()

Float_t CbmTrdRawToDigiFitR::GetMaxAdcValue ( const std::vector< std::int16_t > * )
virtual

Get the MaxAdc value.

Parameters
samples
Returns
Float_t

Implements CbmTrdRawToDigiBaseR.

Definition at line 18 of file CbmTrdRawToDigiFitR.cxx.

References fResponseFunc, and CbmTrdSpadic::kInputCharge.

◆ GetNrOfPresamples()

UInt_t CbmTrdRawToDigiBaseR::GetNrOfPresamples ( )
inlineinherited

Get the Nr Of Presamples.

Returns
UInt_t

Definition at line 103 of file CbmTrdRawToDigiBaseR.h.

References CbmTrdRawToDigiBaseR::fNrOfPresamples.

◆ GetResponseFunc()

std::shared_ptr< TF1 > CbmTrdRawToDigiFitR::GetResponseFunc ( )
inline

Get the Response Function object.

Returns
std::shared_ptr<TF1>

Definition at line 76 of file CbmTrdRawToDigiFitR.h.

References fResponseFunc.

◆ GetSpadicObject()

std::shared_ptr< CbmTrdSpadic > CbmTrdRawToDigiBaseR::GetSpadicObject ( )
inlineinherited

Get the spadic class.

Returns
std::shared_ptr<CbmTrdSpadic>

Definition at line 96 of file CbmTrdRawToDigiBaseR.h.

References CbmTrdRawToDigiBaseR::fSpadic.

◆ MakeDigi()

std::unique_ptr< CbmTrdDigi > CbmTrdRawToDigiBaseR::MakeDigi ( const std::vector< std::int16_t > * samples,
Int_t padChNr,
Int_t uniqueModuleId,
ULong64_t time,
CbmTrdDigi::eTriggerType triggerType,
Int_t errClass )
inherited

Get digi from input values. Implemented in the derived classes.

Get digi from the input values. The methods how a timeshift within the bins is estimated and how the input charge to the asic is extracted are implemented in the derived classes

Parameters
samplesAdc samples
padChNrChannel number of the pad
uniqueModuleIdunique Id of the module
timeAbsolute time [ns].
triggerTypeSPADIC trigger type see CbmTrdTriggerType.
errClassSPADIC signal error parametrization based on message type.
Returns
std::shared_ptr<CbmTrdDigi> *

Definition at line 52 of file CbmTrdRawToDigiBaseR.cxx.

References CbmTrdRawToDigiBaseR::fCurrentTimeshift, CbmTrdRawToDigiBaseR::fSpadic, CbmTrdRawToDigiBaseR::GetBinTimeShift(), and CbmTrdRawToDigiBaseR::GetMaxAdcValue().

◆ operator=()

CbmTrdRawToDigiFitR CbmTrdRawToDigiFitR::operator= ( const CbmTrdRawToDigiFitR & )

Assignment operator - not implemented!

Returns
CbmTrdRawToDigiFitR

◆ SetBinTimeshift()

virtual void CbmTrdRawToDigiFitR::SetBinTimeshift ( Double_t value)
inlinevirtual

Set and fix the Bin Timeshift value.

Parameters
value

Definition at line 114 of file CbmTrdRawToDigiFitR.h.

References fResponseFunc, and CbmTrdSpadic::kBinTimeshift.

◆ SetChargeToMaxAdcCal()

virtual void CbmTrdRawToDigiFitR::SetChargeToMaxAdcCal ( Double_t value)
inlinevirtual

Set the Charge Calibration.

Parameters
value

Definition at line 124 of file CbmTrdRawToDigiFitR.h.

References fResponseFunc, and CbmTrdSpadic::kChargeToMaxAdcCal.

◆ SetFitRange()

void CbmTrdRawToDigiFitR::SetFitRange ( UInt_t start,
UInt_t end )
inline

Set the Fit Range.

Parameters
start
end

Definition at line 135 of file CbmTrdRawToDigiFitR.h.

References fFitRangeEnd, and fFitRangeStart.

◆ SetNrOfPresamples()

virtual void CbmTrdRawToDigiFitR::SetNrOfPresamples ( UInt_t value)
inlinevirtual

Set the Nr Of Presamples.

Parameters
value

Reimplemented from CbmTrdRawToDigiBaseR.

Definition at line 83 of file CbmTrdRawToDigiFitR.h.

References CbmTrdRawToDigiBaseR::fNrOfPresamples, fResponseFunc, and CbmTrdSpadic::kNrPresamples.

◆ SetShapingOrder()

virtual void CbmTrdRawToDigiFitR::SetShapingOrder ( std::uint8_t value)
inlinevirtual

Set the Shaping Order.

Parameters
value

Definition at line 94 of file CbmTrdRawToDigiFitR.h.

References fResponseFunc, and CbmTrdSpadic::kShapingOrder.

◆ SetShapingTime()

virtual void CbmTrdRawToDigiFitR::SetShapingTime ( Double_t value)
inlinevirtual

Set and fix the Shaping Time.

Parameters
value

Definition at line 104 of file CbmTrdRawToDigiFitR.h.

References fResponseFunc, and CbmTrdSpadic::kShapingTime.

◆ SetSpadicObject()

void CbmTrdRawToDigiBaseR::SetSpadicObject ( std::shared_ptr< CbmTrdSpadic > spadic)
inlineinherited

Set the spadic class.

Parameters
spadic

Definition at line 126 of file CbmTrdRawToDigiBaseR.h.

References CbmTrdRawToDigiBaseR::fSpadic.

Member Data Documentation

◆ fCurrentTimeshift

ULong64_t CbmTrdRawToDigiBaseR::fCurrentTimeshift = 0
protectedinherited

Bin timeshift for the current sample set in [ns].

Definition at line 146 of file CbmTrdRawToDigiBaseR.h.

Referenced by CbmTrdRawToDigiLookUpCorrR::GetMaxAdcValue(), and CbmTrdRawToDigiBaseR::MakeDigi().

◆ fFitRangeEnd

UInt_t CbmTrdRawToDigiFitR::fFitRangeEnd = 10
private

Last sample that is used for the fit.

Definition at line 185 of file CbmTrdRawToDigiFitR.h.

Referenced by fitResponse(), and SetFitRange().

◆ fFitRangeStart

UInt_t CbmTrdRawToDigiFitR::fFitRangeStart = fNrOfPresamples
private

First sample that is used for the fit.

Definition at line 179 of file CbmTrdRawToDigiFitR.h.

Referenced by fitResponse(), and SetFitRange().

◆ fNrOfPresamples

UInt_t CbmTrdRawToDigiBaseR::fNrOfPresamples = CbmTrdSpadic::GetNrOfPresamples()
protectedinherited

◆ fResponseFunc

std::shared_ptr<TF1> CbmTrdRawToDigiFitR::fResponseFunc = CbmTrdSpadic::GetResponseFunc()
private

Response function.

Spadic obejct internal response function. Use the Getter to access the function and set/fix/etc. parameters.

Definition at line 157 of file CbmTrdRawToDigiFitR.h.

Referenced by fitResponse(), fixExtractionPar(), fixExtractionPars(), GetBinTimeShift(), GetMaxAdcValue(), GetResponseFunc(), SetBinTimeshift(), SetChargeToMaxAdcCal(), SetNrOfPresamples(), SetShapingOrder(), and SetShapingTime().

◆ fSpadic


The documentation for this class was generated from the following files: