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

#include <Doxymodules_parameterisations.h>

Inheritance diagram for ExGflash2SensitiveDetector:
G4VSensitiveDetector G4VGFlashSensitiveDetector

Public Member Functions

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

Private Attributes

ExGflashHitsCollectionfCaloHitsCollection
 
ExGflash2DetectorConstructionfDetector
 
G4int fHCID {-1}
 

Detailed Description

Definition at line 124 of file Doxymodules_parameterisations.h.

Constructor & Destructor Documentation

◆ ExGflash2SensitiveDetector()

ExGflash2SensitiveDetector::ExGflash2SensitiveDetector ( G4String  name,
ExGflash2DetectorConstruction det 
)

Definition at line 46 of file ExGflash2SensitiveDetector.cc.

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

◆ ~ExGflash2SensitiveDetector()

ExGflash2SensitiveDetector::~ExGflash2SensitiveDetector ( )
overridedefault

Member Function Documentation

◆ Initialize()

void ExGflash2SensitiveDetector::Initialize ( G4HCofThisEvent HCE)
override

Definition at line 60 of file ExGflash2SensitiveDetector.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 ExGflash2SensitiveDetector::ProcessHits ( G4Step aStep,
G4TouchableHistory ROhist 
)
override

Definition at line 76 of file ExGflash2SensitiveDetector.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++) //@@@@@@@ ExGflash2SensitiveDetector: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 ExGflash2SensitiveDetector::ProcessHits ( G4GFlashSpot aSpot,
G4TouchableHistory ROhist 
)
override

Definition at line 108 of file ExGflash2SensitiveDetector.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++) //@@@@@@@ ExGflash2SensitiveDetector:vorsichty
125 {
126 if (pCurrentVolume == fDetector->GetCristal(i)) crystalnum = i;
127 }
128 caloHit->SetCrystalNum(crystalnum);
129
130 return true;
131}

◆ EndOfEvent()

void ExGflash2SensitiveDetector::EndOfEvent ( G4HCofThisEvent )
override

Definition at line 72 of file ExGflash2SensitiveDetector.cc.

72{}

Member Data Documentation

◆ fCaloHitsCollection

ExGflashHitsCollection* ExGflash2SensitiveDetector::fCaloHitsCollection
private

Definition at line 58 of file ExGflash2SensitiveDetector.hh.

◆ fDetector

ExGflash2DetectorConstruction* ExGflash2SensitiveDetector::fDetector
private

Definition at line 59 of file ExGflash2SensitiveDetector.hh.

◆ fHCID

G4int ExGflash2SensitiveDetector::fHCID {-1}
private

Definition at line 60 of file ExGflash2SensitiveDetector.hh.

60{-1};

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

Applications | User Support | Publications | Collaboration