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