1#ifndef ROOT_THcRawAdcHit
2#define ROOT_THcRawAdcHit
261 if( iSampleHigh >=
fNSamples || iSampleLow > iSampleHigh )
265 for(
UInt_t i = iSampleLow; i <= iSampleHigh; ++i ) {
268 return average / (iSampleHigh - iSampleLow + 1);
274 if( iSampleHigh >=
fNSamples || iSampleLow > iSampleHigh )
278 for(
UInt_t i = iSampleLow; i <= iSampleHigh; ++i ) {
289 -
GetAverage(iPedHigh, iPedLow) * (iIntHigh - iIntLow + 1);
341 throw std::runtime_error(
"THcRawAdcHit::GetRefTime: Reference time not available!");
349 throw std::runtime_error(
"THcRawAdcHit::GetRefDiffTime: Reference time not available!");
std::vector< uint32_t > integral
#define ClassDef(name, id)
Class representing a single raw ADC hit.
Int_t GetSampPulseIntRaw(UInt_t iPulse=0) const
UInt_t GetNSampPulses() const
Double_t GetSampPulseInt(UInt_t iPulse=0) const
Int_t GetPedRaw() const
Gets raw signal pedestal. In channels.
Int_t GetSampPulseAmpRaw(UInt_t iPulse=0) const
Double_t GetSampPulseTime(UInt_t iPulse=0) const
UInt_t GetNPulses() const
Gets number of set pulses.
void SetData(Int_t data)
Sets raw ADC value.
Int_t GetF250_NSB() const
UInt_t GetNSamples() const
Gets number of set samples.
static void throw_bad_index(const char *loc, UInt_t i, UInt_t N)
static constexpr Double_t fAdcTimeRes
Int_t GetSampPedRaw() const
Int_t fPulseTime[fMaxNPulses]
virtual ~THcRawAdcHit()
Destructor.
Bool_t HasRefTime() const
void SetSampNSAT(Int_t nsat)
void SetRefDiffTime(Int_t refDiffTime)
void SetDataTimePedestalPeak(Int_t data, Int_t time, Int_t pedestal, Int_t peak)
Sets various bits of ADC data.
THcRawAdcHit & operator=(const THcRawAdcHit &right)
Assignment operator.
static constexpr Double_t fAdcTimeSample
static constexpr Double_t GetAdcTopC()
void SetSampThreshold(Double_t thres)
Double_t GetPulseAmp(UInt_t iPulse=0) const
Gets pedestal subtracted pulse amplitude. In channels.
Double_t GetSample(UInt_t iSample=0) const
Bool_t HasMulti() const
Queries whether data is from flash 250 module.
static constexpr UInt_t fMaxNSamples
void SetSampIntTimePedestalPeak()
Int_t fSampPulseInt[fMaxNPulses]
Int_t fSample[fMaxNSamples]
Int_t GetPulseAmpRaw(UInt_t iPulse=0) const
Gets raw pulse amplitude. In channels.
Double_t fPeakPedestalRatio
static void throw_bad_range(const char *loc, UInt_t lo, UInt_t hi, UInt_t N)
Double_t GetPed() const
Gets sample pedestal. In channels.
Double_t GetF250_PeakPedestalRatio() const
Int_t GetPulseTimeRaw(UInt_t iPulse=0) const
Gets raw pulse time. In subsamples.
Double_t GetSampPulseAmp(UInt_t iPulse=0) const
static constexpr Double_t fNAdcChan
Double_t GetPulseTime(UInt_t iPulse=0) const
Int_t GetRawData(UInt_t iPulse=0) const
Gets raw pulse integral. In channels.
Double_t GetSampleInt() const
Gets pedestal subtracted integral of samples. In channels.
Int_t fSampPulseAmp[fMaxNPulses]
static constexpr UInt_t fMaxNPulses
Int_t GetF250_NPedestalSamples() const
Int_t GetSampleRaw(UInt_t iSample=0) const
Gets raw sample. In channels.
Int_t GetPulseIntRaw(UInt_t iPulse=0) const
Gets raw pulse integral. In channels.
Int_t fPulseInt[fMaxNPulses]
static constexpr Double_t fAdcImpedence
Int_t GetSampPulseTimeRaw(UInt_t iPulse=0) const
Int_t fPulseAmp[fMaxNPulses]
void SetSample(Int_t data)
Sets raw signal sample.
Double_t GetAverage(UInt_t iSampleLow, UInt_t iSampleHigh) const
Gets average of raw samples. In channels.
Double_t GetSampPed() const
Int_t GetRefDiffTime() const
static constexpr Double_t fAdcRange
Int_t GetF250_NSA() const
virtual void Clear(Option_t *opt="")
Clears variables before next event.
Int_t GetIntegral(UInt_t iSampleLow, UInt_t iSampleHigh) const
Gets integral of raw samples. In channels.
THcRawAdcHit()
Constructor.
static constexpr Double_t GetAdcTomV()
Double_t fSubsampleToTimeFactor
void SetF250Params(Int_t NSA, Int_t NSB, Int_t NPED)
Sets F250 parameters used for pedestal subtraction.
Int_t GetSampleIntRaw() const
Gets raw integral of sTimeFacamples. In channels.
static constexpr Double_t GetAdcTons()
Double_t GetData(UInt_t iPedLow, UInt_t iPedHigh, UInt_t iIntLow, UInt_t iIntHigh) const
Gets pedestal subtracted integral of samples. In channels.
void SetRefTime(Int_t refTime)
Sets reference time. In channels.
Int_t fSampPulseTime[fMaxNPulses]
Double_t GetPulseInt(UInt_t iPulse=0) const
Gets pedestal subtracted pulse integral. In channels.