MpdEmcKI.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef MPDEMCKIDET_H
  2. #define MPDEMCKIDET_H
  3. #include "FairDetector.h"
  4. class MpdEmcPointKI;
  5. class FairVolume;
  6. class TClonesArray;
  7. class TVector3;
  8. class MpdEmcGeoUtils;
  9. class MpdEmcKI : public FairDetector
  10. {
  11. public:
  12. /** Name : Detector Name
  13. * Active: kTRUE for active detectors (ProcessHits() will be called)
  14. * kFALSE for inactive detectors
  15. */
  16. MpdEmcKI(const char* Name, Bool_t Active);
  17. /** default constructor */
  18. MpdEmcKI();
  19. /** destructor */
  20. virtual ~MpdEmcKI();
  21. /** Initialization of the detector is done here */
  22. // virtual void Initialize();
  23. /** this method is called for each step during simulation
  24. * (see FairMCApplication::Stepping())
  25. */
  26. virtual Bool_t ProcessHits(FairVolume* v = 0);
  27. /** Registers the produced collections in FAIRRootManager. */
  28. virtual void Register();
  29. /** Gets the produced collections */
  30. virtual TClonesArray* GetCollection(Int_t iColl) const;
  31. /** has to be called after each event to reset the containers */
  32. virtual void Reset();
  33. /**
  34. this is called at the end of an event
  35. */
  36. virtual void EndOfEvent();
  37. virtual void FinishEvent();
  38. /** Screen output of hit collection. */
  39. virtual void Print() const;
  40. /** Create the detector geometry */
  41. void ConstructGeometry();
  42. /** Create the detector geometry */
  43. void ConstructAsciiGeometry();
  44. /** Check sensitivity */
  45. virtual Bool_t CheckIfSensitive(std::string name);
  46. /** This method is an example of how to add your own point
  47. * of type MpdEmcPoint to the clones array
  48. */
  49. MpdEmcPointKI* AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length,
  50. Double_t ELoss);
  51. private:
  52. std::map<int, int> fSuperParents; //! map of current tracks to SuperParents: entered ECAL active volumes particles
  53. TClonesArray* fMpdEmcPointCollection; //! Collection of ECAL hits
  54. Int_t fNhits; //! Number of created so far hits
  55. Int_t fCurrentTrackID; //! current track Id
  56. Int_t fCurrentCellID; //! current cell Id
  57. Int_t fCurentSuperParent; //! current SuperParent ID: particle entered PHOS
  58. MpdEmcPointKI* fCurrentHit; //! current Hit
  59. MpdEmcGeoUtils* fGeom; //! pointer to GeoUtils
  60. Double_t fEcalRmin; //! inner and outer
  61. Double_t fEcalRmax; //! radii of ECAL (used for tracking)
  62. ClassDef(MpdEmcKI, 2)
  63. };
  64. #endif // MPDEMCDET_H