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