ATLAS Offline Software
Loading...
Searching...
No Matches
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
8
9int 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
20int 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}
#define GASVES
#define QUARTZ
#define GASTUB
#define z
int GetTubNumber(G4Step *) const
static int GetVolNumber(const G4String &)
G4ThreeVector GetPreStepPoint(G4Step *aStep) const