MpdTpcClusterFinderAZ.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. //-----------------------------------------------------------
  2. // File and Version Information:
  3. // $Id$
  4. //
  5. // Description:
  6. // TpcClusterFinderAZ reads in TPC digits and reconstructs clusters and hits
  7. //
  8. //
  9. // Environment:
  10. // Software developed for the MPD Detector at NICA.
  11. //
  12. // Author List:
  13. // Alexandr Zinchenko LHEP, JINR, Dubna - 14-July-2015
  14. //
  15. //-----------------------------------------------------------
  16. #ifndef MPDTPCCLUSTERFINDERAZ_HH
  17. #define MPDTPCCLUSTERFINDERAZ_HH
  18. // Base Class Headers ----------------
  19. #include "FairTask.h"
  20. #include <TVector3.h>
  21. #include <set>
  22. #include <map>
  23. // Collaborating Class Headers -------
  24. // Collaborating Class Declarations --
  25. class MpdTpc2dCluster;
  26. //class TpcGas;
  27. class MpdTpcSectorGeo;
  28. class TClonesArray;
  29. class MpdTpcClusterFinderAZ : public FairTask {
  30. public:
  31. // Constructors/Destructors ---------
  32. MpdTpcClusterFinderAZ();
  33. ~MpdTpcClusterFinderAZ();
  34. // Operators
  35. // Accessors -----------------------
  36. // Modifiers -----------------------
  37. void SetPersistence(Bool_t opt = kTRUE) { fPersistence = opt; }
  38. // Operations ----------------------
  39. virtual InitStatus Init();
  40. void FinishTask();
  41. virtual void Exec(Option_t* opt);
  42. //virtual void Clear(Option_t* opt);
  43. private:
  44. // Private Data Members ------------
  45. static const Int_t fgkNsec2 = 24; // number of readout sectors (12 * 2)
  46. static const Int_t fgkNpads = 128, fgkNtimes = 512; // max number of pads and time bins
  47. TClonesArray* fDigiArray;
  48. TClonesArray* fClusArray;
  49. TClonesArray* fHitArray;
  50. //TClonesArray** fPrimArray;
  51. std::set<Int_t>* fDigiSet[fgkNsec2];
  52. Double_t fCharges[fgkNpads][fgkNtimes];
  53. Int_t fFlags[fgkNpads][fgkNtimes];
  54. Int_t fDigis[fgkNpads][fgkNtimes];
  55. //TpcGas* fGas;
  56. Bool_t fPersistence;
  57. MpdTpcSectorGeo* fSecGeo;
  58. // Private Methods -----------------
  59. void ProcessPadrow(Int_t isec, Int_t irow); // process one padrow of a sector
  60. void NextPixel(MpdTpc2dCluster* clus, Int_t ipad, Int_t itime); // add next pixel to the cluster
  61. void FindHits(); // find hits
  62. void FindHitsLocMax(); // find hits (local maxima)
  63. void PeakAndValley(const MpdTpc2dCluster* clus, std::multimap<Double_t,Int_t> &localMax); // peak-and-valley
  64. void CorrectReco(TVector3 &p3loc, TVector3 &p3err, Int_t nPads, Double_t &adc); // correct reco charge, coordinates and errors
  65. ClassDef(MpdTpcClusterFinderAZ,1)
  66. };
  67. #endif
  68. //--------------------------------------------------------------
  69. // $Log$
  70. //--------------------------------------------------------------