MpdEmc.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. #ifndef MPDEMCDET_H
  2. #define MPDEMCDET_H
  3. #include "FairDetector.h"
  4. #include "TVector3.h"
  5. #include "TLorentzVector.h"
  6. class MpdEmcPoint;
  7. class FairVolume;
  8. class TClonesArray;
  9. class MpdEmc: public FairDetector {
  10. public:
  11. /** Name : Detector Name
  12. * Active: kTRUE for active detectors (ProcessHits() will be called)
  13. * kFALSE for inactive detectors
  14. */
  15. MpdEmc(const char * Name, Bool_t Active);
  16. /** default constructor */
  17. MpdEmc();
  18. /** destructor */
  19. virtual ~MpdEmc();
  20. /** Initialization of the detector is done here */
  21. // virtual void Initialize();
  22. /** this method is called for each step during simulation
  23. * (see FairMCApplication::Stepping())
  24. */
  25. virtual Bool_t ProcessHits( FairVolume *v=0);
  26. /** Registers the produced collections in FAIRRootManager. */
  27. virtual void Register();
  28. /** Gets the produced collections */
  29. virtual TClonesArray* GetCollection(Int_t iColl) const ;
  30. /** has to be called after each event to reset the containers */
  31. virtual void Reset();
  32. /** Screen output of hit collection. */
  33. virtual void Print() const;
  34. /** Create the detector geometry */
  35. void ConstructGeometry();
  36. /** Create the detector geometry */
  37. void ConstructAsciiGeometry();
  38. /** Check sensitivity */
  39. virtual Bool_t CheckIfSensitive(std::string name);
  40. /** This method is an example of how to add your own point
  41. * of type MpdEmcPoint to the clones array
  42. */
  43. MpdEmcPoint* AddHit(Int_t trackID, Int_t detID,
  44. TVector3 pos, TVector3 mom,
  45. Double_t time, Double_t length,
  46. Double_t ELoss);
  47. /** The following methods can be implemented if you need to make
  48. * any optional action in your detector during the transport.
  49. */
  50. virtual void CopyClones( TClonesArray *cl1, TClonesArray *cl2 ,
  51. Int_t offset) {;}
  52. virtual void SetSpecialPhysicsCuts(){;}
  53. virtual void EndOfEvent();
  54. virtual void FinishPrimary(){;}
  55. virtual void FinishRun(){;}
  56. virtual void BeginPrimary(){;}
  57. virtual void PostTrack(){;}
  58. virtual void PreTrack(){;}
  59. virtual void BeginEvent(){;}
  60. private:
  61. /** Track information to be stored until the track leaves the
  62. active volume.
  63. */
  64. Int_t fTrackID; //! track index
  65. Int_t fVolumeID; //! volume id
  66. TLorentzVector fPos; //! position at entrance
  67. TLorentzVector fMom; //! momentum at entrance
  68. Double32_t fTime; //! time
  69. Double32_t fLength; //! length
  70. Double32_t fELoss; //! energy loss
  71. /** container for data points */
  72. TClonesArray *fMpdEmcPointCollection;
  73. ClassDef(MpdEmc,1)
  74. };
  75. #endif //MPDEMCDET_H