]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PMD/AliPMDcluster.cxx
default directory is set correctly
[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 }
37edc588 38 for (Int_t i = 0; i < 19; i++)
dc9f9910 39 {
40 fClusCellDataX[i] = 0;
41 fClusCellDataY[i] = 0;
920e13db 42 fClusCellTrack[i] = -1;
43 fClusCellPid[i] = -1;
b0e4d1e1 44 fClusCellAdc[i] = 0;
dc9f9910 45 }
46
1cbf30ea 47}
a48edddd 48// --------------------------------------------------------------------- //
dc9f9910 49AliPMDcluster::AliPMDcluster(Int_t idet, Int_t ismn, Float_t *clusdata,
920e13db 50 Int_t *celldataX, Int_t *celldataY,
b0e4d1e1 51 Int_t *celltrack, Int_t *cellpid,
52 Float_t *celladc):
a48edddd 53 fDet(idet),
54 fSMN(ismn)
1cbf30ea 55{
a918d77a 56 // Constructor
dc9f9910 57 for (Int_t i = 0; i < 6; i++)
1cbf30ea 58 {
59 fClusData[i] = clusdata[i];
60 }
37edc588 61 for (Int_t i = 0; i < 19; i++)
dc9f9910 62 {
63 fClusCellDataX[i] = celldataX[i];
64 fClusCellDataY[i] = celldataY[i];
920e13db 65 fClusCellTrack[i] = celltrack[i];
66 fClusCellPid[i] = cellpid[i];
b0e4d1e1 67 fClusCellAdc[i] = celladc[i];
dc9f9910 68 }
69
1cbf30ea 70}
a48edddd 71// --------------------------------------------------------------------- //
72AliPMDcluster::AliPMDcluster(AliPMDcluster *pmdcluster):
73 fDet(0),
74 fSMN(0)
75{
76 *this = *pmdcluster;
77}
78// --------------------------------------------------------------------- //
79
80AliPMDcluster::AliPMDcluster(const AliPMDcluster &pmdcluster):
81 TObject(pmdcluster),
82 fDet(pmdcluster.fDet),
83 fSMN(pmdcluster.fSMN)
a918d77a 84{
85 //Copy Constructor
dc9f9910 86 for(Int_t i=0; i<6; i++)
a918d77a 87 {
88 this->fClusData[i] = pmdcluster.fClusData[i];
89 }
37edc588 90 for(Int_t i=0; i<19; i++)
dc9f9910 91 {
92 this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
93 this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
920e13db 94 this->fClusCellTrack[i] = pmdcluster.fClusCellTrack[i];
95 this->fClusCellPid[i] = pmdcluster.fClusCellPid[i];
b0e4d1e1 96 this->fClusCellAdc[i] = pmdcluster.fClusCellAdc[i];
dc9f9910 97 }
a918d77a 98}
a48edddd 99// --------------------------------------------------------------------- //
a918d77a 100
101AliPMDcluster & AliPMDcluster::operator=(const AliPMDcluster &pmdcluster)
1cbf30ea 102{
a918d77a 103 // Assignment operator
a48edddd 104 if(this != &pmdcluster)
a918d77a 105 {
a48edddd 106 this->fDet = pmdcluster.fDet;
107 this->fSMN = pmdcluster.fSMN;
108 for(Int_t i=0; i<6; i++)
109 {
110 this->fClusData[i] = pmdcluster.fClusData[i];
111 }
37edc588 112 for(Int_t i=0; i<19; i++)
a48edddd 113 {
114 this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
115 this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
920e13db 116 this->fClusCellTrack[i] = pmdcluster.fClusCellTrack[i];
117 this->fClusCellPid[i] = pmdcluster.fClusCellPid[i];
b0e4d1e1 118 this->fClusCellAdc[i] = pmdcluster.fClusCellAdc[i];
a48edddd 119 }
dc9f9910 120 }
a918d77a 121 return *this;
122}
a48edddd 123// --------------------------------------------------------------------- //
1cbf30ea 124
a918d77a 125AliPMDcluster::~AliPMDcluster()
126{
127 // Destructor
1cbf30ea 128}
a48edddd 129// --------------------------------------------------------------------- //
afef6247 130
131Int_t AliPMDcluster::GetDetector() const
132{
133 return fDet;
134}
a48edddd 135// --------------------------------------------------------------------- //
afef6247 136Int_t AliPMDcluster::GetSMN() const
137{
138 return fSMN;
139}
a48edddd 140// --------------------------------------------------------------------- //
1cbf30ea 141Float_t AliPMDcluster::GetClusX() const
142{
143 return fClusData[0];
144}
a48edddd 145// --------------------------------------------------------------------- //
1cbf30ea 146Float_t AliPMDcluster::GetClusY() const
147{
148 return fClusData[1];
149}
a48edddd 150// --------------------------------------------------------------------- //
1cbf30ea 151Float_t AliPMDcluster::GetClusADC() const
152{
153 return fClusData[2];
154}
a48edddd 155// --------------------------------------------------------------------- //
1cbf30ea 156Float_t AliPMDcluster::GetClusCells() const
157{
158 return fClusData[3];
159}
a48edddd 160// --------------------------------------------------------------------- //
dc9f9910 161Float_t AliPMDcluster::GetClusSigmaX() const
1cbf30ea 162{
163 return fClusData[4];
164}
a48edddd 165// --------------------------------------------------------------------- //
dc9f9910 166Float_t AliPMDcluster::GetClusSigmaY() const
167{
168 return fClusData[5];
169}
a48edddd 170// --------------------------------------------------------------------- //
dc9f9910 171Int_t AliPMDcluster::GetClusCellX(Int_t i) const
172{
173 return fClusCellDataX[i];
174}
a48edddd 175// --------------------------------------------------------------------- //
dc9f9910 176Int_t AliPMDcluster::GetClusCellY(Int_t i) const
177{
178 return fClusCellDataY[i];
179}
a48edddd 180// --------------------------------------------------------------------- //
920e13db 181Int_t AliPMDcluster::GetClusCellTrack(Int_t i) const
182{
183 return fClusCellTrack[i];
184}
185// --------------------------------------------------------------------- //
186Int_t AliPMDcluster::GetClusCellPid(Int_t i) const
187{
188 return fClusCellPid[i];
189}
190// --------------------------------------------------------------------- //
b0e4d1e1 191Float_t AliPMDcluster::GetClusCellAdc(Int_t i) const
192{
193 return fClusCellAdc[i];
194}
195// --------------------------------------------------------------------- //