]>
Commit | Line | Data |
---|---|---|
571dda3d | 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 | Revision 0.02 2005/07/27 A. De Caro | |
17 | Implement new ctor AliTOFcluster(Double_t *, Int_t *) | |
18 | for cluster construction from raw data | |
19 | ||
20 | Revision 0.01 2005/07/25 A. De Caro | |
21 | Implement new class statring from | |
22 | class definition inside AliTOFtracker class | |
23 | (originally implemented by S. Arcelli and C. Zampolli) | |
24 | */ | |
25 | ||
0e46b9ae | 26 | //////////////////////////////////////////////////////// |
27 | // // | |
28 | // AliTOFcluster Class // | |
29 | // Description: class for TOF cluster definition // | |
30 | // // | |
31 | //////////////////////////////////////////////////////// | |
571dda3d | 32 | |
33 | #include "AliTOFcluster.h" | |
5c7c93fa | 34 | //#include "AliLog.h" |
35 | //#include "AliGeomManager.h" | |
36 | //#include "TGeoMatrix.h" | |
571dda3d | 37 | |
38 | ClassImp(AliTOFcluster) | |
39 | ||
58d8d9a3 | 40 | AliTOFcluster::AliTOFcluster(): |
638f14f1 | 41 | AliCluster3D(), |
58d8d9a3 | 42 | fIdx(-1), |
638f14f1 | 43 | fQuality(-100), |
58d8d9a3 | 44 | fR(0), |
45 | fPhi(0), | |
bf33f8f0 | 46 | fTDC(0), |
58d8d9a3 | 47 | fToT(0), |
bf33f8f0 | 48 | fADC(0), |
58d8d9a3 | 49 | fTdcND(0), |
aa5476d8 | 50 | fTdcRAW(0), |
2bf4d9d6 | 51 | fStatus(kTRUE), |
52 | fDeltaBC(0), | |
49436743 | 53 | fL0L1Latency(0), |
54 | fESDID(-1) | |
58d8d9a3 | 55 | { |
571dda3d | 56 | // |
57 | // default ctor | |
58 | // | |
59 | ||
60 | Int_t ii; | |
571dda3d | 61 | for (ii=0; ii<5; ii++) fdetIndex[ii] = -1; |
571dda3d | 62 | } |
63 | //------------------------------------------------------------------------- | |
64 | ||
638f14f1 | 65 | AliTOFcluster::AliTOFcluster(UShort_t volId, |
66 | Float_t x, Float_t y, Float_t z, | |
67 | Float_t sx2, Float_t sxy, Float_t sxz, | |
3e2f0097 | 68 | Float_t sy2, Float_t syz, |
0e74c396 | 69 | Float_t sz2, |
70 | Int_t *lab, Int_t * const ind, | |
71 | Int_t *par, Bool_t status, Int_t idx): | |
638f14f1 | 72 | AliCluster3D(volId,x,y,z,sx2,sxy,sxz,sy2,syz,sz2,lab), |
a79b519b | 73 | fIdx(idx), |
a79b519b | 74 | fQuality(-100), |
638f14f1 | 75 | fR(0), |
76 | fPhi(0), | |
bf33f8f0 | 77 | fTDC(par[0]), |
78 | fToT(par[1]), | |
79 | fADC(par[2]), | |
80 | fTdcND(par[3]), | |
81 | fTdcRAW(par[4]), | |
2bf4d9d6 | 82 | fStatus(status), |
83 | fDeltaBC(par[5]), | |
49436743 | 84 | fL0L1Latency(par[6]), |
85 | fESDID(-1) | |
a79b519b | 86 | { |
87 | // | |
88 | // constructor | |
89 | // | |
638f14f1 | 90 | Int_t ii; |
91 | for (ii=0; ii<5; ii++) fdetIndex[ii] = ind[ii]; | |
92 | ||
93 | Float_t xyz[3]; | |
94 | GetGlobalXYZ(xyz); | |
3e2f0097 | 95 | fR = TMath::Sqrt(xyz[0]*xyz[0] + xyz[1]*xyz[1]); |
96 | fPhi = TMath::ATan2(xyz[1], xyz[0]); | |
a79b519b | 97 | |
571dda3d | 98 | } |
99 | //------------------------------------------------------------------------- | |
100 | ||
58d8d9a3 | 101 | AliTOFcluster::AliTOFcluster(const AliTOFcluster & cluster): |
638f14f1 | 102 | AliCluster3D(cluster), |
103 | fIdx(cluster.fIdx), | |
104 | fQuality(cluster.fQuality), | |
105 | fR(cluster.fR), | |
106 | fPhi(cluster.fPhi), | |
107 | fTDC(cluster.fTDC), | |
108 | fToT(cluster.fToT), | |
109 | fADC(cluster.fADC), | |
110 | fTdcND(cluster.fTdcND), | |
111 | fTdcRAW(cluster.fTdcRAW), | |
2bf4d9d6 | 112 | fStatus(cluster.fStatus), |
113 | fDeltaBC(cluster.fDeltaBC), | |
49436743 | 114 | fL0L1Latency(cluster.fL0L1Latency), |
115 | fESDID(-1) | |
58d8d9a3 | 116 | { |
571dda3d | 117 | // |
118 | // copy ctor for AliTOFcluster object | |
119 | // | |
120 | ||
121 | Int_t ii; | |
571dda3d | 122 | for (ii=0; ii<5; ii++) fdetIndex[ii] = cluster.fdetIndex[ii]; |
571dda3d | 123 | } |
124 | //------------------------------------------------------------------------- | |
125 | ||
c0197ff4 | 126 | AliTOFcluster & AliTOFcluster::operator = (const AliTOFcluster & cluster) |
127 | { | |
128 | ||
129 | if (this == &cluster) | |
130 | return *this; | |
131 | ||
132 | TObject::operator=(cluster); | |
133 | fIdx=cluster.fIdx; | |
134 | fQuality=cluster.fQuality; | |
135 | fR=cluster.fR; | |
136 | fPhi=cluster.fPhi; | |
137 | fTDC=cluster.fTDC; | |
138 | fToT=cluster.fToT; | |
139 | fADC=cluster.fADC; | |
140 | fTdcND=cluster.fTdcND; | |
141 | fTdcRAW=cluster.fTdcRAW; | |
142 | fStatus=cluster.fStatus; | |
143 | fDeltaBC=cluster.fDeltaBC; | |
144 | fL0L1Latency=cluster.fL0L1Latency; | |
49436743 | 145 | fESDID = -1; |
c0197ff4 | 146 | for (Int_t ii=0; ii<5; ii++) |
147 | fdetIndex[ii] = cluster.fdetIndex[ii]; | |
148 | return *this; | |
149 | ||
150 | } | |
151 | //------------------------------------------------------------------------- | |
152 | ||
571dda3d | 153 | AliTOFcluster::~AliTOFcluster() { |
638f14f1 | 154 | |
571dda3d | 155 | // |
156 | // dtor | |
157 | // | |
158 | ||
571dda3d | 159 | } |
638f14f1 | 160 | |
161 |