FairRoot/PandaRoot
|
Simulator to create PndEmcMultiWaveform. More...
#include <PndEmcMultiWaveformSimulator.h>
Public Member Functions | |
PndEmcMultiWaveformSimulator () | |
PndEmcMultiWaveformSimulator (Double_t sampleRate, PndEmcAbsPulseshape *pulseshape, Int_t wfMultiplicity) | |
virtual void | AddModifier (PndEmcAbsWaveformModifier *wfModifier, Int_t wfIndex) |
Add a modifier (PndEmcAbsWaveformModifier) More... | |
virtual Double_t | GetTotalScale (Int_t wfIndex) |
Return scale after all modifiers. More... | |
virtual void | Init (Double_t samplingBeforeFirstPulse, Double_t samplingAfterLastPulse, Double_t cutoff, Double_t activeTimeIncrement) |
Init the simulator. More... | |
virtual void | GetAbsoluteTimeInterval (PndEmcWaveformData *wfData, Double_t &startTime, Double_t &activeTime) |
Get time interval for which the signal is above the cutoff. More... | |
virtual Double_t | GetTimeBeforeFirstHit (PndEmcWaveformData *) |
virtual Double_t | GetScale () |
virtual PndEmcWaveform * | Get1GevWaveform () |
virtual Double_t | GetPulseRiseTime () |
virtual PndEmcWaveform * | Simulate (PndEmcWaveformData *wfData, TClonesArray *arrayToStore=NULL) |
virtual PndEmcWaveform * | SimulateSinglePulse (Double_t hitEnergy, Double_t hitTime, TClonesArray *arrayToStore=NULL, Int_t detId=-1, Int_t trackId=-1, Int_t hitIndex=-1) |
virtual Double_t | GetTotalScale () |
virtual Double_t | GetSampleRate () |
virtual void | AddModifier (PndEmcAbsWaveformModifier *wfModifier) |
Protected Member Functions | |
virtual PndEmcWaveform * | CallModifiers (PndEmcWaveform *wf) |
Call modifiers on waveform wf . More... | |
virtual PndEmcWaveform * | MakeWaveform (PndEmcWaveformData *wfData, TClonesArray *arrayToStore=NULL) |
Create PndEmcWaveform. More... | |
virtual PndEmcWaveform * | MakeSingleWaveform (Double_t hitEnergy, Double_t hitTime, TClonesArray *arrayToStore=NULL, Int_t detId=-1, Int_t trackId=-1, Int_t hitIndex=-1) |
Create a PndEmcWaveform from the given parameters of a single hit. More... | |
virtual Double_t | CalcWaveForTime (Double_t absoluteTime, PndEmcWaveformData *wfData) |
Calculate pulse value at given time. More... | |
Double_t | CalcSingleWaveForTime (Double_t absoluteTime, Double_t energy, Double_t pulseTime) |
Return pulse at given time and for given energy. More... | |
ClassDef (PndEmcAbsWaveformSimulator, 3) | |
void | SyncWithADCClock (Double_t &time) |
Protected Attributes | |
TList | fListOfWaveformModifiers |
Double_t | fSampleRate |
sampling rate of SADC. In 1/ns More... | |
Private Member Functions | |
PndEmcMultiWaveform * | MultiplyWaveform (const PndEmcWaveform *singleWaveform, TClonesArray *arrayToStore) |
Creates a PndEmcMultiWaveform from a PndEmcWaveform. More... | |
Private Attributes | |
Int_t | fWfMultiplicity |
std::vector< Int_t > | fIndexList |
Simulator to create PndEmcMultiWaveform.
Definition at line 17 of file PndEmcMultiWaveformSimulator.h.
PndEmcMultiWaveformSimulator::PndEmcMultiWaveformSimulator | ( | ) |
Definition at line 14 of file PndEmcMultiWaveformSimulator.cxx.
PndEmcMultiWaveformSimulator::PndEmcMultiWaveformSimulator | ( | Double_t | sampleRate, |
PndEmcAbsPulseshape * | pulseshape, | ||
Int_t | wfMultiplicity | ||
) |
Definition at line 18 of file PndEmcMultiWaveformSimulator.cxx.
|
virtual |
Add a modifier (PndEmcAbsWaveformModifier)
wfIndex characterizes wf, the modifier will apllied on* If the modifier itself will work on the multiwaveform itself, pass a -1. In this case, the Modifier is considered to scale all waveforms equally.
pass wfIndex Modifier shall work on as second parameter
wfModifier | |
wfIndex |
Definition at line 52 of file PndEmcMultiWaveformSimulator.cxx.
References PndEmcAbsWaveformSimulator::AddModifier(), and fIndexList.
Referenced by PndEmcFWEndcapTimebasedWaveforms::Init().
|
inlinevirtualinherited |
Definition at line 68 of file PndEmcAbsWaveformSimulator.h.
References PndEmcAbsWaveformSimulator::fListOfWaveformModifiers.
Referenced by AddModifier().
|
protectedinherited |
Return pulse at given time and for given energy.
Time in the pulse is absoluteTime-
absoluteTime Time for which to calculate value. pulseTime
energy | Energy of the pulse. |
pulseTime | Time when the pulse starts. |
Definition at line 152 of file PndEmcFullStackedWaveformSimulator.cxx.
References PndEmcFullStackedWaveformSimulator::fPulseshape, and PndEmcAbsPulseshape::value().
Referenced by PndEmcFullStackedWaveformSimulator::CalcWaveForTime(), PndEmcFullStackedWaveformSimulator::Init(), and PndEmcFullStackedWaveformSimulator::MakeSingleWaveform().
|
protectedvirtualinherited |
Calculate pulse value at given time.
absoluteTime | Time for which to calculate value. |
wfData | Waveform including the hit map. |
Definition at line 164 of file PndEmcFullStackedWaveformSimulator.cxx.
References PndEmcFullStackedWaveformSimulator::CalcSingleWaveForTime(), Double_t, energy, and PndEmcWaveformData::GetHitMap().
Referenced by PndEmcFullStackedWaveformSimulator::GetAbsoluteTimeInterval(), and PndEmcFullStackedWaveformSimulator::MakeWaveform().
|
protectedvirtual |
Call modifiers on waveform wf
.
wf | waveform |
wf
Reimplemented from PndEmcAbsWaveformSimulator.
Definition at line 64 of file PndEmcMultiWaveformSimulator.cxx.
References count, fIndexList, PndEmcAbsWaveformSimulator::fListOfWaveformModifiers, and PndEmcMultiWaveform::SetActiveWaveform().
|
protectedinherited |
|
inlinevirtualinherited |
returns 1GeV equivalent waveform
might be used for calibration etc.
Implements PndEmcAbsWaveformSimulator.
Definition at line 35 of file PndEmcFullStackedWaveformSimulator.h.
References PndEmcFullStackedWaveformSimulator::f1GeVWaveform.
|
virtualinherited |
Get time interval for which the signal is above the cutoff.
wfData | Waveform | |
[out] | startTime | Start time of waveform (adjusted by fSamplingBeforeFirstPulse) |
[out] | activeTime | Active time of waveform(s) |
Implements PndEmcAbsWaveformSimulator.
Definition at line 126 of file PndEmcFullStackedWaveformSimulator.cxx.
References CAMath::Abs(), PndEmcFullStackedWaveformSimulator::CalcWaveForTime(), PndEmcFullStackedWaveformSimulator::fActiveTimeIncrement, PndEmcFullStackedWaveformSimulator::fCutoff, PndEmcFullStackedWaveformSimulator::fPulseRiseTime, PndEmcFullStackedWaveformSimulator::fSamplingAfterLastPulse, PndEmcFullStackedWaveformSimulator::fSamplingBeforeFirstPulse, PndEmcFullStackedWaveformSimulator::fScale, PndEmcWaveformData::GetHitMap(), and PndEmcAbsWaveformSimulator::SyncWithADCClock().
|
inlinevirtualinherited |
Definition at line 37 of file PndEmcFullStackedWaveformSimulator.h.
References PndEmcFullStackedWaveformSimulator::fPulseRiseTime.
Referenced by PndEmcFWEndcapTimebasedWaveforms::Init().
|
inlinevirtualinherited |
Definition at line 66 of file PndEmcAbsWaveformSimulator.h.
References PndEmcAbsWaveformSimulator::fSampleRate.
Referenced by PndEmcFullStackedWaveformSimulator::Init(), PndEmcFullStackedWaveformSimulator::MakeSingleWaveform(), and PndEmcFullStackedWaveformSimulator::MakeWaveform().
|
inlinevirtualinherited |
Get 1GeV pulse height equivalient of simulator generated waveform
Implements PndEmcAbsWaveformSimulator.
Definition at line 34 of file PndEmcFullStackedWaveformSimulator.h.
References PndEmcFullStackedWaveformSimulator::fScale.
Referenced by GetTotalScale().
|
inlinevirtualinherited |
maximum timeinterval generated waveforms are ahead of causal detector hits
Information is needed by timebased simulation framework. E.g. provokeed by simulation of preceding baseline samples
Reimplemented from PndEmcAbsWaveformSimulator.
Definition at line 32 of file PndEmcFullStackedWaveformSimulator.h.
References PndEmcFullStackedWaveformSimulator::fSamplingBeforeFirstPulse.
|
virtual |
Return scale after all modifiers.
wfIndex | Waveform index. |
Definition at line 86 of file PndEmcMultiWaveformSimulator.cxx.
References count, Double_t, fIndexList, PndEmcAbsWaveformSimulator::fListOfWaveformModifiers, and PndEmcFullStackedWaveformSimulator::GetScale().
Referenced by PndEmcFWEndcapTimebasedWaveforms::Init().
|
inlinevirtualinherited |
Get 1GeV pulse height equivalent of waveform at end of modification chain
Definition at line 55 of file PndEmcAbsWaveformSimulator.h.
References Double_t, PndEmcAbsWaveformSimulator::fListOfWaveformModifiers, and PndEmcAbsWaveformSimulator::GetScale().
|
virtualinherited |
Init the simulator.
samplingBeforeFirstPulse | Time to start sampling before first pulse, in ns |
samplingAfterLastPulse | Time to stop sampling after last pulse, in ns |
cutoff | Threshold under which signal is considered to have stopped, in GeV |
activeTimeIncrement | Increment when checking if pulse is over cutoff, in ns |
Definition at line 41 of file PndEmcFullStackedWaveformSimulator.cxx.
References Bool_t, PndEmcFullStackedWaveformSimulator::CalcSingleWaveForTime(), Double_t, PndEmcFullStackedWaveformSimulator::f1GeVWaveform, PndEmcFullStackedWaveformSimulator::fActiveTimeIncrement, PndEmcFullStackedWaveformSimulator::fCutoff, PndEmcFullStackedWaveformSimulator::fPulseRiseTime, PndEmcFullStackedWaveformSimulator::fSamplingAfterLastPulse, PndEmcFullStackedWaveformSimulator::fSamplingBeforeFirstPulse, PndEmcFullStackedWaveformSimulator::fScale, PndEmcAbsWaveformSimulator::GetSampleRate(), and PndEmcFullStackedWaveformSimulator::MakeSingleWaveform().
Referenced by PndEmcFWEndcapTimebasedWaveforms::Init().
|
protectedvirtual |
Create a PndEmcWaveform from the given parameters of a single hit.
hitEnergy | ... |
hitTime | ... |
arrayToStore | ... |
detId | ... |
trackId | ... |
hitIndex | ... |
Reimplemented from PndEmcFullStackedWaveformSimulator.
Definition at line 33 of file PndEmcMultiWaveformSimulator.cxx.
References PndEmcFullStackedWaveformSimulator::MakeSingleWaveform(), and MultiplyWaveform().
|
protectedvirtual |
Create PndEmcWaveform.
wfData | PndEmcWaveformData containing the hits. |
arrayToStore | If not null, the new PndEmcWaveform is created in this TClonesArray. |
Reimplemented from PndEmcFullStackedWaveformSimulator.
Definition at line 23 of file PndEmcMultiWaveformSimulator.cxx.
References PndEmcFullStackedWaveformSimulator::MakeWaveform(), and MultiplyWaveform().
|
private |
Creates a PndEmcMultiWaveform from a PndEmcWaveform.
singleWaveform | The single waveform from which to create the multi-waveform. |
arrayToStore | If not null, the new PndEmcMultiWaveform is created in this TClonesArray. |
Definition at line 110 of file PndEmcMultiWaveformSimulator.cxx.
References fWfMultiplicity, PndEmcWaveform::GetDetectorId(), PndEmcWaveform::GetHitIndex(), PndEmcWaveform::GetSampleRate(), PndEmcWaveform::GetSignal(), PndEmcWaveform::GetTrackId(), PndEmcWaveform::SetSampleRate(), and PndEmcMultiWaveform::SetWaveform().
Referenced by MakeSingleWaveform(), and MakeWaveform().
|
inlinevirtualinherited |
Simulate Waveform based on wfData object
The PndEmcWaveformData object is used by the emc timebased simulation
Definition at line 31 of file PndEmcAbsWaveformSimulator.h.
References PndEmcAbsWaveformSimulator::CallModifiers(), and PndEmcAbsWaveformSimulator::MakeWaveform().
Referenced by PndEmcWaveformBuffer::AddNewDataToTClonesArray().
|
inlinevirtualinherited |
Simulate waveform consisting of single pusle
Definition at line 34 of file PndEmcAbsWaveformSimulator.h.
References PndEmcAbsWaveformSimulator::CallModifiers(), and PndEmcAbsWaveformSimulator::MakeSingleWaveform().
|
inlineprotectedinherited |
Definition at line 78 of file PndEmcAbsWaveformSimulator.h.
References PndEmcAbsWaveformSimulator::fSampleRate.
Referenced by PndEmcFullStackedWaveformSimulator::GetAbsoluteTimeInterval(), and PndEmcFullStackedWaveformSimulator::MakeSingleWaveform().
|
private |
Definition at line 38 of file PndEmcMultiWaveformSimulator.h.
Referenced by AddModifier(), CallModifiers(), and GetTotalScale().
|
protectedinherited |
Definition at line 90 of file PndEmcAbsWaveformSimulator.h.
Referenced by PndEmcAbsWaveformSimulator::AddModifier(), CallModifiers(), PndEmcAbsWaveformSimulator::CallModifiers(), GetTotalScale(), and PndEmcAbsWaveformSimulator::GetTotalScale().
|
protectedinherited |
sampling rate of SADC. In 1/ns
Definition at line 91 of file PndEmcAbsWaveformSimulator.h.
Referenced by PndEmcAbsWaveformSimulator::GetSampleRate(), PndEmcFullStackedWaveformSimulator::MakeSingleWaveform(), PndEmcFullStackedWaveformSimulator::MakeWaveform(), and PndEmcAbsWaveformSimulator::SyncWithADCClock().
|
private |
Definition at line 37 of file PndEmcMultiWaveformSimulator.h.
Referenced by MultiplyWaveform().