REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
Public Member Functions | Protected Attributes | Private Member Functions
TRestRawSignalEvent Class Reference

Detailed Description

An event container for time rawdata signals with fixed length.

The TRestRawSignalEvent ...

DOCUMENTATION TO BE WRITTEN (main description, figures, methods, data members)

Raw event signals produced with DrawEvent method

Warning
⚠ REST is under continuous development. This documentation is offered to you by the REST community. Your HELP is needed to keep this code up to date. Your feedback will be worth to support this software, please report any problems/suggestions you may find while using it at The REST Framework forum. You are welcome to contribute fixing typos, updating information or adding/proposing new contributions. See also our Contribution Guide.

RESTsoft - Software for Rare Event Searches with TPCs

History of developments:

2017-Feb: First concept (inspired by TRestDetectorSignalEvent) Javier Galan

Author
Javier Galan

Definition at line 40 of file TRestRawSignalEvent.h.

#include <TRestRawSignalEvent.h>

Inheritance diagram for TRestRawSignalEvent:
TRestEvent

Public Member Functions

void AddChargeToSignal (Int_t sgnlID, Int_t bin, Short_t value)
 
void AddSignal (TRestRawSignal &s)
 
TPad * DrawEvent (const TString &option="")
 This method draws current raw signal event in a TPad. More...
 
TPad * DrawSignal (Int_t signalID, const TString &option="")
 This method draws selected signalID by ID, with baseline range and points over threshold highlighted. More...
 
void DrawSignals (TPad *pad, const std::vector< Int_t > &signals)
 This method draws selected signal IDs, given by the vector passed as reference. More...
 
auto GetAuxiliar ()
 
Double_t GetAverageWidth (Double_t minPeakAmplitude=0)
 
Double_t GetBaseLineAverage ()
 
Double_t GetBaseLineSigmaAverage ()
 
Double_t GetIntegral ()
 
Double_t GetLowAverageWidth (Int_t nSignals=5, Double_t minPeakAmplitude=0)
 
Int_t GetLowestWidth (Double_t minPeakAmplitude=0)
 
TRestRawSignalGetMaxSignal ()
 
Double_t GetMaxTime ()
 
Double_t GetMaxValue ()
 
Double_t GetMinTime ()
 
Double_t GetMinValue ()
 
Int_t GetNumberOfSignals () const
 
TRestRawReadoutMetadataGetReadoutMetadata () const
 
Double_t GetRiseSlope ()
 
Double_t GetRiseTime ()
 
TRestRawSignalGetSignal (Int_t n)
 
TRestRawSignalGetSignalById (Int_t sid)
 
TRestRawSignalEvent GetSignalEventForType (const std::string &type) const
 
TRestRawSignalEvent GetSignalEventForTypes (const std::set< std::string > &types, const TRestRawReadoutMetadata *readoutMetadata=nullptr) const
 
std::vector< int > GetSignalIds ()
 
Int_t GetSignalIndex (Int_t signalID)
 
std::vector< TRestRawSignalGetSignals () const
 
Double_t GetSlopeIntegral ()
 
Double_t GetThresholdIntegral ()
 
Double_t GetTripleMaxIntegral ()
 
void Initialize ()
 
Bool_t isBaseLineInitialized ()
 
void PrintEvent ()
 
void PrintSignalIds ()
 
void RemoveSignalWithId (Int_t sId)
 
void SetAuxiliar (Double_t aux)
 
void SetBaseLineRange (Int_t from, Int_t to, std::string option="")
 
void SetBaseLineRange (TVector2 blRange, std::string option="")
 
void SetRange (Int_t from, Int_t to)
 
void SetRange (TVector2 range)
 
void SetTailPoints (Int_t p)
 
Bool_t signalIDExists (Int_t sID)
 
- Public Member Functions inherited from TRestEvent
virtual void CloneTo (TRestEvent *target)
 Clone the content of this TRestEvent object to another. More...
 
