]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/FLOW/Base/AliFlowVector.cxx
Moving/split PWG2/FLOW to PWGCF/FLOW, PWG/FLOW/Base, PWG/FLOW/Tasks, PWG/Glauber
[u/mrichter/AliRoot.git] / PWG / FLOW / Base / AliFlowVector.cxx
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
16 #define AliFlowVector_cxx
17
18 #include "AliFlowVector.h"
19
20 //********************************************************************
21 // AliFlowVector:                                                    *
22 // Class to hold the flow vector and multiplicity for flow analysis. *
23 // Author: A. Bilandzic (anteb@nikhef.nl)                            *
24 //********************************************************************
25
26 ClassImp(AliFlowVector)
27
28 //________________________________________________________________________
29
30 AliFlowVector::AliFlowVector():
31  fMult(0)
32 {
33   // default contructor
34 }
35
36 //________________________________________________________________________
37
38 AliFlowVector::AliFlowVector(const AliFlowVector& aVector):
39   TVector2(aVector),
40   fMult(aVector.fMult)
41 {
42   // copy constructor
43 }
44
45  //________________________________________________________________________
46
47 AliFlowVector::AliFlowVector(const TVector2 &v, const Double_t m):
48   TVector2(v),
49   fMult(m)
50 {
51   // custom constructor
52 }
53
54 //________________________________________________________________________ 
55
56 AliFlowVector::~AliFlowVector()
57 {
58   // default constructor 
59 }
60
61 //________________________________________________________________________
62
63 AliFlowVector& AliFlowVector::operator=(const AliFlowVector& aVector)
64 {
65   // assignement operator
66   if (this==&aVector) return *this;
67   fX = aVector.X();
68   fY = aVector.Y();
69   fMult = aVector.GetMult();
70   
71   return *this;
72 }
73
74 //________________________________________________________________________
75
76 AliFlowVector& AliFlowVector::operator+=(const AliFlowVector& aVector)
77 {
78   // addition operator
79   fX += aVector.X(); 
80   fY += aVector.Y(); 
81   fMult += aVector.GetMult();
82   
83   return *this;
84 }
85