]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSTrackSegment.cxx
A new (final?) geometry developed
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTrackSegment.cxx
CommitLineData
d15a28e7 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 **************************************************************************/
b2a60966 15/* $Id$ */
d15a28e7 16//_________________________________________________________________________
b2a60966 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)
d15a28e7 23
24// --- ROOT system ---
25
d15a28e7 26
27// --- Standard library ---
28
de9ec31b 29#include <iostream.h>
d15a28e7 30
31// --- AliRoot header files ---
32
33#include "AliPHOSTrackSegment.h"
d15a28e7 34
35ClassImp(AliPHOSTrackSegment)
36
37//____________________________________________________________________________
88714635 38AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc ,
2731cd1e 39 AliPHOSRecPoint * ppsdrp1,
40 AliPHOSRecPoint * ppsdrp2 )
b2a60966 41{
42 // ctor
43
d15a28e7 44 if( emc )
83974468 45 fEmcRecPoint = emc->GetIndexInList() ;
46 else
47 fEmcRecPoint = -1 ;
d15a28e7 48
83974468 49 if( ppsdrp1 )
50 fPpsdUpRecPoint = ppsdrp1->GetIndexInList() ;
51 else
52 fPpsdUpRecPoint = -1 ;
d15a28e7 53
83974468 54 if( ppsdrp2 )
55 fPpsdLowRecPoint = ppsdrp2->GetIndexInList() ;
56 else
57 fPpsdLowRecPoint = -1 ;
d15a28e7 58
83974468 59 fIndexInList = -1 ;
d15a28e7 60}
61
6ad0bfa0 62//____________________________________________________________________________
63AliPHOSTrackSegment::AliPHOSTrackSegment( const AliPHOSTrackSegment & ts)
64{
b2a60966 65 // Copy ctor
66
c198e326 67 ( (AliPHOSTrackSegment &)ts ).Copy(*this) ;
6ad0bfa0 68}
69
d15a28e7 70
6ad0bfa0 71//____________________________________________________________________________
72void AliPHOSTrackSegment::Copy(TObject & obj)
73{
b2a60966 74 // Copy of a track segment into another track segment
75
6ad0bfa0 76 TObject::Copy(obj) ;
83974468 77 ( (AliPHOSTrackSegment &)obj ).fEmcRecPoint = fEmcRecPoint ;
78 ( (AliPHOSTrackSegment &)obj ).fPpsdLowRecPoint = fPpsdLowRecPoint ;
79 ( (AliPHOSTrackSegment &)obj ).fPpsdUpRecPoint = fPpsdUpRecPoint ;
80 ( (AliPHOSTrackSegment &)obj ).fIndexInList = fIndexInList ;
6ad0bfa0 81}
d15a28e7 82
83//____________________________________________________________________________
baef0810 84void AliPHOSTrackSegment::Print(Option_t * opt) const
d15a28e7 85{
b2a60966 86 // Print all information on this track Segment
87
d15a28e7 88
83974468 89 cout << "--------AliPHOSTrackSegment-------- "<<endl ;
2731cd1e 90 cout << "Stored at position " << fIndexInList << endl ;
91 cout << "Emc RecPoint # " << fEmcRecPoint << endl ;
92 if(fPpsdUpRecPoint >= 0)
93 cout << "CPV RecPoint # " << fPpsdUpRecPoint << endl ;
94 else
95 cout << "No CPV RecPoint " << endl ;
d15a28e7 96
2731cd1e 97 if(fPpsdLowRecPoint >= 0)
98 cout << "PPSD RecPoint # " << fPpsdLowRecPoint << endl ;
99 else
100 cout << "No PPSD RecPoint " << endl ;
101
102 cout << "------------------------------------ " << endl ;
d15a28e7 103
d15a28e7 104}
28c3a259 105//____________________________________________________________________________
2731cd1e 106void AliPHOSTrackSegment::SetCpvRecPoint(AliPHOSRecPoint * PpsdUpRecPoint)
28c3a259 107{
2f04ed65 108 // gives an id from its position in the list
28c3a259 109 if( PpsdUpRecPoint )
110 fPpsdUpRecPoint = PpsdUpRecPoint->GetIndexInList() ;
111 else
112 fPpsdUpRecPoint = -1 ;
113}
d15a28e7 114