virtual TPad * DrawEvent (const TString &option="")
 Draw the event. More...
 
Int_t GetID () const
 
Int_t GetRunOrigin () const
 
TString GetSubEventTag () const
 
Int_t GetSubID () const
 
Int_t GetSubRunOrigin () const
 
Double_t GetTime () const
 
TTimeStamp GetTimeStamp () const
 
virtual void Initialize ()=0
 
virtual void InitializeReferences (TRestRun *run)
 Initialize dynamical references when loading the event from a root file. More...
 
virtual void InitializeWithMetadata (TRestRun *run)
 
Bool_t isOk () const
 
virtual void PrintEvent () const
 
void SetEventInfo (TRestEvent *eve)
 
void SetID (Int_t id)
 
void SetOK (Bool_t state)
 
void SetRunOrigin (Int_t run_origin)
 
void SetState (Bool_t state)
 
void SetSubEventTag (const TString &tag)
 
void SetSubID (Int_t id)
 
void SetSubRunOrigin (Int_t sub_run_origin)
 
void SetTime (Double_t seconds, Double_t nanoseconds)
 
void SetTime (Double_t time)
 
void SetTimeStamp (const TTimeStamp &time)
 
 TRestEvent ()
 
virtual ~TRestEvent ()
 

Protected Attributes

Double_t fAuxiliar = 0
 
TVector2 fBaseLineRange = TVector2(-1, -1)
 
Double_t fMaxTime
 
Double_t fMaxValue
 
Double_t fMinTime
 
Double_t fMinValue
 
TVector2 fRange = TVector2(-1, -1)
 
std::vector< TRestRawSignalfSignal
 
TGraph * gr
 
- Protected Attributes inherited from TRestEvent
Int_t fEventID
 Event identification number. More...
 
TTimeStamp fEventTime
 Absolute event time. More...
 
Bool_t fOk
 Flag to be used by processes to define an event status. fOk=true is the default. More...
 
TPad * fPad
 
TRestRunfRun = nullptr
 
Int_t fRunOrigin
 Run ID number of the event. More...
 
Int_t fSubEventID
 Sub-Event identification number. More...
 
TString fSubEventTag
 A short length label to identify the sub-Event. More...
 
Int_t fSubRunOrigin
 Sub-run ID number of the event. More...
 

Private Member Functions

void SetMaxAndMin ()
 

Additional Inherited Members

- Protected Member Functions inherited from TRestEvent
void RestartPad (Int_t nElements)
 

Constructor & Destructor Documentation

◆ TRestRawSignalEvent()

TRestRawSignalEvent::TRestRawSignalEvent ( )

Definition at line 74 of file TRestRawSignalEvent.cxx.

◆ ~TRestRawSignalEvent()

TRestRawSignalEvent::~TRestRawSignalEvent ( )
virtual

Definition at line 79 of file TRestRawSignalEvent.cxx.

Member Function Documentation

◆ AddChargeToSignal()

void TRestRawSignalEvent::AddChargeToSignal ( Int_t  signalID,
Int_t  bin,
Short_t  value 
)

Perhaps we should not subtract baselines on a TRestRawSignal. Just consider it in the observables calculation if a baseline range is provided in the argument (as it is done in InitializeThresholdIntegral). This method should be probably removed.

Definition at line 289 of file TRestRawSignalEvent.cxx.

◆ AddSignal()

void TRestRawSignalEvent::AddSignal ( TRestRawSignal s)

Definition at line 95 of file TRestRawSignalEvent.cxx.

◆ DrawEvent()

TPad * TRestRawSignalEvent::DrawEvent ( const TString &  option = "")
virtual

This method draws current raw signal event in a TPad.

This method receives an optional argument as string that allows to control which signals will be plotted. Different options can be passed to the string by separated the options using colons, as "option1:option2:option3".

