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