OMSim
Geant4 for IceCube optical module studies
Loading...
Searching...
No Matches
OMSimDecaysAnalysis.hh
Go to the documentation of this file.
1
7#pragma once
8#include <G4ThreeVector.hh>
9#include <fstream>
10#include "G4AutoLock.hh"
11
17{
18 std::vector<G4long> eventId;
19 std::vector<G4String> isotopeName;
20 std::vector<G4double> decayTime;
21 std::vector<G4ThreeVector> decayPosition;
22};
23
29{
30public:
35 void appendDecay(G4String pParticleName, G4double pDecayTime, G4ThreeVector pDecayPosition);
36 void mergeDecayData();
37 void writeMultiplicity(G4double pTimeWindow);
40 void reset();
41
42private:
43 G4ThreadLocal static DecayStats *m_threadDecayStats;
44
45 static G4Mutex m_mutex;
46
47 static OMSimDecaysAnalysis* m_instance;
48 OMSimDecaysAnalysis() = default;
49 ~OMSimDecaysAnalysis() = default;
51 OMSimDecaysAnalysis &operator=(const OMSimDecaysAnalysis &) = delete;
52};
Singleton class responsible for managing, analysing, and saving decay-related data.
Definition OMSimDecaysAnalysis.hh:29
void appendDecay(G4String pParticleName, G4double pDecayTime, G4ThreeVector pDecayPosition)
Append decay information to internal data structures.
Definition OMSimDecaysAnalysis.cc:36
static OMSimDecaysAnalysis & getInstance()
Returns the instance of OMSimDecaysAnalysis (Singleton pattern).
Definition OMSimDecaysAnalysis.cc:15
void writeThreadHitInformation()
Write data of the hits to the output file.
Definition OMSimDecaysAnalysis.cc:108
void reset()
Resets (deletes) decay and hits data.
Definition OMSimDecaysAnalysis.cc:146
void writeThreadDecayInformation()
Write isotoped related data to the output file.
Definition OMSimDecaysAnalysis.cc:75
void writeMultiplicity(G4double pTimeWindow)
Calls calculateMultiplicity and writes the results to the output file.
Definition OMSimDecaysAnalysis.cc:53
A structure to store information about decays.
Definition OMSimDecaysAnalysis.hh:17
std::vector< G4ThreeVector > decayPosition
Global position of the decay.
Definition OMSimDecaysAnalysis.hh:21
std::vector< G4String > isotopeName
Isotope name and energy level.
Definition OMSimDecaysAnalysis.hh:19
std::vector< G4long > eventId
ID of the event.
Definition OMSimDecaysAnalysis.hh:18
std::vector< G4double > decayTime
Time of the decay after (possibly) randomising inside simulation time window.
Definition OMSimDecaysAnalysis.hh:20