/// @file AllPixTrackerSD.hh /// @brief Implementation of the Allpix tracker sensitive detector class. #ifndef AllPixTrackerSD_h #define AllPixTrackerSD_h 1 // Standard include statements. #include // GEANT4 include statements. #include "G4VSensitiveDetector.hh" #include "G4WrapperProcess.hh" #include "G4UnitsTable.hh" // Allpix include statements. #include "AllPixTrackerHit.hh" #include "Utils.h" using namespace std; using namespace Utils; // Forward declarations. class G4Step; class G4HCofThisEvent; class G4Event; class AllPixGeoDsc; #define MAX_CHAMBERS_EPIX 20 /// @brief The Allpix tracker sensitive detector class. class AllPixTrackerSD : public G4VSensitiveDetector { public: /// @brief The constructor (non-pixel detectors). AllPixTrackerSD(G4String, G4ThreeVector, G4ThreeVector, AllPixGeoDsc *, G4RotationMatrix *); /// @brief The constructor (non-pixel detectors). AllPixTrackerSD(G4String, G4ThreeVector, G4RotationMatrix *); /// @brief The destructor. ~AllPixTrackerSD(); void Initialize(G4HCofThisEvent*); G4bool ProcessHits(G4Step*, G4TouchableHistory*); void EndOfEvent(G4HCofThisEvent*); G4String GetHitsCollectionName(){ return m_thisHitsCollectionName; }; private: AllPixTrackerHitsCollection* hitsCollection; G4ThreeVector m_absolutePosOfWrapper; // Absolute position of Wrapper G4ThreeVector m_relativePosOfSD; // Relative (to Wrapper) position of SD G4RotationMatrix * m_rotationOfWrapper; // rotation of Wrapper /// @brief The detector geometry descriptions. AllPixGeoDsc * m_gD; G4String m_thisHitsCollectionName; bool m_thisIsAPixelDetector; /// @brief Used to dump tracking information in special cases. long m_globalTrackId_Dump; set m_hitsCollectionSet; };//end of the AllPixTrackerSD class definition. #endif