Move AliWarning and AliInfo to AliDebug to reduce prints during reconstruction
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALClusterizerv1.h
CommitLineData
483b0559 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#, branches PHOSEmcRP (EMC recPoints),
13// PHOSCpvRP (CPV RecPoints) and AliPHOSClusterizer
14//
15//*-- Author: Yves Schutz (SUBATECH)
05a92d59 16// Modif:
17// August 2002 Yves Schutz: clone PHOS as closely as possible and intoduction
18// of new IO (à la PHOS)
483b0559 19
20// --- ROOT system ---
21
22// --- Standard library ---
23
24// --- AliRoot header files ---
25
26#include "AliEMCALClusterizer.h"
e52475ed 27class TH1F;
70a93198 28class AliEMCALRecPoint ;
483b0559 29class AliEMCALDigit ;
30class AliEMCALDigitizer ;
31class AliEMCALGeometry ;
f565d89d 32class AliEMCALCalibData ;
40164976 33class AliCaloCalibPedestal ;
483b0559 34
35class AliEMCALClusterizerv1 : public AliEMCALClusterizer {
36
37public:
38
39 AliEMCALClusterizerv1() ;
5544799a 40 AliEMCALClusterizerv1(AliEMCALGeometry* geometry);
40164976 41 AliEMCALClusterizerv1(AliEMCALGeometry* geometry, AliEMCALCalibData * calib, AliCaloCalibPedestal * pedestal);
0c5b726e 42
483b0559 43 virtual ~AliEMCALClusterizerv1() ;
18a21c7c 44
483b0559 45 virtual Int_t AreNeighbours(AliEMCALDigit * d1, AliEMCALDigit * d2)const ;
46 // Checks if digits are in neighbour cells
47
1bd98442 48 virtual Float_t Calibrate(Int_t amp, Int_t cellId) ; // Tranforms Amp to energy
ed611565 49
fdebddeb 50 virtual void GetNumberOfClustersFound(int numb )const{ numb = fNumberOfECAClusters ;}
51 virtual Float_t GetECAClusteringThreshold()const{ return fECAClusteringThreshold;}
88cb7938 52 virtual Float_t GetECALocalMaxCut()const { return fECALocMaxCut;}
c8be63ae 53 virtual Float_t GetECALogWeight()const { return fECAW0;}
54 virtual Float_t GetMinECut()const { return fMinECut;}
ed611565 55
98e9578e 56 virtual Float_t GetTimeCut() const { return fTimeCut ; }
483b0559 57
c47157cd 58 virtual void Digits2Clusters(Option_t *option); // Does the job
483b0559 59
60 virtual void Print(Option_t * option)const ;
61
88cb7938 62 virtual void SetECAClusteringThreshold(Float_t cluth) { fECAClusteringThreshold = cluth ; }
c8be63ae 63 virtual void SetMinECut(Float_t mine) { fMinECut = mine; }
88cb7938 64 virtual void SetECALocalMaxCut(Float_t cut) { fECALocMaxCut = cut ; }
65 virtual void SetECALogWeight(Float_t w) { fECAW0 = w ; }
0c5b726e 66 virtual void SetTimeCut(Float_t gate) { fTimeCut = gate ;}
88cb7938 67 virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) {fToUnfold = toUnfold ;}
225cd96d 68 static Double_t ShowerShape(Double_t x, Double_t y) ; // Shape of EM shower used in unfolding;
483b0559 69 //class member function (not object member function)
70 static void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) ;
71 // Chi^2 of the fit. Should be static to be passes to MINUIT
72 virtual const char * Version() const { return "clu-v1" ; }
7ea6391b 73
1d46d1f6 74 void PrintRecoInfo(); //*MENU*
40164976 75 void SetCalibrationParameters(AliEMCALCalibData * calib) { fCalibData = calib ; }
76 void SetCaloCalibPedestal(AliCaloCalibPedestal * caloped) { fCaloPed = caloped ; }
77
483b0559 78protected:
79
0e7c6655 80 virtual void MakeClusters();
7ea6391b 81
483b0559 82private:
c47157cd 83 AliEMCALClusterizerv1(const AliEMCALClusterizerv1 &); //copy ctor
84 AliEMCALClusterizerv1 & operator = (const AliEMCALClusterizerv1 &);
483b0559 85
86 void GetCalibrationParameters(void) ;
40164976 87 void GetCaloCalibPedestal(void) ;
88
d804d556 89 Bool_t FindFit(AliEMCALRecPoint * emcRP, AliEMCALDigit ** MaxAt, const Float_t * maxAtEnergy,
483b0559 90 Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit
91 void Init() ;
0832a2bf 92 void InitParameters();
483b0559 93
225cd96d 94 virtual void MakeUnfolding();
95 void UnfoldCluster(AliEMCALRecPoint * iniEmc, Int_t Nmax,
96 AliEMCALDigit ** maxAt,
97 Float_t * maxAtEnergy ); //Unfolds cluster using TMinuit package
fdebddeb 98 void PrintRecPoints(Option_t * option) ;
a5c60732 99
483b0559 100private:
a5c60732 101 AliEMCALGeometry* fGeom; //! pointer to geometry for utilities
483b0559 102
ef305168 103 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
483b0559 104 Bool_t fToUnfold ; // To perform unfolding
88cb7938 105 Int_t fNumberOfECAClusters ; // number of clusters found in EC section
a5c60732 106
05a92d59 107 //Calibration parameters... to be replaced by database
f565d89d 108
40164976 109 AliEMCALCalibData * fCalibData ; //! Calibration database if aval
110 AliCaloCalibPedestal * fCaloPed ; //! Tower status map if aval
111
88cb7938 112 Float_t fADCchannelECA ; // width of one ADC channel for EC section (GeV)
113 Float_t fADCpedestalECA ; // pedestal of ADC for EC section (GeV)
ed611565 114
c8be63ae 115 Float_t fECAClusteringThreshold ; // minimum energy to seed a EC digit in a cluster
88cb7938 116 Float_t fECALocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster
117 Float_t fECAW0 ; // logarithmic weight for the cluster center of gravity calculation
98e9578e 118 Float_t fTimeCut ; // Maximum time difference between the digits in ont EMC cluster
c8be63ae 119 Float_t fMinECut; // Minimum energy for a digit to be a member of a cluster
120
40164976 121 ClassDef(AliEMCALClusterizerv1,8) // Clusterizer implementation version 1
483b0559 122
123};
124
125#endif // AliEMCALCLUSTERIZERV1_H