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 **************************************************************************/
16 //_________________________________________________________________________
17 // Track segment in PHOS
18 // Can be : 1 EmcRecPoint
19 // 1 EmcRecPoint + 1 CPV
20 // 1 EmcRecPoint + 1 CPV + 1 charged track
22 //*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
24 // --- ROOT system ---
27 // --- Standard library ---
29 // --- AliRoot header files ---
30 #include "AliPHOSEmcRecPoint.h"
31 #include "AliPHOSTrackSegment.h"
32 #include "AliESDtrack.h"
34 ClassImp(AliPHOSTrackSegment)
36 //____________________________________________________________________________
37 AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc ,
38 AliPHOSRecPoint * cpvrp1)
43 fEmcRecPoint = emc->GetIndexInList() ;
48 fCpvRecPoint = cpvrp1->GetIndexInList() ;
57 //____________________________________________________________________________
58 AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc ,
59 AliPHOSRecPoint * cpvrp1,
65 fEmcRecPoint = emc->GetIndexInList() ;
70 fCpvRecPoint = cpvrp1->GetIndexInList() ;
79 //____________________________________________________________________________
80 AliPHOSTrackSegment::AliPHOSTrackSegment( const AliPHOSTrackSegment & ts)
85 ( (AliPHOSTrackSegment &)ts ).Copy(*this) ;
89 //____________________________________________________________________________
90 void AliPHOSTrackSegment::Copy(TObject & obj)
92 // Copy of a track segment into another track segment
95 ( (AliPHOSTrackSegment &)obj ).fEmcRecPoint = fEmcRecPoint ;
96 ( (AliPHOSTrackSegment &)obj ).fCpvRecPoint = fCpvRecPoint ;
97 ( (AliPHOSTrackSegment &)obj ).fIndexInList = fIndexInList ;
98 ( (AliPHOSTrackSegment &)obj ).fTrack = fTrack ;
102 //____________________________________________________________________________
103 void AliPHOSTrackSegment::Print() const
105 // Print all information on this track Segment
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) ;
114 printf(" No CPV RecPoint\n");
116 printf(" Charged track # %d\n", fTrack) ;
118 printf(" No Charged track\n");
121 //____________________________________________________________________________
122 void AliPHOSTrackSegment::SetCpvRecPoint(AliPHOSRecPoint * cpvRecPoint)
124 // gives an id from its position in the list
126 fCpvRecPoint = cpvRecPoint->GetIndexInList() ;