REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Protected Attributes | Private Member Functions
TRestDetectorSignal Class Reference

Detailed Description




         RESTSoft : Software for Rare Event Searches with TPCs

         TRestDetectorSignal.h

         Event class to store signals fromm simulation and acquisition
         events

         sept 2015:   First concept
             Created as part of the conceptualization of existing REST
             software.
             JuanAn Garcia/Javier Galan
    nov 2015:
        Changed vectors fSignalTime and fSignalCharge from <Int_t> to

Float_t> JuanAn Garcia


Definition at line 32 of file TRestDetectorSignal.h.

#include <TRestDetectorSignal.h>

Public Member Functions

void AddGaussianSignal (Double_t amp, Double_t sigma, Double_t time, Int_t N, Double_t fromTime, Double_t toTime)
 
void AddOffset (Double_t offset)
 
void ExponentialConvolution (Double_t fromTime, Double_t decayTime, Double_t offset=0)
 
Double_t GetAverage (Int_t start=0, Int_t end=0)
 
Double_t GetBaseLine (Int_t startBin, Int_t endBin)
 
Double_t GetBaseLineSigma (Int_t startBin, Int_t endBin, Double_t baseline=0)
 
Double_t GetData (Int_t index) const
 
void GetDifferentialSignal (TRestDetectorSignal *diffSgnl, Int_t smearPoints=5)
 
TGraph * GetGraph (Int_t color=1)
 
Int_t GetID () const
 
Double_t GetIntegral (Int_t startBin=0, Int_t endBin=0) const
 
Double_t GetIntegralWithTime (Double_t startTime, Double_t endTime) const
 
TVector2 GetMaxAget ()
 
TVector2 GetMaxGauss ()
 
Int_t GetMaxIndex (Int_t from=0, Int_t to=0)
 
TVector2 GetMaxLandau ()
 
Double_t GetMaxPeakTime (Int_t from=0, Int_t to=0)
 
Double_t GetMaxPeakValue ()
 
Int_t GetMaxPeakWidth ()
 
Double_t GetMaxPeakWithTime (Double_t startTime, Double_t endTime)
 
Double_t GetMaxTime () const
 
Double_t GetMaxValue ()
 
Double_t GetMinPeakValue ()
 
Double_t GetMinTime () const
 
Double_t GetMinValue ()
 
Int_t GetNumberOfPoints () const
 
TVector2 GetPoint (Int_t n)
 
std::vector< Int_t > GetPointsOverThreshold ()
 
void GetSignalDelayed (TRestDetectorSignal *delayedSignal, Int_t delay)
 
void GetSignalGaussianConvolution (TRestDetectorSignal *convSgnl, Double_t sigma=100., Int_t nSigmas=5)
 
Int_t GetSignalID () const
 
std::string GetSignalName () const
 
void GetSignalSmoothed (TRestDetectorSignal *smthSignal, Int_t averagingPoints=3)
 
std::string GetSignalType () const
 
Double_t GetStandardDeviation (Int_t startBin, Int_t endBin)
 
Double_t GetTime (Int_t index) const
 
void GetWhiteNoiseSignal (TRestDetectorSignal *noiseSgnl, Double_t noiseLevel=1.)
 
void IncreaseAmplitude (Double_t t, Double_t d)
 If the point already exists inside the detector signal event, the amplitude value will be added to the corresponding time.
 
void IncreaseAmplitude (TVector2 p)
 If the point already exists inside the detector signal event, the amplitude value will be added to the corresponding time.
 
void IncreaseTimeBinBy (Int_t bin, Double_t data)
 
Bool_t isSorted ()
 
void MultiplySignalBy (Double_t factor)
 
void NewPoint (Float_t time, Float_t data)
 
void Normalize (Double_t scale=1.)
 
void Print () const
 
void Reset ()
 
void SetID (Int_t sID)
 
void SetPoint (Double_t t, Double_t d)
 If the point already exists inside the detector signal event, it will be overwritten. If it does not exists, a new point will be added to the poins vector.
 
void SetPoint (Int_t index, Double_t t, Double_t d)
 If replaces the time and amplitude of the point at the given index.
 
void SetPoint (TVector2 p)
 If the point already exists inside the detector signal event, it will be overwritten. If it does not exists, a new point will be added to the poins vector.
 
void SetSignalID (Int_t sID)
 
void SetSignalName (const std::string &name)
 
void SetSignalType (const std::string &type)
 
void SignalAddition (TRestDetectorSignal *inSgnl)
 
void Sort ()
 
Double_t SubstractBaseline (Int_t startBin, Int_t endBin)
 
