ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
ForwardDetectors
LUCID
LUCID_G4_SD
src
LUCID_HitHelper.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
LUCID_HitHelper.h
"
6
7
#include "
LUCID_GeoModel/LUCID_Constants.h
"
8
9
int
LUCID_HitHelper::GetVolNumber
(
const
G4String& volName) {
10
11
int
volNumber = 100;
12
13
if
(!strcmp(volName.substr(9, 9).c_str(),
"VesselGas"
)) volNumber =
GASVES
;
14
else
if
(!strcmp(volName.substr(9, 7).c_str(),
"TubeGas"
)) volNumber =
GASTUB
;
15
else
if
(!strcmp(volName.substr(9, 3).c_str(),
"Pmt"
)) volNumber =
QUARTZ
;
16
17
return
volNumber;
18
}
19
20
int
LUCID_HitHelper::GetTubNumber
(G4Step* aStep)
const
{
21
22
G4String volName = aStep->GetTrack()->GetVolume()->GetName();
23
24
int
tubNumber = 100;
25
26
if
(!strcmp(volName.substr(5, 9).c_str(),
"VesselGas"
)) tubNumber = -1;
27
else
if
(!strcmp(volName.substr(5, 7).c_str(),
"TubeGas"
)) tubNumber = atoi(volName.substr(12, 2).c_str());
28
else
if
(!strcmp(volName.substr(5, 3).c_str(),
"Pmt"
)) tubNumber = atoi(volName.substr( 8, 2).c_str());
29
30
if
(
GetPreStepPoint
(aStep).
z
() < 0) tubNumber += 20;
31
32
return
tubNumber;
33
}
LUCID_Constants.h
GASVES
#define GASVES
Definition
LUCID_Constants.h:8
QUARTZ
#define QUARTZ
Definition
LUCID_Constants.h:10
GASTUB
#define GASTUB
Definition
LUCID_Constants.h:9
LUCID_HitHelper.h
z
#define z
LUCID_HitHelper::GetTubNumber
int GetTubNumber(G4Step *) const
Definition
LUCID_HitHelper.cxx:20
LUCID_HitHelper::GetVolNumber
static int GetVolNumber(const G4String &)
Definition
LUCID_HitHelper.cxx:9
LUCID_HitHelper::GetPreStepPoint
G4ThreeVector GetPreStepPoint(G4Step *aStep) const
Definition
LUCID_HitHelper.h:31
Generated on
for ATLAS Offline Software by
1.17.0