MpdEmcClusterCreation.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. // -------------------------------------------------------------------------
  2. // ----- MpdEmcClusterCreator header file -----
  3. // -------------------------------------------------------------------------
  4. #ifndef MPDEMCCLUSTERCREATION_H
  5. #define MPDEMCCLUSTERCREATION_H 1
  6. #include <iostream>
  7. #include "FairTask.h"
  8. #include "MpdEmcGeoParams.h"
  9. class TClonesArray;
  10. class MpdEmcClusterCreation : public FairTask {
  11. public:
  12. /** Default constructor **/
  13. MpdEmcClusterCreation();
  14. /** Destructor **/
  15. ~MpdEmcClusterCreation();
  16. /** Virtual method Init **/
  17. virtual InitStatus Init();
  18. /** Virtual method Exec **/
  19. virtual void Exec(Option_t* opt);
  20. void virtual Finish();
  21. // Search relative module of the central hit inside frame with sides rowFrame and modFrame
  22. void SearchFrameHits(UInt_t row, UInt_t mod, vector<UInt_t> &relHits);
  23. // Search relative module of the central hit with row/mod position
  24. void SearchRelativeHits(UInt_t row, UInt_t mod, vector<Int_t> &relHits);
  25. // Set algorithm number (1 - search cluster by radius; 2 - search cluster by surrounding modules)
  26. void SetAlgorithmNumber(UInt_t algo) {
  27. algoIndex = algo;
  28. }
  29. // Set threshold for each hit
  30. void SetEnergyThreshold(Float_t fEnMin) {
  31. fEnergyThreshold = fEnMin;
  32. };
  33. // Set max radius for each cluster
  34. void SetMaxClusterRadius(Float_t fRad) {
  35. fMaxClusterRadius = fRad;
  36. };
  37. // Set frame to search cluster candidates
  38. void SetClusterFrame(Float_t row, Float_t mod) {
  39. rowFrame = row; modFrame = mod;
  40. };
  41. Float_t GetEnergyThreshold() {
  42. return fEnergyThreshold;
  43. };
  44. Float_t GetMaxClusterRadius() {
  45. return fMaxClusterRadius;
  46. };
  47. private:
  48. /** Input array of MpdEmcHit **/
  49. TClonesArray* fHitArray;
  50. /** Input array of MCTracks **/
  51. TClonesArray* fMcTrackArray;
  52. /** Output array of MpdEmcCluster **/
  53. TClonesArray* fClusterArray;
  54. Float_t fEnergyThreshold; // Energy threshold for each module
  55. UInt_t algoIndex; // Algorithm ID
  56. // First method variable
  57. Float_t fMaxClusterRadius; // Maximal radius of cluster
  58. // Second method variables
  59. UInt_t rowFrame; // row window to search cluster candidates
  60. UInt_t modFrame; // tower (z) window to search cluster candidates
  61. MpdEmcGeoParams* fGeoPar;
  62. ClassDef(MpdEmcClusterCreation, 2);
  63. };
  64. #endif