AliRoot Core  3dc7879 (3dc7879)
AliCaloRawAnalyzerPeakFinder Class Reference

Raw data fitting: Peak Finder. More...

#include <AliCaloRawAnalyzerPeakFinder.h>

Inheritance diagram for AliCaloRawAnalyzerPeakFinder:

Public Member Functions

virtual ~AliCaloRawAnalyzerPeakFinder ()
 
virtual AliCaloFitResults Evaluate (const std::vector< AliCaloBunchInfo > &bunchvector, UInt_t altrocfg1, UInt_t altrocfg2)
 
- Public Member Functions inherited from AliCaloRawAnalyzer
 AliCaloRawAnalyzer (const char *name="AliCaloRawAnalyzer", const char *nameshort="RawAna")
 Constructor. More...
 
virtual ~AliCaloRawAnalyzer ()
 
int PreFitEvaluateSamples (const std::vector< AliCaloBunchInfo > &bunchvector, UInt_t altrocfg1, UInt_t altrocfg2, Int_t &index, Float_t &maxf, short &maxamp, short &maxampindex, Float_t &ped, int &first, int &last, int acut)
 Method to do the selection of what should possibly be fitted. More...
 
void SetTimeConstraint (int min, int max)
 Require that the bin if the maximum ADC value is between min and max (timebin) More...
 
void SetVerbose (bool verbose=true)
 
void SetIsZeroSuppressed (bool iszs=true)
 
void SetAmpCut (Float_t cut)
 
void SetFitArrayCut (Int_t cut)
 
void SetNsampleCut (Int_t cut)
 
void SetOverflowCut (Int_t cut)
 
void SetNsamplePed (Int_t i)
 
void SetL1Phase (Double_t phase)
 
bool GetIsZeroSuppressed () const
 
Float_t GetAmpCut () const
 
Int_t GetFitArrayCut () const
 
Int_t GetNsampleCut () const
 
Int_t GetOverflowCut () const
 
Int_t GetNsamplePed () const
 
Double_t GetReversed (const int i) const
 
const char * GetAlgoName () const
 
const char * GetAlgoAbbr () const
 
Algo::fitAlgorithm GetAlgo () const
 
Float_t GetTau () const
 
void SetTau (Float_t tau)
 
Bool_t GetFixTau () const
 
void SetFixTau (Bool_t b)
 
Double_t CalculateChi2 (const Double_t amp, const Double_t time, const Int_t first, const Int_t last, const Double_t adcErr=1, const Double_t tau=2.35) const
 
void CalculateMeanAndRMS (const Int_t first, const Int_t last, Double_t &mean, Double_t &rms)
 
short Max (const AliCaloBunchInfo *const bunch, int *maxindex) const
 Get maximum in bunch array. More...
 
UShort_t Max (const UShort_t *data, const int length) const
 Get maximum of array. More...
 
bool CheckBunchEdgesForMax (const AliCaloBunchInfo *const bunch) const
 A bunch is considered invalid if the maximum is in the first or last time-bin. More...
 
bool IsInTimeRange (const int maxindex, const int maxtime, const int mintime) const
 Check if the index of the max ADC vaue is consistent with trigger. More...
 
Float_t ReverseAndSubtractPed (const AliCaloBunchInfo *bunch, UInt_t altrocfg1, UInt_t altrocfg2, double *outarray) const
 
int SelectBunch (const std::vector< AliCaloBunchInfo > &bunchvector, short *maxampbin, short *maxamplitude)
 We select the bunch with the highest amplitude unless any time constraints is set. More...
 
void SelectSubarray (const Double_t *date, int length, short maxindex, int *first, int *last, int cut) const
 
Float_t EvaluatePedestal (const UShort_t *const data, const int length) const
 Pedestal evaluation if not zero suppressed. More...
 

Private Member Functions

 AliCaloRawAnalyzerPeakFinder ()
 Constructor. More...
 
 AliCaloRawAnalyzerPeakFinder (const AliCaloRawAnalyzerPeakFinder &)
 
AliCaloRawAnalyzerPeakFinderoperator= (const AliCaloRawAnalyzerPeakFinder &)
 
void LoadVectorsOCDB ()
 
void CopyVectors (const AliCaloPeakFinderVectors *pfvectors)
 Copy vectors. More...
 
void ResetVectors ()
 Reset vectors. More...
 
void WriteRootFile () const
 
void PrintVectors ()
 Utility function to write Peak-Finder vectors. More...
 
Double_t ScanCoarse (const Double_t *array, Int_t length) const
 

Private Attributes

Double_t fPFAmpVectorsCoarse [PF::MAXSTART][PF::SAMPLERANGE][100]
 Vectors for Amplitude extraction, first iteration. More...
 
