PandaRoot
PndEmcWaveform Class Reference

represents a simulated waveform in an emc crystal More...

#include <PndEmcWaveform.h>

Inheritance diagram for PndEmcWaveform:
PndEmcMultiWaveform

Public Member Functions

 PndEmcWaveform ()
 
 PndEmcWaveform (int trackId, long detId, const std::vector< Double_t > &signal, Int_t hitIndex=-1)
 
 PndEmcWaveform (long detId, const std::vector< Double_t > &signal, const FairMultiLinkedData &links)
 
 PndEmcWaveform (Int_t trackId, Long_t detId, Double_t sampleRate, Long_t waveform_length=64, Int_t hitIndex=-1, Double_t time=0.)
 
virtual ~PndEmcWaveform ()
 
long GetDetectorId () const
 
int GetTrackId () const
 
Short_t GetModule () const
 
PndEmcTwoCoordIndexGetTCI () const
 
virtual std::vector< double > GetSignal () const
 
virtual std::vector< Double_t > GetSignalError () const
 
Int_t GetHitIndex () const
 
virtual bool operator== (const PndEmcWaveform &otherWave) const
 
virtual bool operator< (const PndEmcWaveform &otherWave) const
 
virtual bool operator!= (const PndEmcWaveform &otherWave) const
 
virtual bool equal (FairTimeStamp *data)
 
PndEmcWaveformoperator+= (const PndEmcWaveform &otherWave)
 
Double_t GetSampleRate () const
 
Double_t GetScale (Double_t sampleRate, PndEmcAbsPulseshape *pulseshape) const
 
Double_t GetNormalisation (Double_t sampleRate, PndEmcAbsPulseshape *pulseshape) const
 
Int_t GetWaveformLength () const
 
void SetSampleRate (Double_t rate)
 
void UpdateWaveform (PndEmcHit *hit, Double_t pePerMeV, Bool_t usePhotonStatistic, Double_t excessNoiseFactor, Double_t firstADCBinTime, Double_t sampleRate, PndEmcAbsPulseshape *pulseshape, Double_t=0)
 
void MakeWaveform (Double_t energy, Double_t time, Double_t pePerMeV, Bool_t usePhotonStatistic, Double_t excessNoiseFactor, Double_t firstADCBinTime, Double_t sampleRate, PndEmcAbsPulseshape *pulseshape, Double_t=0)
 
void AddElecNoise (Double_t)
 
void Digitise (Double_t)
 
void AddElecNoiseAndDigitise (Double_t, Double_t, Double_t=0)
 
void AddShapedElecNoiseAndDigitise (Double_t noise_width, Double_t oneBitResolution, PndEmcAbsPulseshape *pulseshape, Double_t firstADCBinTime, Double_t sampleRate, Double_t=0)
 
void SetWaveform (std::vector< Double_t > &signal, Int_t length)
 
Double_t Max ()
 
virtual void clearAndReset ()
 
virtual void Clear (Option_t *)
 
Double_t GetActiveTime () const
 
Int_t GetPileupCount () const
 
void AddEvt (Int_t evtNo)
 
const std::vector< Int_t > & GetEvtList () const
 
TGraphErrors * ToTGraph () const
 
Double_t GetBaseline () const
 
Double_t Integral () const
 

Protected Attributes

Int_t fTrackId
 
Int_t fDetectorId
 
Int_t fWaveformLength
 
std::vector< Double_t > fSignal
 
std::vector< Double_t > fSignalError
 
Int_t fHitIndex
 
Double_t fSampleRate
 
Double_t fBaselineValue
 
std::vector< Int_t > fEvt
 

Static Protected Attributes

static Double_t BarrelOverlapTime
 
static Double_t ForwardOverlapTime
 
static Double_t ShashylikOverlapTime
 

Friends

class PndEmcAbsWaveformModifier
 

Detailed Description

represents a simulated waveform in an emc crystal