The following options are allowed:

  1. from-to: It imposes that only the signal entries on the specified range will be plotted.
  2. ids[startId,endId] or signalRangeID[startId,endId]: It imposes that the signal ids drawn are inside the given range. Giving the range using - symbol (as in previous option) is also allowed. I.e. ids[10-20].
  1. onlyGoodSignals[pointTh,signalTh,nOver]: It imposes that only signals where points were identified over the threshold will be plotted. The parameters provided are the parameters given to the method TRestRawSignal::InitializePointsOverThreshold.
    Warning
    When using this option baseLineRange option must also be defined.
  2. baseLineRange[start,end]: It defines the bin range (start,end) where the baseline will be calculated.
  3. printIDs: Prints by screen the ID of plotted signals.

If no option is given, all signals will be plotted.

Example 1:

DrawEvent("0-10:onlyGoodSignals[3.5,1.5,7]:baseLineRange[20,150]:printIDs");
TPad * DrawEvent(const TString &option="")
This method draws current raw signal event in a TPad.

Example 2:

DrawEvent("signalRangeID[800,900]:onlyGoodSignals[3.5,1.5,7]:baseLineRange[20,150]");

Example 3:

DrawEvent("ids[800,900]:printIDs");

Reimplemented from TRestEvent.

Definition at line 413 of file TRestRawSignalEvent.cxx.

◆ DrawSignal()

TPad * TRestRawSignalEvent::DrawSignal ( Int_t  signalID,
const TString &  option = "" 
)

This method draws selected signalID by ID, with baseline range and points over threshold highlighted.

In order to compute points over threshold the following parameters should be provided:

goodSignals[pointTh,signalTh,nOver]: These parameters are the ones needed to call the method TRestRawSignal::InitializePointsOverThreshold.

Warning
When using this option baseLineRange option must also be defined.

baseLineRange[start,end]: It defines the bin range (start,end) where the baseline will be calculated.

Example 1:

DrawEvent(100,"goodSignals[3.5,1.5,7]:baseLineRange[20,150]");

Definition at line 692 of file TRestRawSignalEvent.cxx.

◆ DrawSignals()

void TRestRawSignalEvent::DrawSignals ( TPad *  pad,
const std::vector< Int_t > &  signals 
)

This method draws selected signal IDs, given by the vector passed as reference.

Definition at line 620 of file TRestRawSignalEvent.cxx.

◆ GetAuxiliar()

auto TRestRawSignalEvent::GetAuxiliar ( )
inline

Definition at line 78 of file TRestRawSignalEvent.h.

◆ GetAverageWidth()

Double_t TRestRawSignalEvent::GetAverageWidth ( Double_t  minPeakAmplitude = 0)

Definition at line 232 of file TRestRawSignalEvent.cxx.

◆ GetBaseLineAverage()

Double_t TRestRawSignalEvent::GetBaseLineAverage ( )

Definition at line 208 of file TRestRawSignalEvent.cxx.

◆ GetBaseLineSigmaAverage()

Double_t TRestRawSignalEvent::GetBaseLineSigmaAverage ( )

Definition at line 268 of file TRestRawSignalEvent.cxx.

◆ GetIntegral()

Double_t TRestRawSignalEvent::GetIntegral ( )

Definition at line 126 of file TRestRawSignalEvent.cxx.

◆ GetLowAverageWidth()

Double_t TRestRawSignalEvent::GetLowAverageWidth ( Int_t  nSignals = 5,
Double_t  minPeakAmplitude = 0 
)

Definition at line 248 of file TRestRawSignalEvent.cxx.

◆ GetLowestWidth()

Int_t TRestRawSignalEvent::GetLowestWidth ( Double_t  minPeakAmplitude = 0)

Definition at line 219 of file TRestRawSignalEvent.cxx.

◆ GetMaxSignal()

TRestRawSignal * TRestRawSignalEvent::GetMaxSignal ( )

