MpdMcord.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * MpdMcord.h
  3. *
  4. * Created on: 20 maj 2019
  5. * Author: Daniel Wielanek
  6. * E-mail: daniel.wielanek@gmail.com
  7. * Warsaw University of Technology, Faculty of Physics
  8. */
  9. #ifndef MCORD_MCORD_MPDMCORD_H_
  10. #define MCORD_MCORD_MPDMCORD_H_
  11. #include "TClonesArray.h"
  12. #include "TLorentzVector.h"
  13. #include "TVector3.h"
  14. #include "FairDetector.h"
  15. class MpdMCordHit;
  16. class FairVolume;
  17. class MpdMcordGeo;
  18. class MpdMcordPoint;
  19. class MpdMcord : public FairDetector{
  20. Int_t fTrackID; //! track index
  21. Int_t fVolumeID; //! volume id
  22. TLorentzVector fPos; //! position
  23. TLorentzVector fMom; //! momentum
  24. Double_t fTime; //! time
  25. Double_t fLength; //! length
  26. Double_t fELoss; //! energy loss
  27. public:
  28. MpdMcord();
  29. MpdMcord(const char* name, Bool_t active);
  30. virtual ~MpdMcord();
  31. // Defines the action to be taken when a step is inside the
  32. // active volume. Creates MpdStsPoints and adds them to the collection.
  33. // @param vol Pointer to the active volume
  34. virtual Bool_t ProcessHits(FairVolume* vol = 0);
  35. // If verbosity level is set, print hit collection at the
  36. // end of the event and resets it afterwards.
  37. virtual void EndOfEvent();
  38. // Registers the hit collection in the ROOT manager.
  39. virtual void Register();
  40. // Accessor to the hit collection
  41. virtual TClonesArray* GetCollection(Int_t iColl) const;
  42. // Screen output of hit collection.
  43. virtual void Print() const;
  44. // Clears the hit collection
  45. virtual void Reset();
  46. // *@param cl1 Origin
  47. // *@param cl2 Target
  48. // *@param offset Index offset
  49. virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset);
  50. // Constructs the STS geometry
  51. virtual void ConstructGeometry();
  52. virtual Bool_t CheckIfSensitive(std::string name);
  53. MpdMcordPoint* AddHit(Int_t trackID, Int_t detId, TVector3 pos, TVector3 mom, Double_t time,
  54. Double_t lenght, Double_t eloss);
  55. ClassDef(MpdMcord,1)
  56. private:
  57. TClonesArray *fPointCollection;
  58. static MpdMcordGeo *fgGeo;
  59. };
  60. #endif /* MCORD_MCORD_MPDMCORD_H_ */