]>
Commit | Line | Data |
---|---|---|
621688e4 | 1 | /************************************************************************* |
2 | * Copyright(c) 1998-2048, 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 | // Author: Dariusz Miskowiec <mailto:d.miskowiec@gsi.de> 2007 | |
17 | ||
18 | //============================================================================= | |
19 | // parent class of all events; analyzers access data via this class | |
20 | //============================================================================= | |
21 | ||
22 | #include <TMath.h> | |
23 | #include "AliUnicorEvent.h" | |
24 | ||
25 | ClassImp(AliUnicorEvent) | |
26 | ||
27 | //============================================================================= | |
28 | void AliUnicorEvent::RP(Double_t &qx, Double_t &qy, Int_t harmonic) const | |
29 | { | |
30 | // simplest flow vector | |
31 | ||
32 | qx=0; | |
33 | qy=0; | |
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)); | |
40 | } | |
41 | } | |
42 | //============================================================================= | |
43 | Double_t AliUnicorEvent::ParticleEta(Int_t i) const | |
44 | { | |
45 | // pseudorapidity | |
46 | ||
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)); | |
51 | } | |
52 | //============================================================================= | |
53 | Double_t AliUnicorEvent::ParticleY(Int_t i, Double_t mass) const | |
54 | { | |
55 | // rapidity | |
56 | ||
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; | |
61 | return yy; | |
62 | } | |
63 | //============================================================================= | |
64 |