]>
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(), |
30 | fTrackSourceBits(), | |
31 | fFMDmultiplicity(0.) | |
32 | { | |
33 | //constructor | |
34 | } | |
35 | ||
36 | //----------------------------------------------------------------------- | |
37 | AliFlowTrack::AliFlowTrack(AliVParticle* p): | |
38 | AliFlowTrackSimple(p->Phi(),p->Eta(),p->Pt()), | |
12d0abaf | 39 | fTrackSourceBits(), |
40 | fFMDmultiplicity(0.) | |
41 | { | |
42 | //constructor | |
43 | } | |
44 | ||
45 | //----------------------------------------------------------------------- | |
46 | AliFlowTrack::AliFlowTrack(const AliFlowTrack& aTrack): | |
47 | AliFlowTrackSimple(aTrack), | |
48 | fTrackSourceBits(aTrack.fTrackSourceBits), | |
49 | fFMDmultiplicity(aTrack.fFMDmultiplicity) | |
50 | { | |
51 | //copy constructor | |
52 | } | |
53 | ||
bc231a12 | 54 | //----------------------------------------------------------------------- |
65ef7d1a | 55 | AliFlowTrack* AliFlowTrack::Clone(const char* /*option*/) const |
bc231a12 | 56 | { |
57 | //clone "constructor" | |
58 | return new AliFlowTrack(*this); | |
59 | } | |
60 | ||
12d0abaf | 61 | //----------------------------------------------------------------------- |
62 | AliFlowTrack& AliFlowTrack::operator=(const AliFlowTrack& aTrack) | |
63 | { | |
bc231a12 | 64 | //assignment |
12d0abaf | 65 | AliFlowTrackSimple::operator=(aTrack); |
66 | fTrackSourceBits = aTrack.fTrackSourceBits; | |
67 | fFMDmultiplicity = aTrack.fFMDmultiplicity; | |
bc231a12 | 68 | return *this; |
69 | } | |
12d0abaf | 70 | |
bc231a12 | 71 | //----------------------------------------------------------------------- |
72 | AliFlowTrackSimple& AliFlowTrack::operator=(const AliFlowTrackSimple& aTrack) | |
73 | { | |
74 | //polymorphic assignment | |
75 | AliFlowTrackSimple::operator=(aTrack); | |
76 | const AliFlowTrack* pft = dynamic_cast<const AliFlowTrack*>(&aTrack); | |
77 | if (pft) | |
78 | { | |
79 | fTrackSourceBits = pft->fTrackSourceBits; | |
80 | fFMDmultiplicity = pft->fFMDmultiplicity; | |
81 | } | |
82 | else | |
83 | { | |
84 | fTrackSourceBits.ResetAllBits(); | |
85 | fFMDmultiplicity=0.; | |
86 | } | |
12d0abaf | 87 | return *this; |
88 | } | |
89 | ||
90 | ||
91 | //----------------------------------------------------------------------- | |
92 | AliFlowTrack::~AliFlowTrack() | |
93 | { | |
94 | //destructor | |
95 | } | |
96 |