Hall C ROOT/C++ Analyzer (hcana)
THcRawAdcHit Class Reference

Class representing a single raw ADC hit.

It supports rich data from flash 250 ADC modules.

Definition at line 7 of file THcRawAdcHit.h.

Public Member Functions

virtual void Clear (Option_t *opt="")
 Clears variables before next event. More...
 
Double_t GetAdcTomV () const
 
Double_t GetAdcTons () const
 
Double_t GetAdcTopC () const
 
Double_t GetAverage (UInt_t iSampleLow, UInt_t iSampleHigh) const
 Gets average of raw samples. In channels. More...
 
Double_t GetData (UInt_t iPedLow, UInt_t iPedHigh, UInt_t iIntLow, UInt_t iIntHigh) const
 Gets pedestal subtracted integral of samples. In channels. More...
 
Int_t GetF250_NPedestalSamples ()
 
Double_t GetF250_PeakPedestalRatio ()
 
Int_t GetIntegral (UInt_t iSampleLow, UInt_t iSampleHigh) const
 Gets integral of raw samples. In channels. More...
 
UInt_t GetNPulses () const
 Gets number of set pulses. More...
 
UInt_t GetNSamples () const
 Gets number of set samples. More...
 
Double_t GetPed () const
 Gets sample pedestal. In channels. More...
 
Int_t GetPedRaw () const
 Gets raw signal pedestal. In channels. More...
 
Double_t GetPulseAmp (UInt_t iPulse=0) const
 Gets pedestal subtracted pulse amplitude. In channels. More...
 
Int_t GetPulseAmpRaw (UInt_t iPulse=0) const
 Gets raw pulse amplitude. In channels. More...
 
Double_t GetPulseInt (UInt_t iPulse=0) const
 Gets pedestal subtracted pulse integral. In channels. More...
 
Int_t GetPulseIntRaw (UInt_t iPulse=0) const
 Gets raw pulse integral. In channels. More...
 
Double_t GetPulseTime (UInt_t iPulse=0) const
 
Int_t GetPulseTimeRaw (UInt_t iPulse=0) const
 Gets raw pulse time. In subsamples. More...
 
Int_t GetRawData (UInt_t iPulse=0) const
 Gets raw pulse integral. In channels. More...
 
Int_t GetRefDiffTime () const
 
Int_t GetRefTime () const
 
Double_t GetSampleInt () const
 Gets pedestal subtracted integral of samples. In channels. More...
 
Int_t GetSampleIntRaw () const
 Gets raw integral of sTimeFacamples. In channels. More...
 
Int_t GetSampleRaw (UInt_t iSample=0) const
 Gets raw sample. In channels. More...
 
Bool_t HasMulti () const
 Queries whether data is from flash 250 module. More...
 
Bool_t HasRefTime () const
 
THcRawAdcHitoperator= (const THcRawAdcHit &right)
 Assignment operator. More...
 
void SetData (Int_t data)
 Sets raw ADC value. More...
 
void SetDataTimePedestalPeak (Int_t data, Int_t time, Int_t pedestal, Int_t peak)
 Sets various bits of ADC data. More...
 
void SetF250Params (Int_t NSA, Int_t NSB, Int_t NPED)
 Sets F250 parameters used for pedestal subtraction. More...
 
void SetRefDiffTime (Int_t refDiffTime)
 
void SetRefTime (Int_t refTime)
 Sets reference time. In channels. More...
 
void SetSample (Int_t data)
 Sets raw signal sample. More...
 
 THcRawAdcHit ()
 Constructor. More...
 
virtual ~THcRawAdcHit ()
 Destructor. More...
 
- Public Member Functions inherited from TObject
void AbstractMethod (const char *method) const
 
virtual void AppendPad (Option_t *option="")
 
virtual void Browse (TBrowser *b)
 
virtual const char * ClassName () const
 
virtual TObjectClone (const char *newname="") const
 
