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