void WriteSignalToTextFile (const TString &filename)
 

Data Fields

TGraph * fGraph
 
std::vector< Int_t > fPointsOverThreshold
 

Protected Attributes

std::string fName
 
std::vector< Float_t > fSignalCharge
 
Int_t fSignalID = -1
 
std::vector< Float_t > fSignalTime
 
std::string fType
 

Private Member Functions

Int_t GetMinIndex ()
 
Int_t GetTimeIndex (Double_t t)
 

Constructor & Destructor Documentation

◆ TRestDetectorSignal()

TRestDetectorSignal::TRestDetectorSignal ( )

Definition at line 41 of file TRestDetectorSignal.cxx.

◆ ~TRestDetectorSignal()

TRestDetectorSignal::~TRestDetectorSignal ( )

Definition at line 51 of file TRestDetectorSignal.cxx.

Member Function Documentation

◆ AddGaussianSignal()

void TRestDetectorSignal::AddGaussianSignal ( Double_t  amp,
Double_t  sigma,
Double_t  time,
Int_t  N,
Double_t  fromTime,
Double_t  toTime 
)

Definition at line 660 of file TRestDetectorSignal.cxx.

◆ AddOffset()

void TRestDetectorSignal::AddOffset ( Double_t  offset)

Definition at line 622 of file TRestDetectorSignal.cxx.

◆ ExponentialConvolution()

void TRestDetectorSignal::ExponentialConvolution ( Double_t  fromTime,
Double_t  decayTime,
Double_t  offset = 0 
)

Definition at line 630 of file TRestDetectorSignal.cxx.

◆ GetAverage()

Double_t TRestDetectorSignal::GetAverage ( Int_t  start = 0,
Int_t  end = 0 
)

Definition at line 235 of file TRestDetectorSignal.cxx.

◆ GetBaseLine()

Double_t TRestDetectorSignal::GetBaseLine ( Int_t  startBin,
Int_t  endBin 
)

Definition at line 589 of file TRestDetectorSignal.cxx.

◆ GetBaseLineSigma()

Double_t TRestDetectorSignal::GetBaseLineSigma ( Int_t  startBin,
Int_t  endBin,
Double_t  baseline = 0 
)

Definition at line 603 of file TRestDetectorSignal.cxx.

◆ GetData()

Double_t TRestDetectorSignal::GetData ( Int_t  index) const
inline

Definition at line 117 of file TRestDetectorSignal.h.

◆ GetDifferentialSignal()

void TRestDetectorSignal::GetDifferentialSignal ( TRestDetectorSignal diffSgnl,
Int_t  smearPoints = 5 
)

Definition at line 542 of file TRestDetectorSignal.cxx.

◆ GetGraph()

TGraph * TRestDetectorSignal::GetGraph ( Int_t  color = 1)

Definition at line 745 of file TRestDetectorSignal.cxx.

◆ GetID()

Int_t TRestDetectorSignal::GetID ( ) const
inline

Definition at line 76 of file TRestDetectorSignal.h.

◆ GetIntegral()

Double_t TRestDetectorSignal::GetIntegral ( Int_t  startBin = 0,
Int_t  endBin = 0 
) const

Definition at line 131 of file TRestDetectorSignal.cxx.

◆ GetIntegralWithTime()

Double_t TRestDetectorSignal::GetIntegralWithTime ( Double_t  startTime,
Double_t  endTime 
) const

Definition at line 153 of file TRestDetectorSignal.cxx.

◆ GetMaxAget()

TVector2 TRestDetectorSignal::GetMaxAget ( )

Definition at line 422 of file TRestDetectorSignal.cxx.

◆ GetMaxGauss()

TVector2 TRestDetectorSignal::GetMaxGauss ( )

Definition at line 293 of file TRestDetectorSignal.cxx.

◆ GetMaxIndex()

Int_t TRestDetectorSignal::GetMaxIndex ( Int_t  from = 0,
Int_t  to = 0 
)

Definition at line 271 of file TRestDetectorSignal.cxx.

◆ GetMaxLandau()

TVector2 TRestDetectorSignal::GetMaxLandau ( )

Definition at line 355 of file TRestDetectorSignal.cxx.

◆ GetMaxPeakTime()

Double_t TRestDetectorSignal::GetMaxPeakTime ( Int_t  from = 0,
Int_t  to = 0 
)

Definition at line 469 of file TRestDetectorSignal.cxx.

◆ GetMaxPeakValue()

Double_t TRestDetectorSignal::GetMaxPeakValue ( )

Definition at line 269 of file TRestDetectorSignal.cxx.

◆ GetMaxPeakWidth()

