Loading...
Searching...
No Matches
LXeEventAction.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27/// \file optical/LXe/include/LXeEventAction.hh
28/// \brief Definition of the LXeEventAction class
29//
30
31#ifndef LXeEventAction_h
32#define LXeEventAction_h 1
33
34#include "LXeEventMessenger.hh"
35
36#include "globals.hh"
37#include "G4ThreeVector.hh"
38#include "G4UserEventAction.hh"
39
40class G4Event;
42
44{
45 public:
47 ~LXeEventAction() override;
48
49 void BeginOfEventAction(const G4Event*) override;
50 void EndOfEventAction(const G4Event*) override;
51
52 void SetEventVerbose(G4int v) { fVerbose = v; }
53
54 void SetPMTThreshold(G4int t) { fPMTThreshold = t; }
55
56 void SetForceDrawPhotons(G4bool b) { fForcedrawphotons = b; }
57 void SetForceDrawNoPhotons(G4bool b) { fForcenophotons = b; }
58
61 void IncEDep(G4double dep) { fTotE += dep; }
64 void IncHitCount(G4int i = 1) { fHitCount += i; }
65
66 void SetEWeightPos(const G4ThreeVector& p) { fEWeightPos = p; }
67 void SetReconPos(const G4ThreeVector& p) { fReconPos = p; }
68 void SetConvPos(const G4ThreeVector& p)
69 {
70 fConvPos = p;
71 fConvPosSet = true;
72 }
73 void SetPosMax(const G4ThreeVector& p, G4double edep)
74 {
75 fPosMax = p;
76 fEdepMax = edep;
77 }
78
79 G4int GetPhotonCount_Scint() const { return fPhotonCount_Scint; }
80 G4int GetPhotonCount_Ceren() const { return fPhotonCount_Ceren; }
81 G4int GetHitCount() const { return fHitCount; }
82 G4double GetEDep() const { return fTotE; }
83 G4int GetAbsorptionCount() const { return fAbsorptionCount; }
85
86 G4ThreeVector GetEWeightPos() { return fEWeightPos; }
87 G4ThreeVector GetReconPos() { return fReconPos; }
88 G4ThreeVector GetConvPos() { return fConvPos; }
89 G4ThreeVector GetPosMax() { return fPosMax; }
90 G4double GetEDepMax() { return fEdepMax; }
91 G4double IsConvPosSet() { return fConvPosSet; }
92
93 // Gets the total photon count produced
95
98
99 private:
102
103 G4int fScintCollID = -1;
104 G4int fPMTCollID = -1;
105
106 G4int fVerbose = 0;
107
108 G4int fPMTThreshold = 1;
109
110 G4bool fForcedrawphotons = false;
111 G4bool fForcenophotons = false;
112
113 G4int fHitCount = 0;
118
119 G4double fTotE = 0.;
120
121 // These only have meaning if totE > 0
122 // If totE = 0 then these won't be set by EndOfEventAction
123 G4ThreeVector fEWeightPos;
124 G4ThreeVector fReconPos; // Also relies on hitCount>0
125 G4ThreeVector fConvPos; // true (initial) converstion position
126 G4bool fConvPosSet = false;
127 G4ThreeVector fPosMax;
128 G4double fEdepMax = 0.;
129
131};
132
133#endif
Definition of the LXeEventMessenger class.
void IncHitCount(G4int i=1)
G4int GetPMTSAboveThreshold()
G4double GetEDep() const
G4double IsConvPosSet()
void IncPMTSAboveThreshold()
const LXeDetectorConstruction * fDetector
G4int GetPhotonCount_Scint() const
G4ThreeVector fConvPos
void SetReconPos(const G4ThreeVector &p)
void SetEventVerbose(G4int v)
~LXeEventAction() override
void EndOfEventAction(const G4Event *) override
void BeginOfEventAction(const G4Event *) override
G4ThreeVector GetReconPos()
G4ThreeVector fEWeightPos
G4ThreeVector fReconPos
void SetConvPos(const G4ThreeVector &p)
void IncPhotonCount_Scint()
G4int GetHitCount() const
void SetForceDrawNoPhotons(G4bool b)
void SetPMTThreshold(G4int t)
G4int GetBoundaryAbsorptionCount() const
G4ThreeVector GetPosMax()
void SetPosMax(const G4ThreeVector &p, G4double edep)
void IncPhotonCount_Ceren()
void SetEWeightPos(const G4ThreeVector &p)
G4double GetEDepMax()
void SetForceDrawPhotons(G4bool b)
void IncBoundaryAbsorption()
G4int GetAbsorptionCount() const
void IncEDep(G4double dep)
LXeEventMessenger * fEventMessenger
G4int GetPhotonCount_Ceren() const
G4ThreeVector fPosMax
G4ThreeVector GetEWeightPos()
G4ThreeVector GetConvPos()
G4int fBoundaryAbsorptionCount

Applications | User Support | Publications | Collaboration