removed iostream
[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
d15a28e7 29// --- AliRoot header files ---
30
31#include "AliPHOSTrackSegment.h"
d15a28e7 32
33ClassImp(AliPHOSTrackSegment)
34
35//____________________________________________________________________________
88714635 36AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc ,
9688c1dd 37 AliPHOSRecPoint * ppsdrp1)
b2a60966 38{
39 // ctor
40
d15a28e7 41 if( emc )
83974468 42 fEmcRecPoint = emc->GetIndexInList() ;
43 else
44 fEmcRecPoint = -1 ;
d15a28e7 45
83974468 46 if( ppsdrp1 )
47 fPpsdUpRecPoint = ppsdrp1->GetIndexInList() ;
48 else
49 fPpsdUpRecPoint = -1 ;
d15a28e7 50
d15a28e7 51
83974468 52 fIndexInList = -1 ;
d15a28e7 53}
54
6ad0bfa0 55//____________________________________________________________________________
56AliPHOSTrackSegment::AliPHOSTrackSegment( const AliPHOSTrackSegment & ts)
57{
b2a60966 58 // Copy ctor
59
c198e326 60 ( (AliPHOSTrackSegment &)ts ).Copy(*this) ;
6ad0bfa0 61}
62
d15a28e7 63
6ad0bfa0 64//____________________________________________________________________________
65void AliPHOSTrackSegment::Copy(TObject & obj)
66{
b2a60966 67 // Copy of a track segment into another track segment
68
6ad0bfa0 69 TObject::Copy(obj) ;
83974468 70 ( (AliPHOSTrackSegment &)obj ).fEmcRecPoint = fEmcRecPoint ;
83974468 71 ( (AliPHOSTrackSegment &)obj ).fPpsdUpRecPoint = fPpsdUpRecPoint ;
72 ( (AliPHOSTrackSegment &)obj ).fIndexInList = fIndexInList ;
6ad0bfa0 73}
d15a28e7 74
75//____________________________________________________________________________
baef0810 76void AliPHOSTrackSegment::Print(Option_t * opt) const
d15a28e7 77{
b2a60966 78 // Print all information on this track Segment
79
d15a28e7 80
21cd0c07 81 Info("Print", "--------AliPHOSTrackSegment-------- ");
82 Info("Print", "Stored at position %d", fIndexInList) ;
83 Info("Print", "Emc RecPoint # %d", fEmcRecPoint) ;
2731cd1e 84 if(fPpsdUpRecPoint >= 0)
21cd0c07 85 Info("Print", "CPV RecPoint # %d", fPpsdUpRecPoint) ;
2731cd1e 86 else
21cd0c07 87 Info("Print", "No CPV RecPoint ");
d15a28e7 88
2731cd1e 89
21cd0c07 90 Info("Print", "------------------------------------ ") ;
d15a28e7 91
d15a28e7 92}
28c3a259 93//____________________________________________________________________________
2731cd1e 94void AliPHOSTrackSegment::SetCpvRecPoint(AliPHOSRecPoint * PpsdUpRecPoint)
28c3a259 95{
2f04ed65 96 // gives an id from its position in the list
28c3a259 97 if( PpsdUpRecPoint )
98 fPpsdUpRecPoint = PpsdUpRecPoint->GetIndexInList() ;
99 else
100 fPpsdUpRecPoint = -1 ;
101}
d15a28e7 102