/// @file AllPixLETCalculatorDigit.hh /// @brief Header file for the LET calculator digitizer. #ifndef AllPixLETCalculatorDigit_h #define AllPixLETCalculatorDigit_h 1 // GEANT4 include statements. #include "G4TDigiCollection.hh" #include "G4Allocator.hh" #include "G4ThreeVector.hh" // Allpix include statements. #include "AllPixDigitInterface.hh" /// @brief Digit AllPixLETCalculator class. /// /// @author J. Idarraga (principle author - idarraga@cern.ch) /// @author Mathieu Benoit (benoit@lal.in2p3.fr) /// @author T. Whyntie (editor for CERN\@school - t.whyntie@qmul.ac.uk) class AllPixLETCalculatorDigit : public AllPixDigitInterface { public: AllPixLETCalculatorDigit(); ~AllPixLETCalculatorDigit(); AllPixLETCalculatorDigit(const AllPixLETCalculatorDigit&); const AllPixLETCalculatorDigit& operator=(const AllPixLETCalculatorDigit&); int operator==(const AllPixLETCalculatorDigit&) const; inline void* operator new(size_t); inline void operator delete(void*); void Draw(); void Print(); private: G4int pixelIDX; G4int pixelIDY; G4int pixelCounts; G4double pixelEnergyDep; // MC // Corrected MC charge (detector effects included, at Digi step) G4ThreeVector primaryVertex; public: inline void SetPixelIDX(G4int pidX) {pixelIDX = pidX;}; inline void SetPixelIDY(G4int pidY) {pixelIDY = pidY;}; inline void SetPixelCounts(G4int pc) {pixelCounts = pc;}; inline void SetPixelEnergyDep(G4double ed) {pixelEnergyDep = ed;}; // MC // Corrected MC charge (detector effects included, at Digi step) inline void SetPrimaryVertex(G4ThreeVector pv) {primaryVertex = pv;}; // MC vertex // inline void IncreasePixelCounts() {pixelCounts++;}; inline G4int GetPixelIDX() {return pixelIDX;}; inline G4int GetPixelIDY() {return pixelIDY;}; inline G4int GetPixelCounts() {return pixelCounts;}; inline G4double GetPixelEnergyDep() {return pixelEnergyDep;}; // MC // inline G4ThreeVector GetPrimaryVertex() {return primaryVertex;}; // MC // };// end of AllPixLETCalculatorDigit class definition. /// @brief Digi collection for the LET calculator digitizer. typedef G4TDigiCollection AllPixLETCalculatorDigitsCollection; /// @brief Digi allocator for the LET calculator digitizer. extern G4Allocator AllPixLETCalculatorDigitAllocator; inline void* AllPixLETCalculatorDigit::operator new(size_t) { void* aDigi; aDigi = (void*) AllPixLETCalculatorDigitAllocator.MallocSingle(); return aDigi; } inline void AllPixLETCalculatorDigit::operator delete(void* aDigi) { AllPixLETCalculatorDigitAllocator.FreeSingle((AllPixLETCalculatorDigit*) aDigi); } #endif