Definition at line 142 of file TRestRawSignalEvent.cxx.

◆ GetMaxTime()

Double_t TRestRawSignalEvent::GetMaxTime ( )

Definition at line 349 of file TRestRawSignalEvent.cxx.

◆ GetMaxValue()

Double_t TRestRawSignalEvent::GetMaxValue ( )

Definition at line 337 of file TRestRawSignalEvent.cxx.

◆ GetMinTime()

Double_t TRestRawSignalEvent::GetMinTime ( )

Definition at line 347 of file TRestRawSignalEvent.cxx.

◆ GetMinValue()

Double_t TRestRawSignalEvent::GetMinValue ( )

Definition at line 342 of file TRestRawSignalEvent.cxx.

◆ GetNumberOfSignals()

Int_t TRestRawSignalEvent::GetNumberOfSignals ( ) const
inline

Definition at line 101 of file TRestRawSignalEvent.h.

◆ GetReadoutMetadata()

TRestRawReadoutMetadata * TRestRawSignalEvent::GetReadoutMetadata ( ) const

Definition at line 805 of file TRestRawSignalEvent.cxx.

◆ GetRiseSlope()

Double_t TRestRawSignalEvent::GetRiseSlope ( )

Definition at line 167 of file TRestRawSignalEvent.cxx.

◆ GetRiseTime()

Double_t TRestRawSignalEvent::GetRiseTime ( )

Definition at line 183 of file TRestRawSignalEvent.cxx.

◆ GetSignal()

TRestRawSignal * TRestRawSignalEvent::GetSignal ( Int_t  n)
inline

Definition at line 102 of file TRestRawSignalEvent.h.

◆ GetSignalById()

TRestRawSignal * TRestRawSignalEvent::GetSignalById ( Int_t  sid)
inline

Definition at line 125 of file TRestRawSignalEvent.h.

◆ GetSignalEventForType()

TRestRawSignalEvent TRestRawSignalEvent::GetSignalEventForType ( const std::string &  type) const

Definition at line 813 of file TRestRawSignalEvent.cxx.

◆ GetSignalEventForTypes()

TRestRawSignalEvent TRestRawSignalEvent::GetSignalEventForTypes ( const std::set< std::string > &  types,
const TRestRawReadoutMetadata readoutMetadata = nullptr 
) const

Definition at line 817 of file TRestRawSignalEvent.cxx.

◆ GetSignalIds()

std::vector< int > TRestRawSignalEvent::GetSignalIds ( )
inline

Definition at line 112 of file TRestRawSignalEvent.h.

◆ GetSignalIndex()

Int_t TRestRawSignalEvent::GetSignalIndex ( Int_t  signalID)

Definition at line 120 of file TRestRawSignalEvent.cxx.

◆ GetSignals()

std::vector< TRestRawSignal > TRestRawSignalEvent::GetSignals ( ) const
inline

Definition at line 63 of file TRestRawSignalEvent.h.

◆ GetSlopeIntegral()

Double_t TRestRawSignalEvent::GetSlopeIntegral ( )

Definition at line 159 of file TRestRawSignalEvent.cxx.

◆ GetThresholdIntegral()

Double_t TRestRawSignalEvent::GetThresholdIntegral ( )

The result if this method depends on InitializePointsOverThreshold. Arguments are given there.

Definition at line 136 of file TRestRawSignalEvent.cxx.

◆ GetTripleMaxIntegral()

Double_t TRestRawSignalEvent::GetTripleMaxIntegral ( )

Definition at line 199 of file TRestRawSignalEvent.cxx.

◆ Initialize()

void TRestRawSignalEvent::Initialize ( )
virtual

Run to initialize event data. To be re-implemented in derived class, you may want to call the base class at the end of the re-implemented, by calling TRestEvent::Initialize();

Implements TRestEvent.

Definition at line 83 of file TRestRawSignalEvent.cxx.

◆ isBaseLineInitialized()

