// --- AliRoot header files ---
#include "AliEMCALClusterizer.h"
-class AliEMCALTowerRecPoint ;
+class TH1F;
+class AliEMCALRecPoint ;
class AliEMCALDigit ;
class AliEMCALDigitizer ;
class AliEMCALGeometry ;
-
+class AliEMCALCalibData ;
+class AliCaloCalibPedestal ;
class AliEMCALClusterizerv1 : public AliEMCALClusterizer {
public:
AliEMCALClusterizerv1() ;
- AliEMCALClusterizerv1(const char * headerFile, const char * name = "Default", const Bool_t toSplit=kFALSE);
+ AliEMCALClusterizerv1(AliEMCALGeometry* geometry);
+ AliEMCALClusterizerv1(AliEMCALGeometry* geometry, AliEMCALCalibData * calib, AliCaloCalibPedestal * pedestal);
+
virtual ~AliEMCALClusterizerv1() ;
-
+
virtual Int_t AreNeighbours(AliEMCALDigit * d1, AliEMCALDigit * d2)const ;
// Checks if digits are in neighbour cells
- virtual Float_t Calibrate(Int_t amp, Int_t where)const ; // Tranforms Amp to energy
-
- virtual void GetNumberOfClustersFound(int * numb )const{ numb[0] = fNumberOfPREClusters ;
- numb[1] = fNumberOfECClusters ;
- numb[2] = fNumberOfHCClusters ; }
+ virtual Float_t Calibrate(Int_t amp, Int_t cellId) ; // Tranforms Amp to energy
- virtual Float_t GetPREClusteringThreshold()const{ return fPREClusteringThreshold; }
- virtual Float_t GetECClusteringThreshold()const{ return fECClusteringThreshold;}
- virtual Float_t GetHCClusteringThreshold()const{ return fHCClusteringThreshold;}
+ virtual void GetNumberOfClustersFound(int numb )const{ numb = fNumberOfECAClusters ;}
+ virtual Float_t GetECAClusteringThreshold()const{ return fECAClusteringThreshold;}
+ virtual Float_t GetECALocalMaxCut()const { return fECALocMaxCut;}
+ virtual Float_t GetECALogWeight()const { return fECAW0;}
+ virtual Float_t GetMinECut()const { return fMinECut;}
- virtual Float_t GetPRELocalMaxCut()const { return fPRELocMaxCut;}
- virtual Float_t GetPREShoLogWeight()const { return fPREW0;}
- virtual Float_t GetECLocalMaxCut()const { return fECLocMaxCut;}
- virtual Float_t GetECLogWeight()const { return fECW0;}
- virtual Float_t GetHCLocalMaxCut()const { return fHCLocMaxCut;}
- virtual Float_t GetHCLogWeight()const { return fHCW0;}
+ virtual Float_t GetTimeCut() const { return fTimeCut ; }
- virtual Float_t GetTimeGate() const { return fTimeGate ; }
- virtual const char * GetRecPointsBranch() const{ return GetName() ;}
- virtual const Int_t GetRecPointsInRun() const {return fRecPointsInRun ;}
-
- void Exec(Option_t *option); // Does the job
+ virtual void Digits2Clusters(Option_t *option); // Does the job
virtual void Print(Option_t * option)const ;
- virtual void SetECClusteringThreshold(Float_t cluth) { fECClusteringThreshold = cluth ; }
- virtual void SetECLocalMaxCut(Float_t cut) { fECLocMaxCut = cut ; }
- virtual void SetECLogWeight(Float_t w) { fECW0 = w ; }
- virtual void SetHCClusteringThreshold(Float_t cluth) { fHCClusteringThreshold = cluth ; }
- virtual void SetHCLocalMaxCut(Float_t cut) { fHCLocMaxCut = cut ; }
- virtual void SetHCLogWeight(Float_t w) { fHCW0 = w ; }
- virtual void SetTimeGate(Float_t gate) { fTimeGate = gate ;}
- virtual void SetPREClusteringThreshold(Float_t cluth) { fPREClusteringThreshold = cluth ; }
- virtual void SetPRELocalMaxCut(Float_t cut) { fPRELocMaxCut = cut ; }
- virtual void SetPRELogWeight(Float_t w) { fPREW0 = w ; }
- virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) {fToUnfold = toUnfold ;}
- static Double_t ShowerShape(Double_t r) ; // Shape of EM shower used in unfolding;
+ virtual void SetECAClusteringThreshold(Float_t cluth) { fECAClusteringThreshold = cluth ; }
+ virtual void SetMinECut(Float_t mine) { fMinECut = mine; }
+ virtual void SetECALocalMaxCut(Float_t cut) { fECALocMaxCut = cut ; }
+ virtual void SetECALogWeight(Float_t w) { fECAW0 = w ; }
+ virtual void SetTimeCut(Float_t gate) { fTimeCut = gate ;}
+ virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) {fToUnfold = toUnfold ;}
+ static Double_t ShowerShape(Double_t x, Double_t y) ; // Shape of EM shower used in unfolding;
//class member function (not object member function)
static void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) ;
// Chi^2 of the fit. Should be static to be passes to MINUIT
virtual const char * Version() const { return "clu-v1" ; }
+ void PrintRecoInfo(); //*MENU*
+ void SetCalibrationParameters(AliEMCALCalibData * calib) { fCalibData = calib ; }
+ void SetCaloCalibPedestal(AliCaloCalibPedestal * caloped) { fCaloPed = caloped ; }
+
protected:
- void WriteRecPoints(Int_t event) ;
- virtual void MakeClusters( ) ;
-
+ virtual void MakeClusters();
+
private:
+ AliEMCALClusterizerv1(const AliEMCALClusterizerv1 &); //copy ctor
+ AliEMCALClusterizerv1 & operator = (const AliEMCALClusterizerv1 &);
- const TString BranchName() const ;
void GetCalibrationParameters(void) ;
-
- Bool_t FindFit(AliEMCALTowerRecPoint * emcRP, AliEMCALDigit ** MaxAt, Float_t * maxAtEnergy,
+ void GetCaloCalibPedestal(void) ;
+
+ Bool_t FindFit(AliEMCALRecPoint * emcRP, AliEMCALDigit ** MaxAt, const Float_t * maxAtEnergy,
Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit
void Init() ;
- void InitParameters() ;
+ void InitParameters();
- virtual void MakeUnfolding() ;
- void UnfoldCluster(AliEMCALTowerRecPoint * iniEmc,Int_t Nmax,
- AliEMCALDigit ** maxAt,Float_t * maxAtEnergy ) ; //Unfolds cluster using TMinuit package
+ virtual void MakeUnfolding();
+ void UnfoldCluster(AliEMCALRecPoint * iniEmc, Int_t Nmax,
+ AliEMCALDigit ** maxAt,
+ Float_t * maxAtEnergy ); //Unfolds cluster using TMinuit package
void PrintRecPoints(Option_t * option) ;
private:
+ AliEMCALGeometry* fGeom; //! pointer to geometry for utilities
Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
-
- Int_t fNTowers ; // number of Towers in EMCAL
-
Bool_t fToUnfold ; // To perform unfolding
+ Int_t fNumberOfECAClusters ; // number of clusters found in EC section
- Int_t fNumberOfPREClusters ; // number of clusters found in PRE section
- Int_t fNumberOfECClusters ; // number of clusters found in EC section
- Int_t fNumberOfHCClusters ; // number of clusters found in HC section
-
//Calibration parameters... to be replaced by database
- Float_t fADCchannelPRE ; // width of one ADC channel for PRE section (GeV)
- Float_t fADCpedestalPRE ; // pedestal of ADC for PRE section (GeV)
- Float_t fADCchannelEC ; // width of one ADC channel for EC section (GeV)
- Float_t fADCpedestalEC ; // pedestal of ADC for EC section (GeV)
- Float_t fADCchannelHC ; // width of one ADC channel for HC section (GeV)
- Float_t fADCpedestalHC ; // pedestal of ADC for HC section (GeV)
+
+ AliEMCALCalibData * fCalibData ; //! Calibration database if aval
+ AliCaloCalibPedestal * fCaloPed ; //! Tower status map if aval
+
+ Float_t fADCchannelECA ; // width of one ADC channel for EC section (GeV)
+ Float_t fADCpedestalECA ; // pedestal of ADC for EC section (GeV)
- Float_t fECClusteringThreshold ; // minimum energy to include a EC digit in a cluster
- Float_t fHCClusteringThreshold ; // minimum energy to include a HC digit in a cluster
- Float_t fPREClusteringThreshold ; // minimum energy to include a PRE digit in a cluster
- Float_t fECLocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster
- Float_t fECW0 ; // logarithmic weight for the cluster center of gravity calculation
- Float_t fHCLocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster
- Float_t fHCW0 ; // logarithmic weight for the cluster center of gravity calculation
- Float_t fPRELocMaxCut ; // minimum energy difference to distinguish local maxima in a CPV cluster
- Float_t fPREW0 ; // logarithmic weight for the CPV cluster center of gravity calculation
- Int_t fRecPointsInRun ; //! Total number of recpoints in one run
- Float_t fTimeGate ; // Maximum time difference between the digits in ont EMC cluster
-
- ClassDef(AliEMCALClusterizerv1,2) // Clusterizer implementation version 1
+ Float_t fECAClusteringThreshold ; // minimum energy to seed a EC digit in a cluster
+ Float_t fECALocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster
+ Float_t fECAW0 ; // logarithmic weight for the cluster center of gravity calculation
+ Float_t fTimeCut ; // Maximum time difference between the digits in ont EMC cluster
+ Float_t fMinECut; // Minimum energy for a digit to be a member of a cluster
+
+ ClassDef(AliEMCALClusterizerv1,8) // Clusterizer implementation version 1
};