![]() |
AliRoot Core
edcc906 (edcc906)
|
Base class for extraction of signal amplitude and peak position. More...
#include <AliCaloRawAnalyzer.h>
Public Member Functions | |
AliCaloRawAnalyzer (const char *name="AliCaloRawAnalyzer", const char *nameshort="RawAna") | |
Constructor. More... | |
virtual | ~AliCaloRawAnalyzer () |
virtual AliCaloFitResults | Evaluate (const std::vector< AliCaloBunchInfo > &, UInt_t, UInt_t)=0 |
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... | |
Static Public Member Functions | |
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 | |
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... | |
Base class for extraction of signal amplitude and peak position.
Base class for extraction of signal amplitude and peak position from CALO Calorimeter RAW data. It contains some utilities for preparing / selecting signals suitable for signal extraction by derived classes
Definition at line 39 of file AliCaloRawAnalyzer.h.
AliCaloRawAnalyzer::AliCaloRawAnalyzer | ( | const char * | name = "AliCaloRawAnalyzer" , |
const char * | nameshort = "RawAna" |
||
) |
Constructor.
Definition at line 40 of file AliCaloRawAnalyzer.cxx.
|
inlinevirtual |
Definition at line 45 of file AliCaloRawAnalyzer.h.
Double_t AliCaloRawAnalyzer::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 |
amp | - max amplitude; |
time | - time of max amplitude; |
first | - sample array indices to be used |
last | - sample array indices to be used |
adcErr | - nominal error of amplitude measurement (one value for all channels) if adcErr<0 that mean adcErr=1. |
tau | - filter time response (in timebin units) |
Definition at line 349 of file AliCaloRawAnalyzer.cxx.
Referenced by AliCaloRawAnalyzerFakeALTRO::Evaluate(), AliCaloRawAnalyzerFastFit::Evaluate(), AliCaloRawAnalyzerNN::Evaluate(), AliCaloRawAnalyzerCrude::Evaluate(), and AliCaloRawAnalyzerPeakFinder::Evaluate().
void AliCaloRawAnalyzer::CalculateMeanAndRMS | ( | const Int_t | first, |
const Int_t | last, | ||
Double_t & | mean, | ||
Double_t & | rms | ||
) |
first | sample array indices to be used |
last | sample array indices to be used |
mean | of samples |
rms | of samples |
Definition at line 400 of file AliCaloRawAnalyzer.cxx.
bool AliCaloRawAnalyzer::CheckBunchEdgesForMax | ( | const AliCaloBunchInfo *const | bunch | ) | const |
A bunch is considered invalid if the maximum is in the first or last time-bin.
Definition at line 227 of file AliCaloRawAnalyzer.cxx.
Referenced by SelectBunch().
|
pure virtual |
Implemented in AliCaloRawAnalyzerPeakFinder, AliCaloRawAnalyzerKStandard, AliCaloRawAnalyzerCrude, AliCaloRawAnalyzerNN, AliCaloRawAnalyzerFastFit, and AliCaloRawAnalyzerFakeALTRO.
Referenced by AliCaloRawAnalyzerComparison::Evaluate(), AliEMCALQADataMakerRec::MakeRaws(), AliCaloCalibSignal::ProcessEvent(), and AliEMCALRawUtils::Raw2Digits().
Float_t AliCaloRawAnalyzer::EvaluatePedestal | ( | const UShort_t *const | data, |
const int | length | ||
) | const |
Pedestal evaluation if not zero suppressed.
Definition at line 180 of file AliCaloRawAnalyzer.cxx.
Referenced by ReverseAndSubtractPed().
|
inline |
Definition at line 80 of file AliCaloRawAnalyzer.h.
|
inline |
Definition at line 79 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzerComparison::InitHistograms().
|
inline |
Definition at line 78 of file AliCaloRawAnalyzer.h.
|
inline |
Definition at line 70 of file AliCaloRawAnalyzer.h.
|
inline |
Definition at line 71 of file AliCaloRawAnalyzer.h.
|
inline |
Definition at line 86 of file AliCaloRawAnalyzer.h.
|
inline |
Definition at line 69 of file AliCaloRawAnalyzer.h.
|
inline |
Definition at line 72 of file AliCaloRawAnalyzer.h.
|
inline |
Definition at line 74 of file AliCaloRawAnalyzer.h.
|
inline |
Definition at line 73 of file AliCaloRawAnalyzer.h.
|
inline |
Definition at line 77 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzerKStandard::FitRaw().
|
inline |
Definition at line 84 of file AliCaloRawAnalyzer.h.
bool AliCaloRawAnalyzer::IsInTimeRange | ( | const int | maxindex, |
const int | maxtime, | ||
const int | mintime | ||
) | const |
Check if the index of the max ADC vaue is consistent with trigger.
Definition at line 294 of file AliCaloRawAnalyzer.cxx.
Referenced by SelectBunch().
short AliCaloRawAnalyzer::Max | ( | const AliCaloBunchInfo *const | bunch, |
int * | maxindex | ||
) | const |
Get maximum in bunch array.
Definition at line 199 of file AliCaloRawAnalyzer.cxx.
Referenced by SelectBunch().
UShort_t AliCaloRawAnalyzer::Max | ( | const UShort_t * | data, |
const int | length | ||
) | const |
Get maximum of array.
Definition at line 88 of file AliCaloRawAnalyzer.cxx.
int AliCaloRawAnalyzer::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.
Definition at line 438 of file AliCaloRawAnalyzer.cxx.
Referenced by AliCaloRawAnalyzerKStandard::Evaluate().
|
static |
Print bunch information.
Definition at line 325 of file AliCaloRawAnalyzer.cxx.
Referenced by AliCaloRawAnalyzerFakeALTRO::Evaluate(), and PrintBunches().
|
static |
Print bunch vector infomation.
Definition at line 308 of file AliCaloRawAnalyzer.cxx.
Float_t AliCaloRawAnalyzer::ReverseAndSubtractPed | ( | const AliCaloBunchInfo * | bunch, |
UInt_t | altrocfg1, | ||
UInt_t | altrocfg2, | ||
double * | outarray | ||
) | const |
Time sample comes in reversed order, revers them back Subtract the baseline based on content of altrocfg1 and altrocfg2.
Definition at line 159 of file AliCaloRawAnalyzer.cxx.
Referenced by AliCaloRawAnalyzerFakeALTRO::Evaluate(), AliCaloRawAnalyzerFastFit::Evaluate(), AliCaloRawAnalyzerNN::Evaluate(), AliCaloRawAnalyzerCrude::Evaluate(), AliCaloRawAnalyzerPeakFinder::Evaluate(), and PreFitEvaluateSamples().
int AliCaloRawAnalyzer::SelectBunch | ( | const std::vector< AliCaloBunchInfo > & | bunchvector, |
short * | maxampbin, | ||
short * | maxamplitude | ||
) |
We select the bunch with the highest amplitude unless any time constraints is set.
Definition at line 255 of file AliCaloRawAnalyzer.cxx.
Referenced by AliCaloRawAnalyzerFakeALTRO::Evaluate(), AliCaloRawAnalyzerFastFit::Evaluate(), AliCaloRawAnalyzerNN::Evaluate(), AliCaloRawAnalyzerCrude::Evaluate(), AliCaloRawAnalyzerPeakFinder::Evaluate(), and PreFitEvaluateSamples().
void AliCaloRawAnalyzer::SelectSubarray | ( | const Double_t * | data, |
int | length, | ||
short | maxindex, | ||
int * | first, | ||
int * | last, | ||
int | cut | ||
) | const |
Selection of subset of data from one bunch that will be used for fitting or Peak finding. Go to the left and right of index of the maximum time bin Until the ADC value is less that fFitArrayCut, or derivative changes sign (data jump)
Definition at line 108 of file AliCaloRawAnalyzer.cxx.
Referenced by AliCaloRawAnalyzerFakeALTRO::Evaluate(), AliCaloRawAnalyzerFastFit::Evaluate(), AliCaloRawAnalyzerNN::Evaluate(), AliCaloRawAnalyzerCrude::Evaluate(), AliCaloRawAnalyzerPeakFinder::Evaluate(), and PreFitEvaluateSamples().
|
inline |
Definition at line 62 of file AliCaloRawAnalyzer.h.
Referenced by AliEMCALRawUtils::SetFittingAlgorithm().
|
inline |
Definition at line 63 of file AliCaloRawAnalyzer.h.
Referenced by AliEMCALRawUtils::SetFittingAlgorithm().
|
inline |
Definition at line 87 of file AliCaloRawAnalyzer.h.
Referenced by AliEMCALQADataMakerRec::SetFittingAlgorithm().
|
inline |
Definition at line 60 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzerComparison::AliCaloRawAnalyzerComparison(), AliEMCALQADataMakerRec::MakeRaws(), AliEMCALRawUtils::Raw2Digits(), and AliCaloCalibSignal::SetFittingAlgorithm().
|
inline |
Definition at line 67 of file AliCaloRawAnalyzer.h.
Referenced by AliEMCALRawUtils::Raw2Digits().
|
inline |
Definition at line 64 of file AliCaloRawAnalyzer.h.
Referenced by AliEMCALRawUtils::SetFittingAlgorithm().
|
inline |
Definition at line 66 of file AliCaloRawAnalyzer.h.
|
inline |
Definition at line 65 of file AliCaloRawAnalyzer.h.
Referenced by AliEMCALRawUtils::SetFittingAlgorithm().
|
inline |
Definition at line 85 of file AliCaloRawAnalyzer.h.
Referenced by AliEMCALQADataMakerRec::SetFittingAlgorithm().
void AliCaloRawAnalyzer::SetTimeConstraint | ( | int | min, |
int | max | ||
) |
Require that the bin if the maximum ADC value is between min and max (timebin)
Definition at line 70 of file AliCaloRawAnalyzer.cxx.
|
inline |
Definition at line 59 of file AliCaloRawAnalyzer.h.
|
protected |
Which algorithm to use.
Definition at line 141 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzerCrude::AliCaloRawAnalyzerCrude(), AliCaloRawAnalyzerFakeALTRO::AliCaloRawAnalyzerFakeALTRO(), AliCaloRawAnalyzerFastFit::AliCaloRawAnalyzerFastFit(), AliCaloRawAnalyzerKStandard::AliCaloRawAnalyzerKStandard(), AliCaloRawAnalyzerNN::AliCaloRawAnalyzerNN(), AliCaloRawAnalyzerPeakFinder::AliCaloRawAnalyzerPeakFinder(), and AliCaloRawAnalyzerKStandard::Evaluate().
|
protected |
The amplitude in entities of ADC counts.
Definition at line 145 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzerPeakFinder::Evaluate().
|
protected |
Max ADC - pedestal must be higher than this befor attemting to extract the amplitude.
Definition at line 127 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzerFakeALTRO::Evaluate(), AliCaloRawAnalyzerFastFit::Evaluate(), AliCaloRawAnalyzerCrude::Evaluate(), AliCaloRawAnalyzerKStandard::Evaluate(), and AliCaloRawAnalyzerPeakFinder::Evaluate().
|
protected |
Cut on ADC value (after ped. subtraction) for signals used for fit.
Definition at line 125 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzerFakeALTRO::Evaluate(), AliCaloRawAnalyzerFastFit::Evaluate(), AliCaloRawAnalyzerNN::Evaluate(), AliCaloRawAnalyzerCrude::Evaluate(), and AliCaloRawAnalyzerPeakFinder::Evaluate().
|
protected |
Fixed fit parameter or not, used in AliCaloRawAnalyzerFitter.
Definition at line 151 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzerFitter::AliCaloRawAnalyzerFitter(), and AliCaloRawAnalyzerFakeALTRO::Evaluate().
|
protected |
Wether or not the data is zeros supressed, by default its assumed that the baseline is also subtracted if set to true.
Definition at line 134 of file AliCaloRawAnalyzer.h.
Referenced by EvaluatePedestal().
|
protected |
Phase of the ADC sampling clock relative to the LHC clock.
Definition at line 143 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzerFakeALTRO::Evaluate(), AliCaloRawAnalyzerFastFit::Evaluate(), AliCaloRawAnalyzerNN::Evaluate(), AliCaloRawAnalyzerCrude::Evaluate(), AliCaloRawAnalyzerKStandard::Evaluate(), and AliCaloRawAnalyzerPeakFinder::Evaluate().
|
protected |
The timebin of the max signal value must be between fMinTimeIndex and fMaxTimeIndex.
Definition at line 123 of file AliCaloRawAnalyzer.h.
Referenced by SelectBunch(), and SetTimeConstraint().
|
protected |
The timebin of the max signal value must be between fMinTimeIndex and fMaxTimeIndex.
Definition at line 122 of file AliCaloRawAnalyzer.h.
Referenced by SelectBunch(), and SetTimeConstraint().
|
protected |
Name of the algorithm.
Definition at line 138 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzer().
|
protected |
Abbrevation for the name.
Definition at line 139 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzer().
|
protected |
Minimum number of sample require before attemting to extract signal parameters.
Definition at line 129 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzerFakeALTRO::Evaluate(), AliCaloRawAnalyzerFastFit::Evaluate(), and AliCaloRawAnalyzerPeakFinder::Evaluate().
|
protected |
Number of samples used for pedestal calculation (first in bunch)
Definition at line 132 of file AliCaloRawAnalyzer.h.
Referenced by EvaluatePedestal().
|
protected |
Value when ADC starts to saturate.
Definition at line 130 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzerFakeALTRO::Evaluate(), AliCaloRawAnalyzerFastFit::Evaluate(), AliCaloRawAnalyzerNN::Evaluate(), AliCaloRawAnalyzerCrude::Evaluate(), and AliCaloRawAnalyzerPeakFinder::Evaluate().
|
protected |
Reversed sequence of samples (pedestalsubtracted)
Definition at line 120 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzer(), CalculateChi2(), CalculateMeanAndRMS(), AliCaloRawAnalyzerFakeALTRO::Evaluate(), AliCaloRawAnalyzerFastFit::Evaluate(), AliCaloRawAnalyzerNN::Evaluate(), AliCaloRawAnalyzerCrude::Evaluate(), AliCaloRawAnalyzerPeakFinder::Evaluate(), and PreFitEvaluateSamples().
|
protected |
Rise time of the signal (peak position = t0 +tau), by defauly it is 235 ns.
Definition at line 149 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzerFitter::AliCaloRawAnalyzerFitter(), and AliCaloRawAnalyzerFakeALTRO::Evaluate().
|
protected |
The amplitude in entities of ADC counts.
Definition at line 147 of file AliCaloRawAnalyzer.h.
|
protected |
Print debug information to std out if set to true.
Definition at line 136 of file AliCaloRawAnalyzer.h.
Referenced by AliCaloRawAnalyzerFakeALTRO::Evaluate().