]>
Commit | Line | Data |
---|---|---|
12d0abaf | 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 | ||
16 | /* $Id$ */ | |
17 | ||
18 | // AliFlowTrack: | |
bc231a12 | 19 | // A track class for use in AliFlowEvent for flow analysis |
20 | // origin: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch) | |
12d0abaf | 21 | |
bc231a12 | 22 | #include "AliVParticle.h" |
12d0abaf | 23 | #include "AliFlowTrack.h" |
24 | ||
25 | ClassImp(AliFlowTrack) | |
26 | ||
27 | //----------------------------------------------------------------------- | |
28 | AliFlowTrack::AliFlowTrack(): | |
bc231a12 | 29 | AliFlowTrackSimple(), |
44e060e0 | 30 | fTrackSourceBits() |
bc231a12 | 31 | { |
32 | //constructor | |
33 | } | |
34 | ||
35 | //----------------------------------------------------------------------- | |
36 | AliFlowTrack::AliFlowTrack(AliVParticle* p): | |
44e060e0 | 37 | AliFlowTrackSimple(p->Phi(),p->Eta(),p->Pt(),1.), |
38 | fTrackSourceBits() | |
12d0abaf | 39 | { |
40 | //constructor | |
41 | } | |
42 | ||
43 | //----------------------------------------------------------------------- | |
44 | AliFlowTrack::AliFlowTrack(const AliFlowTrack& aTrack): | |
45 | AliFlowTrackSimple(aTrack), | |
44e060e0 | 46 | fTrackSourceBits(aTrack.fTrackSourceBits) |
12d0abaf | 47 | { |
48 | //copy constructor | |
49 | } | |
50 | ||
bc231a12 | 51 | //----------------------------------------------------------------------- |
65ef7d1a | 52 | AliFlowTrack* AliFlowTrack::Clone(const char* /*option*/) const |
bc231a12 | 53 | { |
54 | //clone "constructor" | |
55 | return new AliFlowTrack(*this); | |
56 | } | |
57 | ||
12d0abaf | 58 | //----------------------------------------------------------------------- |
59 | AliFlowTrack& AliFlowTrack::operator=(const AliFlowTrack& aTrack) | |
60 | { | |
bc231a12 | 61 | //assignment |
12d0abaf | 62 | AliFlowTrackSimple::operator=(aTrack); |
63 | fTrackSourceBits = aTrack.fTrackSourceBits; | |
bc231a12 | 64 | return *this; |
65 | } | |
12d0abaf | 66 | |
bc231a12 | 67 | //----------------------------------------------------------------------- |
68 | AliFlowTrackSimple& AliFlowTrack::operator=(const AliFlowTrackSimple& aTrack) | |
69 | { | |
70 | //polymorphic assignment | |
71 | AliFlowTrackSimple::operator=(aTrack); | |
72 | const AliFlowTrack* pft = dynamic_cast<const AliFlowTrack*>(&aTrack); | |
73 | if (pft) | |
74 | { | |
75 | fTrackSourceBits = pft->fTrackSourceBits; | |
bc231a12 | 76 | } |
77 | else | |
78 | { | |
79 | fTrackSourceBits.ResetAllBits(); | |
bc231a12 | 80 | } |
12d0abaf | 81 | return *this; |
82 | } | |
83 | ||
84 | ||
85 | //----------------------------------------------------------------------- | |
86 | AliFlowTrack::~AliFlowTrack() | |
87 | { | |
88 | //destructor | |
89 | } | |
90 |