AliCaloRawAnalyzerCrude::AliCaloRawAnalyzerCrude() : AliCaloRawAnalyzer("Crude", "Crude")
{
- //Comment
+ // Ctor
+
fAlgo=Algo::kCrude;
}
-
-AliCaloRawAnalyzerCrude::~AliCaloRawAnalyzerCrude()
-{
- //Comment
-}
-
-
AliCaloFitResults
AliCaloRawAnalyzerCrude::Evaluate(const vector<AliCaloBunchInfo> &bunchvector, const UInt_t altrocfg1, const UInt_t altrocfg2)
{
public:
AliCaloRawAnalyzerCrude();
- virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector,
+
+ virtual ~AliCaloRawAnalyzerCrude() { ; }
+
+ virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector,
const UInt_t altrocfg1, const UInt_t altrocfg2 );
- virtual ~AliCaloRawAnalyzerCrude();
-
+
private:
ClassDef(AliCaloRawAnalyzerCrude, 1)
};
AliCaloRawAnalyzer*
AliCaloRawAnalyzerFactory::CreateAnalyzer( const int algo )
{
- // return new AliCaloRawAnalyzerKStandard();
- switch ( algo)
- {
+ // Return the requested algorithm
+
+ switch ( algo)
+ {
case kFastFit:
return new AliCaloRawAnalyzerFastFit();
break;
}
AliCaloFitResults
-AliCaloRawAnalyzerFakeALTRO::Evaluate( const vector<AliCaloBunchInfo> &bunchvector, const UInt_t altrocfg1, const UInt_t altrocfg2 )
+AliCaloRawAnalyzerFakeALTRO::Evaluate( const vector<AliCaloBunchInfo> &bunchvector,
+ UInt_t altrocfg1, UInt_t altrocfg2 )
{
// Extracting signal parameters using fitting
+
short maxampindex; //index of maximum amplitude
short maxamp; //Maximum amplitude
int index = SelectBunch( bunchvector, &maxampindex, &maxamp );
friend class AliCaloRawAnalyzerFactory;
public:
+
virtual ~AliCaloRawAnalyzerFakeALTRO();
- virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector, const UInt_t altrocfg1, const UInt_t altrocfg2 );
+
+ virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector,
+ UInt_t altrocfg1,
+ UInt_t altrocfg2 );
private:
+
AliCaloRawAnalyzerFakeALTRO();
- AliCaloRawAnalyzerFakeALTRO(const AliCaloRawAnalyzerFakeALTRO & );
- AliCaloRawAnalyzerFakeALTRO & operator = (const AliCaloRawAnalyzerFakeALTRO &);
+ AliCaloRawAnalyzerFakeALTRO( const AliCaloRawAnalyzerFakeALTRO & );
+ AliCaloRawAnalyzerFakeALTRO & operator = (const AliCaloRawAnalyzerFakeALTRO & );
ClassDef(AliCaloRawAnalyzerFakeALTRO,1)
};
AliCaloFitResults
AliCaloRawAnalyzerFastFit::Evaluate( const vector<AliCaloBunchInfo> &bunchvector,
- const UInt_t altrocfg1, const UInt_t altrocfg2 )
+ UInt_t altrocfg1, UInt_t altrocfg2 )
{
// Execute algorithm
class AliCaloRawAnalyzerFastFit : public AliCaloRawAnalyzerFitter
{
- friend class AliCaloRawAnalyzerFactory; // comment
+ friend class AliCaloRawAnalyzerFactory; // RuleChecker request
public:
virtual ~AliCaloRawAnalyzerFastFit() { ; }
virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector,
- const UInt_t altrocfg1, const UInt_t altrocfg2 );
+ UInt_t altrocfg1, UInt_t altrocfg2 );
private:
class AliCaloRawAnalyzerFitter : public AliCaloRawAnalyzer
{
public:
+
AliCaloRawAnalyzerFitter( const char *name, const char *nameshort );
+
virtual ~AliCaloRawAnalyzerFitter();
TF1 * GetFit() const { return fTf1; };
AliCaloFitResults
-AliCaloRawAnalyzerKStandard::Evaluate( const vector<AliCaloBunchInfo> &bunchlist, const UInt_t altrocfg1, const UInt_t altrocfg2 )
+AliCaloRawAnalyzerKStandard::Evaluate( const vector<AliCaloBunchInfo> &bunchlist, UInt_t altrocfg1, UInt_t altrocfg2 )
{
//Evaluation Amplitude and TOF
Float_t pedEstimate = 0;
void
- AliCaloRawAnalyzerKStandard::FitRaw(const Int_t firstTimeBin, const Int_t lastTimeBin, Float_t & amp, Float_t & time, Float_t & chi2, Bool_t & fitDone) const
+ AliCaloRawAnalyzerKStandard::FitRaw( Int_t firstTimeBin, Int_t lastTimeBin,
+ Float_t & amp, Float_t & time, Float_t & chi2, Bool_t & fitDone) const
{
// Fits the raw signal time distribution
int nsamples = lastTimeBin - firstTimeBin + 1;
class AliCaloRawAnalyzerKStandard : public AliCaloRawAnalyzerFitter
{
- friend class AliCaloRawAnalyzerFactory; // Factory for creation of raw analyzer (= shutting up the rule checker )
+ friend class AliCaloRawAnalyzerFactory; // Factory for creation of raw analyzer (rule checker request)
public:
+
virtual ~AliCaloRawAnalyzerKStandard();
- virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector, const UInt_t altrocfg1, const UInt_t altrocfg2 );
- void FitRaw(const Int_t firstTimeBin, const Int_t lastTimeBin, Float_t & amp, Float_t & time,
- Float_t & chi2, Bool_t & fitDone) const ;
+
+ virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector,
+ UInt_t altrocfg1,
+ UInt_t altrocfg2 );
+
+ void FitRaw( Int_t firstTimeBin, Int_t lastTimeBin,
+ Float_t & amp, Float_t & time,
+ Float_t & chi2, Bool_t & fitDone) const ;
private:
+
AliCaloRawAnalyzerKStandard();
- AliCaloRawAnalyzerKStandard(const AliCaloRawAnalyzerKStandard & );
- AliCaloRawAnalyzerKStandard & operator = (const AliCaloRawAnalyzerKStandard &);
+ AliCaloRawAnalyzerKStandard( const AliCaloRawAnalyzerKStandard & );
+ AliCaloRawAnalyzerKStandard & operator = (const AliCaloRawAnalyzerKStandard & );
+
ClassDef(AliCaloRawAnalyzerKStandard, 2)
};
AliCaloRawAnalyzerNN::AliCaloRawAnalyzerNN() : AliCaloRawAnalyzer("Neural Network", "NN"), fNeuralNet(0)
{
- // Comment
+ // Ctor
+
fAlgo=Algo::kNeuralNet;
fNeuralNet = new AliCaloNeuralFit();
AliCaloRawAnalyzerNN::~AliCaloRawAnalyzerNN()
{
+ // Dtor
delete fNeuralNet;
}
AliCaloFitResults
AliCaloRawAnalyzerNN::Evaluate( const vector<AliCaloBunchInfo> &bunchvector,
- const UInt_t altrocfg1, const UInt_t altrocfg2 )
+ UInt_t altrocfg1, UInt_t altrocfg2 )
{
// The eveluation of Peak position and amplitude using the Neural Network
if( bunchvector.size() <= 0 )
class AliCaloFitResults;
class AliCaloNeuralFit;
-
class AliCaloRawAnalyzerNN : public AliCaloRawAnalyzer
{
friend class AliCaloRawAnalyzerFactory; // self explanatory
+
public:
- // AliCaloRawAnalyzerNN();
+
virtual ~AliCaloRawAnalyzerNN();
virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector,
- const UInt_t altrocfg1, const UInt_t altrocfg2 );
- // virtual void SelectSubarray( const Double_t *fData, const int length, const short maxindex, int *const first, int *const last ) const;
+ UInt_t altrocfg1, UInt_t altrocfg2 );
private:
+
AliCaloRawAnalyzerNN();
- AliCaloRawAnalyzerNN( const AliCaloRawAnalyzerNN & );
- AliCaloRawAnalyzerNN & operator = ( const AliCaloRawAnalyzerNN & );
+ AliCaloRawAnalyzerNN( const AliCaloRawAnalyzerNN & );
+ AliCaloRawAnalyzerNN & operator = ( const AliCaloRawAnalyzerNN & );
+
AliCaloNeuralFit *fNeuralNet; // pointer to the class whick actually implements the Neural Network for EMCAL
Double_t fNNInput[5]; // The 5 input Neurons to the network ( mix bin + to samples on each side )
ClassDef( AliCaloRawAnalyzerNN, 1 )
// The amplitude is extracted as a
// weighted sum of the samples using the
// best possible weights.
-// The wights is calculated only once and the
-// Actual extraction of amplitude and peak position
-// Is done with a simple vector multiplication, allowing for
-// Extreemely fast computations.
+// 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.
#include "AliCaloRawAnalyzerPeakFinder.h"
#include "AliCaloBunchInfo.h"
using namespace std;
-
-
ClassImp( AliCaloRawAnalyzerPeakFinder )
fRunOnAlien(false),
fIsInitialized(false)
{
- //Comment
+ // Ctor
fAlgo= Algo::kPeakFinder;
fPeakFinderVectors = new AliCaloPeakFinderVectors() ;
ResetVectors();
}
-AliCaloRawAnalyzerPeakFinder::~AliCaloRawAnalyzerPeakFinder()
-{
- //comment
-}
-
-
Double_t
AliCaloRawAnalyzerPeakFinder::ScanCoarse(const Double_t *const array, const int length ) const
{
class AliCaloRawAnalyzerPeakFinder : public AliCaloRawAnalyzer
{
- friend class AliCaloRawAnalyzerFactory; // shutting up the rule checker
+ friend class AliCaloRawAnalyzerFactory; // rule checker request
+
public:
- virtual ~AliCaloRawAnalyzerPeakFinder();
+
+ virtual ~AliCaloRawAnalyzerPeakFinder() { ; }
+
virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector,
- const UInt_t altrocfg1, const UInt_t altrocfg2 );
+ UInt_t altrocfg1, UInt_t altrocfg2 );
private:
+
AliCaloRawAnalyzerPeakFinder();
- AliCaloRawAnalyzerPeakFinder( const AliCaloRawAnalyzerPeakFinder & );
- AliCaloRawAnalyzerPeakFinder & operator = ( const AliCaloRawAnalyzerPeakFinder & );
+ AliCaloRawAnalyzerPeakFinder( const AliCaloRawAnalyzerPeakFinder & );
+ AliCaloRawAnalyzerPeakFinder & operator = ( const AliCaloRawAnalyzerPeakFinder & );
+
void LoadVectorsOCDB();
- void CopyVectors(const AliCaloPeakFinderVectors *const pfvectors );
+ void CopyVectors(const AliCaloPeakFinderVectors * pfvectors );
void ResetVectors();
void WriteRootFile() const;
- void PrintVectors();
- Double_t ScanCoarse(const Double_t *const array, const int length ) const ; // Find a rough estimate of peak position and t0
- Double_t fPFAmpVectorsCoarse[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for Amplitude extraction, first iteration
- Double_t fPFTofVectorsCoarse[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for TOF extraction, first iteration
- Double_t fPFAmpVectors[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for Amplitude extraction, second iteration
- Double_t fPFTofVectors[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for TOF extraction, second iteration
- AliCaloPeakFinderVectors *fPeakFinderVectors; // Collection of Peak-Fincer vectors
- bool fRunOnAlien; // Wether or not we are running on the GRID
+ void PrintVectors();
+ Double_t ScanCoarse( const Double_t *array, Int_t length ) const ; // Find a rough estimate of peak position and t0
+
+ Double_t fPFAmpVectorsCoarse[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for Amplitude extraction, first iteration
+ Double_t fPFTofVectorsCoarse[PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for TOF extraction, first iteration
+ Double_t fPFAmpVectors [PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for Amplitude extraction, second iteration
+ Double_t fPFTofVectors [PF::MAXSTART][PF::SAMPLERANGE][100]; // Vectors for TOF extraction, second iteration
+
+ AliCaloPeakFinderVectors * fPeakFinderVectors; // Collection of Peak-Fincer vectors
+
+ bool fRunOnAlien; // Wether or not we are running on the GRID
bool fIsInitialized; // init flag
+
ClassDef( AliCaloRawAnalyzerPeakFinder, 1 )
+
};