]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PMD/AliPMDcluster.cxx
adding shred tpc clusters cut for the mixed events
[u/mrichter/AliRoot.git] / PMD / AliPMDcluster.cxx
... / ...
CommitLineData
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//-----------------------------------------------------//
16// //
17// Date : August 05 2003 //
18// //
19// Store cluster information //
20// //
21//-----------------------------------------------------//
22#include "Riostream.h"
23#include "Rtypes.h"
24#include "AliPMDcluster.h"
25#include "AliLog.h"
26#include <stdio.h>
27
28ClassImp(AliPMDcluster)
29
30AliPMDcluster::AliPMDcluster():
31 fDet(0),
32 fSMN(0)
33{
34 // Default constructor
35 for (Int_t i = 0; i < 6; i++)
36 {
37 fClusData[i] = 0.;
38 }
39 for (Int_t i = 0; i < 19; i++)
40 {
41 fClusCellDataX[i] = 0;
42 fClusCellDataY[i] = 0;
43 fClusCellTrack[i] = -1;
44 fClusCellPid[i] = -1;
45 fClusCellAdc[i] = 0;
46 }
47
48}
49// --------------------------------------------------------------------- //
50AliPMDcluster::AliPMDcluster(Int_t idet, Int_t ismn, Float_t *clusdata,
51 Int_t *celldataX, Int_t *celldataY,
52 Int_t *celltrack, Int_t *cellpid,
53 Float_t *celladc):
54 fDet(idet),
55 fSMN(ismn)
56{
57 // Constructor
58 for (Int_t i = 0; i < 6; i++)
59 {
60 fClusData[i] = clusdata[i];
61 }
62
63 for (Int_t i = 0; i < 19; i++)
64 {
65 fClusCellDataX[i] = celldataX[i];
66 fClusCellDataY[i] = celldataY[i];
67 fClusCellTrack[i] = celltrack[i];
68 fClusCellPid[i] = cellpid[i];
69 fClusCellAdc[i] = celladc[i];
70 }
71
72}
73// --------------------------------------------------------------------- //
74AliPMDcluster::AliPMDcluster(AliPMDcluster *pmdcluster):
75 fDet(0),
76 fSMN(0)
77{
78 *this = *pmdcluster;
79}
80// --------------------------------------------------------------------- //
81
82AliPMDcluster::AliPMDcluster(const AliPMDcluster &pmdcluster):
83 TObject(pmdcluster),
84 fDet(pmdcluster.fDet),
85 fSMN(pmdcluster.fSMN)
86{
87 //Copy Constructor
88 for(Int_t i=0; i<6; i++)
89 {
90 this->fClusData[i] = pmdcluster.fClusData[i];
91 }
92 for(Int_t i=0; i<19; i++)
93 {
94 this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
95 this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
96 this->fClusCellTrack[i] = pmdcluster.fClusCellTrack[i];
97 this->fClusCellPid[i] = pmdcluster.fClusCellPid[i];
98 this->fClusCellAdc[i] = pmdcluster.fClusCellAdc[i];
99 }
100}
101// --------------------------------------------------------------------- //
102
103AliPMDcluster & AliPMDcluster::operator=(const AliPMDcluster &pmdcluster)
104{
105 // Assignment operator
106 if(this != &pmdcluster)
107 {
108 this->fDet = pmdcluster.fDet;
109 this->fSMN = pmdcluster.fSMN;
110 for(Int_t i=0; i<6; i++)
111 {
112 this->fClusData[i] = pmdcluster.fClusData[i];
113 }
114 for(Int_t i=0; i<19; i++)
115 {
116 this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
117 this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
118 this->fClusCellTrack[i] = pmdcluster.fClusCellTrack[i];
119 this->fClusCellPid[i] = pmdcluster.fClusCellPid[i];
120 this->fClusCellAdc[i] = pmdcluster.fClusCellAdc[i];
121 }
122 }
123 return *this;
124}
125// --------------------------------------------------------------------- //
126
127AliPMDcluster::~AliPMDcluster()
128{
129 // Destructor
130}
131// --------------------------------------------------------------------- //
132
133Int_t AliPMDcluster::GetDetector() const
134{
135 return fDet;
136}
137// --------------------------------------------------------------------- //
138Int_t AliPMDcluster::GetSMN() const
139{
140 return fSMN;
141}
142// --------------------------------------------------------------------- //
143Float_t AliPMDcluster::GetClusX() const
144{
145 return fClusData[0];
146}
147// --------------------------------------------------------------------- //
148Float_t AliPMDcluster::GetClusY() const
149{
150 return fClusData[1];
151}
152// --------------------------------------------------------------------- //
153Float_t AliPMDcluster::GetClusADC() const
154{
155 return fClusData[2];
156}
157// --------------------------------------------------------------------- //
158Float_t AliPMDcluster::GetClusCells() const
159{
160 return fClusData[3];
161}
162// --------------------------------------------------------------------- //
163Float_t AliPMDcluster::GetClusSigmaX() const
164{
165 return fClusData[4];
166}
167// --------------------------------------------------------------------- //
168Float_t AliPMDcluster::GetClusSigmaY() const
169{
170 return fClusData[5];
171}
172// --------------------------------------------------------------------- //
173Int_t AliPMDcluster::GetClusCellX(Int_t i) const
174{
175 return fClusCellDataX[i];
176}
177// --------------------------------------------------------------------- //
178Int_t AliPMDcluster::GetClusCellY(Int_t i) const
179{
180 return fClusCellDataY[i];
181}
182// --------------------------------------------------------------------- //
183Int_t AliPMDcluster::GetClusCellTrack(Int_t i) const
184{
185 return fClusCellTrack[i];
186}
187// --------------------------------------------------------------------- //
188Int_t AliPMDcluster::GetClusCellPid(Int_t i) const
189{
190 return fClusCellPid[i];
191}
192// --------------------------------------------------------------------- //
193Float_t AliPMDcluster::GetClusCellAdc(Int_t i) const
194{
195 return fClusCellAdc[i];
196}
197// --------------------------------------------------------------------- //