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