virtual Int_t Compare (const TObject *obj) const
 
virtual void Copy (TObject &object) const
 
virtual void Delete (Option_t *option="")
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 
virtual void Draw (Option_t *option="")
 
virtual void DrawClass () const
 
virtual TObjectDrawClone (Option_t *option="") const
 
virtual void Dump () const
 
virtual void Error (const char *method, const char *msgfmt,...) const
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 
virtual TObjectFindObject (const char *name) const
 
virtual TObjectFindObject (const TObject *obj) const
 
virtual Option_tGetDrawOption () const
 
virtual const char * GetIconName () const
 
virtual const char * GetName () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 
virtual UInt_t GetUniqueID () const
 
virtual Bool_t HandleTimer (TTimer *timer)
 
virtual ULong_t Hash () const
 
virtual void Info (const char *method, const char *msgfmt,...) const
 
virtual Bool_t InheritsFrom (const char *classname) const
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 
virtual void Inspect () const
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 
virtual Bool_t IsFolder () const
 
Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 
void MayNotUse (const char *method) const
 
virtual Bool_t Notify ()
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 
void operator delete (void *ptr)
 
void operator delete[] (void *ptr)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
TObjectoperator= (const TObject &rhs)
 
virtual void Paint (Option_t *option="")
 
virtual void Pop ()
 
virtual void Print (Option_t *option="") const
 
virtual Int_t Read (const char *name)
 
virtual void RecursiveRemove (TObject *obj)
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 
virtual void SetDrawOption (Option_t *option="")
 
virtual void SetUniqueID (UInt_t uid)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 
Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
 TObject ()
 
 TObject (const TObject &object)
 
virtual void UseCurrentStyle ()
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 
virtual ~TObject ()
 

Protected Attributes

Bool_t fHasMulti
 
Bool_t fHasRefTime
 
Int_t fNPeakSamples
 
Int_t fNPedestalSamples
 
UInt_t fNPulses
 
UInt_t fNSamples
 
Double_t fPeakPedestalRatio
 
Int_t fPed
 
Int_t fPulseAmp [fMaxNPulses]
 
Int_t fPulseInt [fMaxNPulses]
 
Int_t fPulseTime [fMaxNPulses]
 
Int_t fRefDiffTime
 
Int_t fRefTime
 
Int_t fSample [fMaxNSamples]
 
Double_t fSubsampleToTimeFactor
 

Static Protected Attributes

static const Double_t fAdcImpedence = 50.0
 
static const Double_t fAdcRange = 1.0
 
static const Double_t fAdcTimeRes = 0.0625
 
static const Double_t fAdcTimeSample = 4000.0
 
static const UInt_t fMaxNPulses = 4
 
static const UInt_t fMaxNSamples = 511
 
static const Double_t fNAdcChan = 4096.0
 

Additional Inherited Members

- Public Types inherited from TObject
enum  EStatusBits
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 
static Bool_t GetObjectStat ()
 
static void SetDtorOnly (void *obj)
 
static void SetObjectStat (Bool_t stat)
 
- Public Attributes inherited from TObject
 kBitMask
 
 kCanDelete
 
 kCannotPick
 
 kHasUUID
 
 kInvalidObject
 
 kIsOnHeap
 
 kIsReferenced
 
 kMustCleanup
 
 kNoContextMenu
 
 kNotDeleted
 
 kObjInCanvas
 
 kOverwrite
 
 kSingleKey
 
 kWriteDelete
 
 kZombie
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 
void MakeZombie ()
 

#include <THcRawAdcHit.h>

Inheritance diagram for THcRawAdcHit:

Constructor & Destructor Documentation

THcRawAdcHit::THcRawAdcHit ( )

Constructor.

Definition at line 196 of file THcRawAdcHit.cxx.

THcRawAdcHit::~THcRawAdcHit ( )
virtual

Destructor.

Definition at line 228 of file THcRawAdcHit.cxx.

Member Function Documentation

