]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDCalibStripRange.cxx
RICH becomes HMPID
[u/mrichter/AliRoot.git] / FMD / AliFMDCalibStripRange.cxx
CommitLineData
c2fc1258 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15/* $Id$ */
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
20*/
21//____________________________________________________________________
22//
02a27b50 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.
c2fc1258 28//
29#include "AliFMDCalibStripRange.h" // ALIFMDCALIBGAIN_H
6169f936 30// #include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
c2fc1258 31
32//____________________________________________________________________
33ClassImp(AliFMDCalibStripRange)
34#if 0
35 ; // This is here to keep Emacs for indenting the next line
36#endif
37
38//____________________________________________________________________
39AliFMDCalibStripRange::AliFMDCalibStripRange()
02a27b50 40 : fRanges(AliFMDMap::kMaxDetectors, AliFMDMap::kMaxRings, 2, 1)
41 // fRanges(3)
c2fc1258 42{
02a27b50 43 // CTOR
44 fRanges.Reset(1);
c2fc1258 45}
46
47//____________________________________________________________________
48AliFMDCalibStripRange::AliFMDCalibStripRange(const AliFMDCalibStripRange& o)
02a27b50 49 : TObject(o), fRanges(o.fRanges)
50{
51 // Copy CTOR
52}
c2fc1258 53
54//____________________________________________________________________
55AliFMDCalibStripRange&
56AliFMDCalibStripRange::operator=(const AliFMDCalibStripRange& o)
57{
02a27b50 58 // Assignement operator
59 fRanges = o.fRanges;
c2fc1258 60 return (*this);
61}
62
63//____________________________________________________________________
64void
65AliFMDCalibStripRange::Set(UShort_t det, Char_t ring,
66 UShort_t sector, UShort_t, UShort_t min,
67 UShort_t max)
68{
02a27b50 69 // Set the min and max for a half-ring
c2fc1258 70 UInt_t nSec = (ring == 'I' ? 20 : 40);
71 UInt_t board = sector / nSec;
02a27b50 72 fRanges(det, ring, board, 0) = ((max & 0x7f) << 8) + (min & 0x7f);
c2fc1258 73}
74
75//____________________________________________________________________
76UShort_t
77AliFMDCalibStripRange::Min(UShort_t det, Char_t ring,
78 UShort_t sec, UShort_t) const
79{
02a27b50 80 // Get the min for a half-ring
c2fc1258 81 UInt_t nSec = (ring == 'I' ? 20 : 40);
82 UInt_t board = sec / nSec;
02a27b50 83 return (fRanges(det, ring, board, 0) & 0x7f);
c2fc1258 84}
85
86//____________________________________________________________________
87UShort_t
88AliFMDCalibStripRange::Max(UShort_t det, Char_t ring,
89 UShort_t sec, UShort_t) const
90{
02a27b50 91 // Get the max for a half-ring
c2fc1258 92 UInt_t nSec = (ring == 'I' ? 20 : 40);
93 UInt_t board = sec / nSec;
02a27b50 94 return ((fRanges(det, ring, board, 0) >> 8) & 0x7f);
c2fc1258 95}
96
97//____________________________________________________________________
98//
99// EOF
100//