From 396baaf6bede58d74faf8ea7fa5fd9b38dbf6303 Mon Sep 17 00:00:00 2001 From: phille Date: Tue, 29 Mar 2011 16:38:02 +0000 Subject: [PATCH] Refactoring: Code triplication various class memeber, and functions was triplicated in AliCaloRawAnalyzerLMS/ALTRO/KSTandard. Common code moved tho ne mother class AliCaliRawAnalyzerFitter. --- EMCAL/AliCaloRawAnalyzer.cxx | 4 +- EMCAL/AliCaloRawAnalyzer.h | 11 ++- EMCAL/AliCaloRawAnalyzerFactory.cxx | 2 + EMCAL/AliCaloRawAnalyzerFakeALTRO.cxx | 29 ++++-- EMCAL/AliCaloRawAnalyzerFakeALTRO.h | 36 ++++--- EMCAL/AliCaloRawAnalyzerKStandard.cxx | 134 +++++--------------------- EMCAL/AliCaloRawAnalyzerKStandard.h | 41 ++++---- EMCAL/AliCaloRawAnalyzerLMS.cxx | 34 +++++-- EMCAL/AliCaloRawAnalyzerLMS.h | 30 +++--- EMCAL/AliEMCALRawUtils.cxx | 3 + 10 files changed, 148 insertions(+), 176 deletions(-) diff --git a/EMCAL/AliCaloRawAnalyzer.cxx b/EMCAL/AliCaloRawAnalyzer.cxx index b4eb88e34ab..c8dc9b104c6 100644 --- a/EMCAL/AliCaloRawAnalyzer.cxx +++ b/EMCAL/AliCaloRawAnalyzer.cxx @@ -49,7 +49,9 @@ AliCaloRawAnalyzer::AliCaloRawAnalyzer(const char *name, const char *nameshort) // fFp(0), fL1Phase(0), fAmp(0), - fTof(0) + fTof(0), + fTau( EMCAL::TAU ) +// fFixTau(true) { //Comment snprintf(fName, 256,"%s", name); diff --git a/EMCAL/AliCaloRawAnalyzer.h b/EMCAL/AliCaloRawAnalyzer.h index 100d53d89b9..c2209cad312 100644 --- a/EMCAL/AliCaloRawAnalyzer.h +++ b/EMCAL/AliCaloRawAnalyzer.h @@ -93,6 +93,12 @@ public: // PAI int SelectBunch( const std::vector &bunchvector, short *const maxampbin, short *const maxamplitude ); void SelectSubarray( const Double_t *date, const int length, const short maxindex, int *const first, int *const last, const int cut); Float_t EvaluatePedestal(const UShort_t * const data, const int length ) const; + + Float_t GetTau() const { return fTau;}; + void SetTau( const Float_t tau ) { fTau =tau ;}; + //Bool_t GetFixTau() const { return fFixTau; }; + //void SetFixTau(Bool_t b) { fFixTau = b; }; + Double_t fReversed[ALTROMAXSAMPLES]; //Reversed sequence of samples (pedestalsubtracted) // private: int fMinTimeIndex; //The timebin of the max signal value must be between fMinTimeIndex and fMaxTimeIndex @@ -113,7 +119,10 @@ public: // PAI Double_t fAmp; // The amplitude in entities of ADC counts Double_t fTof; // The amplitude in entities of ADC counts - + + Float_t fTau; + // Bool_t fFixTau; // flag if tau should be fix + ClassDef(AliCaloRawAnalyzer, 2) }; diff --git a/EMCAL/AliCaloRawAnalyzerFactory.cxx b/EMCAL/AliCaloRawAnalyzerFactory.cxx index e47ba15196b..cf2c29eabb1 100644 --- a/EMCAL/AliCaloRawAnalyzerFactory.cxx +++ b/EMCAL/AliCaloRawAnalyzerFactory.cxx @@ -38,9 +38,11 @@ AliCaloRawAnalyzerFactory::~AliCaloRawAnalyzerFactory() } + AliCaloRawAnalyzer* AliCaloRawAnalyzerFactory::CreateAnalyzer( const int algo ) { + // return new AliCaloRawAnalyzerKStandard(); switch ( algo) { case kFastFit: diff --git a/EMCAL/AliCaloRawAnalyzerFakeALTRO.cxx b/EMCAL/AliCaloRawAnalyzerFakeALTRO.cxx index 2d4edac87f0..5c9dccbc7bc 100644 --- a/EMCAL/AliCaloRawAnalyzerFakeALTRO.cxx +++ b/EMCAL/AliCaloRawAnalyzerFakeALTRO.cxx @@ -33,18 +33,20 @@ Author: R. GUERNANE LPSC Grenoble CNRS/IN2P3 using namespace std; -#define BAD 4 //CRAP PTH +//#define BAD 4 //CRAP PTH ClassImp( AliCaloRawAnalyzerFakeALTRO ) -AliCaloRawAnalyzerFakeALTRO::AliCaloRawAnalyzerFakeALTRO() : AliCaloRawAnalyzer("Chi Square Fit", "LMS"), - fkEulerSquared(7.389056098930650227), - fTf1(0), - fTau(2.35), - fFixTau(kTRUE) +AliCaloRawAnalyzerFakeALTRO::AliCaloRawAnalyzerFakeALTRO() : AliCaloRawAnalyzerFitter("Chi Square Fit", "LMS") +// fkEulerSquared(7.389056098930650227), +// fTf1(0), +// fTau(2.35), +// fFixTau(kTRUE) { //comment + + /* for(int i=0; i < ALTROMAXSAMPLES; i++) { fXaxis[i] = i; @@ -58,16 +60,24 @@ AliCaloRawAnalyzerFakeALTRO::AliCaloRawAnalyzerFakeALTRO() : AliCaloRawAnalyzer( fTf1->ReleaseParameter(2); // allow par. to vary fTf1->SetParameter(2, fTau); } - + */ + } AliCaloRawAnalyzerFakeALTRO::~AliCaloRawAnalyzerFakeALTRO() { - delete fTf1; + //delete fTf1; } +/* +void +AliCaloRawAnalyzerFakeALTRO::InitFormula( TF1* f) +{ + f = new TF1( "myformula", "[0]*((x - [1])/[2])^2*exp(-2*(x -[1])/[2])", 0, 30 ); +} +*/ AliCaloFitResults AliCaloRawAnalyzerFakeALTRO::Evaluate( const vector &bunchvector, const UInt_t altrocfg1, const UInt_t altrocfg2 ) @@ -158,6 +168,8 @@ AliCaloRawAnalyzerFakeALTRO::Evaluate( const vector &bunchvec } + +/* void AliCaloRawAnalyzerFakeALTRO::PrintFitResult(const TF1 *f) const { @@ -170,4 +182,5 @@ AliCaloRawAnalyzerFakeALTRO::PrintFitResult(const TF1 *f) const // cout << __FILE__ << __LINE__ << "STATUS = " << f->GetStatus() << ",.. !!!!" << endl << endl; cout << endl << endl; } +*/ diff --git a/EMCAL/AliCaloRawAnalyzerFakeALTRO.h b/EMCAL/AliCaloRawAnalyzerFakeALTRO.h index d479d177dc7..7fd1208c7c4 100644 --- a/EMCAL/AliCaloRawAnalyzerFakeALTRO.h +++ b/EMCAL/AliCaloRawAnalyzerFakeALTRO.h @@ -10,13 +10,13 @@ Author: R. GUERNANE LPSC Grenoble CNRS/IN2P3 */ -#include "AliCaloRawAnalyzer.h" +#include "AliCaloRawAnalyzerFitter.h" -class TF1; -class TGraph; +// class TF1; +// class TGraph; -class AliCaloRawAnalyzerFakeALTRO : public AliCaloRawAnalyzer +class AliCaloRawAnalyzerFakeALTRO : public AliCaloRawAnalyzerFitter { friend class AliCaloRawAnalyzerFactory; @@ -25,28 +25,32 @@ class AliCaloRawAnalyzerFakeALTRO : public AliCaloRawAnalyzer virtual ~AliCaloRawAnalyzerFakeALTRO(); virtual AliCaloFitResults Evaluate( const std::vector &bunchvector, const UInt_t altrocfg1, const UInt_t altrocfg2 ); - void PrintFitResult(const TF1 *f) const; + + //void PrintFitResult(const TF1 *f) const; // shaper tau value, in time-bins, and flag for keeping tau fixed - Float_t GetTau() const { return fTau;}; - void SetTau(Float_t f) { fTau = f; }; - Bool_t GetFixTau() const { return fFixTau; }; - void SetFixTau(Bool_t b) { fFixTau = b; }; + + // Float_t GetTau() const { return fTau;}; + // void SetTau(Float_t f) { fTau = f; }; + // Bool_t GetFixTau() const { return fFixTau; }; + // void SetFixTau(Bool_t b) { fFixTau = b; }; // extra interfaces - TF1 * GetFit() const { return fTf1; }; - + // TF1 * GetFit() const { return fTf1; }; + + // virtual void InitFormula( TF1* f); + private: AliCaloRawAnalyzerFakeALTRO(); AliCaloRawAnalyzerFakeALTRO(const AliCaloRawAnalyzerFakeALTRO & ); AliCaloRawAnalyzerFakeALTRO & operator = (const AliCaloRawAnalyzerFakeALTRO &); - double fXaxis[ALTROMAXSAMPLES]; //Axis if time bins, ( used by TGraph ) - const double fkEulerSquared; //e^2 = 7.389056098930650227 - TF1 *fTf1; // Analytical formula of the Semi Gaussian to be fitted + // double fXaxis[ALTROMAXSAMPLES]; //Axis if time bins, ( used by TGraph ) + // const double fkEulerSquared; //e^2 = 7.389056098930650227 + // TF1 *fTf1; // Analytical formula of the Semi Gaussian to be fitted - Float_t fTau; // shaper tau, in time bins - Bool_t fFixTau; // flag if tau should be fix + // Float_t fTau; // shaper tau, in time bins + // Bool_t fFixTau; // flag if tau should be fix ClassDef(AliCaloRawAnalyzerFakeALTRO,1) diff --git a/EMCAL/AliCaloRawAnalyzerKStandard.cxx b/EMCAL/AliCaloRawAnalyzerKStandard.cxx index fd5bd0d09ff..7cd48d395f2 100644 --- a/EMCAL/AliCaloRawAnalyzerKStandard.cxx +++ b/EMCAL/AliCaloRawAnalyzerKStandard.cxx @@ -44,30 +44,38 @@ using namespace std; ClassImp( AliCaloRawAnalyzerKStandard ) -AliCaloRawAnalyzerKStandard::AliCaloRawAnalyzerKStandard() : AliCaloRawAnalyzer("Chi Square ( kStandard )", "KStandard"), - fkEulerSquared(7.389056098930650227), - fTf1(0), - fTau(2.35), - fFixTau(kTRUE) +AliCaloRawAnalyzerKStandard::AliCaloRawAnalyzerKStandard() : AliCaloRawAnalyzerFitter("Chi Square ( kStandard )", "KStandard") +// fkEulerSquared(7.389056098930650227), +// fTf1(0) +// fTau(2.35), +// fFixTau(kTRUE) { fAlgo = Algo::kStandard; //comment + + /* for(int i=0; i < ALTROMAXSAMPLES; i++) { fXaxis[i] = i; } - - fTf1 = new TF1( "myformula", "[0]*((x - [1])/[2])^2*exp(-2*(x -[1])/[2])", 0, 30 ); + */ + + // fTf1 = new TF1( "myformula", "[0]*((x - [1])/[2])^2*exp(-2*(x -[1])/[2])", 0, 30 ); + + // InitFormula(fTf1); + + /* if (fFixTau) { - fTf1->FixParameter(2, fTau); + fTf1->FixParameter(2, fTau); } else { fTf1->ReleaseParameter(2); // allow par. to vary fTf1->SetParameter(2, fTau); } + */ } @@ -77,6 +85,13 @@ AliCaloRawAnalyzerKStandard::~AliCaloRawAnalyzerKStandard() } +/* +void +AliCaloRawAnalyzerKStandard::InitFormula( TF1* f) +{ + f = new TF1( "myformula", "[0]*((x - [1])/[2])^2*exp(-2*(x -[1])/[2])", 0, 30 ); +} +*/ AliCaloFitResults AliCaloRawAnalyzerKStandard::Evaluate( const vector &bunchlist, const UInt_t altrocfg1, const UInt_t altrocfg2 ) @@ -158,108 +173,7 @@ AliCaloRawAnalyzerKStandard::Evaluate( const vector &bunchlis } - - -/* - return AliCaloFitResults( maxamp, ped, Ret::kCrude, maxf, timebinOffset, - timebinOffset, chi2, ndf, Ret::kDummy, AliCaloFitSubarray(index, maxrev, first, last) ); - } - } // ampcut - } - return AliCaloFitResults( Ret::kInvalid, Ret::kInvalid ); -*/ - - /* - // Extracting signal parameters using fitting - short maxampindex; //index of maximum amplitude - short maxamp; //Maximum amplitude - int index = SelectBunch( bunchvector, &maxampindex, &maxamp ); - - if( index >= 0) - { - Float_t ped = ReverseAndSubtractPed( &(bunchvector.at(index)) , altrocfg1, altrocfg2, fReversed ); - Float_t maxf = TMath::MaxElement( bunchvector.at(index).GetLength(), fReversed ); - short maxrev = maxampindex - bunchvector.at(index).GetStartBin(); - // timebinOffset is timebin value at maximum (maxrev) - short timebinOffset = maxampindex - (bunchvector.at(index).GetLength()-1); - if( maxf < fAmpCut || ( maxamp - ped) > fOverflowCut ) // (maxamp - ped) > fOverflowCut = Close to saturation (use low gain then) - { - return AliCaloFitResults( maxamp, ped, Ret::kCrude, maxf, timebinOffset); - } - else if ( maxf >= fAmpCut ) - { - int first = 0; - int last = 0; - SelectSubarray( fReversed, bunchvector.at(index).GetLength(), maxrev, &first, &last, fFitArrayCut); - int nsamples = last - first + 1; - - if( ( nsamples ) >= fNsampleCut ) - { - Float_t tmax = (maxrev - first); // local tmax estimate - TGraph *graph = new TGraph( nsamples, fXaxis, &fReversed[first] ); - fTf1->SetParameter(0, maxf*fkEulerSquared ); - fTf1->SetParameter(1, tmax - fTau); - // set rather loose parameter limits - fTf1->SetParLimits(0, 0.5*maxf*fkEulerSquared, 2*maxf*fkEulerSquared ); - fTf1->SetParLimits(1, tmax - fTau - 4, tmax - fTau + 4); - - if (fFixTau) { - fTf1->FixParameter(2, fTau); - } - else { - fTf1->ReleaseParameter(2); // allow par. to vary - fTf1->SetParameter(2, fTau); - } - - Short_t tmpStatus = 0; - try { - tmpStatus = graph->Fit(fTf1, "Q0RW"); - } - catch (const std::exception & e) { - AliError( Form("TGraph Fit exception %s", e.what()) ); - return AliCaloFitResults( maxamp, ped, Ret::kNoFit, maxf, timebinOffset, - timebinOffset, Ret::kDummy, Ret::kDummy, Ret::kDummy, AliCaloFitSubarray(index, maxrev, first, last) ); - } - - if( fVerbose == true ) - { - AliCaloRawAnalyzer::PrintBunch( bunchvector.at(index) ); - PrintFitResult( fTf1 ) ; - } - // global tmax - tmax = fTf1->GetParameter(1) + timebinOffset - (maxrev - first) // abs. t0 - + fTf1->GetParameter(2); // +tau, makes sum tmax - - delete graph; - return AliCaloFitResults( maxamp, ped , Ret::kFitPar, - fTf1->GetParameter(0)/fkEulerSquared, - tmax, - timebinOffset, - fTf1->GetChisquare(), - fTf1->GetNDF(), - Ret::kDummy, AliCaloFitSubarray(index, maxrev, first, last) ); - - // delete graph; - - } - else - { - - Float_t chi2 = CalculateChi2(maxf, maxrev, first, last); - Int_t ndf = last - first - 1; // nsamples - 2 - return AliCaloFitResults( maxamp, ped, Ret::kCrude, maxf, timebinOffset, - timebinOffset, chi2, ndf, Ret::kDummy, AliCaloFitSubarray(index, maxrev, first, last) ); - } - } // ampcut - } - return AliCaloFitResults( Ret::kInvalid, Ret::kInvalid ); - -} -*/ - - - void AliCaloRawAnalyzerKStandard::PrintFitResult(const TF1 *f) const { @@ -272,7 +186,7 @@ AliCaloRawAnalyzerKStandard::PrintFitResult(const TF1 *f) const // cout << __FILE__ << __LINE__ << "STATUS = " << f->GetStatus() << ",.. !!!!" << endl << endl; cout << endl << endl; } - +*/ diff --git a/EMCAL/AliCaloRawAnalyzerKStandard.h b/EMCAL/AliCaloRawAnalyzerKStandard.h index 5abc093aa41..2628f78b532 100644 --- a/EMCAL/AliCaloRawAnalyzerKStandard.h +++ b/EMCAL/AliCaloRawAnalyzerKStandard.h @@ -23,16 +23,16 @@ // FRom CALO raw data using // Chi square fit -#include "AliCaloRawAnalyzer.h" +#include "AliCaloRawAnalyzerFitter.h" #include "AliCaloConstants.h" -using namespace ALTRO; -using namespace EMCAL; +//using namespace ALTRO; +//using namespace EMCAL; -class TF1; +//class TF1; class TGraph; -class AliCaloRawAnalyzerKStandard : public AliCaloRawAnalyzer +class AliCaloRawAnalyzerKStandard : public AliCaloRawAnalyzerFitter { friend class AliCaloRawAnalyzerFactory; @@ -40,7 +40,7 @@ class AliCaloRawAnalyzerKStandard : public AliCaloRawAnalyzer //AliCaloRawAnalyzerKStandard(); virtual ~AliCaloRawAnalyzerKStandard(); virtual AliCaloFitResults Evaluate( const std::vector &bunchvector, const UInt_t altrocfg1, const UInt_t altrocfg2 ); - void PrintFitResult(const TF1 *f) const; + // void PrintFitResult(const TF1 *f) const; static Double_t RawResponseFunction(Double_t *x, Double_t *par); void FitRaw(const Int_t firstTimeBin, const Int_t lastTimeBin, Float_t & amp, Float_t & time, Float_t & chi2, Bool_t & fitDone) const ; @@ -48,25 +48,32 @@ class AliCaloRawAnalyzerKStandard : public AliCaloRawAnalyzer void FitParabola(const TGraph *gSig, Float_t & amp) const ; // shaper tau value, in time-bins, and flag for keeping tau fixed - Float_t GetTau() const { return fTau;}; - void SetTau(Float_t f) { fTau = f; }; - Bool_t GetFixTau() const { return fFixTau; }; - void SetFixTau(Bool_t b) { fFixTau = b; }; + + // Float_t GetTau() const { return fTau;}; + // void SetTau(Float_t f) { fTau = f; }; + + // Bool_t GetFixTau() const { return fFixTau; }; + // void SetFixTau(Bool_t b) { fFixTau = b; }; + + // virtual void InitFormula( TF1*); // extra interfaces - TF1 * GetFit() const { return fTf1; }; + // TF1 * GetFit() const { return fTf1; }; private: AliCaloRawAnalyzerKStandard(); AliCaloRawAnalyzerKStandard(const AliCaloRawAnalyzerKStandard & ); AliCaloRawAnalyzerKStandard & operator = (const AliCaloRawAnalyzerKStandard &); - double fXaxis[ALTROMAXSAMPLES]; //Axis if time bins, ( used by TGraph ) - const double fkEulerSquared; //e^2 = 7.389056098930650227 - TF1 *fTf1; // Analytical formula of the Semi Gaussian to be fitted - - Float_t fTau; // shaper tau, in time bins - Bool_t fFixTau; // flag if tau should be fix + + // double fXaxis[ALTROMAXSAMPLES]; //Axis if time bins, ( used by TGraph ) + // const double fkEulerSquared; //e^2 = 7.389056098930650227 + + //TF1 *fTf1; // Analytical formula of the Semi Gaussian to be fitted + + + // Float_t fTau; // shaper tau, in time bins + // Bool_t fFixTau; // flag if tau should be fix ClassDef(AliCaloRawAnalyzerKStandard, 2) diff --git a/EMCAL/AliCaloRawAnalyzerLMS.cxx b/EMCAL/AliCaloRawAnalyzerLMS.cxx index a38dbd2bc72..99bfd7378ca 100644 --- a/EMCAL/AliCaloRawAnalyzerLMS.cxx +++ b/EMCAL/AliCaloRawAnalyzerLMS.cxx @@ -38,26 +38,31 @@ using namespace std; -#define BAD 4 //CRAP PTH +//#define BAD 4 //CRAP PTH ClassImp( AliCaloRawAnalyzerLMS ) -AliCaloRawAnalyzerLMS::AliCaloRawAnalyzerLMS() : AliCaloRawAnalyzer("Chi Square Fit", "LMS"), - fkEulerSquared(7.389056098930650227), - fTf1(0), - fTau(2.35), - fFixTau(kTRUE) +AliCaloRawAnalyzerLMS::AliCaloRawAnalyzerLMS() : AliCaloRawAnalyzerFitter("Chi Square Fit", "LMS") +// fkEulerSquared(7.389056098930650227), +// fTf1(0) +// fTau(2.35), +// fFixTau(kTRUE) { - fAlgo = Algo::kLMS; //comment + + /* for(int i=0; i < ALTROMAXSAMPLES; i++) { fXaxis[i] = i; } + */ - fTf1 = new TF1( "myformula", "[0]*((x - [1])/[2])^2*exp(-2*(x -[1])/[2])", 0, 30 ); + // fTf1 = new TF1( "myformula", "[0]*((x - [1])/[2])^2*exp(-2*(x -[1])/[2])", 0, 30 ); + + + /* if (fFixTau) { fTf1->FixParameter(2, fTau); @@ -67,15 +72,23 @@ AliCaloRawAnalyzerLMS::AliCaloRawAnalyzerLMS() : AliCaloRawAnalyzer("Chi Square fTf1->ReleaseParameter(2); // allow par. to vary fTf1->SetParameter(2, fTau); } + */ } AliCaloRawAnalyzerLMS::~AliCaloRawAnalyzerLMS() { - delete fTf1; + // delete fTf1; } +/* +void +AliCaloRawAnalyzerLMS::InitFormula( TF1* f) +{ + f = new TF1( "myformula", "[0]*((x - [1])/[2])^2*exp(-2*(x -[1])/[2])", 0, 30 ); +} +*/ AliCaloFitResults AliCaloRawAnalyzerLMS::Evaluate( const vector &bunchvector, const UInt_t altrocfg1, const UInt_t altrocfg2 ) @@ -167,6 +180,7 @@ AliCaloRawAnalyzerLMS::Evaluate( const vector &bunchvector, c } +/* void AliCaloRawAnalyzerLMS::PrintFitResult(const TF1 *f) const { @@ -179,4 +193,4 @@ AliCaloRawAnalyzerLMS::PrintFitResult(const TF1 *f) const // cout << __FILE__ << __LINE__ << "STATUS = " << f->GetStatus() << ",.. !!!!" << endl << endl; cout << endl << endl; } - +*/ diff --git a/EMCAL/AliCaloRawAnalyzerLMS.h b/EMCAL/AliCaloRawAnalyzerLMS.h index b7608dcd737..ed5f53f4ad3 100644 --- a/EMCAL/AliCaloRawAnalyzerLMS.h +++ b/EMCAL/AliCaloRawAnalyzerLMS.h @@ -23,7 +23,7 @@ // FRom CALO raw data using // Chi square fit -#include "AliCaloRawAnalyzer.h" +#include "AliCaloRawAnalyzerFitter.h" #include "AliCaloConstants.h" using namespace ALTRO; @@ -31,7 +31,7 @@ using namespace ALTRO; class TF1; class TGraph; -class AliCaloRawAnalyzerLMS : public AliCaloRawAnalyzer +class AliCaloRawAnalyzerLMS : public AliCaloRawAnalyzerFitter { friend class AliCaloRawAnalyzerFactory; @@ -39,28 +39,32 @@ class AliCaloRawAnalyzerLMS : public AliCaloRawAnalyzer // AliCaloRawAnalyzerLMS(); virtual ~AliCaloRawAnalyzerLMS(); virtual AliCaloFitResults Evaluate( const std::vector &bunchvector, const UInt_t altrocfg1, const UInt_t altrocfg2 ); - void PrintFitResult(const TF1 *f) const; + //void PrintFitResult(const TF1 *f) const; + + // virtual void InitFormula( TF1* f); // shaper tau value, in time-bins, and flag for keeping tau fixed - Float_t GetTau() const { return fTau;}; - void SetTau(Float_t f) { fTau = f; }; - Bool_t GetFixTau() const { return fFixTau; }; - void SetFixTau(Bool_t b) { fFixTau = b; }; + // Float_t GetTau() const { return fTau;}; + // void SetTau(Float_t f) { fTau = f; }; + // Bool_t GetFixTau() const { return fFixTau; }; + // void SetFixTau(Bool_t b) { fFixTau = b; }; // extra interfaces - TF1 * GetFit() const { return fTf1; }; + // TF1 * GetFit() const { return fTf1; }; private: AliCaloRawAnalyzerLMS(); AliCaloRawAnalyzerLMS(const AliCaloRawAnalyzerLMS & ); AliCaloRawAnalyzerLMS & operator = (const AliCaloRawAnalyzerLMS &); - double fXaxis[ALTROMAXSAMPLES]; //Axis if time bins, ( used by TGraph ) - const double fkEulerSquared; //e^2 = 7.389056098930650227 - TF1 *fTf1; // Analytical formula of the Semi Gaussian to be fitted + // double fXaxis[ALTROMAXSAMPLES]; //Axis if time bins, ( used by TGraph ) + + //const double fkEulerSquared; //e^2 = 7.389056098930650227 + + // TF1 *fTf1; // Analytical formula of the Semi Gaussian to be fitted - Float_t fTau; // shaper tau, in time bins - Bool_t fFixTau; // flag if tau should be fix + // Float_t fTau; // shaper tau, in time bins + // Bool_t fFixTau; // flag if tau should be fix ClassDef(AliCaloRawAnalyzerLMS, 2) diff --git a/EMCAL/AliEMCALRawUtils.cxx b/EMCAL/AliEMCALRawUtils.cxx index 2f959041b6e..c750f993bb2 100644 --- a/EMCAL/AliEMCALRawUtils.cxx +++ b/EMCAL/AliEMCALRawUtils.cxx @@ -491,6 +491,9 @@ void AliEMCALRawUtils::SetFittingAlgorithm(Int_t fitAlgo) { // fRawAnalyzer = AliCaloRawAnalyzerFactory::CreateAnalyzer( Algo::kStandard ); fRawAnalyzer = AliCaloRawAnalyzerFactory::CreateAnalyzer( fitAlgo ); + + //fRawAnalyzer = AliCaloRawAnalyzerFactory::CreateAnalyzer( kStandard ); + fRawAnalyzer->SetNsampleCut(5); // requirement for fits to be done, for the new methods fRawAnalyzer->SetOverflowCut ( OVERFLOWCUT ); fRawAnalyzer->SetAmpCut(fNoiseThreshold); -- 2.43.0