Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ExGflash3SensitiveDetector Class Reference

#include <Doxymodules_parameterisations.h>

Inheritance diagram for ExGflash3SensitiveDetector:
G4VSensitiveDetector G4VGFlashSensitiveDetector

Public Member Functions

 ExGflash3SensitiveDetector (G4String, ExGflash3ParallelWorld *det)
 
 ~ExGflash3SensitiveDetector () override
 
void Initialize (G4HCofThisEvent *) override
 
G4bool ProcessHits (G4Step *, G4TouchableHistory *) override
 
G4bool ProcessHits (G4GFlashSpot *aSpot, G4TouchableHistory *) override
 
void EndOfEvent (G4HCofThisEvent *) override
 

Private Attributes

ExGflashHitsCollectionfCaloHitsCollection
 
ExGflash3ParallelWorldfDetector
 
G4int fHCID {-1}
 

Detailed Description

Definition at line 141 of file Doxymodules_parameterisations.h.

Constructor & Destructor Documentation

◆ ExGflash3SensitiveDetector()

ExGflash3SensitiveDetector::ExGflash3SensitiveDetector ( G4String  name,
ExGflash3ParallelWorld det 
)

Definition at line 47 of file ExGflash3SensitiveDetector.cc.

49{
50 G4String caloname = "ExGflashCollection";
51 collectionName.insert(caloname);
52}

◆ ~ExGflash3SensitiveDetector()

ExGflash3SensitiveDetector::~ExGflash3SensitiveDetector ( )
overridedefault

Member Function Documentation

◆ Initialize()

void ExGflash3SensitiveDetector::Initialize ( G4HCofThisEvent HCE)
override

Definition at line 60 of file ExGflash3SensitiveDetector.cc.

61{
62 if (fHCID < 0) {
63 fHCID = GetCollectionID(0);
64 }
66 new ExGflashHitsCollection(SensitiveDetectorName, collectionName[0]); // first collection
67 HCE->AddHitsCollection(fHCID, fCaloHitsCollection);
68}
ExGflashHitsCollection * fCaloHitsCollection

◆ ProcessHits() [1/2]

G4bool ExGflash3SensitiveDetector::ProcessHits ( G4Step aStep,
G4TouchableHistory ROhist 
)
override

Definition at line 76 of file ExGflash3SensitiveDetector.cc.

77{
78 G4double e = aStep->GetTotalEnergyDeposit();
79 if (e <= 0.) return false;
80
81 auto theTouchable = (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable());
82
83 // enrgy deposited -> make Hit
84 // const G4VPhysicalVolume* physVol= aStep->GetPreStepPoint()->GetPhysicalVolume();
85 // G4TouchableHistory* theTouchable =
86 // (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable());
87 auto caloHit = new ExGflashHit();
88 caloHit->SetEdep(e);
89 caloHit->SetPos(aStep->GetPreStepPoint()->GetPosition());
90 fCaloHitsCollection->insert(caloHit);
91 if (ROhist) {
92 ;
93 }
94 G4VPhysicalVolume* physVol = theTouchable->GetVolume();
95 G4int crystalnum = 0;
96 for (int i = 0; i < 100; i++) //@@@@@@@ ExGflash3SensitiveDetector:vorsichty
97 {
98 if (physVol == fDetector->GetCristal(i)) crystalnum = i;
99 }
100 caloHit->SetCrystalNum(crystalnum);
101
102 return true;
103}
const G4VPhysicalVolume * GetCristal(int aNumCrystal)

◆ ProcessHits() [2/2]

G4bool ExGflash3SensitiveDetector::ProcessHits ( G4GFlashSpot aSpot,
G4TouchableHistory ROhist 
)
override

Definition at line 108 of file ExGflash3SensitiveDetector.cc.

109{ // cout<<"This is ProcessHits GFLASH"<<endl;
110 G4double e = aSpot->GetEnergySpot()->GetEnergy();
111 if (e <= 0.) return false;
112
113 G4VPhysicalVolume* pCurrentVolume = aSpot->GetTouchableHandle()->GetVolume();
114
115 auto caloHit = new ExGflashHit();
116 caloHit->SetEdep(e);
117 caloHit->SetPos(aSpot->GetEnergySpot()->GetPosition());
118 fCaloHitsCollection->insert(caloHit);
119 if (ROhist) {
120 ;
121 }
122 // cout <<pCurrentVolume->GetName() << endl;
123 G4int crystalnum = 0;
124 for (int i = 0; i < 100; i++) //@@@@@@@ ExGflash3SensitiveDetector:vorsichty
125 {
126 if (pCurrentVolume == fDetector->GetCristal(i)) crystalnum = i;
127 }
128 caloHit->SetCrystalNum(crystalnum);
129
130 return true;
131}

◆ EndOfEvent()

void ExGflash3SensitiveDetector::EndOfEvent ( G4HCofThisEvent )
override

Definition at line 72 of file ExGflash3SensitiveDetector.cc.

72{}

Member Data Documentation

◆ fCaloHitsCollection

ExGflashHitsCollection* ExGflash3SensitiveDetector::fCaloHitsCollection
private

Definition at line 58 of file ExGflash3SensitiveDetector.hh.

◆ fDetector

ExGflash3ParallelWorld* ExGflash3SensitiveDetector::fDetector
private

Definition at line 59 of file ExGflash3SensitiveDetector.hh.

◆ fHCID

G4int ExGflash3SensitiveDetector::fHCID {-1}
private

Definition at line 60 of file ExGflash3SensitiveDetector.hh.

60{-1};

The documentation for this class was generated from the following files:

Applications | User Support | Publications | Collaboration