aboutsummaryrefslogtreecommitdiffstats
path: root/src/G4BeamTestSiSD.cxx
diff options
context:
space:
mode:
authorshivesh <s.p.mandalia@qmul.ac.uk>2019-08-02 22:46:21 +0100
committershivesh <s.p.mandalia@qmul.ac.uk>2019-08-02 22:46:21 +0100
commitba4dd395d1f163983f7102ff9a6c513cfe17912e (patch)
treed92e207a2e743dd7628cc7bc6397a34d081eafbf /src/G4BeamTestSiSD.cxx
parentd0533d03d0c85f2f993f1793a6b9ea2af3391207 (diff)
downloadG4BeamTest-ba4dd395d1f163983f7102ff9a6c513cfe17912e.tar.gz
G4BeamTest-ba4dd395d1f163983f7102ff9a6c513cfe17912e.zip
Fri 2 Aug 22:46:21 BST 2019
Diffstat (limited to 'src/G4BeamTestSiSD.cxx')
-rw-r--r--src/G4BeamTestSiSD.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/G4BeamTestSiSD.cxx b/src/G4BeamTestSiSD.cxx
index b67092b..afa6bf8 100644
--- a/src/G4BeamTestSiSD.cxx
+++ b/src/G4BeamTestSiSD.cxx
@@ -45,6 +45,7 @@ void G4BeamTestSiSD::Initialize(G4HCofThisEvent* hce)
G4int hcID
= G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
+ G4cout << "hcID " << hcID << G4endl;
hce->AddHitsCollection( hcID, fHitsCollection );
}
@@ -61,11 +62,25 @@ G4bool G4BeamTestSiSD::ProcessHits(G4Step* aStep,
/* G4cout << " Particle_name = " << name << G4endl; */
if (name == "opticalphoton" || name == "gamma") {
-/* G4cout << " Particle_name = " << name << G4endl; */
+ // G4cout << " Particle_name = " << name << G4endl;
+// total energy
+ G4double etot = aStep->GetTrack()->GetTotalEnergy();
// energy deposit
G4double edep = aStep->GetTotalEnergyDeposit();
+ if (etot < 2.26 * CLHEP::eV) { // Lower threshold of PMT - 550nm
+ // if (etot < 2.48 * CLHEP::eV) { // Lower threshold of PMT - 500nm
+ // G4cout << "particle " << name << " under threshold with energy " << etot << G4endl;
+ return true;
+ }
+ if (etot > 3.55 * CLHEP::eV) { // Upper threshold of PMT - 350nm
+ // if (etot > 3.10 * CLHEP::eV) { // Upper threshold of PMT - 400nm
+ // G4cout << "particle " << name << " over threshold with energy " << etot << G4endl;
+ return true;
+ }
+ // G4cout << "inserting particle " << name << " with energy " << etot << " into record" << G4endl;
+
// if (edep==0.) return false;
/* G4cout << " Particle_name_after_edep = " << name << G4endl; */