Adding include path to allow compilation of CleanGeom task
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALReconstructor.h
CommitLineData
f6019cda 1#ifndef ALIEMCALRECONSTRUCTOR_H
2#define ALIEMCALRECONSTRUCTOR_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// Wrapping class for reconstruction
10//*--
11//*-- Author: Yves Schutz (SUBATECH)
12//*-- Dmitri Peressounko (SUBATECH & Kurchatov Institute)
40164976 13// Reconstruction class. Redesigned from the old AliReconstructionner class and
14// derived from STEER/AliReconstructor.
15//
f6019cda 16
f6019cda 17// --- ROOT system ---
85c25c2e 18class TClonesArray;
19class TTree;
20
0c5b726e 21// --- AliRoot header files ---
22#include "AliReconstructor.h"
23#include "AliEMCALTracker.h"
24#include "AliEMCALRecParam.h"
25
f6019cda 26class AliEMCALDigitizer ;
27class AliEMCALClusterizer ;
f6019cda 28class AliEMCALSDigitizer ;
c47157cd 29class AliEMCALRecParam;
af885e0f 30class AliESDEvent ;
1d59832c 31class AliRawReader ;
65bdc82f 32class AliEMCALRawUtils;
33class AliEMCALGeometry;
0c5b726e 34class AliEMCALCalibData ;
40164976 35class AliCaloCalibPedestal ;
916f1e76 36class AliEMCALTriggerElectronics;
de39a0ff 37class AliEMCALTriggerData;
f6019cda 38
f6019cda 39class AliEMCALReconstructor : public AliReconstructor {
29c9d15f 40
41 public:
42
f6019cda 43 AliEMCALReconstructor() ; //ctor
29c9d15f 44
f6019cda 45 virtual ~AliEMCALReconstructor() ; //dtor
29c9d15f 46
47 virtual void Init() {;}
48 virtual void InitClusterizer() const;
49
4800667c 50 using AliReconstructor::FillESD;
29c9d15f 51 virtual void FillESD(TTree* digitsTree, TTree* clustersTree, AliESDEvent* esd) const;
52 AliTracker* CreateTracker () const {return new AliEMCALTracker;}
4800667c 53 using AliReconstructor::Reconstruct;
29c9d15f 54 virtual void Reconstruct(TTree* digitsTree, TTree* clustersTree) const ;
55
56 virtual Bool_t HasDigitConversion() const {return kTRUE;};
57 virtual void ConvertDigits(AliRawReader* rawReader, TTree* digitsTree) const;
58
59 static void SetRecParam(AliEMCALRecParam * recParam){ fgkRecParam = recParam;}
60
61 void ReadDigitsArrayFromTree(TTree *digitsTree) const;
a68156e6 62
0832a2bf 63 static const AliEMCALRecParam* GetRecParam() {
64 return dynamic_cast<const AliEMCALRecParam*>(AliReconstructor::GetRecoParam(6)); }
29c9d15f 65
85c25c2e 66 static TClonesArray* GetDigitsArr() {return fgDigitsArr;}
29c9d15f 67
68 void FillMisalMatrixes(AliESDEvent* esd)const ;
5970dfe2 69
70 //New class used to sort the matched tracks
71 class AliEMCALMatch : public TObject
72 {
73 public:
74 AliEMCALMatch();
75 AliEMCALMatch(const AliEMCALMatch& copy);
f1d9131f 76 AliEMCALMatch& operator = (const AliEMCALMatch& source) ;
5970dfe2 77 virtual ~AliEMCALMatch() { }
78 //----------------------------------------------------------------------------
79 Int_t Compare(const TObject *obj) const;
80 Bool_t IsSortable() const {return kTRUE;}
81 Double_t GetDistance() const {return fDistance;}
82 Double_t GetdEta() const {return fdEta;}
83 Double_t GetdPhi() const {return fdPhi;}
84 Int_t GetIndexT() const {return fIndexT;}
85 void SetIndexT(Int_t itr) {fIndexT=itr;}
86 void SetDistance(Double_t dist) {fDistance=dist;}
87 void SetdEta(Double_t dEta) {fdEta=dEta;}
88 void SetdPhi(Double_t dPhi) {fdPhi=dPhi;}
89 private:
90 Int_t fIndexT; // track index in 'fTracks' array
91 Double_t fDistance; // track - cluster distance
92 Double_t fdEta; // track - cluster residual in eta
93 Double_t fdPhi; // track - cluster residual in phi
94 };
ee602376 95 Bool_t CalculateResidual(AliESDtrack *track, AliESDCaloCluster *cluster, Float_t &dEta, Float_t &dPhi) const;
29c9d15f 96
97 private:
f6019cda 98
3abc001d 99 AliEMCALReconstructor(const AliEMCALReconstructor &); //Not implemented
100 AliEMCALReconstructor & operator = (const AliEMCALReconstructor &); //Not implemented
29c9d15f 101
102 AliEMCALGeometry * fGeom; // pointer to the EMCAL geometry
103 static AliEMCALClusterizer * fgClusterizer; // clusterizer
104 static AliEMCALRawUtils * fgRawUtils; // raw utilities class
105
106 //Temporal arrays with clusters, digits, triggers, to be reused per event
107 static TClonesArray * fgDigitsArr; //-> Array with EMCAL digits
108 static TObjArray * fgClustersArr; //-> Array with EMCAL clusters
109 static TClonesArray * fgTriggerDigits; //-> Array with EMCAL trigger digits
110
111 //OCDB
112 static const AliEMCALRecParam* fgkRecParam; // reconstruction parameters for EMCAL
113 AliEMCALCalibData * fCalibData ; //! Calibration database if aval
114 AliCaloCalibPedestal * fPedestalData ; //! Tower status database if aval
115
116 //Trigger specific
117 static AliEMCALTriggerElectronics* fgTriggerProcessor; // Trigger preprocessor
118 AliEMCALTriggerData * fTriggerData; // Trigger parameters data container
5970dfe2 119
120 //Track matching
121 TList * fMatches; //! collection of matches between tracks and clusters
29c9d15f 122
5970dfe2 123 ClassDef(AliEMCALReconstructor,12) // Reconstruction algorithm class (Base Class)
124};
f6019cda 125
126#endif // ALIEMCALRECONSTRUCTOR_H
916f1e76 127