CbmSttPoint.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. // -------------------------------------------------------------------------
  2. // ----- CbmStsPoint header file -----
  3. // ----- Created 26/07/04 by V. Friese -----
  4. // -------------------------------------------------------------------------
  5. /** CbmStsPoint.h
  6. *@author V.Friese <v.friese@gsi.de>
  7. *
  8. * Interception of MC track with a STT detetcor. Holds in addition
  9. * to the base class the coordinates and momentum at the exit from
  10. * the active volume.
  11. **/
  12. #ifndef CBMSTTPOINT_H
  13. #define CBMSTTPOINT_H
  14. #include "TObject.h"
  15. #include "TVector3.h"
  16. #include "FairMCPoint.h"
  17. using namespace std;
  18. class CbmSttPoint : public FairMCPoint
  19. {
  20. public:
  21. /** Default constructor **/
  22. CbmSttPoint();
  23. /** Constructor with arguments
  24. *@param trackID Index of MCTrack
  25. *@param detID Detector ID
  26. *@param pos Coordinates at wire center of active volume [cm]
  27. *@param posInLocal Local coordinates at entrance to active volume [cm]
  28. *@param posOutLocal Local coordinates at exit of active volume [cm]
  29. *@param momIn Momentum of track at entrance [GeV]
  30. *@param momOut Momentum of track at exit [GeV]
  31. *@param tof Time since event start [ns]
  32. *@param length Track length since creation [cm]
  33. *@param eLoss Energy deposit [GeV]
  34. **/
  35. CbmSttPoint(Int_t trackID, Int_t detID, TVector3 pos,
  36. TVector3 posInLocal, TVector3 posOutLocal,
  37. TVector3 momIn, TVector3 momOut, TVector3 wireDir,
  38. Double_t tof, Double_t length, Double_t eLoss, Double_t mass, TVector3 postot); // da cancellare postot
  39. /** Copy constructor **/
  40. CbmSttPoint(const CbmSttPoint& point) { *this = point; };
  41. /** Destructor **/
  42. virtual ~CbmSttPoint();
  43. // da cancellare
  44. Double_t GetXtot() const { return fxtot; }
  45. Double_t GetYtot() const { return fytot; }
  46. Double_t GetZtot() const { return fztot; }
  47. void SetPositiontot(TVector3 postot);
  48. //////
  49. /** Accessors **/
  50. Double_t GetXOutLocal() const { return fX_out_local; }
  51. Double_t GetYOutLocal() const { return fY_out_local; }
  52. Double_t GetZOutLocal() const { return fZ_out_local; }
  53. Double_t GetXInLocal() const { return fX_in_local; }
  54. Double_t GetYInLocal() const { return fY_in_local; }
  55. Double_t GetZInLocal() const { return fZ_in_local; }
  56. Double_t GetPxOut() const { return fPx_out; }
  57. Double_t GetPyOut() const { return fPy_out; }
  58. Double_t GetPzOut() const { return fPz_out; }
  59. Double_t GetXWireDirection() const { return fX_wire_dir; }
  60. Double_t GetYWireDirection() const { return fY_wire_dir; }
  61. Double_t GetZWireDirection() const { return fZ_wire_dir; }
  62. Double_t GetMass() const {return fMass;}
  63. void PositionOutLocal(TVector3& pos) { pos.SetXYZ(fX_out_local,fY_out_local,fZ_out_local); }
  64. void PositionInLocal(TVector3& pos) { pos.SetXYZ(fX_in_local,fY_in_local,fZ_in_local); }
  65. void MomentumOut(TVector3& mom) { mom.SetXYZ(fPx_out,fPy_out,fPz_out); }
  66. void WireDirection(TVector3& wire) { wire.SetXYZ(fX_wire_dir, fY_wire_dir, fZ_wire_dir); }
  67. /** Modifiers **/
  68. void SetPositionOutLocal(TVector3 pos);
  69. void SetPositionInLocal(TVector3 pos);
  70. void SetMomentumOut(TVector3 mom);
  71. void SetWireDirection(TVector3 wire);
  72. /** Output to screen **/
  73. virtual void Print(const Option_t* opt) const;
  74. protected:
  75. // exit coordinates in straw frame
  76. Double32_t fX_out_local, fY_out_local, fZ_out_local;
  77. // entry coordinates in straw frame
  78. Double32_t fX_in_local, fY_in_local, fZ_in_local;
  79. Double32_t fPx_out, fPy_out, fPz_out;
  80. // wire direction
  81. Double32_t fX_wire_dir, fY_wire_dir, fZ_wire_dir;
  82. // stt1 - particle mass
  83. Double_t fMass;
  84. // da cancellare
  85. Double_t fxtot, fytot, fztot;
  86. //////
  87. ClassDef(CbmSttPoint,1)
  88. };
  89. inline void CbmSttPoint::SetPositionOutLocal(TVector3 pos) {
  90. fX_out_local = pos.X();
  91. fY_out_local = pos.Y();
  92. fZ_out_local = pos.Z();
  93. }
  94. inline void CbmSttPoint::SetPositionInLocal(TVector3 pos) {
  95. fX_in_local = pos.X();
  96. fY_in_local = pos.Y();
  97. fZ_in_local = pos.Z();
  98. }
  99. inline void CbmSttPoint::SetMomentumOut(TVector3 mom) {
  100. fPx_out = mom.Px();
  101. fPy_out = mom.Py();
  102. fPz_out = mom.Pz();
  103. }
  104. inline void CbmSttPoint::SetWireDirection(TVector3 wire) {
  105. fX_wire_dir = wire.Px();
  106. fY_wire_dir = wire.Py();
  107. fZ_wire_dir = wire.Pz();
  108. }
  109. // da cancellare
  110. inline void CbmSttPoint::SetPositiontot(TVector3 postot){
  111. fxtot = postot.X();
  112. fytot = postot.Y();
  113. fztot = postot.Z();
  114. }
  115. ////////
  116. #endif