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 ;
33 class AliCaloCalibPedestal ;
35 class AliEMCALClusterizerv1 : public AliEMCALClusterizer {
39 AliEMCALClusterizerv1() ;
40 AliEMCALClusterizerv1(AliEMCALGeometry* geometry);
41 AliEMCALClusterizerv1(AliEMCALGeometry* geometry, AliEMCALCalibData * calib, AliCaloCalibPedestal * pedestal);
43 virtual ~AliEMCALClusterizerv1() ;
45 virtual Int_t AreNeighbours(AliEMCALDigit * d1, AliEMCALDigit * d2, Bool_t & shared)const ;
46 // Checks if digits are in neighbour cells
48 virtual Float_t Calibrate(const Float_t amp, const Float_t time, const Int_t cellId) ; // Tranforms Amp to energy
50 virtual void GetNumberOfClustersFound(int numb )const { numb = fNumberOfECAClusters ;}
51 virtual Float_t GetECAClusteringThreshold() const { return fECAClusteringThreshold;}
52 virtual Float_t GetECALocalMaxCut() const { return fECALocMaxCut;}
53 virtual Float_t GetECALogWeight() const { return fECAW0;}
54 virtual Float_t GetMinECut() const { return fMinECut;}
56 virtual Float_t GetTimeCut() const { return fTimeCut ; }
57 virtual Float_t GetTimeMin() const { return fTimeMin ; }
58 virtual Float_t GetTimeMax() const { return fTimeMax ; }
60 virtual void Digits2Clusters(Option_t *option); // Does the job
62 virtual void Print(Option_t * option)const ;
64 virtual void SetECAClusteringThreshold(Float_t cluth) { fECAClusteringThreshold = cluth ; }
65 virtual void SetMinECut(Float_t mine) { fMinECut = mine; }
66 virtual void SetECALocalMaxCut(Float_t cut) { fECALocMaxCut = cut ; }
67 virtual void SetECALogWeight(Float_t w) { fECAW0 = w ; }
68 virtual void SetTimeCut(Float_t t) { fTimeCut = t ;}
69 virtual void SetTimeMin(Float_t t) { fTimeMin = t ;}
70 virtual void SetTimeMax(Float_t t) { fTimeMax = t ;}
72 virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) {fToUnfold = toUnfold ;}
73 static Double_t ShowerShape(Double_t x, Double_t y) ; // Shape of EM shower used in unfolding;
74 //class member function (not object member function)
75 static void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) ;
76 // Chi^2 of the fit. Should be static to be passes to MINUIT
77 virtual const char * Version() const { return "clu-v1" ; }
79 void PrintRecoInfo(); //*MENU*
80 void SetCalibrationParameters(AliEMCALCalibData * calib) { fCalibData = calib ; }
81 void SetCaloCalibPedestal(AliCaloCalibPedestal * caloped) { fCaloPed = caloped ; }
85 virtual void MakeClusters();
88 AliEMCALClusterizerv1(const AliEMCALClusterizerv1 &); //copy ctor
89 AliEMCALClusterizerv1 & operator = (const AliEMCALClusterizerv1 &);
91 void GetCalibrationParameters(void) ;
92 void GetCaloCalibPedestal(void) ;
94 Bool_t FindFit(AliEMCALRecPoint * emcRP, AliEMCALDigit ** MaxAt, const Float_t * maxAtEnergy,
95 Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit
97 void InitParameters();
99 virtual void MakeUnfolding();
100 void UnfoldCluster(AliEMCALRecPoint * iniEmc, Int_t Nmax,
101 AliEMCALDigit ** maxAt,
102 Float_t * maxAtEnergy ); //Unfolds cluster using TMinuit package
103 void PrintRecPoints(Option_t * option) ;
106 AliEMCALGeometry* fGeom; //! pointer to geometry for utilities
108 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
109 Bool_t fToUnfold ; // To perform unfolding
110 Int_t fNumberOfECAClusters ; // number of clusters found in EC section
112 //Calibration parameters... to be replaced by database
114 AliEMCALCalibData * fCalibData ; //! Calibration database if aval
115 AliCaloCalibPedestal * fCaloPed ; //! Tower status map if aval
117 Float_t fADCchannelECA ; // width of one ADC channel for EC section (GeV)
118 Float_t fADCpedestalECA ; // pedestal of ADC for EC section (GeV)
120 Float_t fECAClusteringThreshold ; // minimum energy to seed a EC digit in a cluster
121 Float_t fECALocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster
122 Float_t fECAW0 ; // logarithmic weight for the cluster center of gravity calculation
123 Float_t fTimeCut ; // Maximum time difference between the digits inside EMC cluster
124 Float_t fTimeMin ; // Minimum time of physical signal in a cell/digiy
125 Float_t fTimeMax ; // Maximum time of physical signal in a cell/digit
126 Float_t fMinECut; // Minimum energy for a digit to be a member of a cluster
128 ClassDef(AliEMCALClusterizerv1,9) // Clusterizer implementation version 1
132 #endif // AliEMCALCLUSTERIZERV1_H