11 #include "CLHEP/Units/GlobalSystemOfUnits.h" 34 int* copyno =
new int[
level];
45 for (
int ich = 0; ich <
level; ich++) {
46 if (
name[ich] ==
"ZDC") {
51 }
else if (
name[ich] ==
"ZDC_EMLayer") {
56 }
else if (
name[ich] ==
"ZDC_EMFiber") {
68 }
else if (
name[ich] ==
"ZDC_LumLayer") {
72 }
else if (
name[ich] ==
"ZDC_HadLayer") {
85 else if (
name[ich] ==
"ZDC_LumGas") {
87 }
else if (
name[ich] ==
"ZDC_HadFiber") {
94 unsigned intindex = 0;
98 bool true_for_positive_eta =
true;
100 true_for_positive_eta =
false;
109 <<
" getUnitID - # of levels = " <<
level;
110 for (
int ich = 0; ich <
level; ich++)
111 edm::LogVerbatim(
"ForwardSim") <<
" " << ich <<
": copyno " << copyno[ich] <<
" name=" <<
name[ich]
112 <<
" section " <<
section <<
" zside " <<
zside <<
" layer " <<
layer <<
" fiber " 113 << fiber <<
" channel " << channel <<
"packedIndex =" << intindex
126 unsigned int idx = ((
z - 1) & 1) << 20;
127 idx += (channel & 7) << 17;
128 idx += (fiber & 255) << 9;
134 <<
" channel " << channel <<
" zside " <<
z <<
"idx: " << std::hex <<
idx <<
std::dec;
135 int newsubdet, newlayer, newfiber, newchannel, newz;
143 const unsigned int&
idx,
int&
section,
int&
layer,
int& fiber,
int& channel,
int&
z) {
144 z = 1 + ((
idx >> 20) & 1);
145 channel = (
idx >> 17) & 7;
146 fiber = (
idx >> 9) & 255;
152 <<
" fiber " << fiber <<
" channel " << channel <<
" zside " <<
z;
158 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
161 level = ((touch->GetHistoryDepth()) + 1);
168 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
172 copyno[
ii] = touch->GetReplicaNumber(
i);
static unsigned int packZdcIndex(int subDet, int layer, int fiber, int channel, int z)
virtual unsigned int getUnitID(const G4Step *aStep) const
Log< level::Info, true > LogVerbatim
constexpr std::array< uint8_t, layerIndexSize > layer
virtual ~ZdcNumberingScheme()
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)
int detectorLevel(const G4Step *) const
std::string getName(const G4String &)