1 /*************************************************************************
2 * Copyright(c) 1998-2048, 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 **************************************************************************/
16 // Author: Dariusz Miskowiec <mailto:d.miskowiec@gsi.de> 2007
18 //=============================================================================
19 // parent class of all events; analyzers access data via this class
20 //=============================================================================
23 #include "AliUnicorEvent.h"
25 ClassImp(AliUnicorEvent)
27 //=============================================================================
28 void AliUnicorEvent::RP(Double_t &qx, Double_t &qy, Int_t harmonic) const
30 // simplest flow vector
34 for (int i=0; i<NParticles(); i++) {
35 if (!ParticleGood(i,0)) continue;
36 double pt = ParticlePt(i);
37 if (pt>2.0) pt = 2.0; // from 2 GeV flow saturates anyway
38 qx += pt*cos(harmonic*ParticlePhi(i));
39 qy += pt*sin(harmonic*ParticlePhi(i));
42 //=============================================================================
43 Double_t AliUnicorEvent::ParticleEta(Int_t i) const
47 double the = ParticleTheta(i);
48 if (the<0.0001) return 10;
49 else if (the>TMath::Pi()-0.0001) return -10;
50 return -log(tan(the/2));
52 //=============================================================================
53 Double_t AliUnicorEvent::ParticleY(Int_t i, Double_t mass) const
57 double pp = ParticleP(i);
58 double ee = sqrt(fabs(mass*mass + pp*pp));
59 double pz = ParticlePz(i);
60 double yy = log((ee+pz)/(ee-pz))/2;
63 //=============================================================================