MpdEmcClusterFinderAZ.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. //-----------------------------------------------------------
  2. // File and Version Information:
  3. // $Id$
  4. //
  5. // Description:
  6. // EmcClusterFinderAZ reads in EMC digits and reconstructs clusters
  7. //
  8. //
  9. // Environment:
  10. // Software developed for the MPD Detector at NICA.
  11. //
  12. // Author List:
  13. // Alexandr Zinchenko LHEP, JINR, Dubna - 18-May-2016
  14. // Alexandr Zinchenko LHEP, JINR, Dubna - 24-June-2018 - adapted for projective geometry
  15. //
  16. //-----------------------------------------------------------
  17. #ifndef MPDEMCCLUSTERFINDERAZ_HH
  18. #define MPDEMCCLUSTERFINDERAZ_HH
  19. // Base Class Headers ----------------
  20. #include "FairTask.h"
  21. #include <TVector3.h>
  22. #include <set>
  23. #include <map>
  24. // Collaborating Class Headers -------
  25. // Collaborating Class Declarations --
  26. class MpdTpc2dCluster;
  27. class MpdEmcGeoParams;
  28. class TClonesArray;
  29. class MpdEmcClusterFinderAZ : public FairTask {
  30. public:
  31. // Constructors/Destructors ---------
  32. MpdEmcClusterFinderAZ();
  33. ~MpdEmcClusterFinderAZ();
  34. // Operators
  35. // Accessors -----------------------
  36. // Modifiers -----------------------
  37. void SetPersistence(Bool_t opt = kTRUE) { fPersistence = opt; }
  38. void SetThreshold(Double_t thresh) { fThresh = thresh; }
  39. void SetTimeWindow(Int_t iwind = 1) { fTimeWindow = iwind; }
  40. // Operations ----------------------
  41. virtual InitStatus Init();
  42. void FinishTask();
  43. virtual void Exec(Option_t* opt);
  44. //virtual void Clear(Option_t* opt);
  45. private:
  46. TClonesArray* fDigiArray;
  47. TClonesArray* fClusArray;
  48. TClonesArray* fHitArray;
  49. TClonesArray* fMcTrArray;
  50. //TClonesArray** fPrimArray;
  51. /*
  52. std::set<Int_t>* fDigiSet[fgkNsec2];
  53. Double_t fCharges[fgkNpads][fgkNtimes];
  54. Int_t fFlags[fgkNpads][fgkNtimes];
  55. Int_t fDigis[fgkNpads][fgkNtimes];
  56. */
  57. std::vector<std::set<Int_t> > fDigiSet;
  58. std::vector<std::vector<Double_t> > fCharges;
  59. std::vector<std::vector<Int_t> > fFlags, fDigis;
  60. std::vector<Int_t> fSecRows0;
  61. std::set<Int_t> fSecRows1;
  62. Bool_t fPersistence;
  63. MpdEmcGeoParams* fEmcGeo;
  64. Float_t fThresh;
  65. Int_t fTimeWindow;
  66. // Private Methods -----------------
  67. void FillEmcInfo(); // fill EMC info
  68. void ProcessSector(Int_t isec); // process one sector
  69. void NextPixel(MpdTpc2dCluster* clus, Int_t iphi, Int_t iz); // add next pixel to the cluster
  70. void FindHits(); // find hits
  71. void GetPhiTheta(Double_t &phi, Double_t &theta); // convert COG in bin units to angles
  72. void FindHitsLocMax(); // find hits (local maxima)
  73. void PeakAndValley(const MpdTpc2dCluster* clus, std::multimap<Double_t,Int_t> &localMax, Int_t ishift); // peak-and-valley
  74. void RedoId(std::map<Int_t,Float_t>& contrib); // recompute ID contributions (for tracks born outside EMC)
  75. ClassDef(MpdEmcClusterFinderAZ,1)
  76. };
  77. #endif
  78. //--------------------------------------------------------------
  79. // $Log$
  80. //--------------------------------------------------------------