Definition at line 56 of file PndEmcWaveform.h.

Constructor & Destructor Documentation

◆ PndEmcWaveform() [1/4]

PndEmcWaveform::PndEmcWaveform ( )

◆ PndEmcWaveform() [2/4]

PndEmcWaveform::PndEmcWaveform ( int  trackId,
long  detId,
const std::vector< Double_t > &  signal,
Int_t  hitIndex = -1 
)

◆ PndEmcWaveform() [3/4]

PndEmcWaveform::PndEmcWaveform ( long  detId,
const std::vector< Double_t > &  signal,
const FairMultiLinkedData &  links 
)

◆ PndEmcWaveform() [4/4]

PndEmcWaveform::PndEmcWaveform ( Int_t  trackId,
Long_t  detId,
Double_t  sampleRate,
Long_t  waveform_length = 64,
Int_t  hitIndex = -1,
Double_t  time = 0. 
)

◆ ~PndEmcWaveform()

virtual PndEmcWaveform::~PndEmcWaveform ( )
virtual

Member Function Documentation

◆ AddElecNoise()

void PndEmcWaveform::AddElecNoise ( Double_t  )

Referenced by SetSampleRate().

◆ AddElecNoiseAndDigitise()

void PndEmcWaveform::AddElecNoiseAndDigitise ( Double_t  ,
Double_t  ,
Double_t  = 0 
)

Referenced by SetSampleRate().

◆ AddEvt()

void PndEmcWaveform::AddEvt ( Int_t  evtNo)
inline

Definition at line 135 of file PndEmcWaveform.h.

References fEvt.

135 { fEvt.push_back(evtNo);}
std::vector< Int_t > fEvt

◆ AddShapedElecNoiseAndDigitise()

void PndEmcWaveform::AddShapedElecNoiseAndDigitise ( Double_t  noise_width,
Double_t  oneBitResolution,
PndEmcAbsPulseshape pulseshape,
Double_t  firstADCBinTime,
Double_t  sampleRate,
Double_t  = 0 
)

Referenced by SetSampleRate().

◆ Clear()

virtual void PndEmcWaveform::Clear ( Option_t *  )
inlinevirtual

Reimplemented in PndEmcMultiWaveform.

Definition at line 130 of file PndEmcWaveform.h.

References fSignal.

130 {fSignal.clear();};
std::vector< Double_t > fSignal

◆ clearAndReset()

virtual void PndEmcWaveform::clearAndReset ( )
virtual

Reimplemented in PndEmcMultiWaveform.

Referenced by SetSampleRate().

◆ Digitise()

void PndEmcWaveform::Digitise ( Double_t  )

Referenced by SetSampleRate().

◆ equal()

virtual bool PndEmcWaveform::equal ( FairTimeStamp *  data)
virtual

Referenced by GetHitIndex().

◆ GetActiveTime()

Double_t PndEmcWaveform::GetActiveTime ( ) const
inline

Definition at line 132 of file PndEmcWaveform.h.

References fSampleRate, and fWaveformLength.

132 { return GetTimeStamp() + (fWaveformLength-1)/fSampleRate*1.0e9; }//nano seconds
Double_t fSampleRate

◆ GetBaseline()

Double_t PndEmcWaveform::GetBaseline ( ) const
inline

Definition at line 140 of file PndEmcWaveform.h.

References fBaselineValue, and Integral().

140 { return fBaselineValue;}
Double_t fBaselineValue

◆ GetDetectorId()

long PndEmcWaveform::GetDetectorId ( ) const
inline

Definition at line 81 of file PndEmcWaveform.h.

References fDetectorId.

81 {return fDetectorId;}

◆ GetEvtList()

const std::vector<Int_t>& PndEmcWaveform::GetEvtList ( ) const
inline

Definition at line 136 of file PndEmcWaveform.h.

References fEvt, and ToTGraph().

136 { return fEvt; }
std::vector< Int_t > fEvt