Int_t TRestDetectorSignal::GetMaxPeakWidth ( )

Definition at line 247 of file TRestDetectorSignal.cxx.

◆ GetMaxPeakWithTime()

Double_t TRestDetectorSignal::GetMaxPeakWithTime ( Double_t  startTime,
Double_t  endTime 
)

Definition at line 164 of file TRestDetectorSignal.cxx.

◆ GetMaxTime()

Double_t TRestDetectorSignal::GetMaxTime ( ) const

Definition at line 501 of file TRestDetectorSignal.cxx.

◆ GetMaxValue()

Double_t TRestDetectorSignal::GetMaxValue ( )
inline

Definition at line 111 of file TRestDetectorSignal.h.

◆ GetMinIndex()

Int_t TRestDetectorSignal::GetMinIndex ( )
private

Definition at line 473 of file TRestDetectorSignal.cxx.

◆ GetMinPeakValue()

Double_t TRestDetectorSignal::GetMinPeakValue ( )

Definition at line 471 of file TRestDetectorSignal.cxx.

◆ GetMinTime()

Double_t TRestDetectorSignal::GetMinTime ( ) const

Definition at line 487 of file TRestDetectorSignal.cxx.

◆ GetMinValue()

Double_t TRestDetectorSignal::GetMinValue ( )
inline

Definition at line 112 of file TRestDetectorSignal.h.

◆ GetNumberOfPoints()

Int_t TRestDetectorSignal::GetNumberOfPoints ( ) const
inline

Definition at line 87 of file TRestDetectorSignal.h.

◆ GetPoint()

TVector2 TRestDetectorSignal::GetPoint ( Int_t  n)
inline

Definition at line 69 of file TRestDetectorSignal.h.

◆ GetPointsOverThreshold()

std::vector< Int_t > TRestDetectorSignal::GetPointsOverThreshold ( )
inline

Definition at line 100 of file TRestDetectorSignal.h.

◆ GetSignalDelayed()

void TRestDetectorSignal::GetSignalDelayed ( TRestDetectorSignal delayedSignal,
Int_t  delay 
)

Definition at line 560 of file TRestDetectorSignal.cxx.

◆ GetSignalGaussianConvolution()

void TRestDetectorSignal::GetSignalGaussianConvolution ( TRestDetectorSignal convSgnl,
Double_t  sigma = 100.,
Int_t  nSigmas = 5 
)

Definition at line 684 of file TRestDetectorSignal.cxx.

◆ GetSignalID()

Int_t TRestDetectorSignal::GetSignalID ( ) const
inline

Definition at line 75 of file TRestDetectorSignal.h.

◆ GetSignalName()

std::string TRestDetectorSignal::GetSignalName ( ) const
inline

Definition at line 62 of file TRestDetectorSignal.h.

◆ GetSignalSmoothed()

void TRestDetectorSignal::GetSignalSmoothed ( TRestDetectorSignal smthSignal,
Int_t  averagingPoints = 3 
)

Definition at line 570 of file TRestDetectorSignal.cxx.

◆ GetSignalType()

std::string TRestDetectorSignal::GetSignalType ( ) const
inline

Definition at line 63 of file TRestDetectorSignal.h.

◆ GetStandardDeviation()

Double_t TRestDetectorSignal::GetStandardDeviation ( Int_t  startBin,
Int_t  endBin 
)

Definition at line 598 of file TRestDetectorSignal.cxx.

◆ GetTime()

Double_t TRestDetectorSignal::GetTime ( Int_t  index) const
inline

Definition at line 118 of file TRestDetectorSignal.h.

◆ GetTimeIndex()

Int_t TRestDetectorSignal::GetTimeIndex ( Double_t  t)
private

Definition at line 514 of file TRestDetectorSignal.cxx.

◆ GetWhiteNoiseSignal()

void TRestDetectorSignal::GetWhiteNoiseSignal ( TRestDetectorSignal noiseSgnl,
Double_t  noiseLevel = 1. 
)

Definition at line 672 of file TRestDetectorSignal.cxx.

◆ IncreaseAmplitude() [1/2]

void TRestDetectorSignal::IncreaseAmplitude ( Double_t  t,
Double_t  d 
)

If the point already exists inside the detector signal event, the amplitude value will be added to the corresponding time.

Definition at line 64 of file TRestDetectorSignal.cxx.

◆ IncreaseAmplitude() [2/2]

void TRestDetectorSignal::IncreaseAmplitude ( TVector2  p)

If the point already exists inside the detector signal event, the amplitude value will be added to the corresponding time.

The input vector should contain a physical time and an amplitude.

