1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 /** @file AliFMDCalibStripRange.cxx
17 @author Christian Holm Christensen <cholm@nbi.dk>
18 @date Sun Mar 26 18:31:09 2006
19 @brief Per digitizer card pulser calibration
21 //____________________________________________________________________
23 // This class stores which strips are read-out.
24 // In principle this can be set for each half-ring.
25 // However, in real life, all the detectors will probably read out all
26 // strips, and dead areas can be handled off-line.
27 // This information comes from DCS or the like.
29 #include "AliFMDCalibStripRange.h" // ALIFMDCALIBGAIN_H
30 // #include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
32 //____________________________________________________________________
33 ClassImp(AliFMDCalibStripRange)
35 ; // This is here to keep Emacs for indenting the next line
38 //____________________________________________________________________
39 AliFMDCalibStripRange::AliFMDCalibStripRange()
40 : fRanges(AliFMDMap::kMaxDetectors, AliFMDMap::kMaxRings, 2, 1)
47 //____________________________________________________________________
48 AliFMDCalibStripRange::AliFMDCalibStripRange(const AliFMDCalibStripRange& o)
49 : TObject(o), fRanges(o.fRanges)
54 //____________________________________________________________________
55 AliFMDCalibStripRange&
56 AliFMDCalibStripRange::operator=(const AliFMDCalibStripRange& o)
58 // Assignement operator
63 //____________________________________________________________________
65 AliFMDCalibStripRange::Set(UShort_t det, Char_t ring,
66 UShort_t sector, UShort_t, UShort_t min,
69 // Set the min and max for a half-ring
70 UInt_t nSec = (ring == 'I' ? 20 : 40);
71 UInt_t board = sector / nSec;
72 fRanges(det, ring, board, 0) = ((max & 0x7f) << 8) + (min & 0x7f);
75 //____________________________________________________________________
77 AliFMDCalibStripRange::Min(UShort_t det, Char_t ring,
78 UShort_t sec, UShort_t) const
80 // Get the min for a half-ring
81 UInt_t nSec = (ring == 'I' ? 20 : 40);
82 UInt_t board = sec / nSec;
83 return (fRanges(det, ring, board, 0) & 0x7f);
86 //____________________________________________________________________
88 AliFMDCalibStripRange::Max(UShort_t det, Char_t ring,
89 UShort_t sec, UShort_t) const
91 // Get the max for a half-ring
92 UInt_t nSec = (ring == 'I' ? 20 : 40);
93 UInt_t board = sec / nSec;
94 return ((fRanges(det, ring, board, 0) >> 8) & 0x7f);
97 //____________________________________________________________________