6 #include "EVENT/LCCollection.h"
7 #include "EVENT/TrackerData.h"
8 #include <IMPL/TrackerDataImpl.h>
9 #include "EVENT/TrackerPulse.h"
11 #include "PedestalListener.h"
12 #include "ADCElectronicsListener.h"
116 int minimumPulseLength,
117 float pulseStartPedestalWidthFactor,
118 float pulseEndPedestalWidthFactor,
119 float noiseValuePedestalWidthFactor,
122 int saveNBinsBeforeStart = 0,
123 int saveNBinsAfterEnd = 0,
125 double timeCalculationParameter = 0.9,
126 int chargeCalculationMode =
SUMQ
172 bool _usePedestalValueOverride;
173 bool _usePedestalWidthOverride;
174 bool _use_isPedestalSubtractedOverride;
175 bool _usePolarityOverride;
176 bool _useReadoutFrequencyOverride;
177 bool _useMaxADCValueOverride;
219 void setTime(
float t)
223 void setTimeError(
float e)
236 float _time, _timeError;
247 void setCharge(
float t)
251 void setChargeError(
float e)
259 float getChargeError()
264 float _charge, _chargeError;
277 setCharge(c.getCharge());
278 setChargeError(c.getChargeError());
282 setTime(t.getTime());
283 setTimeError(t.getTimeError());
293 std::vector<float>::const_iterator e,
bool f)
299 std::vector<float>::const_iterator startBin;
300 std::vector<float>::const_iterator endBin;
319 std::vector<TrackerPulse *>
findPulses(TrackerData* inputData);
341 std::vector<std::pair<lcio::TrackerDataImpl*, int> >* tempPulse);
354 std::vector<std::pair<std::vector<float>::const_iterator,
355 std::vector<float>::const_iterator> >* theCandidatePulses);
370 std::vector< std::pair< std::vector<float>::const_iterator,
371 std::vector<float>::const_iterator> >* theCandidatePulses,
372 float noiseThreshold);
434 float getPedestalValue(
const int hardware_channel,
const int readout_group);
440 float getPedestalWidth(
const int hardware_channel,
const int readout_group);
511 #endif // PULSEFINDER_H
PedestalListener const * _pedestalListener
the recommended way of providing the access to the pedestal values:
Definition: PulseFinder.h:165
void setSwitchOffSplitting(bool doNotSplit=false)
Flag whether to try to split pulses.
Definition: PulseFinder.cc:1673
float _minimumPulseHeight
minimal value for the pulse maximum in adc counts
Definition: PulseFinder.h:159
ADCElectronicsListener const * _adcElectronicsListener
the recommended way to access the electronics parameters
Definition: PulseFinder.h:167
float _noiseValuePedestalWidthFactor
factor to calculate noise value
Definition: PulseFinder.h:151
static const int FIT_PARABOLA
Time and/or charge is determined by parabolic fit.
Definition: PulseFinder.h:131
Helper class to store the charge and it's error.
Definition: PulseFinder.h:240
void setReadoutFrequencyOverride(float readoutFrequency)
Set an override value for the readout frequency in MHz.
Definition: PulseFinder.cc:157
Pulse calculatePulseTimeAndCharge(const EVENT::TrackerData *tracker_data)
This wrapper function handles the calculation of the pulse time and the pulse charge.
Definition: PulseFinder.cc:743
Helper class which combined PulseCharge and PulseTime.
Definition: PulseFinder.h:268
Helper class to make more sense to the splitting phase: actually keep track of the "split" flag...
Definition: PulseFinder.h:290
static const int AT_MAXIMUM
Time is the first sample at the maximum.
Definition: PulseFinder.h:134
Helper Class which provides access to the pedestals for every event.
Definition: PedestalListener.h:37
PulseTime calcuPulseTimeGaussianInflexion(const lcio::TrackerData *thisPulse)
Calculate the time information from the inflexion point of a gausssian fit.
Definition: PulseFinder.cc:1445
Helper Class which provides access to the parameters of ADC Electroncis.
Definition: ADCElectronicsListener.h:39
PulseCharge calcPulseChargeMaxQ(const lcio::TrackerData *thisPulse)
Use the maximum value as pulse charge.
Definition: PulseFinder.cc:1130
static const int GAMMA_FIT
Time from a Gamma_4 function fit to the pulse.
Definition: PulseFinder.h:136
float getReadoutFrequency(const int readout_group)
Returns the readout frequency of a readout group (in Mhz) taking into consideration whether it should...
Definition: PulseFinder.cc:1626
float _maximumADCValueOverride
maximum adc value, needed to determine if a pulse is maxed out
Definition: PulseFinder.h:182
float _pulseStartPedestalWidthFactor
factor to calculate the start threshold
Definition: PulseFinder.h:149
float _pedestalWidthOverride
The default pedestal width which is used if the pedestalListener is not set.
Definition: PulseFinder.h:194
PulseTime calcPulseTimeAtConstantFraction(const lcio::TrackerData *thisPulse)
Calculate the time information as the time of crossing the threshold set by a fraction of the max...
Definition: PulseFinder.cc:1233
bool _isPedestalSubtractedOverride
Sets, if the data is already pedestal subtracted in the read-out electronics.
Definition: PulseFinder.h:198
float _pulseEndPedestalWidthFactor
factor to calculate the end threshold
Definition: PulseFinder.h:150
double _ConstFracParameter
parameters for time methods
Definition: PulseFinder.h:156
static const int GAUSSIAN_INFLEXION
Inflexion point of a gaussian fit.
Definition: PulseFinder.h:139
float getMaxADCValue(const int readout_group)
Returns the maximum ADC value of a readout group taking into consideration whether it should be overw...
Definition: PulseFinder.cc:1650
static const int MAXQ
Charge is the maximal ADC value.
Definition: PulseFinder.h:144
bool _switchOffSplitting
flag whether to try to split pulses
Definition: PulseFinder.h:206
static std::string getRevisionNumber()
Log the revision number.
Definition: PulseFinder.cc:180
PulseTime calcPulseTimeCentreOfGravity(const lcio::TrackerData *thisPulse)
Calculate the time information as centre of gravity.
Definition: PulseFinder.cc:1265
static const int FIRST_ABOVE_THRESHOLD
Time is the first sample above the start threshold.
Definition: PulseFinder.h:133
int _timeCalculationMode
The mode used for time calculation.
Definition: PulseFinder.h:154
float getPedestalWidth(const int hardware_channel, const int readout_group)
Returns the pedestal width for a given TrackerData / TrackerPulse object taking into consideration wh...
Definition: PulseFinder.cc:1555
void setPedestalValueOverride(float pedestalValue)
Set an overide value for the pedestal value (in ADC counts).
Definition: PulseFinder.cc:145
float _pedestalValueOverride
The default pedestal value which is used if the pedestalListener is not set.
Definition: PulseFinder.h:190
int getPolarity(const int readout_group)
Returns the polarity of a TrackerData / TrackerPulse object taking into consideration whether is shou...
Definition: PulseFinder.cc:1604
float _readoutFrequencyOverride
The readout frequency of every readout group (in MHz).
Definition: PulseFinder.h:186
Helper class to store the time and it's error.
Definition: PulseFinder.h:212
The PulseFinder class is working horse of the ModularPulseFinderProcessor.
Definition: PulseFinder.h:66
float getPedestalValue(const int hardware_channel, const int readout_group)
Returns the pedestal value for a given TrackerData / TrackerPulse object taking into consideration wh...
Definition: PulseFinder.cc:1525
static const int INFLEXION_POINT
Time is the inflexion point of the rising slope.
Definition: PulseFinder.h:130
static const int SUMQ
Charge is the sum of all ADC counts.
Definition: PulseFinder.h:142
PulseTime calcPulseTimeAtMaximum(const lcio::TrackerData *thisPulse)
Calculate the time information as the time of the bin with pulse maximum.
Definition: PulseFinder.cc:1163
int _COGAtMaxParameter
parameters for time methods
Definition: PulseFinder.h:155
Pulse calculatePulseWithFit(const EVENT::TrackerData *tracker_data)
This function calculates the pulse time and charge by fitting a parabola to the log of the data surro...
Definition: PulseFinder.cc:871
int _saveNBinsBeforeStart
of bins stored before the start threshold
Definition: PulseFinder.h:161
int _maxPlateauLength
The maximum length of a plateau within a pulse in time bins.
Definition: PulseFinder.h:208
PulseTime calcPulseTimeFirstBinAboveThreshold(const lcio::TrackerData *thisPulse)
Calculate the time information as the first bin above threshold.
Definition: PulseFinder.cc:1308
PulseTime calcPulseTimeCOGAtMaximum(const lcio::TrackerData *thisPulse)
Calculate the time information as the cog for 2 bin range around the maximum.
Definition: PulseFinder.cc:1184
PulseTime calcPulseTimeBoxMethod(const lcio::TrackerData *thisPulse)
Calculate the time information from the box method.
Definition: PulseFinder.cc:1342
void findPulseCandidates(lcio::TrackerData *thisData, std::vector< std::pair< lcio::TrackerDataImpl *, int > > *tempPulse)
Find pulses by threshold in the ADC information and closer inspection.
Definition: PulseFinder.cc:266
void setPlateauCutOff(int maxPlateauLength)
Set he maximum length of a plateau allowed within a pulse in time bins.
Definition: PulseFinder.cc:175
int _minimumPulseLength
minimal length for a pulse in number of time bins
Definition: PulseFinder.h:160
int _saveNBinsAfterEnd
of bins stored after the end threshold
Definition: PulseFinder.h:162
A class which is friend of PulseFinder so it can access the protected members for testing...
Definition: PulseFinderTester.h:11
static const int CENTRE_OF_GRAVITY
Time is the center of gravity of the charge.
Definition: PulseFinder.h:132
static const int COG_ATMAX
COG for 2 bin range around maximum.
Definition: PulseFinder.h:137
PulseTime calcPulseTimeWithGammaFit(const lcio::TrackerData *thisPulse)
This function calculates the pulse time and charge by fitting a Gamma_n to the pulse.
Definition: PulseFinder.cc:815
std::vector< InternalSplitPulse > splitMultiplePulses(std::vector< std::pair< std::vector< float >::const_iterator, std::vector< float >::const_iterator > > *theCandidatePulses, float noiseThreshold)
The second part in the pulse finding process.
Definition: PulseFinder.cc:616
PulseFinder(float minimumPulseHeight, int minimumPulseLength, float pulseStartPedestalWidthFactor, float pulseEndPedestalWidthFactor, float noiseValuePedestalWidthFactor, PedestalListener const *pedestalListener, ADCElectronicsListener const *adcElectronicsListener, int saveNBinsBeforeStart=0, int saveNBinsAfterEnd=0, int timeCalculationMode=INFLEXION_POINT, double timeCalculationParameter=0.9, int chargeCalculationMode=SUMQ)
The constructor.
Definition: PulseFinder.cc:41
std::vector< TrackerPulse * > findPulses(TrackerData *inputData)
Create TrackerPulses from the TrackerData input.
Definition: PulseFinder.cc:186
bool isPedestalSubtracted(const int readout_group)
Returns if the data has been pedestal subtracted in the read-out electronics or not.
Definition: PulseFinder.cc:1583
static const int CONSTANT_FRACTION
Time is at the constant fraction of the maximum pulse.
Definition: PulseFinder.h:135
void setForceSpectrumSave(bool doSave=true)
Flag whether the spectrum is always stored.
Definition: PulseFinder.cc:1668
void set_isPedestalSubtractedOverride(bool isPedestalSubtracted)
Set an override value whether the pedestal has been subtracted.
Definition: PulseFinder.cc:163
void setPolarityOverride(int polarity)
Set an override value for the polarity.
Definition: PulseFinder.cc:169
static const int BOX
Box Method.
Definition: PulseFinder.h:138
bool _forceSpectrumSave
flag whether to always save the spectrum
Definition: PulseFinder.h:205
void setPedestalWidthOverride(float pedestalWidth)
Set an overide value for the pedestal width (in ADC counts).
Definition: PulseFinder.cc:151
int _polarityOverride
the polarity of all readout groups, overrides LCCD
Definition: PulseFinder.h:202
int _chargeCalculationMode
The mode used for charge calculation.
Definition: PulseFinder.h:157
void setMaxADCValueOverride(float maxADCValue)
Set an overide value for the maximal ADC value.
Definition: PulseFinder.cc:139
PulseCharge calcPulseChargeSumQ(const lcio::TrackerData *thisPulse)
Calculate the integrated charge of the given pulse by summing up all bins of the ADC spectrum...
Definition: PulseFinder.cc:1103
void brutePulseSearch(TrackerData const *inputTrackerData, std::vector< std::pair< std::vector< float >::const_iterator, std::vector< float >::const_iterator > > *theCandidatePulses)
The first function that is called during the pulse finding, it simply looks for values above the star...
Definition: PulseFinder.cc:513
PulseTime calcPulseTimeInflexionPoint(const lcio::TrackerData *thisPulse)
Calculate the time information as the inflextion point of the rising slope.
Definition: PulseFinder.cc:1017