1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 // AliFlowTrackSimple:
19 // A simple track class to the the AliFlowEventSimple for flow analysis
22 // author: N. van der Kolk (kolk@nikhef.nl)
23 // mods: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
26 #include "TParticle.h"
27 #include "AliFlowTrackSimple.h"
30 ClassImp(AliFlowTrackSimple)
32 //-----------------------------------------------------------------------
34 AliFlowTrackSimple::AliFlowTrackSimple():
44 //-----------------------------------------------------------------------
45 AliFlowTrackSimple::AliFlowTrackSimple(const TParticle* p):
55 //-----------------------------------------------------------------------
57 AliFlowTrackSimple::AliFlowTrackSimple(const AliFlowTrackSimple& aTrack):
62 fFlowBits(aTrack.fFlowBits),
63 fSubEventBits(aTrack.fSubEventBits)
67 //-----------------------------------------------------------------------
69 AliFlowTrackSimple& AliFlowTrackSimple::operator=(const AliFlowTrackSimple& aTrack)
74 fFlowBits = aTrack.fFlowBits;
75 fSubEventBits = aTrack.fSubEventBits;
81 //-----------------------------------------------------------------------
83 AliFlowTrackSimple::~AliFlowTrackSimple()
89 //-----------------------------------------------------------------------
90 void AliFlowTrackSimple::AddFlow( Double_t flow, Double_t reactionPlaneAngle )
92 //add flow wrt the eventplane
93 fPhi -= flow*TMath::Sin(2*(fPhi-reactionPlaneAngle));
96 //-----------------------------------------------------------------------
97 void AliFlowTrackSimple::ResolutionPt(Double_t res)
99 //smear the pt by a gaussian with sigma=res
100 fPt += gRandom->Gaus(0.,res);