BmnRoot
Loading...
Searching...
No Matches
BmnParticleStore.h
Go to the documentation of this file.
1#ifndef BMNPARTICLESTORE_H
2#define BMNPARTICLESTORE_H 1
3
4#include <TNamed.h>
5#include <TMath.h>
6#include <TVector3.h>
7
8using namespace TMath;
9
10class BmnParticleStore : public TNamed {
11public:
12
14 BmnParticleStore(Int_t, Double_t, Double_t, Double_t);
15
17
18 Double_t GetP() {
19 return fP;
20 }
21
22 Double_t GetTx() {
23 return fTx;
24 }
25
26 Double_t GetTy() {
27 return fTy;
28 }
29
30 Double_t GetEta() {
31 Double_t Pz = fP / TMath::Sqrt(1 + fTx * fTx + fTy * fTy);
32 return 0.5 * TMath::Log((fP + Pz) / (fP - Pz));
33 }
34
35 Double_t GetPhi() {
36 Double_t Pz = fP / TMath::Sqrt(1 + fTx * fTx + fTy * fTy);
37 TVector3 tmp(fTx * Pz, fTy * Pz, Pz);
38 return tmp.Phi() * TMath::RadToDeg() + 180.;
39 }
40
41 Int_t GetPdg() {
42 return fPdg;
43 }
44
45private:
46 Double_t fP;
47 Double_t fTx;
48 Double_t fTy;
49
50 Int_t fPdg;
51
52 ClassDef(BmnParticleStore, 1)
53};
54
55#endif
56
57