add getter for the array with digits and initialization inside, just for analysis...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALClusterizer.h
CommitLineData
483b0559 1#ifndef ALIEMCALCLUSTERIZER_H
2#define ALIEMCALCLUSTERIZER_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// Base class for the clusterization algorithm (pure abstract)
10//*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (SUBATECH & Kurchatov Institute)
8d0210ea 11//
12// Clusterization mother class. Contains common methods/data members of different
13// clusterizers. GCB 2010
14//_________________________________________________________________________
15
483b0559 16// --- ROOT system ---
9cd23da3 17#include <TObject.h>
18#include <TClonesArray.h>
c47157cd 19class TTree;
05a92d59 20
483b0559 21// --- AliRoot header files ---
9cd23da3 22#include "AliLog.h"
ac084be7 23class AliEMCALGeometry;
24class AliEMCALCalibData;
25class AliCaloCalibPedestal;
26class AliEMCALRecParam;
0d0d6b98 27#include "AliEMCALUnfolding.h"
483b0559 28
c47157cd 29class AliEMCALClusterizer : public TObject {
483b0559 30
31public:
32
ac084be7 33 AliEMCALClusterizer();
ac084be7 34 AliEMCALClusterizer(AliEMCALGeometry *geometry);
35 AliEMCALClusterizer(AliEMCALGeometry *geometry, AliEMCALCalibData *calib, AliCaloCalibPedestal *pedestal);
8d0210ea 36 virtual ~AliEMCALClusterizer();
37
38 // main methods
39
40 virtual void DeleteDigits();
41 virtual void DeleteRecPoints();
483b0559 42
c47157cd 43 virtual void Digits2Clusters(Option_t *option) = 0;
483b0559 44
783153ff 45 virtual void Calibrate(Float_t & amp, Float_t & time, const Int_t cellId);
ac084be7 46 virtual void Init();
47 virtual void InitParameters();
48 virtual void InitParameters(const AliEMCALRecParam* recParam);
ee08edde 49
9cd23da3 50 virtual void Print (Option_t *option) const ;
8d0210ea 51 virtual void PrintRecPoints(Option_t *option);
52 virtual void PrintRecoInfo();
53
9cd23da3 54 virtual const char *Version() const { Warning("Version", "Not Defined");
55 return 0 ; }
8d0210ea 56
57 //Getters-Setters
58
59 virtual void SetInput (TTree *digitsTree );
60 virtual void SetOutput(TTree *clustersTree);
61
62 virtual void GetCalibrationParameters(void);
63 virtual void GetCaloCalibPedestal(void);
64 virtual void SetCalibrationParameters(AliEMCALCalibData *calib) { fCalibData = calib; }
65 virtual void SetCaloCalibPedestal(AliCaloCalibPedestal *caped) { fCaloPed = caped; }
ee08edde 66
8d0210ea 67 virtual Float_t GetTimeMin() const { return fTimeMin; }
68 virtual Float_t GetTimeMax() const { return fTimeMax; }
69 virtual Float_t GetTimeCut() const { return fTimeCut; }
70 virtual Float_t GetECAClusteringThreshold() const { return fECAClusteringThreshold; }
71 virtual Float_t GetECALocalMaxCut() const { return fECALocMaxCut; }
72 virtual Float_t GetECALogWeight() const { return fECAW0; }
73 virtual Float_t GetMinECut() const { return fMinECut; }
74
9cd23da3 75 virtual void SetTimeMin(Float_t t) { fTimeMin = t; }
76 virtual void SetTimeMax(Float_t t) { fTimeMax = t; }
77 virtual void SetTimeCut(Float_t t) { fTimeCut = t; }
8d0210ea 78 virtual void SetECAClusteringThreshold(Float_t th) { fECAClusteringThreshold = th; }
79 virtual void SetMinECut(Float_t mine) { fMinECut = mine; }
80 virtual void SetECALocalMaxCut(Float_t cut) { fECALocMaxCut = cut; }
81 virtual void SetECALogWeight(Float_t w) { fECAW0 = w; }
0d0d6b98 82
83 //Unfolding
65bec413 84
8d0210ea 85 virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) { fToUnfold = toUnfold; }
86 virtual void SetSSPars (Int_t ipar, Double_t par) { fSSPars[ipar] = par; }
87 virtual void SetPar5 (Int_t ipar, Double_t par) { fPar5 [ipar] = par; }
88 virtual void SetPar6 (Int_t ipar, Double_t par) { fPar6 [ipar] = par; }
89 virtual void InitClusterUnfolding() {
71332f0e 90 fClusterUnfolding=new AliEMCALUnfolding(fGeom,fECALocMaxCut,fSSPars,fPar5,fPar6);
91 fClusterUnfolding->SetThreshold(fMinECut); }
ac084be7 92
d464daf4 93 //NxN (only used in NxN clusterizer)
94
9cd23da3 95 virtual void SetNRowDiff(Int_t ) { ; }
96 virtual void SetNColDiff(Int_t ) { ; }
97 virtual void SetEnergyGrad(Bool_t ) { ; }
d464daf4 98
9cd23da3 99 virtual Int_t GetNRowDiff() const { return -1 ; }
100 virtual Int_t GetNColDiff() const { return -1 ; }
101 virtual Bool_t GetEnergyGrad() const { return -1 ; }
d464daf4 102
ac084be7 103 // add for clusterizing task
c47157cd 104
9cd23da3 105 virtual void SetDigitsArr(TClonesArray *arr) { fDigitsArr = arr ; }
106 virtual TClonesArray *GetDigits() { if (!fDigitsArr)
107 fDigitsArr = new TClonesArray("AliEMCALDigit",12000);
108 return fDigitsArr ; }
109 virtual const TObjArray *GetRecPoints() const { return fRecPoints ; }
110 void SetInputCalibrated(Bool_t val);
111 void SetJustClusters (Bool_t val);
8d0210ea 112
c828bc97 113
839828a6 114protected:
483b0559 115
0e7c6655 116 virtual void MakeClusters() = 0;
b1324a01 117
8d0210ea 118 Bool_t fIsInputCalibrated; // to enable reclusterization from ESD cells
119 Bool_t fJustClusters; // false for standard reco
120 TClonesArray *fDigitsArr; // array with EMCAL digits
121 TTree *fTreeR; // tree with output clusters
122 TObjArray *fRecPoints; // array with EMCAL clusters
ee08edde 123
8d0210ea 124 AliEMCALGeometry *fGeom; //!pointer to geometry for utilities
125 AliEMCALCalibData *fCalibData; //!calibration database if aval
126 AliCaloCalibPedestal *fCaloPed; //!tower status map if aval
ee08edde 127
8d0210ea 128 Float_t fADCchannelECA; // width of one ADC channel for EC section (GeV)
129 Float_t fADCpedestalECA; // pedestal of ADC for EC section (GeV)
130 Float_t fTimeECA; // calibration parameter for channels time
783153ff 131
8d0210ea 132 Float_t fTimeMin; // minimum time of physical signal in a cell/digit
133 Float_t fTimeMax; // maximum time of physical signal in a cell/digit
134 Float_t fTimeCut; // maximum time difference between the digits inside EMC cluster
ee08edde 135
8d0210ea 136 Bool_t fDefaultInit; //!says if the task was created by defaut ctor (only parameters are initialized)
137 Bool_t fToUnfold; // says if unfolding should be performed
138 Int_t fNumberOfECAClusters; // number of clusters found in EC section
ee08edde 139
8d0210ea 140 Float_t fECAClusteringThreshold; // minimum energy to seed a EC digit in a cluster
141 Float_t fECALocMaxCut; // minimum energy difference to distinguish local maxima in a cluster
142 Float_t fECAW0; // logarithmic weight for the cluster center of gravity calculation
143 Float_t fMinECut; // minimum energy for a digit to be a member of a cluster
ee08edde 144
ac084be7 145 AliEMCALUnfolding *fClusterUnfolding; //!pointer to unfolding object
146 Double_t fSSPars[8]; // shower shape parameters
147 Double_t fPar5[3]; // shower shape parameter 5
148 Double_t fPar6[3]; // shower shape parameter 6
65bec413 149
ac084be7 150 private:
9cd23da3 151 AliEMCALClusterizer( const AliEMCALClusterizer &);
c47157cd 152 AliEMCALClusterizer & operator = (const AliEMCALClusterizer &);
ee08edde 153
783153ff 154 ClassDef(AliEMCALClusterizer,7) // Clusterization algorithm class
9cd23da3 155
ac084be7 156};
483b0559 157#endif // AliEMCALCLUSTERIZER_H