void THcRawAdcHit::Clear ( Option_t opt = "")
virtual

Clears variables before next event.

Parameters
[in]optMaybe used in base clas... Not sure.

Reimplemented from TObject.

Definition at line 230 of file THcRawAdcHit.cxx.

Double_t THcRawAdcHit::GetAdcTomV ( ) const

Definition at line 477 of file THcRawAdcHit.cxx.

Double_t THcRawAdcHit::GetAdcTons ( ) const

Definition at line 489 of file THcRawAdcHit.cxx.

Double_t THcRawAdcHit::GetAdcTopC ( ) const

Definition at line 483 of file THcRawAdcHit.cxx.

Double_t THcRawAdcHit::GetAverage ( UInt_t  iSampleLow,
UInt_t  iSampleHigh 
) const

Gets average of raw samples. In channels.

Parameters
[in]iSampleLowSequential number of first sample to be averaged.
[in]iSampleHighSequential number of last sample to be averaged.
Exceptions
std::out_of_rangeTried to average over nonexisting sample.

Definition at line 310 of file THcRawAdcHit.cxx.

Double_t THcRawAdcHit::GetData ( UInt_t  iPedLow,
UInt_t  iPedHigh,
UInt_t  iIntLow,
UInt_t  iIntHigh 
) const

Gets pedestal subtracted integral of samples. In channels.

Parameters
[in]iPedLowSequential number of first sample to be averaged for pedestal value.
[in]iPedHighSequential number of last sample to be averaged for pedestal value.
[in]iIntLowSequential number of first sample to be integrated.
[in]iIntHighSequential number of last sample to be integrated.

Definition at line 343 of file THcRawAdcHit.cxx.

Int_t THcRawAdcHit::GetF250_NPedestalSamples ( )
inline

Definition at line 25 of file THcRawAdcHit.h.

Double_t THcRawAdcHit::GetF250_PeakPedestalRatio ( )
inline

Definition at line 24 of file THcRawAdcHit.h.

Int_t THcRawAdcHit::GetIntegral ( UInt_t  iSampleLow,
UInt_t  iSampleHigh 
) const

Gets integral of raw samples. In channels.

Parameters
[in]iSampleLowSequential number of first sample to be integrated.
[in]iSampleHighSequential number of last sample to be integrated.
Exceptions
std::out_of_rangeTried to integrate over nonexisting sample.

Definition at line 327 of file THcRawAdcHit.cxx.

UInt_t THcRawAdcHit::GetNPulses ( ) const

Gets number of set pulses.

Definition at line 351 of file THcRawAdcHit.cxx.

UInt_t THcRawAdcHit::GetNSamples ( ) const

Gets number of set samples.

Definition at line 355 of file THcRawAdcHit.cxx.

Double_t THcRawAdcHit::GetPed ( ) const

Gets sample pedestal. In channels.

Definition at line 428 of file THcRawAdcHit.cxx.

Int_t THcRawAdcHit::GetPedRaw ( ) const

Gets raw signal pedestal. In channels.

Returns 0 if no signal pedestal is set.

Definition at line 363 of file THcRawAdcHit.cxx.

Double_t THcRawAdcHit::GetPulseAmp ( UInt_t  iPulse = 0) const

Gets pedestal subtracted pulse amplitude. In channels.

Parameters
[in]iPulseSequential number of requested pulse.

Definition at line 436 of file THcRawAdcHit.cxx.

Int_t THcRawAdcHit::GetPulseAmpRaw ( UInt_t  iPulse = 0) const

Gets raw pulse amplitude. In channels.

Parameters
[in]iPulseSequential number of requested pulse.
Exceptions
std::out_of_rangeTried to get nonexisting pulse.

Definition at line 383 of file THcRawAdcHit.cxx.

Double_t THcRawAdcHit::GetPulseInt ( UInt_t  iPulse = 0) const

Gets pedestal subtracted pulse integral. In channels.

