Update mini-task with big output flag and add current status macros
[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)
05a92d59 11// Modif:
12// August 2002 Yves Schutz: clone PHOS as closely as possible and intoduction
13// of new IO (à la PHOS)
483b0559 14// --- ROOT system ---
0832a2bf 15#include "AliLog.h"
c47157cd 16#include "TObject.h"
17class TTree;
05a92d59 18
483b0559 19// --- Standard library ---
20
21// --- AliRoot header files ---
ac084be7 22class AliEMCALGeometry;
23class AliEMCALCalibData;
24class AliCaloCalibPedestal;
25class AliEMCALRecParam;
0d0d6b98 26#include "AliEMCALUnfolding.h"
483b0559 27
c47157cd 28class AliEMCALClusterizer : public TObject {
483b0559 29
30public:
31
ac084be7 32 AliEMCALClusterizer();
33 virtual ~AliEMCALClusterizer();
34 AliEMCALClusterizer(AliEMCALGeometry *geometry);
35 AliEMCALClusterizer(AliEMCALGeometry *geometry, AliEMCALCalibData *calib, AliCaloCalibPedestal *pedestal);
483b0559 36
c47157cd 37 virtual void Digits2Clusters(Option_t *option) = 0;
483b0559 38
ac084be7 39 virtual Float_t Calibrate(const Float_t amp, const Float_t time, const Int_t cellId);
40 virtual void Init();
41 virtual void InitParameters();
42 virtual void InitParameters(const AliEMCALRecParam* recParam);
ee08edde 43
44 //Get/Set reconstruction parameters
ac084be7 45 virtual void GetCalibrationParameters(void);
46 virtual void GetCaloCalibPedestal(void);
47 virtual void SetCalibrationParameters(AliEMCALCalibData *calib) { fCalibData = calib; }
48 virtual void SetCaloCalibPedestal(AliCaloCalibPedestal *caloped) { fCaloPed = caloped; }
ee08edde 49
ac084be7 50 virtual Float_t GetTimeMin() const { return fTimeMin; }
51 virtual Float_t GetTimeMax() const { return fTimeMax; }
52 virtual Float_t GetTimeCut() const { return fTimeCut; }
53 virtual Float_t GetECAClusteringThreshold() const { return fECAClusteringThreshold; }
54 virtual Float_t GetECALocalMaxCut() const { return fECALocMaxCut; }
55 virtual Float_t GetECALogWeight() const { return fECAW0; }
56 virtual Float_t GetMinECut() const { return fMinECut; }
57
58 virtual void SetTimeMin(Float_t t) { fTimeMin = t; }
59 virtual void SetTimeMax(Float_t t) { fTimeMax = t; }
60 virtual void SetTimeCut(Float_t t) { fTimeCut = t; }
61 virtual void SetECAClusteringThreshold(Float_t th) { fECAClusteringThreshold = th; }
62 virtual void SetMinECut(Float_t mine) { fMinECut = mine; }
63 virtual void SetECALocalMaxCut(Float_t cut) { fECALocMaxCut = cut; }
64 virtual void SetECALogWeight(Float_t w) { fECAW0 = w; }
0d0d6b98 65
66 //Unfolding
ac084be7 67 virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) { fToUnfold = toUnfold; }
68 virtual void SetSSPars (Int_t ipar, Double_t par) { fSSPars[ipar] = par; }
69 virtual void SetPar5 (Int_t ipar, Double_t par) { fPar5 [ipar] = par; }
70 virtual void SetPar6 (Int_t ipar, Double_t par) { fPar6 [ipar] = par; }
0d0d6b98 71 virtual void InitClusterUnfolding() {
72 fClusterUnfolding=new AliEMCALUnfolding(fGeom,fECALocMaxCut,fSSPars,fPar5,fPar6);
73 }
74
c47157cd 75 virtual void SetInput(TTree *digitsTree);
76 virtual void SetOutput(TTree *clustersTree);
ee08edde 77
ac084be7 78 virtual void Print(Option_t *option) const ;
79 virtual void PrintRecPoints(Option_t *option);
80 virtual void PrintRecoInfo();
65bec413 81
294553d1 82 void SetInputCalibrated(Bool_t val);
83 void SetJustClusters(Bool_t val);
ee08edde 84
ac084be7 85 virtual const char *Version() const { Warning("Version", "Not Defined"); return 0; }
86
87 // add for clusterizing task
88 virtual void SetDigitsArr(TClonesArray *arr) { fDigitsArr = arr; }
89 virtual const TObjArray *GetRecPoints() const { return fRecPoints; }
c47157cd 90
c828bc97 91 virtual void DeleteRecPoints();
92
839828a6 93protected:
483b0559 94
0e7c6655 95 virtual void MakeClusters() = 0;
b1324a01 96
ac084be7 97 Bool_t fIsInputCalibrated; // to enable reclusterization from ESD cells
294553d1 98 Bool_t fJustClusters; // false for standard reco
ac084be7 99 TClonesArray *fDigitsArr; // array with EMCAL digits
100 TTree *fTreeR; // tree with output clusters
101 TObjArray *fRecPoints; // array with EMCAL clusters
ee08edde 102
ac084be7 103 AliEMCALGeometry *fGeom; //!pointer to geometry for utilities
104 AliEMCALCalibData *fCalibData; //!calibration database if aval
105 AliCaloCalibPedestal *fCaloPed; //!tower status map if aval
ee08edde 106
ac084be7 107 Float_t fADCchannelECA; // width of one ADC channel for EC section (GeV)
108 Float_t fADCpedestalECA; // pedestal of ADC for EC section (GeV)
ee08edde 109
ac084be7 110 Float_t fTimeMin; // minimum time of physical signal in a cell/digit
111 Float_t fTimeMax; // maximum time of physical signal in a cell/digit
112 Float_t fTimeCut; // maximum time difference between the digits inside EMC cluster
ee08edde 113
ac084be7 114 Bool_t fDefaultInit; //!says if the task was created by defaut ctor (only parameters are initialized)
115 Bool_t fToUnfold; // says if unfolding should be performed
116 Int_t fNumberOfECAClusters; // number of clusters found in EC section
ee08edde 117
ac084be7 118 Float_t fECAClusteringThreshold; // minimum energy to seed a EC digit in a cluster
119 Float_t fECALocMaxCut; // minimum energy difference to distinguish local maxima in a cluster
120 Float_t fECAW0; // logarithmic weight for the cluster center of gravity calculation
121 Float_t fMinECut; // minimum energy for a digit to be a member of a cluster
ee08edde 122
ac084be7 123 AliEMCALUnfolding *fClusterUnfolding; //!pointer to unfolding object
124 Double_t fSSPars[8]; // shower shape parameters
125 Double_t fPar5[3]; // shower shape parameter 5
126 Double_t fPar6[3]; // shower shape parameter 6
65bec413 127
ac084be7 128 private:
129 AliEMCALClusterizer(const AliEMCALClusterizer &);
c47157cd 130 AliEMCALClusterizer & operator = (const AliEMCALClusterizer &);
ee08edde 131
294553d1 132 ClassDef(AliEMCALClusterizer,6) // Clusterization algorithm class
ac084be7 133};
483b0559 134#endif // AliEMCALCLUSTERIZER_H