]>
Commit | Line | Data |
---|---|---|
7148817a | 1 | // Author: Dariusz Miskowiec <mailto:d.miskowiec@gsi.de> 2007 |
2 | ||
3 | //============================================================================= | |
4 | // parent class of all events; analyzers access data via this class | |
5 | //============================================================================= | |
6 | ||
7 | #include <TObject.h> | |
5a6d201c | 8 | #include <TMath.h> |
7148817a | 9 | #include "AliDEvent.h" |
10 | ||
11 | ClassImp(AliDEvent) | |
12 | ||
13 | //============================================================================= | |
14 | void AliDEvent::RP(Double_t &qx, Double_t &qy, Int_t harmonic) const | |
15 | { | |
16 | // simplest flow vector | |
17 | ||
18 | qx=0; | |
19 | qy=0; | |
20 | for (int i=0; i<NParticles(); i++) { | |
21 | if (!ParticleGood(i,0)) continue; | |
22 | double pt = ParticlePt(i); | |
23 | if (pt>2.0) pt = 2.0; // from 2 GeV flow saturates anyway | |
24 | qx += pt*cos(harmonic*ParticlePhi(i)); | |
25 | qy += pt*sin(harmonic*ParticlePhi(i)); | |
26 | } | |
27 | } | |
28 | //============================================================================= | |
29 | Double_t AliDEvent::ParticleEta(Int_t i) const | |
30 | { | |
31 | // pseudorapidity | |
32 | ||
33 | double the = ParticleTheta(i); | |
34 | if (the<0.0001) return 10; | |
35 | else if (the>TMath::Pi()-0.0001) return -10; | |
5a6d201c | 36 | return -log(tan(the/2)); |
7148817a | 37 | } |
38 | //============================================================================= | |
39 | Double_t AliDEvent::ParticleY(Int_t i, Double_t mass) const | |
40 | { | |
41 | // rapidity | |
42 | ||
43 | double pp = ParticleP(i); | |
5a6d201c | 44 | double ee = sqrt(fabs(mass*mass + pp*pp)); |
7148817a | 45 | double pz = ParticlePz(i); |
46 | double yy = log((ee+pz)/(ee-pz))/2; | |
47 | return yy; | |
48 | } | |
49 | //============================================================================= | |
7148817a | 50 |