Parameters
[in]iPulseSequential number of requested pulse.

Definition at line 432 of file THcRawAdcHit.cxx.

Int_t THcRawAdcHit::GetPulseIntRaw ( UInt_t  iPulse = 0) const

Gets raw pulse integral. In channels.

Parameters
[in]iPulseSequential number of requested pulse.
Exceptions
std::out_of_rangeTried to get nonexisting pulse.

Definition at line 367 of file THcRawAdcHit.cxx.

Double_t THcRawAdcHit::GetPulseTime ( UInt_t  iPulse = 0) const

Definition at line 440 of file THcRawAdcHit.cxx.

Int_t THcRawAdcHit::GetPulseTimeRaw ( UInt_t  iPulse = 0) const

Gets raw pulse time. In subsamples.

Parameters
[in]iPulseSequential number of requested pulse.
Exceptions
std::out_of_rangeTried to get nonexisting pulse.

Definition at line 399 of file THcRawAdcHit.cxx.

Int_t THcRawAdcHit::GetRawData ( UInt_t  iPulse = 0) const

Gets raw pulse integral. In channels.

Parameters
[in]iPulseSequential number of requested pulse.
Exceptions
std::out_of_rangeTried to get nonexisting pulse.

Returns 0 if tried to access first pulse but no pulses are set.

Definition at line 294 of file THcRawAdcHit.cxx.

Int_t THcRawAdcHit::GetRefDiffTime ( ) const

Definition at line 505 of file THcRawAdcHit.cxx.

Int_t THcRawAdcHit::GetRefTime ( ) const

Definition at line 493 of file THcRawAdcHit.cxx.

Double_t THcRawAdcHit::GetSampleInt ( ) const

Gets pedestal subtracted integral of samples. In channels.

Definition at line 458 of file THcRawAdcHit.cxx.

Int_t THcRawAdcHit::GetSampleIntRaw ( ) const

Gets raw integral of sTimeFacamples. In channels.

Definition at line 448 of file THcRawAdcHit.cxx.

Int_t THcRawAdcHit::GetSampleRaw ( UInt_t  iSample = 0) const

Gets raw sample. In channels.

Parameters
[in]iSampleSequential number of requested sample.
Exceptions
std::out_of_rangeTried to get nonexisting sample.

Definition at line 415 of file THcRawAdcHit.cxx.

Bool_t THcRawAdcHit::HasMulti ( ) const

Queries whether data is from flash 250 module.

Definition at line 359 of file THcRawAdcHit.cxx.

Bool_t THcRawAdcHit::HasRefTime ( ) const

Definition at line 517 of file THcRawAdcHit.cxx.

THcRawAdcHit & THcRawAdcHit::operator= ( const THcRawAdcHit right)

Assignment operator.

Parameters
[in]rightRaw ADC hit to be assigned.

Definition at line 205 of file THcRawAdcHit.cxx.

void THcRawAdcHit::SetData ( Int_t  data)

Sets raw ADC value.

Parameters
[in]dataRaw ADC value. In channels.
Exceptions
std::out_of_rangeTried to set too many pulses.

Should be used for old style ADCs.

Definition at line 249 of file THcRawAdcHit.cxx.

void THcRawAdcHit::SetDataTimePedestalPeak ( Int_t  data,
Int_t  time,
Int_t  pedestal,
Int_t  peak 
)

Sets various bits of ADC data.

Parameters
[in]dataRaw pulse integral. In channels.
[in]timeRaw pulse time. In subsamples.
[in]pedestalRaw signal pedestal. In channels.
[in]peakRaw pulse amplitude. In channels.
Exceptions
std::out_of_rangeTried to set too many pulses.

Should be used for flash 250 modules.

Definition at line 278 of file THcRawAdcHit.cxx.

void THcRawAdcHit::SetF250Params ( Int_t  NSA,
Int_t  NSB,
Int_t  NPED 
)

Sets F250 parameters used for pedestal subtraction.

