10 #include "CLHEP/Units/GlobalSystemOfUnits.h" 28 std::vector<int> copyno;
29 std::vector<G4String>
name;
39 for (
int ich = 0; ich <
level; ich++) {
40 if (
name[ich] ==
"ZDC") {
45 }
else if (
name[ich] ==
"ZDC_EMLayer") {
50 }
else if (
name[ich] ==
"ZDC_EMFiber") {
62 }
else if (
name[ich] ==
"ZDC_LumLayer") {
66 }
else if (
name[ich] ==
"ZDC_HadLayer") {
79 else if (
name[ich] ==
"ZDC_LumGas") {
81 }
else if (
name[ich] ==
"ZDC_HadFiber") {
88 unsigned intindex = 0;
92 bool true_for_positive_eta = (
zside != -1);
100 <<
" getUnitID - # of levels = " <<
level;
101 for (
int ich = 0; ich <
level; ich++)
102 edm::LogVerbatim(
"ForwardSim") <<
" " << ich <<
": copyno " << copyno[ich] <<
" name=" <<
name[ich]
103 <<
" section " <<
section <<
" zside " <<
zside <<
" layer " <<
layer <<
" fiber " 104 <<
fiber <<
" channel " << channel <<
"packedIndex =" << intindex
105 <<
" detId raw: " <<
index;
114 unsigned int idx = ((
z - 1) & 1) << 20;
115 idx += (channel & 7) << 17;
122 <<
" channel " << channel <<
" zside " <<
z <<
"idx: " <<
idx;
123 int newsubdet, newlayer, newfiber, newchannel, newz;
132 z = 1 + ((
idx >> 20) & 1);
133 channel = (
idx >> 17) & 7;
140 <<
" fiber " <<
fiber <<
" channel " << channel <<
" zside " <<
z;
146 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
149 level = ((touch->GetHistoryDepth()) + 1);
155 std::vector<int>& copyno,
156 std::vector<G4String>&
name) {
159 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
162 name.emplace_back(touch->GetVolume(
i)->GetName());
163 copyno.emplace_back(touch->GetReplicaNumber(
i));
static unsigned int packZdcIndex(int subDet, int layer, int fiber, int channel, int z)
Log< level::Info, true > LogVerbatim
int detectorLevel(const G4Step *)
unsigned int getUnitID(const G4Step *aStep)
void setVerbosity(const int)
constexpr uint32_t rawId() const
get the raw id
static void unpackZdcIndex(const unsigned int &idx, int &subDet, int &layer, int &fiber, int &channel, int &z)