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:
20 * Revision 1.29 2005/05/28 14:19:05 schutz
21 * Compilation warnings fixed by T.P.
25 //_________________________________________________________________________
26 // Track segment in PHOS
27 // Can be : 1 EmcRecPoint
28 // 1 EmcRecPoint + 1 CPV
29 // 1 EmcRecPoint + 1 CPV + 1 charged track
31 //*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
33 // --- ROOT system ---
36 // --- Standard library ---
38 // --- AliRoot header files ---
39 #include "AliPHOSEmcRecPoint.h"
40 #include "AliPHOSTrackSegment.h"
41 #include "AliESDtrack.h"
43 ClassImp(AliPHOSTrackSegment)
45 //____________________________________________________________________________
46 AliPHOSTrackSegment::AliPHOSTrackSegment()
55 //____________________________________________________________________________
56 AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc ,
57 AliPHOSRecPoint * cpvrp1)
66 fEmcRecPoint = emc->GetIndexInList() ;
71 fCpvRecPoint = cpvrp1->GetIndexInList() ;
80 //____________________________________________________________________________
81 AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc ,
82 AliPHOSRecPoint * cpvrp1,
92 fEmcRecPoint = emc->GetIndexInList() ;
97 fCpvRecPoint = cpvrp1->GetIndexInList() ;
106 //____________________________________________________________________________
107 AliPHOSTrackSegment::AliPHOSTrackSegment( const AliPHOSTrackSegment & ts)
116 ( (AliPHOSTrackSegment &)ts ).Copy(*this) ;
120 //____________________________________________________________________________
121 void AliPHOSTrackSegment::Copy(TObject & obj) const
123 // Copy of a track segment into another track segment
126 ( (AliPHOSTrackSegment &)obj ).fEmcRecPoint = fEmcRecPoint ;
127 ( (AliPHOSTrackSegment &)obj ).fCpvRecPoint = fCpvRecPoint ;
128 ( (AliPHOSTrackSegment &)obj ).fIndexInList = fIndexInList ;
129 ( (AliPHOSTrackSegment &)obj ).fTrack = fTrack ;
133 //____________________________________________________________________________
134 void AliPHOSTrackSegment::Print(const Option_t *) const
136 // Print all information on this track Segment
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) ;
145 printf(" No CPV RecPoint\n");
147 printf(" Charged track # %d\n", fTrack) ;
149 printf(" No Charged track\n");
152 //____________________________________________________________________________
153 void AliPHOSTrackSegment::SetCpvRecPoint(AliPHOSRecPoint * cpvRecPoint)
155 // gives an id from its position in the list
157 fCpvRecPoint = cpvRecPoint->GetIndexInList() ;