qaParticleLight.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef QATOOLS_FORMAT_PARTICLE_LIGHT_H
  2. #define QATOOLS_FORMAT_PARTICLE_LIGHT_H
  3. #include <iostream>
  4. #include <Rtypes.h>
  5. #include <TMath.h>
  6. #include <qaParticle.h>
  7. class qaParticleLight
  8. {
  9. private:
  10. Float_t fPx;
  11. Float_t fPy;
  12. Float_t fPz;
  13. Float_t fE;
  14. Int_t fPdg;
  15. Int_t fCharge;
  16. public:
  17. qaParticleLight(/* args */);
  18. virtual ~qaParticleLight();
  19. virtual void SetParticle(Float_t _px, Float_t _py, Float_t _pz, Float_t _e, Int_t _pdg, Int_t _charge);
  20. virtual void SetParticle(qaParticle *const &_particle);
  21. virtual Float_t GetPx() const { return fPx; }
  22. virtual Float_t GetPy() const { return fPy; }
  23. virtual Float_t GetPz() const { return fPz; }
  24. virtual Float_t GetEnergy() const { return fE; }
  25. virtual Int_t GetPdg() const { return fPdg; }
  26. virtual Int_t GetCharge() const { return fCharge; }
  27. virtual Float_t GetPt() const { return TMath::Sqrt(TMath::Power(fPx, 2) + TMath::Power(fPy, 2)); }
  28. virtual Float_t GetP() const { return TMath::Sqrt(TMath::Power(fPx, 2) + TMath::Power(fPy, 2) + TMath::Power(fPz, 2)); }
  29. virtual Float_t GetEta() const { return 0.5 * TMath::Log((TMath::Sqrt(TMath::Power(fPx, 2) + TMath::Power(fPy, 2) + TMath::Power(fPz, 2)) + fPz) / (TMath::Sqrt(TMath::Power(fPx, 2) + TMath::Power(fPy, 2) + TMath::Power(fPz, 2)) - fPz)); }
  30. virtual Float_t GetRapidity() const { return 0.5 * TMath::Log((fE + fPz) / (fE - fPz)); }
  31. virtual Float_t GetPhi() const { return TMath::ATan2(fPy, fPx); }
  32. ClassDef(qaParticleLight, 0);
  33. };
  34. #endif