Line data Source code
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 : //_________________________________________________________________________
7 : /// \class AliEMCALReconstructor
8 : /// \brief Wrapping class for EMCal reconstruction
9 : ///
10 : /// Wrapping class for EMCal reconstruction.
11 : ///
12 : /// It steers
13 : /// * Raw data fitting to create digits
14 : /// * Clusterization from digits
15 : /// * ESD filling from clusters
16 : ///
17 : /// Trigger data handling is also dealt here.
18 : ///
19 : /// \author Yves Schutz (SUBATECH), originally
20 : /// \author Dmitri Peressounko (SUBATECH & Kurchatov Institute), PHOS copy
21 : /// \author Gustavo Conesa Balbastre, <Gustavo.Conesa.Balbastre@cern.ch>, LPSC-Grenoble
22 : /// \author Rachid Guernane, <guernane@lpsc.in2p3.fr>, LPSC-Grenoble (Trigger stuff)
23 : /// \author plus others that have put their hands, list them ...
24 : ///
25 :
26 : // --- ROOT system ---
27 : class TClonesArray;
28 : class TTree;
29 :
30 : // --- AliRoot header files ---
31 : #include "AliReconstructor.h"
32 : #include "AliEMCALTracker.h"
33 : #include "AliEMCALRecParam.h"
34 :
35 : class AliEMCALDigitizer ;
36 : class AliEMCALClusterizer ;
37 : class AliEMCALSDigitizer ;
38 : class AliEMCALRecParam;
39 : class AliESDEvent ;
40 : class AliRawReader ;
41 : class AliEMCALRawUtils;
42 : class AliEMCALGeometry;
43 : class AliEMCALCalibData ;
44 : class AliEMCALCalibTime ;
45 : class AliCaloCalibPedestal ;
46 : class AliEMCALTriggerElectronics;
47 : class AliEMCALTriggerData;
48 :
49 : class AliEMCALReconstructor : public AliReconstructor {
50 :
51 : public:
52 :
53 : AliEMCALReconstructor() ; //ctor
54 :
55 : virtual ~AliEMCALReconstructor() ; //dtor
56 :
57 4 : virtual void Init() {;}
58 :
59 : virtual void InitClusterizer() const;
60 :
61 : using AliReconstructor::FillESD;
62 :
63 : virtual void FillESD(TTree* digitsTree, TTree* clustersTree, AliESDEvent* esd) const;
64 :
65 6 : AliTracker* CreateTracker () const {return new AliEMCALTracker;}
66 :
67 : using AliReconstructor::Reconstruct;
68 :
69 : virtual void Reconstruct(TTree* digitsTree, TTree* clustersTree) const ;
70 :
71 24 : virtual Bool_t HasDigitConversion() const {return kTRUE;};
72 :
73 : virtual void ConvertDigits(AliRawReader* rawReader, TTree* digitsTree) const;
74 :
75 0 : static void SetRecParam(AliEMCALRecParam * recParam){ fgkRecParam = recParam;}
76 :
77 : void ReadDigitsArrayFromTree(TTree *digitsTree) const;
78 :
79 : static const AliEMCALRecParam* GetRecParam() {
80 788 : return dynamic_cast<const AliEMCALRecParam*>(AliReconstructor::GetRecoParam(6)); }
81 :
82 0 : static TClonesArray* GetDigitsArr() {return fgDigitsArr;}
83 :
84 : void FillMisalMatrixes(AliESDEvent* esd)const ;
85 :
86 : //
87 : // New class used to sort the matched tracks
88 : //
89 : class AliEMCALMatch : public TObject
90 : {
91 : public:
92 : AliEMCALMatch();
93 : AliEMCALMatch(const AliEMCALMatch& copy);
94 : AliEMCALMatch& operator = (const AliEMCALMatch& source) ;
95 108 : virtual ~AliEMCALMatch() { }
96 : //----------------------------------------------------------------------------
97 : Int_t Compare(const TObject *obj) const;
98 28 : Bool_t IsSortable() const {return kTRUE;}
99 : Double_t GetDistance() const {return fDistance;}
100 28 : Double_t GetdEta() const {return fdEta;}
101 28 : Double_t GetdPhi() const {return fdPhi;}
102 36 : Int_t GetIndexT() const {return fIndexT;}
103 36 : void SetIndexT(Int_t itr) {fIndexT=itr;}
104 36 : void SetDistance(Double_t dist) {fDistance=dist;}
105 36 : void SetdEta(Double_t dEta) {fdEta=dEta;}
106 36 : void SetdPhi(Double_t dPhi) {fdPhi=dPhi;}
107 :
108 : private:
109 :
110 : Int_t fIndexT; ///< Track index in 'fTracks' array
111 : Double_t fDistance; ///< Track - cluster distance
112 : Double_t fdEta; ///< Track - cluster residual in eta
113 : Double_t fdPhi; ///< Track - cluster residual in phi
114 : };
115 :
116 : Bool_t CalculateResidual(AliESDtrack *track, AliESDCaloCluster *cluster, Float_t &dEta, Float_t &dPhi) const;
117 :
118 : private:
119 :
120 : AliEMCALReconstructor (const AliEMCALReconstructor &); /// Not implemented
121 : AliEMCALReconstructor & operator = (const AliEMCALReconstructor &); /// Not implemented
122 :
123 : AliEMCALGeometry * fGeom; ///< Access to the geometry
124 : static AliEMCALClusterizer * fgClusterizer; ///< Access to the clusterization tools
125 : static AliEMCALRawUtils * fgRawUtils; ///< Access to raw fitting tools
126 :
127 : /// Temporary array with digits, to be reused in the event.
128 : static TClonesArray * fgDigitsArr; //->
129 :
130 : /// Temporary array with clusters, to be reused in the event.
131 : static TObjArray * fgClustersArr; //->
132 :
133 : /// Temporary array with trigger digits, to be reused in the event.
134 : static TClonesArray * fgTriggerDigits; //->
135 :
136 : // OCDB
137 : static const AliEMCALRecParam* fgkRecParam; ///< Access to OCDB reconstruction parameters
138 : AliEMCALCalibData * fCalibData ; //!<! Access to OCDB energy calibration database if available
139 : AliEMCALCalibTime * fCalibTime ; //!<! Access to OCDB time calibration database if available
140 : AliCaloCalibPedestal * fPedestalData; //!<! Access to OCDB tower status database if available
141 :
142 : //Trigger specific
143 : static AliEMCALTriggerElectronics *fgTriggerProcessor; ///< Trigger preprocessor
144 : static TClonesArray *fgTriggerData; ///< Trigger parameters data container
145 :
146 : //Track matching
147 : TList * fMatches; //!<! Collection of matches between tracks and clusters
148 :
149 : /// \cond CLASSIMP
150 430 : ClassDef(AliEMCALReconstructor,14) ; // Reconstruction algorithm class (Base Class)
151 : /// \endcond
152 :
153 : };
154 :
155 : #endif // ALIEMCALRECONSTRUCTOR_H
156 :
|