]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - MUON/AliMUONRealDigit.cxx
Adding code to patch St1 HV mapping
[u/mrichter/AliRoot.git] / MUON / AliMUONRealDigit.cxx
... / ...
CommitLineData
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
16// $Id$
17
18#include "AliMUONRealDigit.h"
19
20//-----------------------------------------------------------------------------
21/// \class AliMUONRealDigit
22///
23/// Implementation of AliMUONVDigit for real digit.
24///
25/// This class should store the bare minimum in order to save disk space
26///
27/// \author Laurent Aphecetche
28//-----------------------------------------------------------------------------
29
30/// \cond CLASSIMP
31ClassImp(AliMUONRealDigit)
32/// \endcond
33
34//_____________________________________________________________________________
35AliMUONRealDigit::AliMUONRealDigit()
36 : AliMUONVDigit(),
37 fCharge(0),
38 fPadXY(0),
39 fADC(0),
40 fStatusMap(0)
41{
42 /// default ctor
43}
44
45//_____________________________________________________________________________
46AliMUONRealDigit::AliMUONRealDigit(Int_t detElemId, Int_t manuId,
47 Int_t manuChannel, Int_t cathode)
48: AliMUONVDigit(detElemId,manuId,manuChannel,cathode),
49fCharge(0),
50fPadXY(0),
51fADC(0),
52fStatusMap(0)
53{
54 /// normal ctor
55}
56
57//_____________________________________________________________________________
58AliMUONRealDigit::~AliMUONRealDigit()
59{
60 /// empty ctor
61}
62
63//_____________________________________________________________________________
64Bool_t
65AliMUONRealDigit::MergeWith(const AliMUONVDigit& src)
66{
67 /// Merge with src.
68
69 Bool_t check = ( src.DetElemId() == DetElemId() &&
70 src.PadX() == PadX() &&
71 src.PadY() == PadY() &&
72 src.Cathode() == Cathode() );
73 if (!check)
74 {
75 return kFALSE;
76 }
77
78 AddCharge(src.Charge());
79 return kTRUE;
80}
81
82//_____________________________________________________________________________
83Int_t
84AliMUONRealDigit::PadX() const
85{
86 /// Return (integer) position in x (within the detection element)
87 return fPadXY & 0xFFFF;
88}
89
90//_____________________________________________________________________________
91Int_t
92AliMUONRealDigit::PadY() const
93{
94 /// Return (integer) position in y (within the detection element)
95 return ( fPadXY & 0xFFFF0000 ) >> 16;
96}
97
98//_____________________________________________________________________________
99void
100AliMUONRealDigit::SetPadXY(Int_t padx, Int_t pady)
101{
102 /// Set the pad (integer) positions
103 fPadXY = ( padx | (pady << 16) );
104}
105