MpdSftHit.cxx 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //--------------------------------------------------------------------------
  2. //---- MpdSftHit ----
  3. //---- Created Everard Cordier 14/09/05 ----
  4. //---- Modified by D. Gonzalez-Diaz 06/09/06 ----
  5. //--------------------------------------------------------------------------
  6. #include <iostream>
  7. using namespace std;
  8. #include "MpdSftHit.h"
  9. // ----- Default constructor -------------------------------------------
  10. MpdSftHit::MpdSftHit()
  11. {
  12. fTime = 0.;
  13. fFlag = 1;
  14. }
  15. // ----- Standard constructor ------------------------------------------
  16. MpdSftHit::MpdSftHit(Int_t detID, TVector3 pos, TVector3 dpos, Int_t index, Double_t time, Int_t flag)
  17. : FairHit(detID, pos, dpos, index)
  18. {
  19. fTime = time;
  20. fFlag = flag;
  21. }
  22. // ----- Constructor without flag ------------------------------------------
  23. MpdSftHit::MpdSftHit(Int_t detID, TVector3 pos, TVector3 dpos, Int_t index, Double_t time)
  24. : FairHit(detID, pos, dpos, index)
  25. {
  26. fTime = time;
  27. }
  28. // ----- Destructor ----------------------------------------------------
  29. MpdSftHit::~MpdSftHit() { }
  30. // ----- Print -----------------------------------------------------------
  31. void MpdSftHit::Print(const Option_t* opt) const
  32. {
  33. cout << "-I- MpdSftHit" << endl;
  34. cout << " DetectorID: " << fDetectorID << endl;
  35. cout << " Position: (" << fX
  36. << ", " << fY
  37. << ", " << fZ << ") cm"
  38. << endl;
  39. cout << " Position error: (" << fDx
  40. << ", " << fDy
  41. << ", " << fDz << ") cm"
  42. << endl;
  43. cout << " Time: " << fTime << " ns"
  44. << endl;
  45. cout << " Flag: " << fFlag
  46. << endl;
  47. }
  48. // -------------------------------------------------------------------------
  49. ClassImp(MpdSftHit)