Access to the headers from RAW
[u/mrichter/AliRoot.git] / FMD / AliFMDDigitizer.h
CommitLineData
66d2ede1 1#ifndef ALIFMDDIGITIZER_H
2#define ALIFMDDIGITIZER_H
4347b38f 3/* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights
4 * reserved.
5 *
6 * See cxx source for full Copyright notice
7 */
8#ifndef ALIDIGITIZER_H
9# include <AliDigitizer.h>
10#endif
11#ifndef ALIRUNDIGITIZER_H
12# include <AliRunDigitizer.h>
13#endif
e802be3e 14#ifndef ALIFMDEdepMAP_H
97961cbd 15# include "AliFMDEdepMap.h"
4347b38f 16#endif
17#ifndef __UTILITY__
18# include <utility>
19#endif
20// #ifndef ROOT_TArrayF
21// # include <TArrayF.h>
22// #endif
88cb7938 23
4347b38f 24//====================================================================
88cb7938 25class TClonesArray;
4347b38f 26class AliFMD;
27class AliLoader;
28class AliRunLoader;
8f6ee336 29class AliFMDDigit;
4347b38f 30
4347b38f 31
32//====================================================================
33class AliFMDBaseDigitizer : public AliDigitizer
34{
35public:
36 AliFMDBaseDigitizer();
37 AliFMDBaseDigitizer(AliRunDigitizer * manager);
38 AliFMDBaseDigitizer(const Char_t* name, const Char_t* title);
39 virtual ~AliFMDBaseDigitizer();
4110645f 40
66d2ede1 41 // Do the main work
4347b38f 42 virtual Bool_t Init();
43
44 // Extra member functions
8f6ee336 45 void SetShapingTime(Float_t t=10) { fShapingTime = t; }
4347b38f 46 Float_t GetShapingTime() const { return fShapingTime; }
47protected:
48 virtual void SumContributions(AliFMD* fmd);
49 virtual void DigitizeHits(AliFMD* fmd) const;
50 virtual void ConvertToCount(Float_t edep,
e802be3e 51 Float_t last,
8f6ee336 52 UShort_t detector,
53 Char_t ring,
54 UShort_t sector,
55 UShort_t strip,
4347b38f 56 TArrayI& counts) const;
8f6ee336 57 virtual UShort_t MakePedestal(UShort_t detector,
58 Char_t ring,
59 UShort_t sector,
60 UShort_t strip) const;
4347b38f 61 virtual void AddNoise(TArrayI&) const {}
62 virtual void AddDigit(AliFMD* /* fmd */,
63 UShort_t /* detector */,
64 Char_t /* ring */,
65 UShort_t /* sector */,
66 UShort_t /* strip */,
67 Float_t /* edep */,
68 UShort_t /* count1 */,
69 Short_t /* count2 */,
70 Short_t /* count3 */) const {}
66d2ede1 71
e5c81efd 72 AliRunLoader* fRunLoader; //! Run loader
4347b38f 73 AliFMDEdepMap fEdep; // Cache of Energy from hits
4347b38f 74 Float_t fShapingTime; // Shaping profile parameter
75
088f8e79 76 AliFMDBaseDigitizer(const AliFMDBaseDigitizer& o)
77 : AliDigitizer(o) {}
78 AliFMDBaseDigitizer& operator=(const AliFMDBaseDigitizer&) { return *this; }
e5c81efd 79 ClassDef(AliFMDBaseDigitizer,2) // Base class for FMD digitizers
4347b38f 80};
81
82//====================================================================
83class AliFMDDigitizer : public AliFMDBaseDigitizer
84{
85public:
86 AliFMDDigitizer();
87 AliFMDDigitizer(AliRunDigitizer * manager);
88 virtual ~AliFMDDigitizer() {}
89 virtual void Exec(Option_t* option=0);
4347b38f 90protected:
91 virtual void AddDigit(AliFMD* fmd,
92 UShort_t detector,
93 Char_t ring,
94 UShort_t sector,
95 UShort_t strip,
96 Float_t edep,
97 UShort_t count1,
98 Short_t count2,
99 Short_t count3) const;
8f6ee336 100 virtual UShort_t MakePedestal(UShort_t detector,
101 Char_t ring,
102 UShort_t sector,
103 UShort_t strip) const;
104 virtual void CheckDigit(AliFMDDigit* digit,
4347b38f 105 UShort_t nhits,
106 const TArrayI& counts);
8f6ee336 107 ClassDef(AliFMDDigitizer,1) // Make Digits from Hits
4347b38f 108};
4110645f 109
4347b38f 110//====================================================================
111class AliFMDSDigitizer : public AliFMDBaseDigitizer
112{
113public:
114 AliFMDSDigitizer();
115 AliFMDSDigitizer(const Char_t* headerFile, const Char_t* sdigFile="");
116 virtual ~AliFMDSDigitizer();
117 virtual void Exec(Option_t* option=0);
118protected:
119 virtual void AddDigit(AliFMD* fmd,
120 UShort_t detector,
121 Char_t ring,
122 UShort_t sector,
123 UShort_t strip,
124 Float_t edep,
125 UShort_t count1,
126 Short_t count2,
127 Short_t count3) const;
128 ClassDef(AliFMDSDigitizer,0) // Make Summable Digits from Hits
129};
4110645f 130
131
4347b38f 132
133#endif
134//____________________________________________________________________
135//
0d0e6995 136// Local Variables:
137// mode: C++
138// End:
139//
140//
4347b38f 141// EOF
142//
143