]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDCalibGain.h
Starting a collection of QA/Comparison macros
[u/mrichter/AliRoot.git] / FMD / AliFMDCalibGain.h
CommitLineData
a3537838 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 */
c2fc1258 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*/
02a27b50 13// Gain value and width for each strip in the FMD.
14// Foo
15// Bar
16//
a3537838 17#ifndef ALIFMDFLOATMAP_H
18# include <AliFMDFloatMap.h>
19#endif
e064ab4a 20#include <iosfwd>
f560b28c 21class AliFMDBoolMap;
e064ab4a 22
a3537838 23//____________________________________________________________________
c2fc1258 24/** @brief Gain value and width for each strip in the FMD
9f662337 25 @ingroup FMD_base
26*/
a3537838 27class AliFMDCalibGain : public TObject
28{
29public:
9f662337 30 /** Constructor */
a3537838 31 AliFMDCalibGain();
9f662337 32 /** Destructor */
a3537838 33 ~AliFMDCalibGain() {}
9f662337 34 /** Copy constructor
35 @param o object to copy from */
a3537838 36 AliFMDCalibGain(const AliFMDCalibGain& o);
9f662337 37 /** Assignment operator
38 @param o Object to assign from */
a3537838 39 AliFMDCalibGain& operator=(const AliFMDCalibGain& o);
9f662337 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 */
a3537838 46 void Set(UShort_t det, Char_t ring, UShort_t sec, UShort_t str, Float_t val);
9f662337 47 /** Set the global threshold
48 @param thres Threshold */
a3537838 49 void Set(Float_t thres) { fThreshold = thres; }
9f662337 50 /** Get gain for a strip.
51 @param det Detector
52 @param ring Ring
53 @param sec Sector
54 @param str Strip
9f662337 55 @return Gain for strip */
a3537838 56 Float_t Value(UShort_t det, Char_t ring, UShort_t sec, UShort_t str);
e064ab4a 57
58 /**
59 Read information from file and set values
60 @param inFile inputFile
61 */
62 Bool_t ReadFromFile(std::istream & inFile);
63
9f662337 64 /** @return threshold */
a3537838 65 Float_t Threshold() const { return fThreshold; }
a9579262 66 const AliFMDFloatMap& Values() const { return fValue; }
f560b28c 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;
a3537838 89private:
9f662337 90 AliFMDFloatMap fValue; // Map
91 Float_t fThreshold; // Global threshold
a3537838 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