MpdFfdPoint.cxx 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //------------------------------------------------------------------------------------------------------------------------
  2. /// \class MpdFfdPoint
  3. ///
  4. /// \brief
  5. /// \author Sergei Lobastov (LHE, JINR, Dubna)
  6. //------------------------------------------------------------------------------------------------------------------------
  7. #include <iostream>
  8. #include "MpdFfdPoint.h"
  9. using namespace std;
  10. ClassImp(MpdFfdPoint)
  11. MpdFfdPoint::FFDPointMode MpdFfdPoint::fCurrentMode = FFDPointMode::kPhotoElectron;
  12. //------------------------------------------------------------------------------------------------------------------------
  13. MpdFfdPoint::MpdFfdPoint() : FairMCPoint() { }
  14. //------------------------------------------------------------------------------------------------------------------------
  15. MpdFfdPoint::MpdFfdPoint(Int_t tid, Int_t suid)
  16. : FairMCPoint(tid, suid, TVector3(), TVector3(), 0., 0., 0.)
  17. {
  18. fMode = fCurrentMode;
  19. }
  20. //------------------------------------------------------------------------------------------------------------------------
  21. MpdFfdPoint::~MpdFfdPoint()
  22. {
  23. fData.clear();
  24. }
  25. //------------------------------------------------------------------------------------------------------------------------
  26. void MpdFfdPoint::SaveParentTrackParams(const TVector3& posIn, const TVector3& posOut, const TLorentzVector& P, Double_t time, Double_t length)
  27. {
  28. SetPosition(posIn);
  29. fPositionOut = posOut;
  30. SetMomentum(P.Vect());
  31. SetTime(time);
  32. SetLength(length);
  33. fBeta = P.Beta();
  34. isClosed = true;
  35. }
  36. //------------------------------------------------------------------------------------------------------------------------
  37. void MpdFfdPoint::Print(const Option_t* opt) const
  38. {
  39. double step = (fPositionOut - TVector3(fX, fY, fZ)).Mag();
  40. if(opt) cout<<opt;
  41. cout <<"\n-I- MpdFfdPoint("<<isClosed<<"): tid="<<fTrackID<< ", suid="<<fDetectorID<<", mode="<<fMode
  42. <<", posIn=("<<fX<<", "<<fY<<", "<<fZ<<") cm, posOut=("<<fPositionOut.X()<<", "<<fPositionOut.Y()<<", "<<fPositionOut.Z()
  43. <<") cm, time="<<fTime<<" ns, trackLength="<<fLength<<" cm, quartzStep="<<step<<", beta="<<fBeta<<" " <<this;
  44. if(step>0.) cout<<", Nmb per 1cm ="<<fData.size()/step;
  45. }
  46. //------------------------------------------------------------------------------------------------------------------------