MpdTpcPeak.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // Class that holds TPC Pad Peak information.
  2. //
  3. // Original author: Jonathan Paley 05/13/06 jpaley@indiana.edu
  4. // Edited by Artem Basalaev 03/18/13
  5. #ifndef MPDTPCPEAK_H
  6. #define MPDTPCPEAK_H
  7. #include <iostream>
  8. #include <iomanip>
  9. #include "TObject.h"
  10. #include "TRef.h"
  11. #include "MpdTpc2dCluster.h"
  12. class MpdTpcPeak : public TObject
  13. {
  14. public:
  15. MpdTpcPeak();
  16. MpdTpcPeak(Int_t col, Float_t ptime, Float_t integ, Float_t chi2);
  17. MpdTpcPeak(const MpdTpcPeak& peak);
  18. ~MpdTpcPeak();
  19. public:
  20. const MpdTpc2dCluster* Cluster () const {
  21. //return dynamic_cast<const MpdTpc2dCluster*>(fCluster.GetObject());
  22. return fCluster;
  23. }
  24. void AttachCluster(const MpdTpc2dCluster*);
  25. const Int_t Row () const {return this->Cluster()->Row(); }
  26. const Int_t Col () const {return fCol; }
  27. const Int_t BktOff () const {return fBktOff;}
  28. const Int_t NSamples () const {return (Int_t)fADC.size();}
  29. const Float_t Sample(Int_t i) const {return fADC[i];}
  30. const Float_t PeakTime () const {return fPeakTime;}
  31. const Float_t Integral () const {return fIntegral;}
  32. const Float_t IntegSig () const {return fIntegSig;}
  33. const Float_t Chi2 () const {return fChi2;}
  34. const Float_t Max () const {return fMaxADC;}
  35. const Int_t MaxAdcCol () const {return fMaxAdcCol;}
  36. const Int_t MaxAdcBkt () const {return fMaxAdcBkt;}
  37. const Float_t Min () const {return fMinADC;}
  38. const Int_t GetOrigin () const {return fOrigin;}
  39. const Float_t Mean ();
  40. const Float_t SigMean ();
  41. const Float_t SumADC ();
  42. void Insert (Float_t val, Int_t col, Int_t bkt);
  43. void Remove (UInt_t val);
  44. void SetCol (Int_t val) {fCol = val;}
  45. void SetBktOff (Int_t val) {fBktOff = val;}
  46. void SetPeakTime (Float_t val) {fPeakTime = val;}
  47. void SetIntegral (Float_t val) {fIntegral = val;}
  48. void SetIntegSig (Float_t val) {fIntegSig = val;}
  49. void SetChi2 (Float_t val) {fChi2 = val;}
  50. void SetOrigin (Int_t Origin) {fOrigin = Origin;}
  51. void Clear();
  52. private:
  53. Int_t fCol;
  54. Int_t fBktOff;
  55. std::vector<Float_t> fADC;
  56. Float_t fPeakTime;
  57. Float_t fIntegral;
  58. Float_t fIntegSig;
  59. Float_t fChi2;
  60. Float_t fMean;
  61. Float_t fSigMean;
  62. Float_t fSumADC;
  63. Float_t fMaxADC;
  64. Float_t fMinADC;
  65. Int_t fMaxAdcCol;
  66. Int_t fMaxAdcBkt;
  67. Int_t fOrigin;
  68. //TRef fCluster; // pointer to the cluster from which hit was formed
  69. const MpdTpc2dCluster* fCluster; // pointer to the cluster from which hit was formed
  70. ClassDef(MpdTpcPeak, 1)
  71. };
  72. #endif // TPCRPADPEAK