TpcLheHit.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #ifndef LHE_HIT_H
  2. #define LHE_HIT_H
  3. // *************************************************************************
  4. // Author: Oleg Rogachevsky e-mail: rogach@sunhe.jinr.ru
  5. //
  6. // hit information for LHE
  7. //
  8. // Created: 1-07-07
  9. // Modified:
  10. //
  11. // *************************************************************************
  12. #include "TObject.h"
  13. #include "TClonesArray.h"
  14. #include "TVector3.h"
  15. #include "TpcPoint.h"
  16. class TpcLheTrack;
  17. class TpcLheHit : public TObject {
  18. private:
  19. TVector3 fCoord; // vector of hit coordinates
  20. TVector3 fError; // vector of errors on hit coordinates
  21. Int_t fHitNumber; // number of this hit in this event
  22. Int_t fTrackID; // track number to which this hit belongs to
  23. Int_t fRefIndex; // ref index on MC point
  24. Bool_t fUsed; // if the hit is assigned to a track
  25. Double_t fR; // hit radius
  26. Double_t fRphi; // hit R-Phi coordinate
  27. Int_t fFlag; // flag
  28. Int_t fLayer; // TPC layer
  29. Double_t fEdep; // energy deposit
  30. Double_t fStep; // step size
  31. public:
  32. TpcLheHit(); // default constructor
  33. TpcLheHit(TpcPoint *point); // constructor for data after hit finding
  34. TpcLheHit(Double_t *x, Int_t stn); // constructor which take an arbitrary point
  35. virtual ~TpcLheHit(); // destructor
  36. // getters
  37. TVector3 GetCoord() { return fCoord; }
  38. TVector3 GetError() { return fError; }
  39. Double_t GetX() const { return fCoord.X(); }
  40. Double_t GetY() const { return fCoord.Y(); }
  41. Double_t GetZ() const { return fCoord.Z(); }
  42. Double_t GetXerr() const { return fError.X(); }
  43. Double_t GetYerr() const { return fError.Y(); }
  44. Double_t GetZerr() const { return fError.Z(); }
  45. Double_t GetRphiErr() const { return 0.05; } //AZ 0.5 mm error in RPhi
  46. Double_t GetR() const { return fR; }
  47. Double_t GetRphi() const { return fRphi; }
  48. Int_t GetFlag() const { return fFlag; }
  49. Int_t GetLayer() const { return fLayer; }
  50. Double_t GetEdep() const { return fEdep; }
  51. Double_t GetStep() const { return fStep; }
  52. //TpcLheTrack *GetTrack(TClonesArray *tracks) const;
  53. Bool_t GetUsage() const { return fUsed; }
  54. Int_t GetHitNumber() const { return fHitNumber; }
  55. Int_t GetTrackID() const { return fTrackID; }
  56. Int_t GetRefIndex() const { return fRefIndex; }
  57. // setters
  58. void SetX(Double_t f) { fCoord.SetX(f); }
  59. void SetY(Double_t f) { fCoord.SetY(f); }
  60. void SetZ(Double_t f) { fCoord.SetZ(f); }
  61. void SetXerr(Double_t f) { fError.SetX(f); }
  62. void SetYerr(Double_t f) { fError.SetY(f); }
  63. void SetZerr(Double_t f) { fError.SetZ(f); }
  64. void SetR(Double_t f) { fR = f; }
  65. void SetRphi(Double_t f) { fRphi = f; }
  66. void SetFlag(Int_t f) { fFlag = f; }
  67. void SetLayer(Int_t f) { fLayer = f; }
  68. void SetEdep(Double_t edep) { fEdep = edep; }
  69. void SetStep(Double_t step) { fStep = step; }
  70. void SetUsage(Bool_t f) { fUsed = f; }
  71. void SetHitNumber(Int_t f) { fHitNumber = f; }
  72. void SetTrackID(Int_t f) { fTrackID = f; }
  73. void SetRefIndex(Int_t k) { fRefIndex = k; }
  74. void Print();
  75. Bool_t IsSortable() const { return kTRUE; }
  76. Int_t Compare(const TObject* hit) const; // "Compare" function for sorting
  77. ClassDef(TpcLheHit, 1) //
  78. };
  79. #endif