]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDCalibPedestal.h
Fixes for bug #52499: Field polarities inconsistiency
[u/mrichter/AliRoot.git] / FMD / AliFMDCalibPedestal.h
1 #ifndef ALIFMDCALIBPEDESTAL_H
2 #define ALIFMDCALIBPEDESTAL_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 //____________________________________________________________________
9 //                                                                          
10 // This class stores a pedestal and pedestal width for each strip in
11 // the FMD detectors. 
12 // The values are stored as floats, since they may be results from a
13 // fit. 
14 // Need to make algorithm that makes this data
15 /** @file    AliFMDCalibPedestal.h
16     @author  Christian Holm Christensen <cholm@nbi.dk>
17     @date    Sun Mar 26 18:30:51 2006
18     @brief   Per strip pedestal calibration 
19     @ingroup FMD_base
20 */
21 #ifndef ALIFMDFLOATMAP_H
22 # include <AliFMDFloatMap.h>
23 #endif
24 #include <iosfwd>
25 class AliFMDBoolMap;
26
27 //____________________________________________________________________
28 /** @brief Pedestal value and width for each strip in the FMD 
29     @ingroup FMD_base
30 */
31 class AliFMDCalibPedestal : public TObject 
32 {
33 public:
34   /** CTOR */
35   AliFMDCalibPedestal();
36   /** DTOR */
37   ~AliFMDCalibPedestal() {}
38   /** Copy ctor 
39       @param o Object to copy from  */
40   AliFMDCalibPedestal(const AliFMDCalibPedestal& o);
41   /** Assignment 
42       @param o Object to assign from
43       @return Reference to this object   */
44   AliFMDCalibPedestal& operator=(const AliFMDCalibPedestal& o);
45   /** Set the values for a strip. 
46       @param det  Detector 
47       @param ring Ring 
48       @param sec  Sector 
49       @param str  Strip
50       @param ped  Value of pedestal 
51       @param pedW Width of pedestal */
52   void Set(UShort_t det, Char_t ring, UShort_t sec, UShort_t str, 
53            Float_t ped, Float_t pedW);
54   /** Get pedestal for a strip. 
55       @param det  Detector 
56       @param ring Ring 
57       @param sec  Sector 
58       @param str  Strip
59       @return Pedestal for strip */  
60   Float_t Value(UShort_t det, Char_t ring, UShort_t sec, UShort_t str);
61   /** Get pedestal width for a strip. 
62       @param det  Detector 
63       @param ring Ring 
64       @param sec  Sector 
65       @param str  Strip
66       @return Pedestal width for strip */  
67   Float_t Width(UShort_t det, Char_t ring, UShort_t sec, UShort_t str);
68
69   /**
70      Read information from file and set values
71      @param inFile inputFile
72    */
73   Bool_t ReadFromFile(std::istream & inFile);
74   /** 
75    * Make a dead map based on the noise of the channels.  If the noise
76    * of a paraticular channel is larger than @a maxW, then the channel
77    * is marked as dead. 
78    *
79    * If the argument @a dead is non-null, then the map passed is
80    * modified.  That is, channels marked as dead in the map will
81    * remain marked.   Channels that meat the criterion (noise larger
82    * than @a maxW) will in addition be marked as dead. 
83    *
84    * If the argument @a dead is null, then a new map is created and a
85    * pointer to this will be returned. 
86    * 
87    * @param maxW Maximum value of noise for a channel before it is
88    * marked as dead. 
89    * @param dead If non-null, then modify this map. 
90    * 
91    * @return A pointer to possibly newly allocated dead map. 
92    */
93   AliFMDBoolMap* MakeDeadMap(Float_t maxW, AliFMDBoolMap* dead=0) const;
94 private:
95   AliFMDFloatMap fValue; /** Pedestal */
96   AliFMDFloatMap fWidth; /** Pedestal width */
97   ClassDef(AliFMDCalibPedestal, 1) // Pedestal data for the FMD 
98 };
99
100
101 #endif
102 //____________________________________________________________________
103 //
104 // Local Variables:
105 //   mode: C++
106 // End:
107 //
108
109