Flow wagon added to the train.
[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;
42 }
43
1cbf30ea 44}
a48edddd 45// --------------------------------------------------------------------- //
dc9f9910 46AliPMDcluster::AliPMDcluster(Int_t idet, Int_t ismn, Float_t *clusdata,
a48edddd 47 Int_t *celldataX, Int_t *celldataY):
48 fDet(idet),
49 fSMN(ismn)
1cbf30ea 50{
a918d77a 51 // Constructor
dc9f9910 52 for (Int_t i = 0; i < 6; i++)
1cbf30ea 53 {
54 fClusData[i] = clusdata[i];
55 }
37edc588 56 for (Int_t i = 0; i < 19; i++)
dc9f9910 57 {
58 fClusCellDataX[i] = celldataX[i];
59 fClusCellDataY[i] = celldataY[i];
60 }
61
1cbf30ea 62}
a48edddd 63// --------------------------------------------------------------------- //
64AliPMDcluster::AliPMDcluster(AliPMDcluster *pmdcluster):
65 fDet(0),
66 fSMN(0)
67{
68 *this = *pmdcluster;
69}
70// --------------------------------------------------------------------- //
71
72AliPMDcluster::AliPMDcluster(const AliPMDcluster &pmdcluster):
73 TObject(pmdcluster),
74 fDet(pmdcluster.fDet),
75 fSMN(pmdcluster.fSMN)
a918d77a 76{
77 //Copy Constructor
dc9f9910 78 for(Int_t i=0; i<6; i++)
a918d77a 79 {
80 this->fClusData[i] = pmdcluster.fClusData[i];
81 }
37edc588 82 for(Int_t i=0; i<19; i++)
dc9f9910 83 {
84 this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
85 this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
86 }
a918d77a 87}
a48edddd 88// --------------------------------------------------------------------- //
a918d77a 89
90AliPMDcluster & AliPMDcluster::operator=(const AliPMDcluster &pmdcluster)
1cbf30ea 91{
a918d77a 92 // Assignment operator
a48edddd 93 if(this != &pmdcluster)
a918d77a 94 {
a48edddd 95 this->fDet = pmdcluster.fDet;
96 this->fSMN = pmdcluster.fSMN;
97 for(Int_t i=0; i<6; i++)
98 {
99 this->fClusData[i] = pmdcluster.fClusData[i];
100 }
37edc588 101 for(Int_t i=0; i<19; i++)
a48edddd 102 {
103 this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
104 this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
105 }
dc9f9910 106 }
a918d77a 107 return *this;
108}
a48edddd 109// --------------------------------------------------------------------- //
1cbf30ea 110
a918d77a 111AliPMDcluster::~AliPMDcluster()
112{
113 // Destructor
1cbf30ea 114}
a48edddd 115// --------------------------------------------------------------------- //
afef6247 116
117Int_t AliPMDcluster::GetDetector() const
118{
119 return fDet;
120}
a48edddd 121// --------------------------------------------------------------------- //
afef6247 122Int_t AliPMDcluster::GetSMN() const
123{
124 return fSMN;
125}
a48edddd 126// --------------------------------------------------------------------- //
1cbf30ea 127Float_t AliPMDcluster::GetClusX() const
128{
129 return fClusData[0];
130}
a48edddd 131// --------------------------------------------------------------------- //
1cbf30ea 132Float_t AliPMDcluster::GetClusY() const
133{
134 return fClusData[1];
135}
a48edddd 136// --------------------------------------------------------------------- //
1cbf30ea 137Float_t AliPMDcluster::GetClusADC() const
138{
139 return fClusData[2];
140}
a48edddd 141// --------------------------------------------------------------------- //
1cbf30ea 142Float_t AliPMDcluster::GetClusCells() const
143{
144 return fClusData[3];
145}
a48edddd 146// --------------------------------------------------------------------- //
dc9f9910 147Float_t AliPMDcluster::GetClusSigmaX() const
1cbf30ea 148{
149 return fClusData[4];
150}
a48edddd 151// --------------------------------------------------------------------- //
dc9f9910 152Float_t AliPMDcluster::GetClusSigmaY() const
153{
154 return fClusData[5];
155}
a48edddd 156// --------------------------------------------------------------------- //
dc9f9910 157Int_t AliPMDcluster::GetClusCellX(Int_t i) const
158{
159 return fClusCellDataX[i];
160}
a48edddd 161// --------------------------------------------------------------------- //
dc9f9910 162Int_t AliPMDcluster::GetClusCellY(Int_t i) const
163{
164 return fClusCellDataY[i];
165}
a48edddd 166// --------------------------------------------------------------------- //