]>
Commit | Line | Data |
---|---|---|
84ab81bf | 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 | ///////////////////////////////////////////////////////////////////////////////// | |
18 | // This class sets the local coordinates via a specific setter. Needed because // | |
19 | // the AliGeomManager class can not be used for the upgrade code at this stage // | |
20 | ///////////////////////////////////////////////////////////////////////////////// | |
21 | ||
22 | #include <AliITSRecPointU.h> | |
ebaa7604 | 23 | ClassImp(AliITSRecPointU) |
84ab81bf | 24 | //_____________________________________________________________ |
25 | AliITSRecPointU::AliITSRecPointU(): | |
0ac80088 | 26 | AliITSRecPoint(), |
9b615954 | 27 | fModule(0), |
28 | fNTracksIdMC(0) | |
84ab81bf | 29 | { |
30 | // | |
31 | // Default constructor | |
32 | // | |
9b615954 | 33 | for(Int_t i=0; i<kMaxLab ; i++) { |
34 | fTrackIdMC[i]=-3; | |
35 | } | |
84ab81bf | 36 | } |
37 | //_____________________________________________________________ | |
38 | AliITSRecPointU::AliITSRecPointU(const AliITSRecPointU& pt): | |
0ac80088 | 39 | AliITSRecPoint(pt), |
9b615954 | 40 | fModule(pt.fModule), |
41 | fNTracksIdMC(pt.fNTracksIdMC) | |
84ab81bf | 42 | { |
43 | // | |
44 | // Copy constructor | |
45 | // | |
9b615954 | 46 | for(Int_t i=0; i<kMaxLab ; i++) { |
47 | fTrackIdMC[i]=pt.fTrackIdMC[i]; | |
48 | } | |
84ab81bf | 49 | } |
50 | //______________________________________________________________________ | |
51 | AliITSRecPointU& AliITSRecPointU::operator=(const AliITSRecPointU& source) | |
52 | { | |
53 | // | |
54 | // Assignment operator (as in AliITSRecPoint) | |
55 | // | |
56 | ||
57 | this->~AliITSRecPointU(); | |
58 | new(this) AliITSRecPointU(source); | |
59 | return *this; | |
60 | ||
61 | } | |
9b615954 | 62 | |
63 | //______________________________________________________________________________ | |
64 | void AliITSRecPointU::AddTrackID(Int_t tid) { | |
65 | // | |
66 | // Add an MC label (track ID) to the "expanded list" | |
67 | // | |
68 | if (fNTracksIdMC==kMaxLab) { | |
69 | AliWarning("Max. numbers of labels reached!"); | |
70 | } else { | |
71 | fTrackIdMC[fNTracksIdMC]=tid; | |
72 | fNTracksIdMC++; | |
73 | } | |
74 | } | |
75 | ||
76 | //______________________________________________________________________________ | |
77 | void AliITSRecPointU::Print(Option_t* /*option*/) const | |
78 | { | |
79 | // Print cluster information. | |
80 | ||
81 | printf("AliITSRecPointU pos=(%.4f, %.4f, %.4f), s_y2=%f, s_z2=%f, s_yz=%f, vol=%hu\n", | |
82 | GetX(), GetY(), GetZ(), GetSigmaY2(), GetSigmaZ2(), GetSigmaYZ(), GetVolumeId()); | |
83 | printf(" MC Track Ids =("); | |
84 | if (kMaxLab<=fNTracksIdMC) { | |
85 | for (Int_t i=0; i<kMaxLab; i++) { printf("%d,",fTrackIdMC[i]); } | |
86 | } else { | |
87 | for (Int_t i=0; i<fNTracksIdMC; i++) { printf("%d,",fTrackIdMC[i]); } | |
88 | } | |
89 | printf(")\n"); | |
90 | Float_t g[3]; | |
91 | if (GetGlobalXYZ(g)) | |
92 | printf(" global_pos=(%.4f, %.4f, %.4f)\n", g[0], g[1], g[2]); | |
93 | ||
94 | } | |
95 | ||
96 |