1 #ifndef ALIEMCALCLUSTERIZERV1_H
2 #define ALIEMCALCLUSTERIZERV1_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //_________________________________________________________________________
9 // Implementation version 1 of the clusterization algorithm
10 // Performs clusterization (collects neighbouring active cells) and
11 // unfolding of the clusters with several local maxima.
12 // results are stored in TreeR#, branches PHOSEmcRP (EMC recPoints),
13 // PHOSCpvRP (CPV RecPoints) and AliPHOSClusterizer
15 //*-- Author: Yves Schutz (SUBATECH)
17 // August 2002 Yves Schutz: clone PHOS as closely as possible and intoduction
18 // of new IO (à la PHOS)
20 // --- ROOT system ---
22 // --- Standard library ---
24 // --- AliRoot header files ---
26 #include "AliEMCALClusterizer.h"
27 class AliEMCALRecPoint ;
29 class AliEMCALDigitizer ;
30 class AliEMCALGeometry ;
33 class AliEMCALClusterizerv1 : public AliEMCALClusterizer {
37 AliEMCALClusterizerv1() ;
38 AliEMCALClusterizerv1(const TString alirunFileNameFile, const TString eventFolderName = AliConfig::GetDefaultEventFolderName());
39 virtual ~AliEMCALClusterizerv1() ;
41 virtual Int_t AreNeighbours(AliEMCALDigit * d1, AliEMCALDigit * d2)const ;
42 // Checks if digits are in neighbour cells
44 virtual Float_t Calibrate(Int_t amp)const ; // Tranforms Amp to energy
46 virtual void GetNumberOfClustersFound(int numb )const{ numb = fNumberOfECAClusters ;}
47 virtual Float_t GetECAClusteringThreshold()const{ return fECAClusteringThreshold;}
48 virtual Float_t GetECALocalMaxCut()const { return fECALocMaxCut;}
49 virtual Float_t GetECALogWeight()const { return fECAW0;}
50 virtual Float_t GetMinECut()const { return fMinECut;}
52 virtual Float_t GetTimeGate() const { return fTimeGate ; }
53 virtual const char * GetRecPointsBranch() const{ return GetName() ;}
54 virtual const Int_t GetRecPointsInRun() const {return fRecPointsInRun ;}
56 void Exec(Option_t *option); // Does the job
58 virtual void Print(Option_t * option)const ;
60 virtual void SetECAClusteringThreshold(Float_t cluth) { fECAClusteringThreshold = cluth ; }
61 virtual void SetMinECut(Float_t mine) { fMinECut = mine; }
62 virtual void SetECALocalMaxCut(Float_t cut) { fECALocMaxCut = cut ; }
63 virtual void SetECALogWeight(Float_t w) { fECAW0 = w ; }
64 virtual void SetTimeGate(Float_t gate) { fTimeGate = gate ;}
65 virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) {fToUnfold = toUnfold ;}
66 static Double_t ShowerShape(Double_t r) ; // Shape of EM shower used in unfolding;
67 //class member function (not object member function)
68 static void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) ;
69 // Chi^2 of the fit. Should be static to be passes to MINUIT
71 virtual const char * Version() const { return "clu-v1" ; }
75 void WriteRecPoints() ;
76 virtual void MakeClusters( ) ;
80 const TString BranchName() const ;
81 void GetCalibrationParameters(void) ;
83 Bool_t FindFit(AliEMCALRecPoint * emcRP, AliEMCALDigit ** MaxAt, Float_t * maxAtEnergy,
84 Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit
86 void InitParameters() ;
88 virtual void MakeUnfolding() const;
89 void UnfoldCluster(AliEMCALRecPoint * /*iniEmc*/, Int_t /*Nmax*/,
90 AliEMCALDigit ** /*maxAt*/,
91 Float_t * /*maxAtEnergy*/ ) const; //Unfolds cluster using TMinuit package
92 void PrintRecPoints(Option_t * option) ;
96 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
98 Int_t fNTowers ; // number of Towers in EMCAL
100 Bool_t fToUnfold ; // To perform unfolding
101 Int_t fNumberOfECAClusters ; // number of clusters found in EC section
103 //Calibration parameters... to be replaced by database
104 Float_t fADCchannelECA ; // width of one ADC channel for EC section (GeV)
105 Float_t fADCpedestalECA ; // pedestal of ADC for EC section (GeV)
107 Float_t fECAClusteringThreshold ; // minimum energy to seed a EC digit in a cluster
108 Float_t fECALocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster
109 Float_t fECAW0 ; // logarithmic weight for the cluster center of gravity calculation
110 Int_t fRecPointsInRun ; //! Total number of recpoints in one run
111 Float_t fTimeGate ; // Maximum time difference between the digits in ont EMC cluster
112 Float_t fMinECut; // Minimum energy for a digit to be a member of a cluster
115 ClassDef(AliEMCALClusterizerv1,4) // Clusterizer implementation version 1
119 #endif // AliEMCALCLUSTERIZERV1_H