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