Double_t fPFTofVectorsCoarse [PF::MAXSTART][PF::SAMPLERANGE][100]
 Vectors for TOF extraction, first iteration. More...
 
Double_t fPFAmpVectors [PF::MAXSTART][PF::SAMPLERANGE][100]
 Vectors for Amplitude extraction, second iteration. More...
 
Double_t fPFTofVectors [PF::MAXSTART][PF::SAMPLERANGE][100]
 Vectors for TOF extraction, second iteration. More...
 
AliCaloPeakFinderVectorsfPeakFinderVectors
 Collection of Peak-Fincer vectors. More...
 
bool fRunOnAlien
 Wether or not we are running on the GRID. More...
 
bool fIsInitialized
 init flag More...
 

Friends

class AliCaloRawAnalyzerFactory
 

Additional Inherited Members

- Static Public Member Functions inherited from AliCaloRawAnalyzer
static void PrintBunches (const std::vector< AliCaloBunchInfo > &bunchvector)
 Print bunch vector infomation. More...
 
static void PrintBunch (const AliCaloBunchInfo &bunch)
 Print bunch information. More...
 
- Protected Attributes inherited from AliCaloRawAnalyzer
Double_t fReversed [ALTROMAXSAMPLES]
 Reversed sequence of samples (pedestalsubtracted) More...
 
int fMinTimeIndex
 The timebin of the max signal value must be between fMinTimeIndex and fMaxTimeIndex. More...
 
int fMaxTimeIndex
 The timebin of the max signal value must be between fMinTimeIndex and fMaxTimeIndex. More...
 
int fFitArrayCut
 Cut on ADC value (after ped. subtraction) for signals used for fit. More...
 
Float_t fAmpCut
 Max ADC - pedestal must be higher than this befor attemting to extract the amplitude. More...
 
int fNsampleCut
 Minimum number of sample require before attemting to extract signal parameters. More...
 
int fOverflowCut
 Value when ADC starts to saturate. More...
 
int fNsamplePed
 Number of samples used for pedestal calculation (first in bunch) More...
 
bool fIsZerosupressed
 Wether or not the data is zeros supressed, by default its assumed that the baseline is also subtracted if set to true. More...
 
bool fVerbose
 Print debug information to std out if set to true. More...
 
char fName [256]
 Name of the algorithm. More...
 
char fNameShort [256]
 Abbrevation for the name. More...
 
Algo::fitAlgorithm fAlgo
 Which algorithm to use. More...
 
Double_t fL1Phase
 Phase of the ADC sampling clock relative to the LHC clock. More...
 
Double_t fAmp
 The amplitude in entities of ADC counts. More...
 
Double_t fTof
 The amplitude in entities of ADC counts. More...
 
Float_t fTau
 Rise time of the signal (peak position = t0 +tau), by defauly it is 235 ns. More...
 
Bool_t fFixTau
 Fixed fit parameter or not, used in AliCaloRawAnalyzerFitter. More...
 

Detailed Description

Raw data fitting: Peak Finder.

The Peak-Finder algorithm The amplitude is extracted as a weighted sum of the samples using the best possible weights. The weights are calculated only once and the actual extraction of amplitude and peak position is done with a simple vector multiplication, allowing extremely fast computations.

Author
Per Thomas Hille p.t.h.nosp@m.ille.nosp@m.@fys..nosp@m.uio..nosp@m.no, Yale.

Definition at line 32 of file AliCaloRawAnalyzerPeakFinder.h.

Constructor & Destructor Documentation

virtual AliCaloRawAnalyzerPeakFinder::~AliCaloRawAnalyzerPeakFinder ( )
inlinevirtual

Definition at line 38 of file AliCaloRawAnalyzerPeakFinder.h.

AliCaloRawAnalyzerPeakFinder::AliCaloRawAnalyzerPeakFinder ( )
private

Constructor.

Definition at line 47 of file AliCaloRawAnalyzerPeakFinder.cxx.

Referenced by ~AliCaloRawAnalyzerPeakFinder().

AliCaloRawAnalyzerPeakFinder::AliCaloRawAnalyzerPeakFinder ( const AliCaloRawAnalyzerPeakFinder )
private

Member Function Documentation

void AliCaloRawAnalyzerPeakFinder::CopyVectors ( const AliCaloPeakFinderVectors pfvectors)
private

Copy vectors.

Definition at line 213 of file AliCaloRawAnalyzerPeakFinder.cxx.

Referenced by LoadVectorsOCDB(), and ~AliCaloRawAnalyzerPeakFinder().

AliCaloFitResults AliCaloRawAnalyzerPeakFinder::Evaluate ( const std::vector< AliCaloBunchInfo > &  bunchvector,
UInt_t  altrocfg1,
UInt_t  altrocfg2 
)
virtual

Evaluation of amplitude and TOF

