]>
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), | |
53 | fL0L1Latency(0) | |
58d8d9a3 | 54 | { |
571dda3d | 55 | // |
56 | // default ctor | |
57 | // | |
58 | ||
59 | Int_t ii; | |
571dda3d | 60 | for (ii=0; ii<5; ii++) fdetIndex[ii] = -1; |
571dda3d | 61 | } |
62 | //------------------------------------------------------------------------- | |
63 | ||
638f14f1 | 64 | AliTOFcluster::AliTOFcluster(UShort_t volId, |
65 | Float_t x, Float_t y, Float_t z, | |
66 | Float_t sx2, Float_t sxy, Float_t sxz, | |
3e2f0097 | 67 | Float_t sy2, Float_t syz, |
0e74c396 | 68 | Float_t sz2, |
69 | Int_t *lab, Int_t * const ind, | |
70 | Int_t *par, Bool_t status, Int_t idx): | |
638f14f1 | 71 | AliCluster3D(volId,x,y,z,sx2,sxy,sxz,sy2,syz,sz2,lab), |
a79b519b | 72 | fIdx(idx), |
a79b519b | 73 | fQuality(-100), |
638f14f1 | 74 | fR(0), |
75 | fPhi(0), | |
bf33f8f0 | 76 | fTDC(par[0]), |
77 | fToT(par[1]), | |
78 | fADC(par[2]), | |
79 | fTdcND(par[3]), | |
80 | fTdcRAW(par[4]), | |
2bf4d9d6 | 81 | fStatus(status), |
82 | fDeltaBC(par[5]), | |
83 | fL0L1Latency(par[6]) | |
a79b519b | 84 | { |
85 | // | |
86 | // constructor | |
87 | // | |
638f14f1 | 88 | Int_t ii; |
89 | for (ii=0; ii<5; ii++) fdetIndex[ii] = ind[ii]; | |
90 | ||
91 | Float_t xyz[3]; | |
92 | GetGlobalXYZ(xyz); | |
3e2f0097 | 93 | fR = TMath::Sqrt(xyz[0]*xyz[0] + xyz[1]*xyz[1]); |
94 | fPhi = TMath::ATan2(xyz[1], xyz[0]); | |
a79b519b | 95 | |
571dda3d | 96 | } |
97 | //------------------------------------------------------------------------- | |
98 | ||
58d8d9a3 | 99 | AliTOFcluster::AliTOFcluster(const AliTOFcluster & cluster): |
638f14f1 | 100 | AliCluster3D(cluster), |
101 | fIdx(cluster.fIdx), | |
102 | fQuality(cluster.fQuality), | |
103 | fR(cluster.fR), | |
104 | fPhi(cluster.fPhi), | |
105 | fTDC(cluster.fTDC), | |
106 | fToT(cluster.fToT), | |
107 | fADC(cluster.fADC), | |
108 | fTdcND(cluster.fTdcND), | |
109 | fTdcRAW(cluster.fTdcRAW), | |
2bf4d9d6 | 110 | fStatus(cluster.fStatus), |
111 | fDeltaBC(cluster.fDeltaBC), | |
112 | fL0L1Latency(cluster.fL0L1Latency) | |
58d8d9a3 | 113 | { |
571dda3d | 114 | // |
115 | // copy ctor for AliTOFcluster object | |
116 | // | |
117 | ||
118 | Int_t ii; | |
571dda3d | 119 | for (ii=0; ii<5; ii++) fdetIndex[ii] = cluster.fdetIndex[ii]; |
571dda3d | 120 | } |
121 | //------------------------------------------------------------------------- | |
122 | ||
123 | AliTOFcluster::~AliTOFcluster() { | |
638f14f1 | 124 | |
571dda3d | 125 | // |
126 | // dtor | |
127 | // | |
128 | ||
571dda3d | 129 | } |
638f14f1 | 130 | |
131 |