Parameters
[in]NSANSA parameter of F250 modules.
[in]NSBNSB parameter of F250 modules.
[in]NPEDNPED parameter of F250 modules.

Definition at line 462 of file THcRawAdcHit.cxx.

void THcRawAdcHit::SetRefDiffTime ( Int_t  refDiffTime)

Definition at line 264 of file THcRawAdcHit.cxx.

void THcRawAdcHit::SetRefTime ( Int_t  refTime)

Sets reference time. In channels.

Parameters
[in]refTimeReference time. In channels.

Definition at line 259 of file THcRawAdcHit.cxx.

void THcRawAdcHit::SetSample ( Int_t  data)

Sets raw signal sample.

Parameters
[in]dataRaw signal sample. In channels.
Exceptions
std::out_of_rangeTried to set too many samples.

Definition at line 268 of file THcRawAdcHit.cxx.

Member Data Documentation

const Double_t THcRawAdcHit::fAdcImpedence = 50.0
staticprotected

Definition at line 68 of file THcRawAdcHit.h.

const Double_t THcRawAdcHit::fAdcRange = 1.0
staticprotected

Definition at line 67 of file THcRawAdcHit.h.

const Double_t THcRawAdcHit::fAdcTimeRes = 0.0625
staticprotected

Definition at line 70 of file THcRawAdcHit.h.

const Double_t THcRawAdcHit::fAdcTimeSample = 4000.0
staticprotected

Definition at line 69 of file THcRawAdcHit.h.

Bool_t THcRawAdcHit::fHasMulti
protected

Definition at line 85 of file THcRawAdcHit.h.

Bool_t THcRawAdcHit::fHasRefTime
protected

Definition at line 86 of file THcRawAdcHit.h.

const UInt_t THcRawAdcHit::fMaxNPulses = 4
staticprotected

Definition at line 62 of file THcRawAdcHit.h.

const UInt_t THcRawAdcHit::fMaxNSamples = 511
staticprotected

Definition at line 63 of file THcRawAdcHit.h.

const Double_t THcRawAdcHit::fNAdcChan = 4096.0
staticprotected

Definition at line 66 of file THcRawAdcHit.h.

Int_t THcRawAdcHit::fNPeakSamples
protected

Definition at line 73 of file THcRawAdcHit.h.

Int_t THcRawAdcHit::fNPedestalSamples
protected

Definition at line 72 of file THcRawAdcHit.h.

UInt_t THcRawAdcHit::fNPulses
protected

Definition at line 87 of file THcRawAdcHit.h.

UInt_t THcRawAdcHit::fNSamples
protected

Definition at line 88 of file THcRawAdcHit.h.

Double_t THcRawAdcHit::fPeakPedestalRatio
protected

Definition at line 74 of file THcRawAdcHit.h.

Int_t THcRawAdcHit::fPed
protected

Definition at line 77 of file THcRawAdcHit.h.

Int_t THcRawAdcHit::fPulseAmp[fMaxNPulses]
protected

Definition at line 79 of file THcRawAdcHit.h.

Int_t THcRawAdcHit::fPulseInt[fMaxNPulses]
protected

Definition at line 78 of file THcRawAdcHit.h.

Int_t THcRawAdcHit::fPulseTime[fMaxNPulses]
protected

Definition at line 80 of file THcRawAdcHit.h.

Int_t THcRawAdcHit::fRefDiffTime
protected

Definition at line 83 of file THcRawAdcHit.h.

Int_t THcRawAdcHit::fRefTime
protected

Definition at line 82 of file THcRawAdcHit.h.

Int_t THcRawAdcHit::fSample[fMaxNSamples]
protected

Definition at line 81 of file THcRawAdcHit.h.

Double_t THcRawAdcHit::fSubsampleToTimeFactor
protected

Definition at line 75 of file THcRawAdcHit.h.

Collaboration diagram for THcRawAdcHit:

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