9 #include "CLHEP/Units/GlobalSystemOfUnits.h"
16 std::cout <<
"Creating ZDCNumberingScheme" << std::endl;
21 std::cout <<
" Deleting ZdcNumberingScheme" << std::endl;
31 int* copyno =
new int[
level];
42 for (
int ich = 0; ich <
level; ich++) {
43 if (
name[ich] ==
"ZDC") {
48 }
else if (
name[ich] ==
"ZDC_EMLayer") {
53 }
else if (
name[ich] ==
"ZDC_EMFiber") {
65 }
else if (
name[ich] ==
"ZDC_LumLayer") {
69 }
else if (
name[ich] ==
"ZDC_HadLayer") {
82 else if (
name[ich] ==
"ZDC_LumGas") {
84 }
else if (
name[ich] ==
"ZDC_HadFiber") {
91 unsigned intindex = 0;
95 bool true_for_positive_eta =
true;
97 true_for_positive_eta =
false;
107 <<
" getUnitID - # of levels = " <<
level << std::endl;
108 for (
int ich = 0; ich <
level; ich++)
109 std::cout <<
" " << ich <<
": copyno " << copyno[ich] <<
" name=" <<
name[ich] <<
" section " <<
section
110 <<
" zside " <<
zside <<
" layer " <<
layer <<
" fiber " << fiber <<
" channel " << channel
111 <<
"packedIndex =" << intindex <<
" detId raw: " <<
index << std::endl;
123 unsigned int idx = ((
z - 1) & 1) << 20;
124 idx += (channel & 7) << 17;
125 idx += (fiber & 255) << 9;
130 std::cout <<
"ZDC packing: section " <<
section <<
" layer " <<
layer <<
" fiber " << fiber <<
" channel " << channel
131 <<
" zside " <<
z <<
"idx: " <<
idx << std::endl;
132 int newsubdet, newlayer, newfiber, newchannel, newz;
140 const unsigned int&
idx,
int&
section,
int&
layer,
int& fiber,
int& channel,
int&
z) {
141 z = 1 + ((
idx >> 20) & 1);
142 channel = (
idx >> 17) & 7;
143 fiber = (
idx >> 9) & 255;
149 <<
" channel " << channel <<
" zside " <<
z << std::endl;
155 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
158 level = ((touch->GetHistoryDepth()) + 1);
165 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
168 name[
ii] = touch->GetVolume(
i)->GetName();
169 copyno[
ii] = touch->GetReplicaNumber(
i);