CbmSttPoint.cxx 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // -------------------------------------------------------------------------
  2. // ----- CbmStsPoint source file -----
  3. // ----- Created 26/07/04 by V. Friese -----
  4. // -------------------------------------------------------------------------
  5. #include <iostream>
  6. #include "CbmSttPoint.h"
  7. // ----- Default constructor -------------------------------------------
  8. CbmSttPoint::CbmSttPoint() : FairMCPoint() {
  9. fX_in_local = fY_in_local = fZ_in_local = 0.;
  10. fX_out_local = fY_out_local = fZ_out_local = 0.;
  11. fPx_out = fPy_out = fPz_out = 0.;
  12. fX_wire_dir = fY_wire_dir = fZ_wire_dir = 0.;
  13. }
  14. // -------------------------------------------------------------------------
  15. // ----- Standard constructor ------------------------------------------
  16. CbmSttPoint::CbmSttPoint(Int_t trackID, Int_t detID, TVector3 pos,
  17. TVector3 posInLocal, TVector3 posOutLocal,
  18. TVector3 momIn, TVector3 momOut, TVector3 wireDir,
  19. Double_t tof, Double_t length, Double_t eLoss, Double_t mass, TVector3 postot) // da cancellare postot
  20. : FairMCPoint(trackID, detID, pos, momIn, tof, length, eLoss)
  21. {
  22. fX_out_local = posOutLocal.X();
  23. fY_out_local = posOutLocal.Y();
  24. fZ_out_local = posOutLocal.Z();
  25. fX_in_local = posInLocal.X();
  26. fY_in_local = posInLocal.Y();
  27. fZ_in_local = posInLocal.Z();
  28. fPx_out = momOut.Px();
  29. fPy_out = momOut.Py();
  30. fPz_out = momOut.Pz();
  31. fX_wire_dir = wireDir.X();
  32. fY_wire_dir = wireDir.Y();
  33. fZ_wire_dir = wireDir.Z();
  34. fMass = mass; // stt1
  35. // da cancellare
  36. fxtot = postot.X();
  37. fytot = postot.Y();
  38. fztot = postot.Z();
  39. /////
  40. }
  41. // -------------------------------------------------------------------------
  42. // ----- Destructor ----------------------------------------------------
  43. CbmSttPoint::~CbmSttPoint() { }
  44. // -------------------------------------------------------------------------
  45. // ----- Public method Print -------------------------------------------
  46. void CbmSttPoint::Print(const Option_t* opt) const {
  47. cout << "-I- CbmStsPoint: STS Point for track " << fTrackID
  48. << " in detector " << fDetectorID << endl;
  49. cout << " Position (" << fX << ", " << fY << ", " << fZ
  50. << ") cm" << endl;
  51. cout << " Momentum (" << fPx << ", " << fPy << ", " << fPz
  52. << ") GeV" << endl;
  53. cout << " Time " << fTime << " ns, Length " << fLength
  54. << " cm, Energy loss " << fELoss*1.0e06 << " keV" << endl;
  55. }
  56. // -------------------------------------------------------------------------
  57. ClassImp(CbmSttPoint)