Additiona TOF data members (S.Arcelli)
[u/mrichter/AliRoot.git] / FMD / AliFMDReconstructor.h
CommitLineData
8f1cfb0c 1#ifndef ALIFMDRECONSTRUCTOR_H
2#define ALIFMDRECONSTRUCTOR_H
4347b38f 3//
4// Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
5// reserved.
6//
121a60bd 7// See cxx source for full Copyright notice
4347b38f 8//
121a60bd 9// AliFMDReconstructor.h
4347b38f 10// Task Class for making TreeR for FMD
11//
121a60bd 12//-- Authors: Evgeny Karpechev (INR) and Alla Maevskaia (INR)
4347b38f 13// Latest changes by Christian Holm Christensen <cholm@nbi.dk>
121a60bd 14/* $Id$ */
8f1cfb0c 15
42403906 16//____________________________________________________________________
0d0e6995 17// Header guards in the header files speeds up the compilation
18// considerably. Please leave them in.
19#ifndef ALIRECONSTRUCTOR_H
20# include <AliReconstructor.h>
21#endif
121a60bd 22
4347b38f 23//____________________________________________________________________
1a1fdef7 24class TTree;
4347b38f 25class TClonesArray;
4347b38f 26class AliFMDDigit;
27class AliRawReader;
1a1fdef7 28class AliRunLoader;
a3537838 29class AliESD;
8f6ee336 30class AliESDFMD;
e802be3e 31
9f662337 32/** @defgroup FMD_rec Reconstruction */
4347b38f 33//____________________________________________________________________
9f662337 34/** This is a class that reconstructs AliFMDRecPoint objects from of
35 Digits. This class reads either digits from a TClonesArray or raw
36 data from a DDL file (or similar), and applies calibrations to get
37 psuedo-inclusive multiplicities per strip.
38 @ingroup FMD_rec
39 */
121a60bd 40class AliFMDReconstructor: public AliReconstructor
41{
4347b38f 42public:
9f662337 43 /** CTOR */
4347b38f 44 AliFMDReconstructor();
9f662337 45 /** DTOR */
56b1929b 46 virtual ~AliFMDReconstructor();
4347b38f 47
9f662337 48 /** Initialize the reconstructor. Here, we initialize the geometry
49 manager, and finds the local to global transformations from the
50 geometry. The calibration parameter manager is also
51 initialized (meaning that the calibration parameters is read
52 from CDB). Next, we try to get some information about the run
53 from the run loader passed.
54 @param runLoader Run loader to use to load and store data.
55 */
1a1fdef7 56 virtual void Init(AliRunLoader* runLoader);
9f662337 57 /** Flag that we can convert raw data into digits.
58 @return always @c true */
1a1fdef7 59 virtual Bool_t HasDigitConversion() const { return kTRUE; }
9f662337 60 /** Convert raw data read from the AliRawReader @a reader into
61 digits. This is done using AliFMDRawReader and
62 AliFMDAltroReader. The digits are put in the passed TTree @a
63 digitsTree.
64 @param reader Raw reader.
65 @param digitsTree Tree to store read digits in. */
1a1fdef7 66 virtual void ConvertDigits(AliRawReader* reader, TTree* digitsTree) const;
9f662337 67 /** Flag that we can do one-event reconstruction.
68 @return always @c true */
1a1fdef7 69 virtual Bool_t HasLocalReconstruction() const { return kTRUE; }
9f662337 70 /** Reconstruct one event from the digits passed in @a digitsTree.
71 The member function creates AliFMDRecPoint objects and stores
72 them on the output tree @a clusterTree. An FMD ESD object is
73 created in parallel.
74 @todo Make sure we get a vertex.
75 @param digitsTree Tree holding the digits of this event
76 @param clusterTree Tree to store AliFMDRecPoint objects in. */
1a1fdef7 77 virtual void Reconstruct(TTree* digitsTree, TTree* clusterTree) const;
9f662337 78 /** Put in the ESD data, the FMD ESD data. The object created by
79 the Reconstruct member function is copied to the ESD object.
80 @param digitsTree Tree of digits for this event - not used
81 @param clusterTree Tree of reconstructed points for this event
82 - not used.
83 @param esd ESD object to store data in.
84 */
1a1fdef7 85 virtual void FillESD(TTree* digitsTree, TTree* clusterTree,
86 AliESD* esd) const;
9f662337 87 /** Not used */
a3537838 88 virtual void SetESD(AliESD* esd) { fESD = esd; }
4347b38f 89
54e415a8 90private:
9f662337 91 /** Hide base classes unused function */
54e415a8 92 void Reconstruct(AliRawReader*, TTree*) const;
9f662337 93 /** Hide base classes unused function */
54e415a8 94 void Reconstruct(AliRunLoader*) const;
9f662337 95 /** Hide base classes unused function */
54e415a8 96 void Reconstruct(AliRunLoader*, AliRawReader*) const;
9f662337 97 /** Hide base classes unused function */
54e415a8 98 void FillESD(AliRawReader*, TTree*, AliESD*) const;
9f662337 99 /** Hide base classes unused function */
54e415a8 100 void FillESD(AliRunLoader*, AliESD*) const;
9f662337 101 /** Hide base classes unused function */
54e415a8 102 void FillESD(AliRunLoader*, AliRawReader*, AliESD*) const;
103
4347b38f 104protected:
0e73cae6 105 /** Copy CTOR
106 @param other Object to copy from. */
107 AliFMDReconstructor(const AliFMDReconstructor& other);
108 /** Assignment operator
109 @param other Object to assign from
110 @return reference to this object */
111 AliFMDReconstructor& operator=(const AliFMDReconstructor& other);
9f662337 112 /** Process AliFMDDigit objects in @a digits. For each digit, find
113 the psuedo-rapidity @f$ \eta@f$, azimuthal angle @f$ \varphi@f$,
114 energy deposited @f$ E@f$, and psuedo-inclusive multiplicity @f$
115 M@f$.
116 @param digits Array of digits. */
e802be3e 117 virtual void ProcessDigits(TClonesArray* digits) const;
9f662337 118 /** Substract pedestals from raw ADC in @a digit
119 @param digit Digit data
120 @return Pedestal subtracted ADC count. */
4347b38f 121 virtual UShort_t SubtractPedestal(AliFMDDigit* digit) const;
9f662337 122 /** Converts number of ADC counts to energy deposited. This is
123 done by
124 @f[
125 E_i = A_i g_i
126 @f]
127 where @f$ A_i@f$ is the pedestal subtracted ADC counts, and @f$
128 g_i@f$ is the gain for the @f$ i^{\mbox{th}}@f$ strip.
129 @param digit Raw data
130 @param eta Psuedo-rapidity of digit.
131 @param count Pedestal subtracted ADC counts
132 @return Energy deposited @f$ E_i@f$ */
8f6ee336 133 virtual Float_t Adc2Energy(AliFMDDigit* digit, Float_t eta,
134 UShort_t count) const;
9f662337 135 /** Converts an energy signal to number of particles. In this
136 implementation, it's done by
137 @f[
138 M_i = E_i / E_{\mbox{MIP}}
139 @f]
140 where @f$ E_i@f$ is the energy deposited, and @f$
141 E_{\mbox{MIP}}@f$ is the average energy deposited by a minimum
142 ionizing particle
143 @param digit Raw data
144 @param edep Energy deposited @f$ E_i@f$
145 @return Psuedo-inclusive multiplicity @f$ M@f$ */
8f6ee336 146 virtual Float_t Energy2Multiplicity(AliFMDDigit* digit, Float_t edep) const;
9f662337 147 /** Calculate the physical coordinates psuedo-rapidity @f$ \eta@f$,
148 azimuthal angle @f$ \varphi@f$ of the strip corresponding to
149 the digit @a digit. This is done by using the information
150 obtained, and previously cached by AliFMDGeometry, from the
151 TGeoManager.
152 @param digit Digit.
153 @param eta On return, psuedo-rapidity @f$ \eta@f$
154 @param phi On return, azimuthal angle @f$ \varphi@f$ */
8f6ee336 155 virtual void PhysicalCoordinates(AliFMDDigit* digit, Float_t& eta,
156 Float_t& phi) const;
42403906 157
8f6ee336 158 mutable TClonesArray* fMult; // Cache of RecPoints
159 mutable Int_t fNMult; // Number of entries in fMult
160 mutable TTree* fTreeR; // Output tree
e802be3e 161 mutable Float_t fCurrentVertex; // Z-coordinate of primary vertex
8f6ee336 162 mutable AliESDFMD* fESDObj; // ESD output object
a3537838 163 AliESD* fESD;
42403906 164
121a60bd 165 ClassDef(AliFMDReconstructor, 0) // class for the FMD reconstruction
121a60bd 166};
167#endif
4347b38f 168//____________________________________________________________________
169//
0d0e6995 170// Local Variables:
171// mode: C++
172// End:
173//
4347b38f 174// EOF
175//