]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDCalibGain.h
bugfix
[u/mrichter/AliRoot.git] / FMD / AliFMDCalibGain.h
1 #ifndef ALIFMDCALIBGAIN_H
2 #define ALIFMDCALIBGAIN_H
3 /* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights
4  * reserved. 
5  *
6  * See cxx source for full Copyright notice                               
7  */
8 /** @file    AliFMDCalibGain.h
9     @author  Christian Holm Christensen <cholm@nbi.dk>
10     @date    Sun Mar 26 18:30:16 2006
11     @brief   Per strip gain calibration 
12 */
13 // Gain value and width for each strip in the FMD. 
14 // Foo 
15 // Bar 
16 //
17 #ifndef ALIFMDFLOATMAP_H
18 # include <AliFMDFloatMap.h>
19 #endif
20 #include <iosfwd>
21 class AliFMDBoolMap;
22
23 //____________________________________________________________________
24 /** @brief Gain value and width for each strip in the FMD 
25     @ingroup FMD_base
26 */
27 class AliFMDCalibGain : public TObject 
28 {
29 public:
30   /** Constructor */
31   AliFMDCalibGain();
32   /** Destructor */
33   ~AliFMDCalibGain() {}
34   /** Copy constructor 
35       @param o object to copy from */
36   AliFMDCalibGain(const AliFMDCalibGain& o);
37   /** Assignment operator 
38       @param o Object to assign from */
39   AliFMDCalibGain& operator=(const AliFMDCalibGain& o);
40   /** Set the values for a strip. 
41       @param det  Detector 
42       @param ring Ring 
43       @param sec  Sector 
44       @param str  Strip
45       @param val  Value of gain */
46   void Set(UShort_t det, Char_t ring, UShort_t sec, UShort_t str, Float_t val);
47   /** Set the global threshold 
48       @param thres Threshold */
49   void Set(Float_t thres) { fThreshold = thres; }
50   /** Get gain for a strip. 
51       @param det  Detector 
52       @param ring Ring 
53       @param sec  Sector 
54       @param str  Strip
55       @return Gain for strip */
56   Float_t Value(UShort_t det, Char_t ring, UShort_t sec, UShort_t str);
57
58   /**
59      Read information from file and set values
60      @param inFile inputFile
61    */
62   Bool_t ReadFromFile(std::istream & inFile);
63
64   /** @return threshold */
65   Float_t Threshold() const { return fThreshold; }
66   const AliFMDFloatMap& Values() const { return fValue; }
67   /** 
68    * Make a dead map based on the gain of the channels.  If the gain 
69    * of a paraticular channel falls outside the range specified by @a
70    * min and @a max, then the channel is marked as dead. 
71    *
72    * If the argument @a dead is non-null, then the map passed is
73    * modified.  That is, channels marked as dead in the map will
74    * remain marked.   Channels that meat the criterion (gain outside
75    * the specified range) will in addition be marked as dead. 
76    *
77    * If the argument @a dead is null, then a new map is created and a
78    * pointer to this will be returned. 
79    * 
80    * @param min Minimum value of gain for a channel before it is
81    * @param max Maximum value of gain for a channel before it is
82    * marked as dead. 
83    * @param dead If non-null, then modify this map. 
84    * 
85    * @return A pointer to possibly newly allocated dead map. 
86    */
87   AliFMDBoolMap* MakeDeadMap(Float_t min, Float_t max, 
88                              AliFMDBoolMap* dead=0) const;
89 private:
90   AliFMDFloatMap fValue;       // Map
91   Float_t        fThreshold;   // Global threshold
92   ClassDef(AliFMDCalibGain, 1) // Gain data for the FMD 
93 };
94
95
96 #endif
97 //____________________________________________________________________
98 //
99 // Local Variables:
100 //   mode: C++
101 // End:
102 //
103
104