Sensitive detector.
More...
#include <Par04ParallelFullSensitiveDetector.hh>
Sensitive detector.
Definition at line 48 of file Par04ParallelFullSensitiveDetector.hh.
◆ Par04ParallelFullSensitiveDetector() [1/2]
Par04ParallelFullSensitiveDetector::Par04ParallelFullSensitiveDetector |
( |
G4String |
aName | ) |
|
◆ Par04ParallelFullSensitiveDetector() [2/2]
Par04ParallelFullSensitiveDetector::Par04ParallelFullSensitiveDetector |
( |
G4String |
aName, |
|
|
G4int |
aNbOfLayers, |
|
|
G4int |
aNbOfSlices, |
|
|
G4int |
aNbOfRows |
|
) |
| |
◆ ~Par04ParallelFullSensitiveDetector()
Par04ParallelFullSensitiveDetector::~Par04ParallelFullSensitiveDetector |
( |
| ) |
|
|
virtualdefault |
◆ Initialize()
void Par04ParallelFullSensitiveDetector::Initialize |
( |
G4HCofThisEvent * |
HCE | ) |
|
|
finalvirtual |
Create hit collection.
Definition at line 77 of file Par04ParallelFullSensitiveDetector.cc.
78{
81 {
83 }
85}
G4THitsCollection< Par04Hit > Par04HitsCollection
G4int fHitCollectionID
ID of collection of hits.
Par04HitsCollection * fHitsCollection
Collection of hits.
◆ ProcessHits()
Process energy deposit from the full simulation.
Definition at line 89 of file Par04ParallelFullSensitiveDetector.cc.
90{
91 G4double edep = aStep->GetTotalEnergyDeposit();
92 if(edep == 0.)
93 return true;
94
96
97 G4int layerNo = touchable->GetCopyNumber(0);
98 G4int sliceNo = touchable->GetCopyNumber(1);
99 G4int rowNo = touchable->GetCopyNumber(2);
100
103 G4cout <<
"ERROR, problem with Layer IDs: " << layerNo <<
" > " <<
fNbOfLayers << G4endl;
104 return false;
105 }
107 G4cout <<
"ERROR, problem with Slice IDs: " << sliceNo <<
" >= " <<
fNbOfSlices << G4endl;
108 return false;
109 }
111 G4cout <<
"ERROR, problem with Row IDs: " << rowNo <<
" >= " <<
fNbOfRows << G4endl;
112 return false;
113 }
115 if (hit==nullptr) {
118 hit->SetPhiId(sliceNo);
119 hit->SetRhoId(layerNo);
120 hit->SetZid(rowNo);
121 }
122
123
124 hit->AddEdep(edep);
125
126 hit->AddNdep(1);
127
128
129
130 if(hit->GetTime() == -1 || hit->GetTime() > aStep->GetTrack()->GetGlobalTime())
131 hit->SetTime(aStep->GetTrack()->GetGlobalTime());
132
133
134 hit->SetType(2);
135
136 return true;
137}
Hit class to store energy deposited in the sensitive detector.
std::unordered_map< G4int, std::unique_ptr< Par04Hit > > fHitsMap
◆ EndOfEvent()
void Par04ParallelFullSensitiveDetector::EndOfEvent |
( |
G4HCofThisEvent * |
aHC | ) |
|
|
finalvirtual |
◆ fHitsCollection
◆ fHitsMap
std::unordered_map<G4int, std::unique_ptr<Par04Hit> > Par04ParallelFullSensitiveDetector::fHitsMap |
|
private |
◆ fHitCollectionID
G4int Par04ParallelFullSensitiveDetector::fHitCollectionID = -1 |
|
private |
◆ fNbOfLayers
G4int Par04ParallelFullSensitiveDetector::fNbOfLayers = 1 |
|
private |
◆ fNbOfSlices
G4int Par04ParallelFullSensitiveDetector::fNbOfSlices = 1 |
|
private |
◆ fNbOfRows
G4int Par04ParallelFullSensitiveDetector::fNbOfRows = 1 |
|
private |
The documentation for this class was generated from the following files: