TpcDetector.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. //-----------------------------------------------------------
  2. // File and Version Information:
  3. // $Id$
  4. //
  5. // Description:
  6. // Detector class - sensitive detector for VMC
  7. //
  8. //
  9. // Environment:
  10. // Software developed for the PANDA Detector at FAIR.
  11. //
  12. // Author List:
  13. // Sebastian Neubert TUM (original author)
  14. //
  15. //
  16. //-----------------------------------------------------------
  17. #ifndef TPCDETECTOR_HH
  18. #define TPCDETECTOR_HH
  19. // Base Class Headers ----------------
  20. #include "FairDetector.h"
  21. // Collaborating Class Headers -------
  22. #include <ostream> // remove if you do not need streaming op
  23. #include "TVector3.h"
  24. #include "TGeoMedium.h"
  25. #include <map>
  26. using namespace std;
  27. // Collaborating Class Declarations --
  28. class TClonesArray;
  29. class FairVolume;
  30. class TpcPoint;
  31. class TpcDetector : public FairDetector {
  32. public:
  33. // Constructors/Destructors ---------
  34. /** Name : Detector Name
  35. Active: kTRUE for active detectors
  36. (ProcessHits() will be called)
  37. kFALSE for inactive detectors */
  38. TpcDetector(const char * Name, Bool_t Active);
  39. /** default constructor */
  40. TpcDetector();
  41. /** destructor */
  42. virtual ~TpcDetector();
  43. /** Initialization of the detector is done here */
  44. //virtual void Initialize();
  45. /** this method is called for each step
  46. during simulation (see FairMCApplication::Stepping()) */
  47. virtual Bool_t ProcessHits( FairVolume *v=0);
  48. /** Registers the produced collections in CBMRootManager. */
  49. virtual void Register();
  50. virtual void Print() const;
  51. /** Gets the produced collections */
  52. virtual TClonesArray* GetCollection(Int_t iColl) const ;
  53. /** has to be called after each event
  54. to reset the containers */
  55. virtual void Reset();
  56. /** Create the detector geometry */
  57. virtual void ConstructGeometry();
  58. // Construct the geometry from an ASCII geometry file
  59. virtual void ConstructAsciiGeometry();
  60. // Construct the geometry from a GDML geometry file
  61. virtual void ConstructGDMLGeometry();
  62. void ExpandNodeForGdml(TGeoNode* node);
  63. map<TString, TGeoMedium*> fFixedMedia; // List of media "repaired" after importing GMDL
  64. // Check whether a volume is sensitive.
  65. // The decision is based on the volume name. Only used in case
  66. // of GDML and ROOT geometry.
  67. // @param name Volume name
  68. // @value kTRUE if volume is sensitive, else kFALSE
  69. virtual Bool_t CheckIfSensitive(std::string name);
  70. void EndOfEvent();
  71. TpcPoint* AddHit(Int_t trackID, Int_t detID, TVector3 pos,
  72. TVector3 mom, Double_t time, Double_t length,
  73. Double_t eLoss);
  74. // Operators
  75. // Accessors -----------------------
  76. // Modifiers -----------------------
  77. // Operations ----------------------
  78. private:
  79. // Private Data Members ------------
  80. TClonesArray *fTpcPointCollection;
  81. // Private Methods -----------------
  82. public:
  83. ClassDef(TpcDetector,1)
  84. };
  85. #endif
  86. //--------------------------------------------------------------
  87. // $Log$
  88. //--------------------------------------------------------------