Bool_t TRestRawSignalEvent::isBaseLineInitialized ( )
inline

Definition at line 118 of file TRestRawSignalEvent.h.

◆ PrintEvent()

void TRestRawSignalEvent::PrintEvent ( )

Definition at line 302 of file TRestRawSignalEvent.cxx.

◆ PrintSignalIds()

void TRestRawSignalEvent::PrintSignalIds ( )
inline

Definition at line 104 of file TRestRawSignalEvent.h.

◆ RemoveSignalWithId()

void TRestRawSignalEvent::RemoveSignalWithId ( Int_t  sId)

Definition at line 108 of file TRestRawSignalEvent.cxx.

◆ SetAuxiliar()

void TRestRawSignalEvent::SetAuxiliar ( Double_t  aux)

Definition at line 359 of file TRestRawSignalEvent.cxx.

◆ SetBaseLineRange() [1/2]

void TRestRawSignalEvent::SetBaseLineRange ( Int_t  from,
Int_t  to,
std::string  option = "" 
)
inline

It sets the range to be used for the baseline calculation and calls TRestRawSignal::CalculateBaseLine()

Definition at line 88 of file TRestRawSignalEvent.h.

◆ SetBaseLineRange() [2/2]

void TRestRawSignalEvent::SetBaseLineRange ( TVector2  blRange,
std::string  option = "" 
)
inline

It sets the range to be used for the baseline calculation and calls TRestRawSignal::CalculateBaseLine()

Definition at line 82 of file TRestRawSignalEvent.h.

◆ SetMaxAndMin()

void TRestRawSignalEvent::SetMaxAndMin ( )
private

Definition at line 317 of file TRestRawSignalEvent.cxx.

◆ SetRange() [1/2]

void TRestRawSignalEvent::SetRange ( Int_t  from,
Int_t  to 
)
inline

Definition at line 95 of file TRestRawSignalEvent.h.

◆ SetRange() [2/2]

void TRestRawSignalEvent::SetRange ( TVector2  range)
inline

Definition at line 93 of file TRestRawSignalEvent.h.

◆ SetTailPoints()

void TRestRawSignalEvent::SetTailPoints ( Int_t  p)
inline

Definition at line 72 of file TRestRawSignalEvent.h.

◆ signalIDExists()

Bool_t TRestRawSignalEvent::signalIDExists ( Int_t  sID)
inline

Definition at line 58 of file TRestRawSignalEvent.h.

Field Documentation

◆ fAuxiliar

Double_t TRestRawSignalEvent::fAuxiliar = 0
protected

Definition at line 47 of file TRestRawSignalEvent.h.

◆ fBaseLineRange

TVector2 TRestRawSignalEvent::fBaseLineRange = TVector2(-1, -1)
protected

Definition at line 49 of file TRestRawSignalEvent.h.

◆ fMaxTime

Double_t TRestRawSignalEvent::fMaxTime
protected

Definition at line 44 of file TRestRawSignalEvent.h.

◆ fMaxValue

Double_t TRestRawSignalEvent::fMaxValue
protected

Definition at line 46 of file TRestRawSignalEvent.h.

◆ fMinTime

Double_t TRestRawSignalEvent::fMinTime
protected

Definition at line 43 of file TRestRawSignalEvent.h.

◆ fMinValue

Double_t TRestRawSignalEvent::fMinValue
protected

Definition at line 45 of file TRestRawSignalEvent.h.

◆ fRange

TVector2 TRestRawSignalEvent::fRange = TVector2(-1, -1)
protected

Definition at line 50 of file TRestRawSignalEvent.h.

◆ fSignal

std::vector<TRestRawSignal> TRestRawSignalEvent::fSignal
protected

Definition at line 52 of file TRestRawSignalEvent.h.

◆ gr

TGraph* TRestRawSignalEvent::gr
protected

Definition at line 42 of file TRestRawSignalEvent.h.


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