◆ GetHitIndex()

Int_t PndEmcWaveform::GetHitIndex ( ) const
inline

Definition at line 88 of file PndEmcWaveform.h.

References equal(), fHitIndex, operator!=(), operator+=(), operator<(), and operator==().

88 {return fHitIndex;}

◆ GetModule()

Short_t PndEmcWaveform::GetModule ( ) const
inline

Definition at line 83 of file PndEmcWaveform.h.

References fDetectorId, and GetTCI().

83 { return (fDetectorId/100000000);};

◆ GetNormalisation()

Double_t PndEmcWaveform::GetNormalisation ( Double_t  sampleRate,
PndEmcAbsPulseshape pulseshape 
) const

Referenced by GetSampleRate().

◆ GetPileupCount()

Int_t PndEmcWaveform::GetPileupCount ( ) const
inline

Definition at line 133 of file PndEmcWaveform.h.

References fEvt.

133 {return fEvt.size() - 1; }
std::vector< Int_t > fEvt

◆ GetSampleRate()

Double_t PndEmcWaveform::GetSampleRate ( ) const
inline

Definition at line 100 of file PndEmcWaveform.h.

References fSampleRate, GetNormalisation(), and GetScale().

100 {/*cout<<" GetTimeStamp() "<<GetTimeStamp()<<endl;*/return fSampleRate; } //in s^(-1)
Double_t fSampleRate

◆ GetScale()

Double_t PndEmcWaveform::GetScale ( Double_t  sampleRate,
PndEmcAbsPulseshape pulseshape 
) const

Referenced by GetSampleRate().

◆ GetSignal()

virtual std::vector<double> PndEmcWaveform::GetSignal ( ) const
inlinevirtual

Reimplemented in PndEmcMultiWaveform.

Definition at line 85 of file PndEmcWaveform.h.

References fSignal.

85 { return fSignal ;};
std::vector< Double_t > fSignal

◆ GetSignalError()

virtual std::vector<Double_t> PndEmcWaveform::GetSignalError ( ) const
inlinevirtual

Definition at line 86 of file PndEmcWaveform.h.

References fSignalError.

86 { return fSignalError; }
std::vector< Double_t > fSignalError

◆ GetTCI()

PndEmcTwoCoordIndex* PndEmcWaveform::GetTCI ( ) const

Referenced by GetModule().

◆ GetTrackId()

int PndEmcWaveform::GetTrackId ( ) const
inline

Definition at line 82 of file PndEmcWaveform.h.

References fTrackId.

82 {return fTrackId;}

◆ GetWaveformLength()

Int_t PndEmcWaveform::GetWaveformLength ( ) const
inline

Definition at line 103 of file PndEmcWaveform.h.

References fWaveformLength.

103 {return fWaveformLength;}

◆ Integral()

Double_t PndEmcWaveform::Integral ( ) const

Referenced by GetBaseline().

◆ MakeWaveform()

void PndEmcWaveform::MakeWaveform ( Double_t  energy,
Double_t  time,
Double_t  pePerMeV,
Bool_t  usePhotonStatistic,
Double_t  excessNoiseFactor,
Double_t  firstADCBinTime,
Double_t  sampleRate,
PndEmcAbsPulseshape pulseshape,
Double_t  = 0 
)

Referenced by SetSampleRate().

◆ Max()

Double_t PndEmcWaveform::Max ( )

Referenced by SetSampleRate().

◆ operator!=()

virtual bool PndEmcWaveform::operator!= ( const PndEmcWaveform otherWave) const
virtual

Referenced by GetHitIndex().

◆ operator+=()

PndEmcWaveform& PndEmcWaveform::operator+= ( const PndEmcWaveform otherWave)

Referenced by GetHitIndex().

◆ operator<()

virtual bool PndEmcWaveform::operator< ( const PndEmcWaveform otherWave) const
virtual

Referenced by GetHitIndex().

