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"
28 class AliEMCALRecPoint ;
30 class AliEMCALDigitizer ;
31 class AliEMCALGeometry ;
32 class AliEMCALCalibData ;
34 class AliEMCALClusterizerv1 : public AliEMCALClusterizer {
38 AliEMCALClusterizerv1() ;
40 virtual ~AliEMCALClusterizerv1() ;
42 virtual Int_t AreNeighbours(AliEMCALDigit * d1, AliEMCALDigit * d2)const ;
43 // Checks if digits are in neighbour cells
45 virtual Float_t Calibrate(Int_t amp, Int_t cellId) ; // Tranforms Amp to energy
47 virtual void GetNumberOfClustersFound(int numb )const{ numb = fNumberOfECAClusters ;}
48 virtual Float_t GetECAClusteringThreshold()const{ return fECAClusteringThreshold;}
49 virtual Float_t GetECALocalMaxCut()const { return fECALocMaxCut;}
50 virtual Float_t GetECALogWeight()const { return fECAW0;}
51 virtual Float_t GetMinECut()const { return fMinECut;}
53 virtual Float_t GetTimeCut() const { return fTimeCut ; }
55 virtual void Digits2Clusters(Option_t *option); // Does the job
57 virtual void Print(Option_t * option)const ;
59 virtual void SetECAClusteringThreshold(Float_t cluth) { fECAClusteringThreshold = cluth ; }
60 virtual void SetMinECut(Float_t mine) { fMinECut = mine; }
61 virtual void SetECALocalMaxCut(Float_t cut) { fECALocMaxCut = cut ; }
62 virtual void SetECALogWeight(Float_t w) { fECAW0 = w ; }
63 virtual void SetTimeCut(Float_t gate) { fTimeCut = gate ;}
64 virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) {fToUnfold = toUnfold ;}
65 static Double_t ShowerShape(Double_t r) ; // Shape of EM shower used in unfolding;
66 //class member function (not object member function)
67 static void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) ;
68 // Chi^2 of the fit. Should be static to be passes to MINUIT
69 virtual const char * Version() const { return "clu-v1" ; }
73 //void SaveHists(const char *fn="reco.root"); //*MENU*
74 //void DrawLambdasHists(); //*MENU*
76 void PrintRecoInfo(); //*MENU*
80 virtual void MakeClusters();
85 // TH1F* fPointE; //histogram of point energy
86 // TH1F* fPointL1; //histogram of point L1
87 // TH1F* fPointL2; //histogram of point L2
88 // TH1F* fPointDis; //histogram of point dispersion
89 // TH1F* fPointMult; //histogram of point multiplicity
90 // TH1F* fDigitAmp; //histogram of digit ADC Amplitude
91 // TH1F* fMaxE; //histogram of maximum point energy
92 // TH1F* fMaxL1; //histogram of largest (first) of eigenvalue of covariance matrix
93 // TH1F* fMaxL2; //histogram of smalest (second) of eigenvalue of covariace matrix
94 // TH1F* fMaxDis; //histogram of point dispersion
95 ///////////////////////
99 AliEMCALClusterizerv1(const AliEMCALClusterizerv1 &); //copy ctor
100 AliEMCALClusterizerv1 & operator = (const AliEMCALClusterizerv1 &);
102 void GetCalibrationParameters(void) ;
104 Bool_t FindFit(AliEMCALRecPoint * emcRP, AliEMCALDigit ** MaxAt, Float_t * maxAtEnergy,
105 Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit
107 void InitParameters() ;
109 virtual void MakeUnfolding() const;
110 void UnfoldCluster(AliEMCALRecPoint * /*iniEmc*/, Int_t /*Nmax*/,
111 AliEMCALDigit ** /*maxAt*/,
112 Float_t * /*maxAtEnergy*/ ) const; //Unfolds cluster using TMinuit package
113 void PrintRecPoints(Option_t * option) ;
116 AliEMCALGeometry* fGeom; //! pointer to geometry for utilities
118 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
119 Bool_t fToUnfold ; // To perform unfolding
120 Int_t fNumberOfECAClusters ; // number of clusters found in EC section
122 //Calibration parameters... to be replaced by database
124 AliEMCALCalibData * fCalibData ; //! Calibration database if aval
125 Float_t fADCchannelECA ; // width of one ADC channel for EC section (GeV)
126 Float_t fADCpedestalECA ; // pedestal of ADC for EC section (GeV)
128 Float_t fECAClusteringThreshold ; // minimum energy to seed a EC digit in a cluster
129 Float_t fECALocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster
130 Float_t fECAW0 ; // logarithmic weight for the cluster center of gravity calculation
131 Float_t fTimeCut ; // Maximum time difference between the digits in ont EMC cluster
132 Float_t fMinECut; // Minimum energy for a digit to be a member of a cluster
135 //ClassDef(AliEMCALClusterizerv1,6) // Clusterizer implementation version 1
136 ClassDef(AliEMCALClusterizerv1,7) // Clusterizer implementation version 1
140 #endif // AliEMCALCLUSTERIZERV1_H