]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - EMCAL/AliEMCALReconstructor.h
fix
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALReconstructor.h
... / ...
CommitLineData
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)
13// Reconstruction class. Redesigned from the old AliReconstructionner class and
14// derived from STEER/AliReconstructor.
15//
16
17// --- ROOT system ---
18class TClonesArray;
19class TTree;
20
21// --- AliRoot header files ---
22#include "AliReconstructor.h"
23#include "AliEMCALTracker.h"
24#include "AliEMCALRecParam.h"
25
26class AliEMCALDigitizer ;
27class AliEMCALClusterizer ;
28class AliEMCALSDigitizer ;
29class AliEMCALRecParam;
30class AliESDEvent ;
31class AliRawReader ;
32class AliEMCALRawUtils;
33class AliEMCALGeometry;
34class AliEMCALCalibData ;
35class AliCaloCalibPedestal ;
36class AliEMCALTriggerElectronics;
37class AliEMCALTriggerData;
38
39class AliEMCALReconstructor : public AliReconstructor {
40
41 public:
42
43 AliEMCALReconstructor() ; //ctor
44
45 virtual ~AliEMCALReconstructor() ; //dtor
46
47 virtual void Init() {;}
48 virtual void InitClusterizer() const;
49
50 using AliReconstructor::FillESD;
51 virtual void FillESD(TTree* digitsTree, TTree* clustersTree, AliESDEvent* esd) const;
52 AliTracker* CreateTracker () const {return new AliEMCALTracker;}
53 using AliReconstructor::Reconstruct;
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;
62
63 static const AliEMCALRecParam* GetRecParam() {
64 return dynamic_cast<const AliEMCALRecParam*>(AliReconstructor::GetRecoParam(6)); }
65
66 static TClonesArray* GetDigitsArr() {return fgDigitsArr;}
67
68 void FillMisalMatrixes(AliESDEvent* esd)const ;
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);
76 AliEMCALMatch& operator = (const AliEMCALMatch& source) ;
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 };
95 Bool_t CalculateResidual(AliESDtrack *track, AliESDCaloCluster *cluster, Float_t &dEta, Float_t &dPhi) const;
96
97 private:
98
99 AliEMCALReconstructor(const AliEMCALReconstructor &); //Not implemented
100 AliEMCALReconstructor & operator = (const AliEMCALReconstructor &); //Not implemented
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
119
120 //Track matching
121 TList * fMatches; //! collection of matches between tracks and clusters
122
123 ClassDef(AliEMCALReconstructor,12) // Reconstruction algorithm class (Base Class)
124};
125
126#endif // ALIEMCALRECONSTRUCTOR_H
127