◆ operator==()

virtual bool PndEmcWaveform::operator== ( const PndEmcWaveform otherWave) const
virtual

Referenced by GetHitIndex().

◆ SetSampleRate()

void PndEmcWaveform::SetSampleRate ( Double_t  rate)
inline

Definition at line 111 of file PndEmcWaveform.h.

References AddElecNoise(), AddElecNoiseAndDigitise(), AddShapedElecNoiseAndDigitise(), clearAndReset(), Digitise(), fSampleRate, MakeWaveform(), Max(), SetWaveform(), and UpdateWaveform().

111 {/*cout<<" GetTimeStamp() "<<GetTimeStamp()<<endl;*/fSampleRate = rate;}; //in s^(-1)
Double_t fSampleRate

◆ SetWaveform()

void PndEmcWaveform::SetWaveform ( std::vector< Double_t > &  signal,
Int_t  length 
)

Referenced by SetSampleRate().

◆ ToTGraph()

TGraphErrors* PndEmcWaveform::ToTGraph ( ) const

Referenced by GetEvtList().

◆ UpdateWaveform()

void PndEmcWaveform::UpdateWaveform ( PndEmcHit hit,
Double_t  pePerMeV,
Bool_t  usePhotonStatistic,
Double_t  excessNoiseFactor,
Double_t  firstADCBinTime,
Double_t  sampleRate,
PndEmcAbsPulseshape pulseshape,
Double_t  = 0 
)

Referenced by SetSampleRate().

Friends And Related Function Documentation

◆ PndEmcAbsWaveformModifier

friend class PndEmcAbsWaveformModifier
friend

Definition at line 59 of file PndEmcWaveform.h.

Member Data Documentation

◆ BarrelOverlapTime

Double_t PndEmcWaveform::BarrelOverlapTime
staticprotected

Definition at line 157 of file PndEmcWaveform.h.

◆ fBaselineValue

Double_t PndEmcWaveform::fBaselineValue
protected

Definition at line 152 of file PndEmcWaveform.h.

Referenced by GetBaseline().

◆ fDetectorId

Int_t PndEmcWaveform::fDetectorId
protected

Definition at line 145 of file PndEmcWaveform.h.

Referenced by GetDetectorId(), and GetModule().

◆ fEvt

std::vector<Int_t> PndEmcWaveform::fEvt
protected

Definition at line 154 of file PndEmcWaveform.h.

Referenced by AddEvt(), GetEvtList(), and GetPileupCount().

◆ fHitIndex

Int_t PndEmcWaveform::fHitIndex
protected

Definition at line 149 of file PndEmcWaveform.h.

Referenced by GetHitIndex().

◆ ForwardOverlapTime

Double_t PndEmcWaveform::ForwardOverlapTime
staticprotected

Definition at line 158 of file PndEmcWaveform.h.

◆ fSampleRate

Double_t PndEmcWaveform::fSampleRate
protected

Definition at line 151 of file PndEmcWaveform.h.

Referenced by GetActiveTime(), GetSampleRate(), and SetSampleRate().

◆ fSignal

std::vector<Double_t> PndEmcWaveform::fSignal
protected

◆ fSignalError

std::vector<Double_t> PndEmcWaveform::fSignalError
protected

Definition at line 148 of file PndEmcWaveform.h.

Referenced by GetSignalError().

◆ fTrackId

Int_t PndEmcWaveform::fTrackId
protected

Definition at line 144 of file PndEmcWaveform.h.

Referenced by GetTrackId().

◆ fWaveformLength

Int_t PndEmcWaveform::fWaveformLength
protected

Definition at line 146 of file PndEmcWaveform.h.

Referenced by GetActiveTime(), and GetWaveformLength().

◆ ShashylikOverlapTime

Double_t PndEmcWaveform::ShashylikOverlapTime
staticprotected

Definition at line 159 of file PndEmcWaveform.h.


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