17#include <G4ThreeVector.hh> 
   19#include <G4AutoLock.hh> 
   20#include <G4Threading.hh> 
   71        G4double pTrackLength,
 
   74        G4ThreeVector pMomentumDirection,
 
   75        G4ThreeVector pGlobalPos,
 
   76        G4ThreeVector pLocalPos,
 
   79        G4int pModuleIndex = 0);
 
   82    std::vector<double> 
countMergedHits(
int pModuleIndex = 0, 
bool pDEweight = 
false);
 
   86    bool areThereHitsInModuleSingleThread(
int pModuleIndex = 0);
 
   89    G4int getNextDetectorIndex() { 
return ++m_currentIndex; }
 
   90    G4int getNumberOfModules() { 
return m_currentIndex + 1; }
 
   92    void mergeThreadData();
 
   99    static G4Mutex m_mutex;
 
  103        std::map<G4int, HitStats> moduleHits;
 
 
 
Simulation of PMT response.
 
Manages detected photon information.
Definition OMSimHitManager.hh:56
 
void reset()
Deletes hit information in memory for all modules.
Definition OMSimHitManager.cc:188
 
std::vector< int > calculateMultiplicity(const G4double pTimeWindow, int pModuleNumber=0)
Calculates the multiplicity of hits within a specified time window for a given module.
Definition OMSimHitManager.cc:274
 
std::map< G4int, HitStats > m_moduleHits
Map of a HitStats containing hit information for each simulated optical module.
Definition OMSimHitManager.hh:94
 
HitStats getSingleThreadHitsOfModule(int pModuleIndex=0)
Retrieves the HitStats structure for the specified module of single thread.
Definition OMSimHitManager.cc:172
 
void sortHitStatsByTime(HitStats &pHits)
Sorts the hit statistics by the hit time.
Definition OMSimHitManager.cc:230
 
std::map< G4int, G4int > m_numberOfPMTs
Map of number of PMTs in the used optical modules.
Definition OMSimHitManager.hh:97
 
std::vector< double > countMergedHits(int pModuleIndex=0, bool pDEweight=false)
Counts hits for a specified module.
Definition OMSimHitManager.cc:209
 
static OMSimHitManager & getInstance()
Definition OMSimHitManager.cc:44
 
void appendHitInfo(G4int p_eventid, G4double pGlobalTime, G4double pLocalTime, G4double pTrackLength, G4double pEnergy, G4int pPMTHitNumber, G4ThreeVector pMomentumDirection, G4ThreeVector pGlobalPos, G4ThreeVector pLocalPos, G4double pDistance, OMSimPMTResponse::PMTPulse pResponse, G4int pModuleIndex=0)
Appends hit information for a detected photon to the corresponding module's hit data.
Definition OMSimHitManager.cc:99
 
void setNumberOfPMTs(int pNumberOfPMTs, int pModuleIndex=0)
Stores the number of PMTs in a module for correct data handling.
Definition OMSimHitManager.cc:148
 
static void init()
Initializes the global instance of OMSimHitManager.
Definition OMSimHitManager.cc:23
 
static void shutdown()
Deletes the global instance of OMSimHitManager.
Definition OMSimHitManager.cc:33
 
HitStats getMergedHitsOfModule(int pModuleIndex=0)
Retrieves the HitStats structure for the specified module, should be called after data between thread...
Definition OMSimHitManager.cc:159
 
A structure of vectors to store information about detected photons.
Definition OMSimHitManager.hh:28
 
std::vector< G4double > flightTime
Photon flight time.
Definition OMSimHitManager.hh:31
 
std::vector< G4ThreeVector > direction
Momentum direction of the photon at the time of detection.
Definition OMSimHitManager.hh:35
 
std::vector< OMSimPMTResponse::PMTPulse > PMTresponse
PMT's response to the detected photon, encapsulated as a PMTPulse.
Definition OMSimHitManager.hh:39
 
std::vector< G4double > energy
Energy of the detected photon.
Definition OMSimHitManager.hh:33
 
std::vector< G4long > eventId
ID of the event.
Definition OMSimHitManager.hh:29
 
std::vector< G4ThreeVector > globalPosition
Global position of the detected photon.
Definition OMSimHitManager.hh:37
 
std::vector< G4ThreeVector > localPosition
Local position of the detected photon within the PMT.
Definition OMSimHitManager.hh:36
 
std::vector< G4double > hitTime
Time of detection.
Definition OMSimHitManager.hh:30
 
std::vector< G4double > generationDetectionDistance
Distance between generation and detection of photon.
Definition OMSimHitManager.hh:38
 
std::vector< G4double > pathLenght
Length of the photon's path before hitting.
Definition OMSimHitManager.hh:32
 
std::vector< G4int > PMTnr
ID of the PMT that detected the photon.
Definition OMSimHitManager.hh:34
 
Definition OMSimHitManager.hh:102
 
Represents the output pulse for a detected photon.
Definition OMSimPMTResponse.hh:29