]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALClusterizerv1.h
New Clusterizer that makes cluster grouping neighbour cells around highest energy...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALClusterizerv1.h
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                               */
5
6 /* $Id$ */
7
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
13 //
14 //*-- Author: Yves Schutz (SUBATECH)
15 //--          Gustavo Conesa (LPSC-Grenoble), move common clusterizer functionalities to mother class
16                         
17
18 // --- ROOT system ---
19
20 // --- Standard library ---
21
22 // --- AliRoot header files ---
23 #include "AliEMCALClusterizer.h"
24 class AliEMCALRecPoint ; 
25 class AliEMCALDigit ;
26
27 class AliEMCALClusterizerv1 : public AliEMCALClusterizer {
28   
29 public:
30   
31   AliEMCALClusterizerv1() ;         
32   AliEMCALClusterizerv1(AliEMCALGeometry* geometry);
33   AliEMCALClusterizerv1(AliEMCALGeometry* geometry, AliEMCALCalibData * calib, AliCaloCalibPedestal * pedestal);
34         
35   virtual ~AliEMCALClusterizerv1()  ;
36
37   virtual Int_t   AreNeighbours(AliEMCALDigit * d1, AliEMCALDigit * d2, Bool_t & shared)const ; 
38                                // Checks if digits are in neighbour cells
39   virtual void    Digits2Clusters(Option_t *option);                // Does the job
40
41   static Double_t ShowerShape(Double_t x, Double_t y) ; // Shape of EM shower used in unfolding; 
42                                             //class member function (not object member function)
43   static void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag)  ;
44                                             // Chi^2 of the fit. Should be static to be passes to MINUIT
45   virtual const char * Version() const { return "clu-v1" ; }  
46
47 protected:
48
49   virtual void   MakeClusters();            
50
51 private:
52   AliEMCALClusterizerv1(const AliEMCALClusterizerv1 &); //copy ctor
53   AliEMCALClusterizerv1 & operator = (const AliEMCALClusterizerv1 &);
54
55
56   Bool_t  FindFit(AliEMCALRecPoint * emcRP, AliEMCALDigit ** MaxAt, const Float_t * maxAtEnergy, 
57                   Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit
58
59   virtual void   MakeUnfolding();
60   void           UnfoldCluster(AliEMCALRecPoint * iniEmc, Int_t Nmax, 
61                                AliEMCALDigit ** maxAt,
62                                Float_t * maxAtEnergy ); //Unfolds cluster using TMinuit package
63
64 private:
65
66
67   ClassDef(AliEMCALClusterizerv1,10)   // Clusterizer implementation version 1
68
69 };
70
71 #endif // AliEMCALCLUSTERIZERV1_H