Extracting the amplitude using the Peak-Finder algorithm The amplitude is a weighted sum of the samples using optimum weights.

Implements AliCaloRawAnalyzer.

Definition at line 112 of file AliCaloRawAnalyzerPeakFinder.cxx.

Referenced by ~AliCaloRawAnalyzerPeakFinder().

void AliCaloRawAnalyzerPeakFinder::LoadVectorsOCDB ( )
private

Loading of Peak-Finder vectors from the Offline Condition Database (OCDB)

Definition at line 240 of file AliCaloRawAnalyzerPeakFinder.cxx.

Referenced by AliCaloRawAnalyzerPeakFinder(), and ~AliCaloRawAnalyzerPeakFinder().

AliCaloRawAnalyzerPeakFinder& AliCaloRawAnalyzerPeakFinder::operator= ( const AliCaloRawAnalyzerPeakFinder )
private
void AliCaloRawAnalyzerPeakFinder::PrintVectors ( )
private

Utility function to write Peak-Finder vectors.

Definition at line 284 of file AliCaloRawAnalyzerPeakFinder.cxx.

Referenced by ~AliCaloRawAnalyzerPeakFinder().

void AliCaloRawAnalyzerPeakFinder::ResetVectors ( )
private

Reset vectors.

Definition at line 65 of file AliCaloRawAnalyzerPeakFinder.cxx.

Referenced by AliCaloRawAnalyzerPeakFinder(), and ~AliCaloRawAnalyzerPeakFinder().

Double_t AliCaloRawAnalyzerPeakFinder::ScanCoarse ( const Double_t *  array,
Int_t  length 
) const
private
Returns
First (coarse) estimate of Amplitude using the Peak-Finder.

The output of the first iteration is sued to select vectors for the second iteration.

Definition at line 89 of file AliCaloRawAnalyzerPeakFinder.cxx.

Referenced by Evaluate(), and ~AliCaloRawAnalyzerPeakFinder().

void AliCaloRawAnalyzerPeakFinder::WriteRootFile ( ) const
private

Utility function to write Peak-Finder vectors to an root file The output is used to create an OCDB entry.

Definition at line 267 of file AliCaloRawAnalyzerPeakFinder.cxx.

Referenced by ~AliCaloRawAnalyzerPeakFinder().

Friends And Related Function Documentation

friend class AliCaloRawAnalyzerFactory
friend

Definition at line 34 of file AliCaloRawAnalyzerPeakFinder.h.

Member Data Documentation

bool AliCaloRawAnalyzerPeakFinder::fIsInitialized
private

init flag

Definition at line 64 of file AliCaloRawAnalyzerPeakFinder.h.

Referenced by Evaluate(), and LoadVectorsOCDB().

AliCaloPeakFinderVectors* AliCaloRawAnalyzerPeakFinder::fPeakFinderVectors
private

Collection of Peak-Fincer vectors.

Definition at line 61 of file AliCaloRawAnalyzerPeakFinder.h.

Referenced by AliCaloRawAnalyzerPeakFinder(), CopyVectors(), and WriteRootFile().

Double_t AliCaloRawAnalyzerPeakFinder::fPFAmpVectors[PF::MAXSTART][PF::SAMPLERANGE][100]
private

Vectors for Amplitude extraction, second iteration.

Definition at line 58 of file AliCaloRawAnalyzerPeakFinder.h.

Referenced by CopyVectors(), Evaluate(), PrintVectors(), and ResetVectors().

Double_t AliCaloRawAnalyzerPeakFinder::fPFAmpVectorsCoarse[PF::MAXSTART][PF::SAMPLERANGE][100]
private

Vectors for Amplitude extraction, first iteration.

Definition at line 56 of file AliCaloRawAnalyzerPeakFinder.h.

Referenced by CopyVectors(), ResetVectors(), and ScanCoarse().

Double_t AliCaloRawAnalyzerPeakFinder::fPFTofVectors[PF::MAXSTART][PF::SAMPLERANGE][100]
private

Vectors for TOF extraction, second iteration.

Definition at line 59 of file AliCaloRawAnalyzerPeakFinder.h.

Referenced by CopyVectors(), Evaluate(), and ResetVectors().

Double_t AliCaloRawAnalyzerPeakFinder::fPFTofVectorsCoarse[PF::MAXSTART][PF::SAMPLERANGE][100]
private

Vectors for TOF extraction, first iteration.

Definition at line 57 of file AliCaloRawAnalyzerPeakFinder.h.

Referenced by CopyVectors(), ResetVectors(), and ScanCoarse().

bool AliCaloRawAnalyzerPeakFinder::fRunOnAlien
private

Wether or not we are running on the GRID.

Definition at line 63 of file AliCaloRawAnalyzerPeakFinder.h.


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