1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 /* History of cvs commits:
22 //_________________________________________________________________________
23 // Track segment in PHOS
24 // Can be : 1 EmcRecPoint
25 // 1 EmcRecPoint + 1 CPV
26 // 1 EmcRecPoint + 1 CPV + 1 charged track
28 //*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
30 // --- ROOT system ---
33 // --- Standard library ---
35 // --- AliRoot header files ---
36 #include "AliPHOSEmcRecPoint.h"
37 #include "AliPHOSTrackSegment.h"
38 #include "AliESDtrack.h"
40 ClassImp(AliPHOSTrackSegment)
42 //____________________________________________________________________________
43 AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc ,
44 AliPHOSRecPoint * cpvrp1)
49 fEmcRecPoint = emc->GetIndexInList() ;
54 fCpvRecPoint = cpvrp1->GetIndexInList() ;
63 //____________________________________________________________________________
64 AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc ,
65 AliPHOSRecPoint * cpvrp1,
71 fEmcRecPoint = emc->GetIndexInList() ;
76 fCpvRecPoint = cpvrp1->GetIndexInList() ;
85 //____________________________________________________________________________
86 AliPHOSTrackSegment::AliPHOSTrackSegment( const AliPHOSTrackSegment & ts)
91 ( (AliPHOSTrackSegment &)ts ).Copy(*this) ;
95 //____________________________________________________________________________
96 void AliPHOSTrackSegment::Copy(TObject & obj) const
98 // Copy of a track segment into another track segment
101 ( (AliPHOSTrackSegment &)obj ).fEmcRecPoint = fEmcRecPoint ;
102 ( (AliPHOSTrackSegment &)obj ).fCpvRecPoint = fCpvRecPoint ;
103 ( (AliPHOSTrackSegment &)obj ).fIndexInList = fIndexInList ;
104 ( (AliPHOSTrackSegment &)obj ).fTrack = fTrack ;
108 //____________________________________________________________________________
109 void AliPHOSTrackSegment::Print(const Option_t *) const
111 // Print all information on this track Segment
115 printf("Stored at position %d\n", fIndexInList) ;
116 printf(" Emc RecPoint # %d\n", fEmcRecPoint) ;
117 if(fCpvRecPoint >= 0)
118 printf(" CPV RecPoint # %d\n", fCpvRecPoint) ;
120 printf(" No CPV RecPoint\n");
122 printf(" Charged track # %d\n", fTrack) ;
124 printf(" No Charged track\n");
127 //____________________________________________________________________________
128 void AliPHOSTrackSegment::SetCpvRecPoint(AliPHOSRecPoint * cpvRecPoint)
130 // gives an id from its position in the list
132 fCpvRecPoint = cpvRecPoint->GetIndexInList() ;