]>
Commit | Line | Data |
---|---|---|
f1d945a1 | 1 | /************************************************************************* |
2 | * Copyright(c) 1998-2008, 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 | ||
f1d945a1 | 16 | #include "AliFlowVector.h" |
17 | ||
19f888a6 | 18 | //******************************************************************** |
19 | // AliFlowVector: * | |
20 | // Class to hold the flow vector and multiplicity for flow analysis. * | |
21 | // Author: A. Bilandzic (anteb@nikhef.nl) * | |
22 | //******************************************************************** | |
f1d945a1 | 23 | |
24 | ClassImp(AliFlowVector) | |
25 | ||
26 | //________________________________________________________________________ | |
27 | ||
ae733b3b | 28 | AliFlowVector::AliFlowVector(): |
cbbaf54a | 29 | fMult(0) |
30 | { | |
ae733b3b | 31 | // default contructor |
cbbaf54a | 32 | } |
33 | ||
34 | //________________________________________________________________________ | |
868536da | 35 | |
ae733b3b | 36 | AliFlowVector::AliFlowVector(const AliFlowVector& aVector): |
cbbaf54a | 37 | TVector2(aVector), |
38 | fMult(aVector.fMult) | |
39 | { | |
ae733b3b | 40 | // copy constructor |
cbbaf54a | 41 | } |
42 | ||
43 | //________________________________________________________________________ | |
44 | ||
45 | AliFlowVector::AliFlowVector(const TVector2 &v, const Double_t m): | |
46 | TVector2(v), | |
47 | fMult(m) | |
48 | { | |
ae733b3b | 49 | // custom constructor |
cbbaf54a | 50 | } |
51 | ||
52 | //________________________________________________________________________ | |
53 | ||
ae733b3b | 54 | AliFlowVector::~AliFlowVector() |
55 | { | |
cbbaf54a | 56 | // default constructor |
ae733b3b | 57 | } |
cbbaf54a | 58 | |
03740a6b | 59 | void AliFlowVector::SetMagPhi(double size, double angle, double mult) |
60 | { | |
61 | TVector2::SetMagPhi(size,angle); | |
62 | SetMult(mult); | |
63 | } | |
64 | ||
cbbaf54a | 65 | //________________________________________________________________________ |
66 | ||
19f888a6 | 67 | AliFlowVector& AliFlowVector::operator=(const AliFlowVector& aVector) |
868536da | 68 | { |
cbbaf54a | 69 | // assignement operator |
2047680a | 70 | if (this==&aVector) return *this; |
cbbaf54a | 71 | fX = aVector.X(); |
72 | fY = aVector.Y(); | |
73 | fMult = aVector.GetMult(); | |
74 | ||
75 | return *this; | |
868536da | 76 | } |
19f888a6 | 77 | |
cbbaf54a | 78 | //________________________________________________________________________ |
79 | ||
80 | AliFlowVector& AliFlowVector::operator+=(const AliFlowVector& aVector) | |
81 | { | |
82 | // addition operator | |
83 | fX += aVector.X(); | |
84 | fY += aVector.Y(); | |
85 | fMult += aVector.GetMult(); | |
86 | ||
87 | return *this; | |
88 | } | |
19f888a6 | 89 | |
03740a6b | 90 | AliFlowVector& AliFlowVector::operator-=(const AliFlowVector& aVector) |
91 | { | |
92 | // addition operator | |
93 | fX -= aVector.X(); | |
94 | fY -= aVector.Y(); | |
95 | fMult -= aVector.GetMult(); | |
96 | ||
97 | return *this; | |
98 | } |