]>
Commit | Line | Data |
---|---|---|
d15a28e7 | 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 | **************************************************************************/ | |
b2a60966 | 15 | /* $Id$ */ |
702ab87e | 16 | |
17 | /* History of cvs commits: | |
18 | * | |
19 | * $Log$ | |
3663622c | 20 | * Revision 1.29 2005/05/28 14:19:05 schutz |
21 | * Compilation warnings fixed by T.P. | |
22 | * | |
702ab87e | 23 | */ |
24 | ||
d15a28e7 | 25 | //_________________________________________________________________________ |
b2a60966 | 26 | // Track segment in PHOS |
27 | // Can be : 1 EmcRecPoint | |
fbf5cb06 | 28 | // 1 EmcRecPoint + 1 CPV |
29 | // 1 EmcRecPoint + 1 CPV + 1 charged track | |
b2a60966 | 30 | // |
31 | //*-- Author: Dmitri Peressounko (RRC KI & SUBATECH) | |
d15a28e7 | 32 | |
33 | // --- ROOT system --- | |
34 | ||
d15a28e7 | 35 | |
36 | // --- Standard library --- | |
37 | ||
d15a28e7 | 38 | // --- AliRoot header files --- |
e957fea8 | 39 | #include "AliPHOSEmcRecPoint.h" |
d15a28e7 | 40 | #include "AliPHOSTrackSegment.h" |
fbf5cb06 | 41 | #include "AliESDtrack.h" |
d15a28e7 | 42 | |
43 | ClassImp(AliPHOSTrackSegment) | |
44 | ||
3663622c | 45 | //____________________________________________________________________________ |
46 | AliPHOSTrackSegment::AliPHOSTrackSegment() | |
47 | : fEmcRecPoint(0), | |
48 | fIndexInList(0), | |
49 | fCpvRecPoint(0), | |
50 | fTrack(0) | |
51 | { | |
52 | //def ctor | |
53 | } | |
54 | ||
d15a28e7 | 55 | //____________________________________________________________________________ |
88714635 | 56 | AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc , |
fbf5cb06 | 57 | AliPHOSRecPoint * cpvrp1) |
3663622c | 58 | : fEmcRecPoint(0), |
59 | fIndexInList(0), | |
60 | fCpvRecPoint(0), | |
61 | fTrack(0) | |
b2a60966 | 62 | { |
63 | // ctor | |
64 | ||
d15a28e7 | 65 | if( emc ) |
83974468 | 66 | fEmcRecPoint = emc->GetIndexInList() ; |
67 | else | |
68 | fEmcRecPoint = -1 ; | |
d15a28e7 | 69 | |
fbf5cb06 | 70 | if( cpvrp1 ) |
71 | fCpvRecPoint = cpvrp1->GetIndexInList() ; | |
83974468 | 72 | else |
fbf5cb06 | 73 | fCpvRecPoint = -1 ; |
d15a28e7 | 74 | |
fbf5cb06 | 75 | fTrack = -1 ; |
76 | ||
77 | fIndexInList = -1 ; | |
78 | } | |
79 | ||
80 | //____________________________________________________________________________ | |
81 | AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc , | |
82 | AliPHOSRecPoint * cpvrp1, | |
83 | Int_t track) | |
3663622c | 84 | : fEmcRecPoint(0), |
85 | fIndexInList(0), | |
86 | fCpvRecPoint(0), | |
87 | fTrack(0) | |
fbf5cb06 | 88 | { |
89 | // ctor | |
90 | ||
91 | if( emc ) | |
92 | fEmcRecPoint = emc->GetIndexInList() ; | |
93 | else | |
94 | fEmcRecPoint = -1 ; | |
95 | ||
96 | if( cpvrp1 ) | |
97 | fCpvRecPoint = cpvrp1->GetIndexInList() ; | |
98 | else | |
99 | fCpvRecPoint = -1 ; | |
100 | ||
101 | fTrack = track ; | |
d15a28e7 | 102 | |
83974468 | 103 | fIndexInList = -1 ; |
d15a28e7 | 104 | } |
105 | ||
6ad0bfa0 | 106 | //____________________________________________________________________________ |
107 | AliPHOSTrackSegment::AliPHOSTrackSegment( const AliPHOSTrackSegment & ts) | |
3663622c | 108 | : TObject(ts), |
109 | fEmcRecPoint(0), | |
110 | fIndexInList(0), | |
111 | fCpvRecPoint(0), | |
112 | fTrack(0) | |
6ad0bfa0 | 113 | { |
b2a60966 | 114 | // Copy ctor |
115 | ||
c198e326 | 116 | ( (AliPHOSTrackSegment &)ts ).Copy(*this) ; |
6ad0bfa0 | 117 | } |
118 | ||
d15a28e7 | 119 | |
6ad0bfa0 | 120 | //____________________________________________________________________________ |
702ab87e | 121 | void AliPHOSTrackSegment::Copy(TObject & obj) const |
6ad0bfa0 | 122 | { |
b2a60966 | 123 | // Copy of a track segment into another track segment |
124 | ||
6ad0bfa0 | 125 | TObject::Copy(obj) ; |
83974468 | 126 | ( (AliPHOSTrackSegment &)obj ).fEmcRecPoint = fEmcRecPoint ; |
fbf5cb06 | 127 | ( (AliPHOSTrackSegment &)obj ).fCpvRecPoint = fCpvRecPoint ; |
83974468 | 128 | ( (AliPHOSTrackSegment &)obj ).fIndexInList = fIndexInList ; |
fbf5cb06 | 129 | ( (AliPHOSTrackSegment &)obj ).fTrack = fTrack ; |
130 | } | |
131 | ||
d15a28e7 | 132 | |
133 | //____________________________________________________________________________ | |
702ab87e | 134 | void AliPHOSTrackSegment::Print(const Option_t *) const |
d15a28e7 | 135 | { |
b2a60966 | 136 | // Print all information on this track Segment |
137 | ||
d15a28e7 | 138 | |
fbf5cb06 | 139 | Info("Print", ""); |
140 | printf("Stored at position %d\n", fIndexInList) ; | |
141 | printf(" Emc RecPoint # %d\n", fEmcRecPoint) ; | |
142 | if(fCpvRecPoint >= 0) | |
143 | printf(" CPV RecPoint # %d\n", fCpvRecPoint) ; | |
2731cd1e | 144 | else |
fbf5cb06 | 145 | printf(" No CPV RecPoint\n"); |
146 | if (fTrack >= 0) | |
147 | printf(" Charged track # %d\n", fTrack) ; | |
148 | else | |
149 | printf(" No Charged track\n"); | |
d15a28e7 | 150 | } |
fbf5cb06 | 151 | |
28c3a259 | 152 | //____________________________________________________________________________ |
fbf5cb06 | 153 | void AliPHOSTrackSegment::SetCpvRecPoint(AliPHOSRecPoint * cpvRecPoint) |
28c3a259 | 154 | { |
2f04ed65 | 155 | // gives an id from its position in the list |
fbf5cb06 | 156 | if( cpvRecPoint ) |
157 | fCpvRecPoint = cpvRecPoint->GetIndexInList() ; | |
28c3a259 | 158 | else |
fbf5cb06 | 159 | fCpvRecPoint = -1 ; |
28c3a259 | 160 | } |
d15a28e7 | 161 |