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 PPSD
20 // 1 EmcRecPoint + 1 PPSD + 1 PPSD
22 //*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
24 // --- ROOT system ---
27 // --- Standard library ---
31 // --- AliRoot header files ---
33 #include "AliPHOSTrackSegment.h"
35 ClassImp(AliPHOSTrackSegment)
37 //____________________________________________________________________________
38 AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc ,
39 AliPHOSRecPoint * ppsdrp1,
40 AliPHOSRecPoint * ppsdrp2 )
45 fEmcRecPoint = emc->GetIndexInList() ;
50 fPpsdUpRecPoint = ppsdrp1->GetIndexInList() ;
52 fPpsdUpRecPoint = -1 ;
55 fPpsdLowRecPoint = ppsdrp2->GetIndexInList() ;
57 fPpsdLowRecPoint = -1 ;
62 //____________________________________________________________________________
63 AliPHOSTrackSegment::AliPHOSTrackSegment( const AliPHOSTrackSegment & ts)
67 ( (AliPHOSTrackSegment &)ts ).Copy(*this) ;
71 //____________________________________________________________________________
72 void AliPHOSTrackSegment::Copy(TObject & obj)
74 // Copy of a track segment into another track segment
77 ( (AliPHOSTrackSegment &)obj ).fEmcRecPoint = fEmcRecPoint ;
78 ( (AliPHOSTrackSegment &)obj ).fPpsdLowRecPoint = fPpsdLowRecPoint ;
79 ( (AliPHOSTrackSegment &)obj ).fPpsdUpRecPoint = fPpsdUpRecPoint ;
80 ( (AliPHOSTrackSegment &)obj ).fIndexInList = fIndexInList ;
83 //____________________________________________________________________________
84 void AliPHOSTrackSegment::Print(Option_t * opt) const
86 // Print all information on this track Segment
89 cout << "--------AliPHOSTrackSegment-------- "<<endl ;
90 cout << "Stored at position " << fIndexInList << endl ;
91 cout << "Emc RecPoint # " << fEmcRecPoint << endl ;
92 if(fPpsdUpRecPoint >= 0)
93 cout << "CPV RecPoint # " << fPpsdUpRecPoint << endl ;
95 cout << "No CPV RecPoint " << endl ;
97 if(fPpsdLowRecPoint >= 0)
98 cout << "PPSD RecPoint # " << fPpsdLowRecPoint << endl ;
100 cout << "No PPSD RecPoint " << endl ;
102 cout << "------------------------------------ " << endl ;
105 //____________________________________________________________________________
106 void AliPHOSTrackSegment::SetCpvRecPoint(AliPHOSRecPoint * PpsdUpRecPoint)
108 // gives an id from its position in the list
110 fPpsdUpRecPoint = PpsdUpRecPoint->GetIndexInList() ;
112 fPpsdUpRecPoint = -1 ;