Global transformation correction (ivana)
[u/mrichter/AliRoot.git] / MUON / AliMUONDigit.cxx
CommitLineData
a9e2aefa 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
88cb7938 16/* $Id$ */
a9e2aefa 17
18#include "AliMUONDigit.h"
19
8c343c7c 20
a9e2aefa 21ClassImp(AliMUONDigit)
61adb9bd 22//_____________________________________________________________________________
23 AliMUONDigit::AliMUONDigit(const AliMUONDigit& digits):TObject(digits)
24{
25// copy constructor
26
27 fPadX = digits.fPadX;
28 fPadY = digits.fPadY;
29 fCathode = digits.fCathode;
30 fSignal = digits.fSignal;
31 fPhysics = digits.fPhysics;
32 fHit = digits.fHit;
a713db22 33 fDetElemId = digits.fDetElemId;
61adb9bd 34
35 for(Int_t i=0; i<kMAXTRACKS; i++) {
36 fTcharges[i] = digits.fTcharges[i];
37 fTracks[i] = digits.fTracks[i];
38 }
39}
40
30178c30 41//_____________________________________________________________________________
42 AliMUONDigit::AliMUONDigit()
43 : TObject()
44{
45// Default constructor
46}
47
a9e2aefa 48//_____________________________________________________________________________
49AliMUONDigit::AliMUONDigit(Int_t *digits)
50{
51 //
52 // Creates a MUON digit object to be updated
53 //
54 fPadX = digits[0];
55 fPadY = digits[1];
a450cfad 56 fCathode = digits[2];
57 fSignal = digits[3];
58 fPhysics = digits[4];
59 fHit = digits[5];
a713db22 60 fDetElemId = digits[6];
a9e2aefa 61}
62//_____________________________________________________________________________
63AliMUONDigit::AliMUONDigit(Int_t *tracks, Int_t *charges, Int_t *digits)
64{
65 //
66 // Creates a MUON digit object
67 //
68 fPadX = digits[0];
69 fPadY = digits[1];
a450cfad 70 fCathode = digits[2];
71 fSignal = digits[3];
72 fPhysics = digits[4];
73 fHit = digits[5];
a713db22 74 fDetElemId = digits[6];
a450cfad 75
cb73aa80 76 for(Int_t i=0; i<kMAXTRACKS; i++) {
a9e2aefa 77 fTcharges[i] = charges[i];
78 fTracks[i] = tracks[i];
79 }
80}
81
82AliMUONDigit::~AliMUONDigit()
83{
84 // Destructor
85}
61adb9bd 86
87//_____________________________________________________________________________
88AliMUONDigit& AliMUONDigit::operator=(const AliMUONDigit& digits)
89{
90 if (this == &digits)
91 return *this;
92
93 fPadX = digits.fPadX;
94 fPadY = digits.fPadY;
95 fCathode = digits.fCathode;
96 fSignal = digits.fSignal;
97 fPhysics = digits.fPhysics;
98 fHit = digits.fHit;
a713db22 99 fDetElemId = digits.fDetElemId;
61adb9bd 100
101 for(Int_t i=0; i<kMAXTRACKS; i++) {
102 fTcharges[i] = digits.fTcharges[i];
103 fTracks[i] = digits.fTracks[i];
104 }
105
106 return *this;
107}
a713db22 108//_____________________________________________________________________________
109Int_t AliMUONDigit::Compare(const TObject *obj) const
110{
111// sort by idDE
112
113 AliMUONDigit* d = (AliMUONDigit*) obj;
114
115 return ( fDetElemId > d->DetElemId()) ? 1 : -1;
116
117}