Skip to content

Commit f1ea402

Browse files
author
Sunanda
committed
Update HFFibre for depth=2
1 parent f6fe0fd commit f1ea402

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

SimG4CMS/Calo/src/HFFibre.cc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,14 @@ double HFFibre::zShift(const G4ThreeVector& point, int depth, int fromEndAbs) {
125125
for (int i = nBinR - 1; i > 0; --i)
126126
if (hR < radius[i])
127127
ieta = nBinR - i - 1;
128-
// Defines the full length of the fibre (For onlyLong)
129-
if (static_cast<int>(longFL.size()) > ieta)
130-
length = longFL[ieta];
128+
// Defines the full length of the fibre
129+
if (depth == 2) {
130+
if (static_cast<int>(shortFL.size()) > ieta)
131+
length = shortFL[ieta] + gpar[0];
132+
} else {
133+
if (static_cast<int>(longFL.size()) > ieta)
134+
length = longFL[ieta];
135+
}
131136
zFibre = length; // from beginning of abs (full length)
132137
if (fromEndAbs > 0) {
133138
zFibre -= gpar[1]; // length from end of HF

0 commit comments

Comments
 (0)