Definition at line 75 of file TRestDetectorSignal.cxx.

◆ IncreaseTimeBinBy()

void TRestDetectorSignal::IncreaseTimeBinBy ( Int_t  bin,
Double_t  data 
)
inline

Definition at line 78 of file TRestDetectorSignal.h.

◆ isSorted()

Bool_t TRestDetectorSignal::isSorted ( )

Definition at line 522 of file TRestDetectorSignal.cxx.

◆ MultiplySignalBy()

void TRestDetectorSignal::MultiplySignalBy ( Double_t  factor)

Definition at line 626 of file TRestDetectorSignal.cxx.

◆ NewPoint()

void TRestDetectorSignal::NewPoint ( Float_t  time,
Float_t  data 
)

Definition at line 55 of file TRestDetectorSignal.cxx.

◆ Normalize()

void TRestDetectorSignal::Normalize ( Double_t  scale = 1.)

Definition at line 147 of file TRestDetectorSignal.cxx.

◆ Print()

void TRestDetectorSignal::Print ( ) const

Definition at line 727 of file TRestDetectorSignal.cxx.

◆ Reset()

void TRestDetectorSignal::Reset ( )
inline

Definition at line 155 of file TRestDetectorSignal.h.

◆ SetID()

void TRestDetectorSignal::SetID ( Int_t  sID)
inline

Definition at line 122 of file TRestDetectorSignal.h.

◆ SetPoint() [1/3]

void TRestDetectorSignal::SetPoint ( Double_t  t,
Double_t  d 
)

If the point already exists inside the detector signal event, it will be overwritten. If it does not exists, a new point will be added to the poins vector.

In this method the time and amplitude (data) are given as argument

Definition at line 117 of file TRestDetectorSignal.cxx.

◆ SetPoint() [2/3]

void TRestDetectorSignal::SetPoint ( Int_t  index,
Double_t  t,
Double_t  d 
)

If replaces the time and amplitude of the point at the given index.

Definition at line 126 of file TRestDetectorSignal.cxx.

◆ SetPoint() [3/3]

void TRestDetectorSignal::SetPoint ( TVector2  p)

If the point already exists inside the detector signal event, it will be overwritten. If it does not exists, a new point will be added to the poins vector.

The input vector should contain a physical time and an amplitude.

Definition at line 96 of file TRestDetectorSignal.cxx.

◆ SetSignalID()

void TRestDetectorSignal::SetSignalID ( Int_t  sID)
inline

Definition at line 121 of file TRestDetectorSignal.h.

◆ SetSignalName()

void TRestDetectorSignal::SetSignalName ( const std::string &  name)
inline

Definition at line 65 of file TRestDetectorSignal.h.

◆ SetSignalType()

void TRestDetectorSignal::SetSignalType ( const std::string &  type)
inline

Definition at line 66 of file TRestDetectorSignal.h.

◆ SignalAddition()

void TRestDetectorSignal::SignalAddition ( TRestDetectorSignal inSgnl)

Definition at line 638 of file TRestDetectorSignal.cxx.

◆ Sort()

void TRestDetectorSignal::Sort ( )

Definition at line 529 of file TRestDetectorSignal.cxx.

◆ SubstractBaseline()

Double_t TRestDetectorSignal::SubstractBaseline ( Int_t  startBin,
Int_t  endBin 
)

Definition at line 614 of file TRestDetectorSignal.cxx.

◆ WriteSignalToTextFile()

void TRestDetectorSignal::WriteSignalToTextFile ( const TString &  filename)

Definition at line 719 of file TRestDetectorSignal.cxx.

Field Documentation

◆ fGraph

TGraph* TRestDetectorSignal::fGraph

Definition at line 48 of file TRestDetectorSignal.h.

◆ fName

std::string TRestDetectorSignal::fName
protected

Definition at line 44 of file TRestDetectorSignal.h.

◆ fPointsOverThreshold

std::vector<Int_t> TRestDetectorSignal::fPointsOverThreshold

Definition at line 50 of file TRestDetectorSignal.h.

◆ fSignalCharge

std::vector<Float_t> TRestDetectorSignal::fSignalCharge
protected

Definition at line 41 of file TRestDetectorSignal.h.

◆ fSignalID

Int_t TRestDetectorSignal::fSignalID = -1
protected

Definition at line 38 of file TRestDetectorSignal.h.

◆ fSignalTime

std::vector<Float_t> TRestDetectorSignal::fSignalTime
protected

Definition at line 40 of file TRestDetectorSignal.h.

◆ fType

std::string TRestDetectorSignal::fType
protected

Definition at line 45 of file TRestDetectorSignal.h.


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