]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PMD/AliPMDcluster.cxx
Corrected call to the static method AliBitPacking::UnpackWord
[u/mrichter/AliRoot.git] / PMD / AliPMDcluster.cxx
CommitLineData
afef6247 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 **************************************************************************/
1cbf30ea 15//-----------------------------------------------------//
16// //
17// Date : August 05 2003 //
18// //
19// Store cluster information //
20// //
21//-----------------------------------------------------//
a918d77a 22#include "Riostream.h"
23#include "Rtypes.h"
1cbf30ea 24#include "AliPMDcluster.h"
25#include <stdio.h>
26
27ClassImp(AliPMDcluster)
28
afef6247 29AliPMDcluster::AliPMDcluster():
30 fDet(0),
31 fSMN(0)
1cbf30ea 32{
a918d77a 33 // Default constructor
dc9f9910 34 for (Int_t i = 0; i < 6; i++)
1cbf30ea 35 {
36 fClusData[i] = 0.;
37 }
dc9f9910 38 for (Int_t i = 0; i < 15; i++)
39 {
40 fClusCellDataX[i] = 0;
41 fClusCellDataY[i] = 0;
42 }
43
1cbf30ea 44}
dc9f9910 45AliPMDcluster::AliPMDcluster(Int_t idet, Int_t ismn, Float_t *clusdata,
46 Int_t *celldataX, Int_t *celldataY)
1cbf30ea 47{
a918d77a 48 // Constructor
afef6247 49 fDet = idet;
50 fSMN = ismn;
dc9f9910 51 for (Int_t i = 0; i < 6; i++)
1cbf30ea 52 {
53 fClusData[i] = clusdata[i];
54 }
dc9f9910 55 for (Int_t i = 0; i < 15; i++)
56 {
57 fClusCellDataX[i] = celldataX[i];
58 fClusCellDataY[i] = celldataY[i];
59 }
60
1cbf30ea 61}
a918d77a 62AliPMDcluster::AliPMDcluster(const AliPMDcluster &pmdcluster):TObject(pmdcluster)
63{
64 //Copy Constructor
65 if(&pmdcluster == this) return;
afef6247 66 this->fDet = pmdcluster.fDet;
67 this->fSMN = pmdcluster.fSMN;
dc9f9910 68 for(Int_t i=0; i<6; i++)
a918d77a 69 {
70 this->fClusData[i] = pmdcluster.fClusData[i];
71 }
dc9f9910 72 for(Int_t i=0; i<15; i++)
73 {
74 this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
75 this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
76 }
a918d77a 77 return;
78}
79
80AliPMDcluster & AliPMDcluster::operator=(const AliPMDcluster &pmdcluster)
1cbf30ea 81{
a918d77a 82 // Assignment operator
83 if(&pmdcluster == this) return *this;
afef6247 84 this->fDet = pmdcluster.fDet;
85 this->fSMN = pmdcluster.fSMN;
dc9f9910 86 for(Int_t i=0; i<6; i++)
a918d77a 87 {
88 this->fClusData[i] = pmdcluster.fClusData[i];
89 }
dc9f9910 90 for(Int_t i=0; i<15; i++)
91 {
92 this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
93 this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
94 }
a918d77a 95 return *this;
96}
1cbf30ea 97
a918d77a 98AliPMDcluster::~AliPMDcluster()
99{
100 // Destructor
1cbf30ea 101}
afef6247 102
103Int_t AliPMDcluster::GetDetector() const
104{
105 return fDet;
106}
107Int_t AliPMDcluster::GetSMN() const
108{
109 return fSMN;
110}
1cbf30ea 111Float_t AliPMDcluster::GetClusX() const
112{
113 return fClusData[0];
114}
115Float_t AliPMDcluster::GetClusY() const
116{
117 return fClusData[1];
118}
119Float_t AliPMDcluster::GetClusADC() const
120{
121 return fClusData[2];
122}
123Float_t AliPMDcluster::GetClusCells() const
124{
125 return fClusData[3];
126}
dc9f9910 127Float_t AliPMDcluster::GetClusSigmaX() const
1cbf30ea 128{
129 return fClusData[4];
130}
dc9f9910 131Float_t AliPMDcluster::GetClusSigmaY() const
132{
133 return fClusData[5];
134}
135Int_t AliPMDcluster::GetClusCellX(Int_t i) const
136{
137 return fClusCellDataX[i];
138}
139Int_t AliPMDcluster::GetClusCellY(Int_t i) const
140{
141 return fClusCellDataY[i];
142}