Adding extra check for GPU_FORCE_64BIT_PTR env var
[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; }
b410dc6a 74 virtual Bool_t GetRejectBelowThreshold() const { return fRejectBelowThreshold; }
8d0210ea 75
9cd23da3 76 virtual void SetTimeMin(Float_t t) { fTimeMin = t; }
77 virtual void SetTimeMax(Float_t t) { fTimeMax = t; }
78 virtual void SetTimeCut(Float_t t) { fTimeCut = t; }
8d0210ea 79 virtual void SetECAClusteringThreshold(Float_t th) { fECAClusteringThreshold = th; }
80 virtual void SetMinECut(Float_t mine) { fMinECut = mine; }
81 virtual void SetECALocalMaxCut(Float_t cut) { fECALocMaxCut = cut; }
82 virtual void SetECALogWeight(Float_t w) { fECAW0 = w; }
b410dc6a 83 virtual void SetRejectBelowThreshold(Bool_t reject) { fRejectBelowThreshold = reject; }
0d0d6b98 84
85 //Unfolding
65bec413 86
8d0210ea 87 virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) { fToUnfold = toUnfold; }
88 virtual void SetSSPars (Int_t ipar, Double_t par) { fSSPars[ipar] = par; }
89 virtual void SetPar5 (Int_t ipar, Double_t par) { fPar5 [ipar] = par; }
90 virtual void SetPar6 (Int_t ipar, Double_t par) { fPar6 [ipar] = par; }
91 virtual void InitClusterUnfolding() {
71332f0e 92 fClusterUnfolding=new AliEMCALUnfolding(fGeom,fECALocMaxCut,fSSPars,fPar5,fPar6);
b410dc6a 93 fClusterUnfolding->SetThreshold(fMinECut);
94 fClusterUnfolding->SetRejectBelowThreshold(fRejectBelowThreshold); }
ac084be7 95
d464daf4 96 //NxN (only used in NxN clusterizer)
97
9cd23da3 98 virtual void SetNRowDiff(Int_t ) { ; }
99 virtual void SetNColDiff(Int_t ) { ; }
100 virtual void SetEnergyGrad(Bool_t ) { ; }
d464daf4 101
9cd23da3 102 virtual Int_t GetNRowDiff() const { return -1 ; }
103 virtual Int_t GetNColDiff() const { return -1 ; }
104 virtual Bool_t GetEnergyGrad() const { return -1 ; }
d464daf4 105
ac084be7 106 // add for clusterizing task
c47157cd 107
9cd23da3 108 virtual void SetDigitsArr(TClonesArray *arr) { fDigitsArr = arr ; }
109 virtual TClonesArray *GetDigits() { if (!fDigitsArr)
110 fDigitsArr = new TClonesArray("AliEMCALDigit",12000);
111 return fDigitsArr ; }
112 virtual const TObjArray *GetRecPoints() const { return fRecPoints ; }
113 void SetInputCalibrated(Bool_t val);
114 void SetJustClusters (Bool_t val);
8d0210ea 115
c828bc97 116
839828a6 117protected:
483b0559 118
0e7c6655 119 virtual void MakeClusters() = 0;
b1324a01 120
8d0210ea 121 Bool_t fIsInputCalibrated; // to enable reclusterization from ESD cells
122 Bool_t fJustClusters; // false for standard reco
123 TClonesArray *fDigitsArr; // array with EMCAL digits
124 TTree *fTreeR; // tree with output clusters
125 TObjArray *fRecPoints; // array with EMCAL clusters
ee08edde 126
8d0210ea 127 AliEMCALGeometry *fGeom; //!pointer to geometry for utilities
128 AliEMCALCalibData *fCalibData; //!calibration database if aval
129 AliCaloCalibPedestal *fCaloPed; //!tower status map if aval
ee08edde 130
8d0210ea 131 Float_t fADCchannelECA; // width of one ADC channel for EC section (GeV)
132 Float_t fADCpedestalECA; // pedestal of ADC for EC section (GeV)
133 Float_t fTimeECA; // calibration parameter for channels time
783153ff 134
8d0210ea 135 Float_t fTimeMin; // minimum time of physical signal in a cell/digit
136 Float_t fTimeMax; // maximum time of physical signal in a cell/digit
137 Float_t fTimeCut; // maximum time difference between the digits inside EMC cluster
ee08edde 138
8d0210ea 139 Bool_t fDefaultInit; //!says if the task was created by defaut ctor (only parameters are initialized)
140 Bool_t fToUnfold; // says if unfolding should be performed
141 Int_t fNumberOfECAClusters; // number of clusters found in EC section
ee08edde 142
8d0210ea 143 Float_t fECAClusteringThreshold; // minimum energy to seed a EC digit in a cluster
144 Float_t fECALocMaxCut; // minimum energy difference to distinguish local maxima in a cluster
145 Float_t fECAW0; // logarithmic weight for the cluster center of gravity calculation
146 Float_t fMinECut; // minimum energy for a digit to be a member of a cluster
b410dc6a 147 Bool_t fRejectBelowThreshold; // split (false-default) or reject (true) cell energy below threshold after UF
ee08edde 148
ac084be7 149 AliEMCALUnfolding *fClusterUnfolding; //!pointer to unfolding object
150 Double_t fSSPars[8]; // shower shape parameters
151 Double_t fPar5[3]; // shower shape parameter 5
152 Double_t fPar6[3]; // shower shape parameter 6
65bec413 153
ac084be7 154 private:
9cd23da3 155 AliEMCALClusterizer( const AliEMCALClusterizer &);
c47157cd 156 AliEMCALClusterizer & operator = (const AliEMCALClusterizer &);
ee08edde 157
b410dc6a 158 ClassDef(AliEMCALClusterizer,8) // Clusterization algorithm class
9cd23da3 159
ac084be7 160};
483b0559 161#endif // AliEMCALCLUSTERIZER_H