]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSTrackSegment.cxx
Pyhtia comparison extended
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTrackSegment.cxx
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  **************************************************************************/
15 /* $Id$ */
16 //_________________________________________________________________________
17 //  Track segment in PHOS
18 //  Can be : 1 EmcRecPoint
19 //           1 EmcRecPoint + 1 PPSD
20 //           1 EmcRecPoint + 1 PPSD + 1 PPSD     
21 //                  
22 //*-- Author:  Dmitri Peressounko (RRC KI & SUBATECH)
23
24 // --- ROOT system ---
25  
26
27 // --- Standard library ---
28
29 // --- AliRoot header files ---
30 #include "AliPHOSEmcRecPoint.h" 
31 #include "AliPHOSTrackSegment.h" 
32
33 ClassImp(AliPHOSTrackSegment)
34
35 //____________________________________________________________________________
36 AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc , 
37                                           AliPHOSRecPoint * ppsdrp1)
38 {
39   // ctor
40
41   if( emc )   
42     fEmcRecPoint =  emc->GetIndexInList() ;
43   else 
44     fEmcRecPoint = -1 ;
45
46   if( ppsdrp1 )  
47     fPpsdUpRecPoint = ppsdrp1->GetIndexInList() ;
48  else 
49     fPpsdUpRecPoint = -1 ;
50
51
52   fIndexInList = -1 ;
53 }
54
55 //____________________________________________________________________________
56 AliPHOSTrackSegment::AliPHOSTrackSegment( const AliPHOSTrackSegment & ts) 
57   : TObject(ts)
58 {
59   // Copy ctor
60
61   ( (AliPHOSTrackSegment &)ts ).Copy(*this) ; 
62 }
63
64
65 //____________________________________________________________________________
66 void AliPHOSTrackSegment::Copy(TObject & obj) 
67 {
68   // Copy of a track segment into another track segment
69
70    TObject::Copy(obj) ;
71    ( (AliPHOSTrackSegment &)obj ).fEmcRecPoint     = fEmcRecPoint ; 
72    ( (AliPHOSTrackSegment &)obj ).fPpsdUpRecPoint  = fPpsdUpRecPoint ; 
73    ( (AliPHOSTrackSegment &)obj ).fIndexInList     = fIndexInList ; 
74 }
75
76 //____________________________________________________________________________
77 void AliPHOSTrackSegment::Print() const
78 {
79   // Print all information on this track Segment
80   
81
82   Info("Print", "--------AliPHOSTrackSegment-------- ");
83   Info("Print", "Stored at position %d", fIndexInList) ;
84   Info("Print", "Emc RecPoint #     %d", fEmcRecPoint) ;
85   if(fPpsdUpRecPoint >= 0)
86     Info("Print", "CPV RecPoint #     %d", fPpsdUpRecPoint) ;
87   else
88     Info("Print", "No CPV RecPoint ");
89
90   
91   Info("Print", "------------------------------------ ") ; 
92   
93 }
94 //____________________________________________________________________________
95 void AliPHOSTrackSegment::SetCpvRecPoint(AliPHOSRecPoint * PpsdUpRecPoint) 
96 {
97   // gives an id from its position in the list
98   if( PpsdUpRecPoint )  
99     fPpsdUpRecPoint = PpsdUpRecPoint->GetIndexInList() ;
100  else 
101     fPpsdUpRecPoint = -1 ;
102 }
103