]>
Commit | Line | Data |
---|---|---|
f1d945a1 | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | /* $Id$ */ | |
4 | ||
ae733b3b | 5 | #ifndef ALIFLOWVECTOR_H |
6 | #define ALIFLOWVECTOR_H | |
f1d945a1 | 7 | |
8 | #include "TVector2.h" | |
9 | ||
19f888a6 | 10 | //******************************************************************** |
11 | // AliFlowVector: * | |
12 | // Class to hold the flow vector and multiplicity for flow analysis. * | |
13 | // Author: A. Bilandzic (anteb@nikhef.nl) * | |
14 | //******************************************************************** | |
f1d945a1 | 15 | |
16 | class AliFlowVector: public TVector2 { | |
17 | public: | |
18 | AliFlowVector(); | |
868536da | 19 | AliFlowVector(const AliFlowVector& aVector); |
cbbaf54a | 20 | AliFlowVector(const TVector2 &p, const Double_t m); |
f1d945a1 | 21 | virtual ~AliFlowVector(); |
868536da | 22 | |
19f888a6 | 23 | AliFlowVector& operator=(const AliFlowVector& aVector); |
cbbaf54a | 24 | AliFlowVector& operator+=(const AliFlowVector& aVector); |
868536da | 25 | |
c076fda8 | 26 | Bool_t IsFolder() const {return kTRUE;}; |
27 | ||
ae733b3b | 28 | void SetMult(Double_t const mult) {this->fMult = mult;}; |
29 | Double_t GetMult() const {return this->fMult;}; | |
cbbaf54a | 30 | |
f1d945a1 | 31 | private: |
ae733b3b | 32 | Double_t fMult; // multiplicity = sum of weights = w_1 + w_2 + ... + w_n |
cbbaf54a | 33 | |
46bec39c | 34 | ClassDef(AliFlowVector, 1) |
f1d945a1 | 35 | }; |
f1d945a1 | 36 | |
cbbaf54a | 37 | inline AliFlowVector operator+(const AliFlowVector& aVector,const AliFlowVector& bVector) { |
38 | AliFlowVector cVector; | |
39 | Double_t x = aVector.X() + bVector.X(); | |
40 | Double_t y = aVector.Y() + bVector.Y(); | |
41 | Double_t mult = aVector.GetMult() + bVector.GetMult(); | |
42 | cVector.Set(x,y); | |
43 | cVector.SetMult(mult); | |
44 | ||
45 | return cVector; | |
46 | } | |
19f888a6 | 47 | |
cbbaf54a | 48 | #endif |