#include <ZdcNumberingScheme.h>
|
static unsigned int | packZdcIndex (int subDet, int layer, int fiber, int channel, int z) |
|
static void | unpackZdcIndex (const unsigned int &idx, int &subDet, int &layer, int &fiber, int &channel, int &z) |
|
Definition at line 13 of file ZdcNumberingScheme.h.
ZdcNumberingScheme::ZdcNumberingScheme |
( |
int |
iv | ) |
|
ZdcNumberingScheme::~ZdcNumberingScheme |
( |
| ) |
|
|
virtual |
int ZdcNumberingScheme::detectorLevel |
( |
const G4Step * |
aStep | ) |
const |
void ZdcNumberingScheme::detectorLevel |
( |
const G4Step * |
aStep, |
|
|
int & |
level, |
|
|
int * |
copyno, |
|
|
G4String * |
name |
|
) |
| const |
Definition at line 174 of file ZdcNumberingScheme.cc.
References i, and testEve_cfg::level.
179 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
180 for (
int ii = 0; ii <
level; ii++) {
181 int i = level - ii - 1;
182 name[ii] = touch->GetVolume(i)->GetName();
183 copyno[ii] = touch->GetReplicaNumber(i);
unsigned int ZdcNumberingScheme::getUnitID |
( |
const G4Step * |
aStep | ) |
const |
|
virtual |
Definition at line 27 of file ZdcNumberingScheme.cc.
References gather_cfg::cout, detectorLevel(), HcalZDCDetId::EM, HcalZDCDetId::HAD, getHLTprescales::index, testEve_cfg::level, HcalZDCDetId::LUM, mergeVDriftHistosByStation::name, packZdcIndex(), DetId::rawId(), and HcalZDCDetId::Unknown.
Referenced by ZdcSD::setDetUnitId().
33 int* copyno =
new int[
level];
44 for (
int ich=0; ich <
level; ich++) {
45 if (name[ich] ==
"ZDC") {
46 if(copyno[ich] == 1)zside = 1;
47 if(copyno[ich] == 2)zside = -1;
49 else if (name[ich] ==
"ZDC_EMLayer") {
53 else if (name[ich] ==
"ZDC_EMFiber") {
66 else if (name[ich] ==
"ZDC_LumLayer") {
71 else if (name[ich] ==
"ZDC_LumGas") {
74 else if (name[ich] ==
"ZDC_HadLayer") {
86 else if (name[ich] ==
"ZDC_HadFiber") {
94 intindex =
packZdcIndex (section, layer, fiber, channel, zside);
97 bool true_for_positive_eta =
true;
99 if(zside == -1)true_for_positive_eta =
false;
101 HcalZDCDetId zdcId(section, true_for_positive_eta, channel);
102 index = zdcId.rawId();
110 <<
" getUnitID - # of levels = "
111 << level << std::endl;
112 for (
int ich = 0; ich <
level; ich++)
113 std::cout<<
" " << ich <<
": copyno " << copyno[ich]
114 <<
" name=" << name[ich]
115 <<
" section " << section <<
" zside " << zside
116 <<
" layer " << layer <<
" fiber " << fiber
117 <<
" channel " << channel <<
"packedIndex ="
118 << intindex <<
" detId raw: "<<index<<std::endl;
static unsigned int packZdcIndex(int subDet, int layer, int fiber, int channel, int z)
int detectorLevel(const G4Step *) const
unsigned ZdcNumberingScheme::packZdcIndex |
( |
int |
subDet, |
|
|
int |
layer, |
|
|
int |
fiber, |
|
|
int |
channel, |
|
|
int |
z |
|
) |
| |
|
static |
pack the Unit ID for Zdc
z = 1,2 = -z,+z; subDet = 1,2,3 = EM,Lum,HAD; fiber = 1-96 (EM,HAD), 1 (Lum); channel = 1-5 (EM), layer# (Lum), 1-3 (HAD)
Definition at line 130 of file ZdcNumberingScheme.cc.
References gather_cfg::cout, and unpackZdcIndex().
Referenced by getUnitID().
132 unsigned int idx = ((
z-1)&1)<<20;
133 idx += (channel&7)<<17;
134 idx += (fiber&255)<<9;
135 idx += (layer&127)<<2;
139 std::cout<<
"ZDC packing: section " << section <<
" layer " << layer <<
" fiber "
140 << fiber <<
" channel " << channel <<
" zside " <<
z <<
"idx: " <<idx << std::endl;
141 int newsubdet, newlayer, newfiber, newchannel, newz;
142 unpackZdcIndex(idx, newsubdet, newlayer, newfiber, newchannel, newz);
static void unpackZdcIndex(const unsigned int &idx, int &subDet, int &layer, int &fiber, int &channel, int &z)
void ZdcNumberingScheme::setVerbosity |
( |
const int |
iv | ) |
|
void ZdcNumberingScheme::unpackZdcIndex |
( |
const unsigned int & |
idx, |
|
|
int & |
subDet, |
|
|
int & |
layer, |
|
|
int & |
fiber, |
|
|
int & |
channel, |
|
|
int & |
z |
|
) |
| |
|
static |
int ZdcNumberingScheme::verbosity |
|
private |