]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDParameters.h
small corrections to previous checkin
[u/mrichter/AliRoot.git] / FMD / AliFMDParameters.h
1 #ifndef ALIFMDPARAMETERS_H
2 #define ALIFMDPARAMETERS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4  * reserved. 
5  *
6  * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
7  *
8  * See cxx source for full Copyright notice                               
9  */
10 //____________________________________________________________________
11 //
12 //  Singleton class to handle various parameters (not geometry) of the
13 //  FMD
14 //  Should get ata fromm Conditions DB.
15 //
16 /** @file    AliFMDParameters.h
17     @author  Christian Holm Christensen <cholm@nbi.dk>
18     @date    Mon Mar 27 12:44:43 2006
19     @brief   Manager of FMD parameters
20 */
21 #ifndef ROOT_TNamed
22 # include <TNamed.h>
23 #endif
24 #ifndef ROOT_TArrayI
25 # include <TArrayI.h>
26 #endif
27 #ifndef ALIFMDUSHORTMAP_H
28 # include <AliFMDUShortMap.h>
29 #endif
30 #ifndef ALIFMDBOOLMAP_H
31 # include <AliFMDBoolMap.h>
32 #endif
33 typedef AliFMDUShortMap AliFMDCalibZeroSuppression;
34 typedef AliFMDBoolMap   AliFMDCalibDeadMap;
35 class AliFMDCalibPedestal;
36 class AliFMDCalibGain;
37 class AliFMDCalibSampleRate;
38 class AliFMDCalibStripRange;
39 class AliFMDAltroMapping;
40 class AliCDBEntry;
41 class AliFMDPreprocessor;
42
43 //____________________________________________________________________
44 //
45 //  Singleton class to handle various parameters (not geometry) of the
46 //  FMD
47 //  Should get ata fromm Conditions DB.
48 //
49
50 /** @brief This class is a singleton that handles various parameters
51     of the FMD detectors.  
52     This class reads from the Conditions DB to get the various
53     parameters, which code can then request from here. In that way,
54     all code uses the same data, and the interface is consistent.
55      
56     Some of the parameter managed are 
57     - @c fPedestal, @c fPedestalWidth
58       Mean and width of the pedestal.  The pedestal is simulated
59       by a Guassian, but derived classes my override MakePedestal
60       to simulate it differently (or pick it up from a database).
61     - @c fVA1MipRange
62       The dymamic MIP range of the VA1_ALICE pre-amplifier chip 
63     - @c fAltroChannelSize
64       The largest number plus one that can be stored in one
65       channel in one time step in the ALTRO ADC chip. 
66     - @c fSampleRate
67       How many times the ALTRO ADC chip samples the VA1_ALICE
68       pre-amplifier signal.   The VA1_ALICE chip is read-out at
69       10MHz, while it's possible to drive the ALTRO chip at
70       25MHz.  That means, that the ALTRO chip can have time to
71       sample each VA1_ALICE signal up to 2 times.  Although it's
72       not certain this feature will be used in the production,
73       we'd like have the option, and so it should be reflected in
74       the code.
75
76     @ingroup FMD_base
77 */
78 class AliFMDParameters : public TNamed
79 {
80 public:
81   /** Enumeration of things to initialize */ 
82   enum What { 
83     /** Pulser gain */ 
84     kPulseGain = 0x1, // Pulser gain 
85     /** Pedestals and noise */ 
86     kPedestal = 0x2, // Pedestal and noise 
87     /** Dead channel map */ 
88     kDeadMap = 0x4, // Dead channel map
89     /**  Over sampling rate */ 
90     kSampleRate = 0x8, // Over sampling rate 
91     /** Zero suppression parameters */ 
92     kZeroSuppression = 0x10, // Zero suppression parameters 
93     /** ALTRO data map */ 
94     kAltroMap = 0x20, // Altro channel map
95     /** Strip Range */
96     kStripRange = 0x40 //Strip range, 
97   };
98   enum { 
99     kAll = (kPulseGain|kPedestal|kDeadMap|kSampleRate|
100             kZeroSuppression|kAltroMap|kStripRange)
101   };
102     
103   /** Singleton access
104       @return  single to */
105   static AliFMDParameters* Instance();
106
107   /** Initialize the manager.  This tries to read the parameters from
108       CDB.  If that fails, the class uses the hard-coded parameters. 
109    */
110   void Init(Bool_t forceReInit=kFALSE, UInt_t what=kAll );
111   /** Initialize the manager.  This tries to read the parameters from
112       CDB.  If that fails, the class uses the hard-coded parameters. 
113    */
114   void Init(AliFMDPreprocessor* pp, 
115             Bool_t              forceReInit=kFALSE, 
116             UInt_t              what=kAll);
117   /** 
118    * Initialize the manager.  This will try to read some calibrations
119    * (sample rate, strip range, gains, pedestals) from local comma
120    * separated value (CSV) files in the directory pointed at by @a
121    * path.  If they are not found, then they will be retrieved from
122    * OCDB as appropriately.   Other calibrations are always read from
123    * OCDB.  
124    * 
125    * The CSV files should be named as 
126    * 
127    * - Pedestals: <tt>peds</tt><i>det_number</i><tt>.csv</tt>
128    * - Gains: <tt>gains</tt><i>det_number</i><tt>.csv</tt>
129    * - Sample Rate: <tt>conditions</tt><i>det_number</i><tt>.csv</tt>
130    * - Strip Range: <tt>conditions</tt><i>det_number</i><tt>.csv</tt>
131    *
132    * where <i>det_number</i> is the detector number (1, 2, or 3). 
133    *
134    * @param path        Where to look for the CSV files
135    * @param forceReInit Always reinitialise 
136    * @param what        What calibrations to load. 
137    */  
138   void Init(const char* path, 
139             Bool_t      forceReInit=kFALSE, 
140             UInt_t      what=kAll);
141   
142   /** 
143    * Automatically generate a dead map from the pedestals and gains.
144    * A channel is marked as dead of the noise is too high (currently
145    * more than 10 ADC counts), or the gain is unreasonable (currently
146    * larger than 10, or smaller than 0.1). 
147    * 
148    * The procedure does not overwrite channels previously marked as
149    * dead - e.g., channels marked as dead in the calibration loaded
150    * from OCDB will continue to be marked as dead.  That is, this
151    * procedure will never make a channel un-dead. 
152    *
153    * @param maxNoise  Maximum noise value before a channel is marked
154    * as dead. 
155    * @param minGain   Minimum value of the calibrated gain before a
156    * channel is considered dead. 
157    * @param maxGain   Maximum value of the calibrated gain before a
158    * channel is considered dead. 
159    */
160   void MakeDeadMap(Float_t maxNoise=10, Float_t minGain=.1, Float_t maxGain=10);
161   /** Print all parameters. 
162       @param option Option string */
163   void Print(Option_t* option="A") const;
164   /** Draw parameters. 
165       @param option What to draw. Should be one of 
166       - dead      Dead channels
167       - threshold Threshold
168       - gain      Gain
169       - pedestal  Pedestal
170       - noise     Noise (or pedestal width)
171       - zero      Zero suppression
172       - rate      Sampling rate (VA1 clock / ALTRO clock)
173       - min       Minimum strip read out
174       - max       Maximum strip read out
175       - map       hardware address
176   */
177   void Draw(Option_t* option="pedestal");
178   
179   /** @{ */
180   /** @name Set various `Fixed' parameters */
181   /** @param r How many MIP signals we can fit in the VA1
182       pre-amps. (default and design is 20) */
183   void SetVA1MipRange(UShort_t r=20)          { fVA1MipRange = r; }
184   /** @param s Maximum number of the ADC (ALTRO).  This is a 10 bit
185       ADC so, the maximum number is 1024 */
186   void SetAltroChannelSize(UShort_t s=1024)   { fAltroChannelSize = s;}
187   /** @param size The number of strips multiplexed into one ALTRO
188       channel. That is, how many strips is connected to one VA1
189       pre-amp. */
190   void SetChannelsPerAltro(UShort_t size=128) { fChannelsPerAltro = size; }
191   /** @param f Factor to use for accepting a signal. */
192   void SetPedestalFactor(Float_t f=3)         { fPedestalFactor = f; }
193   /** @param n Number of pre-samples to keep during zero-suppression -
194       only used in simulation. */
195   void SetZSPreSamples(UShort_t n=1) { fZSPre = (n & 0x3); }
196   /** @param n Number of post-samples to keep during zero-suppression -
197       only used in simulation. */
198   void SetZSPostSamples(UShort_t n=1) { fZSPost = (n & 0x3); }
199   /** @param use If true, do pedestal subtraction before zero
200       suppression - only used in simulation */
201   void SetZSPedSubtract(Bool_t use=kTRUE) { fZSPedSubtract = use; }
202   /** @} */
203
204   /** @{ */
205   /** @name Set various variable parameter defaults */
206   /** @param s Zero suppression threshold in ADC counts */
207   void SetZeroSuppression(UShort_t s=0)       { fFixedZeroSuppression = s; }
208   /** @param r How many times we oversample each strip. */
209   void SetSampleRate(UShort_t r=1)            { fFixedSampleRate = r ;}//(r>2?2:r);}
210   void SetSampleRate(AliFMDCalibSampleRate* r) { fSampleRate = r; }
211   /** @param p Pedestal value in ADC counts */
212   void SetPedestal(Float_t p=10)              { fFixedPedestal = p; }
213   /** @param p Pedestal map */
214   void SetPedestal(AliFMDCalibPedestal* p) { fPedestal = p; }
215   /** @param w Pedestal width in ADC counts */
216   void SetPedestalWidth(Float_t w=1)          { fFixedPedestalWidth = w; }
217   /** @param t Threshold used for 1 MIP acceptance. */
218   void SetThreshold(Float_t t=0)              { fFixedThreshold = t; }
219   /** Range of strips read out 
220       @param min Minimum strip number (0-127). 
221       @param max Maximum strip number (0-127). */
222   void SetStripRange(UShort_t min=0, UShort_t max=127);
223   void SetStripRange(AliFMDCalibStripRange* r) { fStripRange = r; }
224   /** Whether raw data has full common data header (8 32bit words) or
225       the older invalid format (7 32bit words with bogus entries)
226       @param yes if true the raw data has complete data header */ 
227   void UseCompleteHeader(Bool_t yes=kTRUE) { fHasCompleteHeader = yes; } 
228   /** @param g Gain map */
229   void SetGain(AliFMDCalibGain* g) { fPulseGain = g; }
230   /** @} */
231
232   /** @{ */
233   /** @name Get `Fixed' various parameters */
234   /** @return Number of MIP signals that fit inside a VA1 channel  */
235   UShort_t GetVA1MipRange()          const { return fVA1MipRange; }
236   /** @return The maximum count in the ADC */
237   UShort_t GetAltroChannelSize()     const { return fAltroChannelSize; }
238   /** @return Number of strips muliplexed into one ADC channel */
239   UShort_t GetChannelsPerAltro()     const { return fChannelsPerAltro; }
240   /** @return The average energy deposited by one MIP */
241   Float_t  GetEdepMip()              const;
242   /** @return The conversion factor from DAC to ADC */
243   Float_t  GetDACPerMIP()              const;
244   /** @return The factor used of signal acceptance */
245   Float_t  GetPedestalFactor()       const { return fPedestalFactor; }
246   /** @param n Number of pre-samples to keep during zero-suppression -
247       only used in simulation. */
248   UShort_t GetZSPreSamples() const { return fZSPre; }
249   /** @param n Number of post-samples to keep during zero-suppression -
250       only used in simulation. */
251   UShort_t GetZSPostSamples() const { return fZSPost; }
252   /** @param use If true, do pedestal subtraction before zero
253       suppression - only used in simulation */
254   Bool_t IsZSPedSubtract() const { return fZSPedSubtract; }
255   /** @} */
256
257   /** @{ */
258   /** @name Various varible conditions */
259   /** Whether the strip is considered dead
260       @param detector Detector # (1-3)
261       @param ring     Ring ID ('I' or 'O')
262       @param sector   Sector number (0-39)
263       @param strip    Strip number (0-511)
264       @return @c true if the strip is considered dead, @c false if
265       it's OK. */
266   Bool_t   IsDead(UShort_t detector, 
267                   Char_t ring, 
268                   UShort_t sector, 
269                   UShort_t strip) const;
270   Float_t  GetThreshold() const;
271   /** Gain of pre-amp. 
272       @param detector Detector # (1-3)
273       @param ring     Ring ID ('I' or 'O')
274       @param sector   Sector number (0-39)
275       @param strip    Strip number (0-511)
276       @return Gain of pre-amp.  */
277   Float_t  GetPulseGain(UShort_t detector, 
278                         Char_t ring, 
279                         UShort_t sector, 
280                         UShort_t strip) const;
281   /** Get mean of pedestal
282       @param detector Detector # (1-3)
283       @param ring     Ring ID ('I' or 'O')
284       @param sector   Sector number (0-39)
285       @param strip    Strip number (0-511)
286       @return Mean of pedestal */
287   Float_t  GetPedestal(UShort_t detector, 
288                        Char_t ring, 
289                        UShort_t sector, 
290                        UShort_t strip) const;
291   /** Width of pedestal
292       @param detector Detector # (1-3)
293       @param ring     Ring ID ('I' or 'O')
294       @param sector   Sector number (0-39)
295       @param strip    Strip number (0-511)
296       @return Width of pedestal */
297   Float_t  GetPedestalWidth(UShort_t detector, 
298                             Char_t ring, 
299                             UShort_t sector, 
300                             UShort_t strip) const;
301   /** zero suppression threshold (in ADC counts)
302       @param detector Detector # (1-3)
303       @param ring     Ring ID ('I' or 'O')
304       @param sector   Sector number (0-39)
305       @param strip    Strip number (0-511)
306       @return zero suppression threshold (in ADC counts) */
307   UShort_t GetZeroSuppression(UShort_t detector, 
308                               Char_t ring, 
309                               UShort_t sector, 
310                               UShort_t strip) const;
311   /** Get the sampling rate
312       @param detector Detector # (1-3)
313       @param ring     Ring ID ('I' or 'O')
314       @param sector   Sector number (0-39)
315       @param strip    Strip number (0-511)
316       @return The sampling rate */
317   UShort_t GetSampleRate(UShort_t detector, 
318                          Char_t ring, 
319                          UShort_t sector, 
320                          UShort_t strip) const;
321   /** Get the minimum strip in the read-out range
322       @param detector Detector # (1-3)
323       @param ring     Ring ID ('I' or 'O')
324       @param sector   Sector number (0-39)
325       @param strip    Strip number (0-511)
326       @return Minimum strip */
327   UShort_t GetMinStrip(UShort_t detector, 
328                        Char_t ring, 
329                        UShort_t sector, 
330                        UShort_t strip) const;
331   /** Get the maximum strip in the read-out range
332       @param detector Detector # (1-3)
333       @param ring     Ring ID ('I' or 'O')
334       @param sector   Sector number (0-39)
335       @param strip    Strip number (0-511)
336       @return Maximum strip */
337   UShort_t GetMaxStrip(UShort_t detector, 
338                        Char_t ring, 
339                        UShort_t sector, 
340                        UShort_t strip) const;
341   /** Get the number of pre-samples in ALTRO channels
342       @param detector Detector # (1-3)
343       @param ring     Ring ID ('I' or 'O')
344       @param sector   Sector number (0-39)
345       @param strip    Strip number (0-511)
346       @return Maximum strip */
347   UShort_t GetPreSamples(UShort_t, 
348                          Char_t, 
349                          UShort_t, 
350                          UShort_t) const { return 14+5; }
351   /** @} */
352   
353   /** @{ 
354       @name Hardware to detector translation (and inverse) */
355   /** Map a hardware address into a detector index. 
356       @param ddl        Hardware DDL number 
357       @param board      FEC number
358       @param altro      ALTRO number 
359       @param channel    Channel number 
360       @param timebin    Timebin 
361       @param det        On return, the detector #
362       @param ring       On return, the ring ID
363       @param sec        On return, the sector #
364       @param str        On return, the base of strip #
365       @param sam        On return, the sample number for this strip
366       @return @c true on success, false otherwise */
367   Bool_t Hardware2Detector(UShort_t    ddl,        UShort_t    board, 
368                            UShort_t    altro,      UShort_t    chan,
369                            UShort_t  timebin,   
370                            UShort_t& det,        Char_t&   ring, 
371                            UShort_t& sec,        Short_t& str,
372                            UShort_t& sam) const;
373   /** Map a hardware address into a detector index. 
374       @param ddl        Hardware DDL number 
375       @param hwaddr     Hardware address.  
376       @param timebin    Timebin 
377       @param det        On return, the detector #
378       @param ring       On return, the ring ID
379       @param sec        On return, the sector #
380       @param str        On return, the base of strip #
381       @param sam        On return, the sample number for this strip
382       @return @c true on success, false otherwise */
383   Bool_t Hardware2Detector(UShort_t    ddl,        UShort_t    hwaddr, 
384                            UShort_t  timebin,    
385                            UShort_t& det,        Char_t&   ring, 
386                            UShort_t& sec,        Short_t& str,
387                            UShort_t& sam) const;
388 #if 0
389   /** Translate hardware address to detector coordinates 
390       @param ddl      DDL number 
391       @param board    Board address
392       @param chip     Chip #
393       @param channel  Channel #
394       @param det      On return, Detector # (1-3)
395       @param ring     On return, Ring ID ('I' or 'O')
396       @param sec      On return, Sector number (0-39)
397       @param str      On return, Strip number (0-511)
398       @return @c true on success. */
399   Bool_t   Hardware2Detector(UShort_t ddl,    UShort_t    board, 
400                              UShort_t chip,   UShort_t    channel, 
401                              UShort_t& det, Char_t&   ring, 
402                              UShort_t& sec, Short_t& str) const;
403   /** Translate hardware address to detector coordinates 
404       @param ddl      DDL number 
405       @param addr     Hardware address
406       @param det      On return, Detector # (1-3)
407       @param ring     On return, Ring ID ('I' or 'O')
408       @param sec      On return, Sector number (0-39)
409       @param str      On return, Strip number (0-511)
410       @return @c true on success. */
411   Bool_t   Hardware2Detector(UShort_t ddl, UShort_t addr, UShort_t& det,
412                              Char_t& ring, UShort_t& sec, Short_t& str) const;
413 #endif
414
415   /** Map a detector index into a hardware address. 
416       @param det         The detector #
417       @param ring        The ring ID
418       @param sec         The sector #
419       @param str         The strip #
420       @param sam         The sample number 
421       @param ddl         On return, hardware DDL number 
422       @param board       On return, the FEC board address (local to DDL)
423       @param altro       On return, the ALTRO number (local to FEC)
424       @param channel     On return, the channel number (local to ALTRO)
425       @param timebin     On return, the timebin number (local to ALTRO)
426       @return @c true on success, false otherwise */
427   Bool_t Detector2Hardware(UShort_t  det,        Char_t    ring, 
428                            UShort_t  sec,        UShort_t  str,
429                            UShort_t  sam, 
430                            UShort_t&   ddl,        UShort_t&   board, 
431                            UShort_t&   altro,      UShort_t&   channel, 
432                            UShort_t& timebin) const;
433   /** Map a detector index into a hardware address. 
434       @param det         The detector #
435       @param ring        The ring ID
436       @param sec         The sector #
437       @param str         The strip #
438       @param sam         The sample number 
439       @param ddl         On return, hardware DDL number 
440       @param hwaddr      On return, hardware address.  
441       @param timebin     On return, the timebin number (local to ALTRO)
442       @return @c true on success, false otherwise */
443   Bool_t Detector2Hardware(UShort_t  det,        Char_t    ring, 
444                            UShort_t  sec,        UShort_t  str,
445                            UShort_t  sam, 
446                            UShort_t&   ddl,        UShort_t&   hwaddr, 
447                            UShort_t& timebin) const;
448 #if 0
449   /** Translate detector coordinates to hardware address 
450       @param det      Detector # (1-3)
451       @param ring     Ring ID ('I' or 'O')
452       @param sec      Sector number (0-39)
453       @param str      Strip number (0-511)
454       @param ddl      On return, DDL number 
455       @param board    On return, Board address
456       @param chip     On return, Chip #
457       @param channel  On return, Channel #
458       @return @c true on success. */
459   Bool_t   Detector2Hardware(UShort_t det, Char_t ring, 
460                              UShort_t sec, UShort_t str, 
461                              UShort_t& ddl,  UShort_t& board,
462                              UShort_t& chip, UShort_t& channel) const;
463   /** Translate detector coordinates to hardware address 
464       @param det      Detector # (1-3)
465       @param ring     Ring ID ('I' or 'O')
466       @param sec      Sector number (0-39)
467       @param str      Strip number (0-511)
468       @param ddl      On return, DDL number 
469       @param addr     On return, Hardware address
470       @return @c true on success. */
471   Bool_t   Detector2Hardware(UShort_t det, Char_t ring, UShort_t sec, 
472                              UShort_t str, UShort_t& ddl, UShort_t& addr) const;
473 #endif
474   /** Get the map that translates hardware to detector coordinates 
475       @return Get the map that translates hardware to detector
476       coordinates */ 
477   AliFMDAltroMapping* GetAltroMap() const;
478   /** Whether raw data has full common data header (8 32bit words) or
479       the older invalid format (7 32bit words with bogus entries)
480       @return false if the raw data has incomplete data header */ 
481   Bool_t HasCompleteHeader() const { return fHasCompleteHeader; } 
482
483   /** @} */
484
485   static const char* PulseGainPath()       { return fgkPulseGain; }
486   static const char* PedestalPath()        { return fgkPedestal; }
487   static const char* DeadPath()            { return fgkDead; }
488   static const char* SampleRatePath()      { return fgkSampleRate; }
489   static const char* AltroMapPath()        { return fgkAltroMap; }
490   static const char* ZeroSuppressionPath() { return fgkZeroSuppression; }
491   static const char* StripRangePath()      { return fgkStripRange; }
492   static const char* GetPedestalShuttleID()   {return fkPedestalShuttleID;}
493   static const char* GetGainShuttleID()       {return fkGainShuttleID;}
494   static const char* GetConditionsShuttleID()   {return fkConditionsShuttleID;}
495   
496 protected:
497   /** CTOR  */
498   AliFMDParameters();
499   /** CTOR  */
500   AliFMDParameters(const AliFMDParameters& o) 
501     : TNamed(o), 
502       fIsInit(o.fIsInit),
503       fkSiDeDxMip(o.fkSiDeDxMip),
504       fVA1MipRange(o.fVA1MipRange),
505       fAltroChannelSize(o.fAltroChannelSize),
506       fChannelsPerAltro(o.fChannelsPerAltro),
507       fPedestalFactor(o.fPedestalFactor),
508       fZSPre(o.fZSPre),
509       fZSPost(o.fZSPost),
510       fZSPedSubtract(o.fZSPedSubtract),
511       fFixedPedestal(o.fFixedPedestal),
512       fFixedPedestalWidth(o.fFixedPedestalWidth),
513       fFixedZeroSuppression(o.fFixedZeroSuppression),
514       fFixedSampleRate(o.fFixedSampleRate),
515       fFixedThreshold(o.fFixedThreshold),
516       fFixedMinStrip(o.fFixedMinStrip),
517       fFixedMaxStrip(o.fFixedMaxStrip),
518       fFixedPulseGain(o.fFixedPulseGain),
519       fEdepMip(o.fEdepMip),
520       fHasCompleteHeader(o.fHasCompleteHeader),
521       fZeroSuppression(o.fZeroSuppression),
522       fSampleRate(o.fSampleRate),
523       fPedestal(o.fPedestal),
524       fPulseGain(o.fPulseGain),
525       fDeadMap(o.fDeadMap),
526       fAltroMap(o.fAltroMap),
527       fStripRange(o.fStripRange)
528   {}
529   /** Assignement operator 
530       @return Reference to this */
531   AliFMDParameters& operator=(const AliFMDParameters&) { return *this; }
532   /** DTOR */
533   virtual ~AliFMDParameters() {}
534   /** Singleton instance  */
535   static AliFMDParameters* fgInstance;   // Static singleton instance
536   /** 
537    * Check if the file <i>prefix</i><i>number</i> exists in @a path, 
538    * and write the full path to @a f.  
539    * 
540    * @param prefix  File prefix (cond, peds, gains, ...)
541    * @param path    Path to files
542    * @param number  Detector number (1, 2, or 3)
543    * @param f       On return full path to file (if found)
544    * 
545    * @return @c true if file exists and is readable, @c false otherwise
546    */
547   Bool_t CheckFile(const char* prefix, const char* path, 
548                    int         number, TString&    f) const;
549   /** Get an entry from either global AliCDBManager or passed
550       AliFMDPreprocessor. 
551       @param path  Path to CDB object. 
552       @param pp    AliFMDPreprocessor 
553       @param fatal If true, raise a fatal flag if we didn't get the entry.
554       @return AliCDBEntry if found */ 
555   AliCDBEntry* GetEntry(const char* path, AliFMDPreprocessor* pp, 
556                         Bool_t fatal=kTRUE) const;
557   /** Initialize gains.  Try to get them from CDB */
558   void InitPulseGain(AliFMDPreprocessor* pp=0);
559   /** Initialize pedestals.  Try to get them from CDB */
560   void InitPedestal(AliFMDPreprocessor* pp=0);
561   /** Initialize dead map.  Try to get it from CDB */
562   void InitDeadMap(AliFMDPreprocessor* pp=0);
563   /** Initialize sample rates.  Try to get them from CDB */
564   void InitSampleRate(AliFMDPreprocessor* pp=0);
565   /** Initialize zero suppression thresholds.  Try to get them from CDB */
566   void InitZeroSuppression(AliFMDPreprocessor* pp=0);
567   /** Initialize hardware map.  Try to get it from CDB */
568   void InitAltroMap(AliFMDPreprocessor* pp=0);
569   /** Initialize strip range.  Try to get it from CDB */
570   void InitStripRange(AliFMDPreprocessor* pp=0);
571
572   Bool_t          fIsInit;                   // Whether we've been initialised  
573
574   static const char* fgkPulseGain;           // Path to PulseGain calib object
575   static const char* fgkPedestal;            // Path to Pedestal calib object
576   static const char* fgkDead;                // Path to Dead calib object
577   static const char* fgkSampleRate;          // Path to SampleRate calib object
578   static const char* fgkAltroMap;            // Path to AltroMap calib object
579   static const char* fgkZeroSuppression;     // Path to ZeroSuppression cal object
580   static const char* fgkStripRange;          // Path to strip range cal object
581   const Float_t   fkSiDeDxMip;               // MIP dE/dx in Silicon
582   UShort_t        fVA1MipRange;              // # MIPs the pre-amp can do    
583   UShort_t        fAltroChannelSize;         // Largest # to store in 1 ADC ch.
584   UShort_t        fChannelsPerAltro;         // Number of pre-amp. chan/adc chan.
585   Float_t         fPedestalFactor;           // Number of pedestal widths
586   UShort_t        fZSPre;                    // Number of pre-samples in ZS
587   UShort_t        fZSPost;                   // Number of post-samples in ZS
588   Bool_t          fZSPedSubtract;            // Pedestal subtraction before ZS
589
590   Float_t         fFixedPedestal;            // Pedestal to subtract
591   Float_t         fFixedPedestalWidth;       // Width of pedestal
592   UShort_t        fFixedZeroSuppression;     // Threshold for zero-suppression
593   UShort_t        fFixedSampleRate;          // Times the ALTRO samples pre-amp.
594   Float_t         fFixedThreshold;           // Threshold in ADC counts
595   UShort_t        fFixedMinStrip;            // Minimum strip read-out
596   UShort_t        fFixedMaxStrip;            // Maximum strip read-out 
597   mutable Float_t fFixedPulseGain;           //! Gain (cached)
598   mutable Float_t fEdepMip;                  //! Cache of energy loss for a MIP
599   Bool_t          fHasCompleteHeader;        // raw data has incomplete data header
600   
601   static const char* fkPedestalShuttleID;    // Shuttle/preprocessor ID for pedestals
602   static const char* fkGainShuttleID;        // Shuttle/preprocessor ID for gains
603   static const char* fkConditionsShuttleID;  // Shuttle/preprocessor ID for conditions
604   
605   AliFMDCalibZeroSuppression* fZeroSuppression; // Zero suppression from CDB
606   AliFMDCalibSampleRate*      fSampleRate;      // Sample rate from CDB 
607   AliFMDCalibPedestal*        fPedestal;        // Pedestals 
608   AliFMDCalibGain*            fPulseGain;       // Pulser gain
609   AliFMDCalibDeadMap*         fDeadMap;         // Pulser gain
610   AliFMDAltroMapping*         fAltroMap;        // Map of hardware
611   AliFMDCalibStripRange*      fStripRange;      // Strip range
612   
613   ClassDef(AliFMDParameters,6) // Manager of parameters
614 };
615
616 #endif
617 //____________________________________________________________________
618 //
619 // Local Variables:
620 //   mode: C++
621 // End:
622 //
623 // EOF
624 //
625