Compiler warnings fixes.
[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;
29
4347b38f 30
31//====================================================================
32class AliFMDBaseDigitizer : public AliDigitizer
33{
34public:
35 AliFMDBaseDigitizer();
36 AliFMDBaseDigitizer(AliRunDigitizer * manager);
37 AliFMDBaseDigitizer(const Char_t* name, const Char_t* title);
38 virtual ~AliFMDBaseDigitizer();
4110645f 39
66d2ede1 40 // Do the main work
4347b38f 41 virtual Bool_t Init();
42
43 // Extra member functions
44 void SetVA1MipRange(UShort_t r=20) { fVA1MipRange = r; }
45 void SetAltroChannelSize(UShort_t s=1024) { fAltroChannelSize = s;}
46 void SetSampleRate(UShort_t r=1) { fSampleRate = (r>2 ? 2 : r); }
47 void SetShapingTime(Float_t t=10) { fShapingTime = t; }
48
49 UShort_t GetVA1MipRange() const { return fVA1MipRange; }
50 UShort_t GetAltroChannelSize() const { return fAltroChannelSize; }
51 UShort_t GetSampleRate() const { return fSampleRate; }
52 Float_t GetShapingTime() const { return fShapingTime; }
53protected:
54 virtual void SumContributions(AliFMD* fmd);
55 virtual void DigitizeHits(AliFMD* fmd) const;
56 virtual void ConvertToCount(Float_t edep,
e802be3e 57 Float_t last,
4347b38f 58 Float_t siThickness,
59 Float_t siDensity,
60 TArrayI& counts) const;
61 virtual UShort_t MakePedestal() const { return 0; }
4347b38f 62 virtual void AddNoise(TArrayI&) const {}
63 virtual void AddDigit(AliFMD* /* fmd */,
64 UShort_t /* detector */,
65 Char_t /* ring */,
66 UShort_t /* sector */,
67 UShort_t /* strip */,
68 Float_t /* edep */,
69 UShort_t /* count1 */,
70 Short_t /* count2 */,
71 Short_t /* count3 */) const {}
66d2ede1 72
69b696b9 73 AliRunLoader* fRunLoader; // Run loader
4347b38f 74 AliFMDEdepMap fEdep; // Cache of Energy from hits
75 UShort_t fVA1MipRange; // How many MIPs the pre-amp can do
76 UShort_t fAltroChannelSize; // Largest # to store in 1 ADC chan.
77 UShort_t fSampleRate; // Times the ALTRO samples pre-amp.
78 Float_t fShapingTime; // Shaping profile parameter
79
4347b38f 80 ClassDef(AliFMDBaseDigitizer,0) // Base class for FMD digitizers
81};
82
83//====================================================================
84class AliFMDDigitizer : public AliFMDBaseDigitizer
85{
86public:
87 AliFMDDigitizer();
88 AliFMDDigitizer(AliRunDigitizer * manager);
89 virtual ~AliFMDDigitizer() {}
90 virtual void Exec(Option_t* option=0);
66d2ede1 91
66d2ede1 92
4347b38f 93 // Extra member functions
94 void SetPedestal(Float_t mean=10, Float_t width=.5);
95 void GetPedestal(Float_t& mean, Float_t& width) const;
96protected:
97 virtual void AddDigit(AliFMD* fmd,
98 UShort_t detector,
99 Char_t ring,
100 UShort_t sector,
101 UShort_t strip,
102 Float_t edep,
103 UShort_t count1,
104 Short_t count2,
105 Short_t count3) const;
106 virtual UShort_t MakePedestal() const;
107 virtual void CheckDigit(Float_t edep,
108 UShort_t nhits,
109 const TArrayI& counts);
110 Float_t fPedestal; // Mean of pedestal
111 Float_t fPedestalWidth; // Width of pedestal
112 ClassDef(AliFMDDigitizer,0) // Make Digits from Hits
113};
114//____________________________________________________________________
115inline void
116AliFMDDigitizer::SetPedestal(Float_t mean, Float_t width)
117{
118 fPedestal = mean;
119 fPedestalWidth = width;
120}
121
122//____________________________________________________________________
123inline void
124AliFMDDigitizer::GetPedestal(Float_t& mean, Float_t& width) const
125{
126 mean = fPedestal;
127 width = fPedestalWidth;
128}
66d2ede1 129
4110645f 130
4347b38f 131//====================================================================
132class AliFMDSDigitizer : public AliFMDBaseDigitizer
133{
134public:
135 AliFMDSDigitizer();
136 AliFMDSDigitizer(const Char_t* headerFile, const Char_t* sdigFile="");
137 virtual ~AliFMDSDigitizer();
138 virtual void Exec(Option_t* option=0);
139protected:
140 virtual void AddDigit(AliFMD* fmd,
141 UShort_t detector,
142 Char_t ring,
143 UShort_t sector,
144 UShort_t strip,
145 Float_t edep,
146 UShort_t count1,
147 Short_t count2,
148 Short_t count3) const;
149 ClassDef(AliFMDSDigitizer,0) // Make Summable Digits from Hits
150};
4110645f 151
152
4347b38f 153
154#endif
155//____________________________________________________________________
156//
0d0e6995 157// Local Variables:
158// mode: C++
159// End:
160//
161//
4347b38f 162// EOF
163//
164