#include <MuonWallSD.h>
Definition at line 32 of file MuonWallSD.h.
◆ MuonWallSD()
MuonWallSD::MuonWallSD |
( |
const std::string & |
name, |
|
|
const std::string & |
hitCollectionName, |
|
|
int |
verbose |
|
) |
| |
Definition at line 27 of file MuonWallSD.cxx.
28 : G4VSensitiveDetector(
name),
35 ISvcLocator* svcLocator = Gaudi::svcLocator();
38 if (svcLocator->service(
"DetectorStore",
detStore).isFailure()) {
40 description <<
"Constructor: DetectorStoreSvc not found!";
41 G4Exception(
"MuonWallSD",
"NoDetStore", FatalException,
description);
43 }
else if (verboseLevel >= 5) {
44 G4cout <<
"DetectorStoreSvc initialized" << G4endl;
50 G4Exception(
"MuonWallSD",
"NoTileTBIDHelper", FatalException,
description);
52 }
else if (verboseLevel >= 5) {
53 G4cout <<
"TileTBID helper retrieved" << G4endl;
◆ ~MuonWallSD()
MuonWallSD::~MuonWallSD |
( |
| ) |
|
◆ EndOfAthenaEvent()
void MuonWallSD::EndOfAthenaEvent |
( |
| ) |
|
Definition at line 147 of file MuonWallSD.cxx.
151 if (verboseLevel >= 5) {
158 }
else if (verboseLevel >= 10) {
160 <<
" nhit=0" << G4endl;
164 if (verboseLevel >= 5) {
165 G4cout <<
"Total number of hits is " <<
m_HitColl->size() << G4endl;
◆ Initialize()
void MuonWallSD::Initialize |
( |
G4HCofThisEvent * |
| ) |
|
|
finaloverride |
Definition at line 78 of file MuonWallSD.cxx.
79 if (verboseLevel >= 5) {
80 G4cout <<
"MuonWallSD::Initialize()" << G4endl;
◆ ProcessHits()
G4bool MuonWallSD::ProcessHits |
( |
G4Step * |
aStep, |
|
|
G4TouchableHistory * |
|
|
) |
| |
|
finaloverride |
Definition at line 88 of file MuonWallSD.cxx.
89 if (verboseLevel >= 10) {
90 G4cout <<
"MuonWallSD::ProcessHits" << G4endl;
93 const G4TouchableHistory* theTouchable = (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable());
94 const G4VPhysicalVolume* physVol = theTouchable->GetVolume();
95 const G4LogicalVolume* logiVol = physVol->GetLogicalVolume();
96 const G4String nameLogiVol = logiVol->GetName();
97 const G4int nScinti = physVol->GetCopyNo();
99 const G4double edep = aStep->GetTotalEnergyDeposit() * aStep->GetTrack()->GetWeight();
102 if (aStep->GetTrack()->GetDefinition()->GetPDGCharge() != 0.){
104 stepl = aStep->GetStepLength();
107 if ((edep == 0.) && (stepl == 0.)) {
114 if(nameLogiVol.find(
"MuScintillatorLayer") !=G4String::npos) {
117 }
else if(nameLogiVol.find(
"S1") !=G4String::npos) {
119 }
else if(nameLogiVol.find(
"S2") !=G4String::npos) {
121 }
else if(nameLogiVol.find(
"S3") !=G4String::npos) {
127 if (verboseLevel >= 10) {
128 G4cout << ((
m_nhits[
ind] > 0)?
"Additional hit in ":
"First hit in ")
131 <<
" time=" << aStep->GetPostStepPoint()->GetGlobalTime()
132 <<
" ene=" << edep << G4endl;
◆ StartOfAthenaEvent()
void MuonWallSD::StartOfAthenaEvent |
( |
| ) |
|
Definition at line 70 of file MuonWallSD.cxx.
71 if (verboseLevel >= 5) {
72 G4cout <<
"Initializing SD" << G4endl;
◆ m_hit
◆ m_HitColl
◆ m_id
◆ m_nhits
◆ m_tileTBID
◆ s_nCell
◆ s_nCellMu
const int MuonWallSD::s_nCellMu = 14 |
|
staticprivate |
◆ s_nCellS
const int MuonWallSD::s_nCellS = 4 |
|
staticprivate |
The documentation for this class was generated from the following files:
std::string to_string(const Identifier &id, int level=0) const
extract all fields from TileTB identifier Identifier get_all_fields ( const Identifier & id,...
int add(double energy, double time, double deltaT)
Add sub-hit to a given hit with time rounding to the center of nearest deltaT bin.