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