Skip to content

Commit b0129ed

Browse files
VDrift: Keep refVDrift constant by changing corrFact with T/P
1 parent bbb5e94 commit b0129ed

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

DataFormats/Detectors/TPC/include/DataFormatsTPC/VDriftCorrFact.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,10 @@ struct VDriftCorrFact {
4747
float normVDrift = newVRef;
4848
if (newVRef == 0.f) {
4949
normVDrift = refVDrift * corrFact;
50-
if ((tp == 0) || (refTP == 0)) {
51-
newVRef = normVDrift; // no T/P scaling applied
52-
} else {
50+
newVRef = normVDrift;
51+
if ((tp > 0) && (refTP > 0)) {
5352
// linear scaling based on relative change of T/P
54-
newVRef = normVDrift * (1 + (tp - refTP) / refTP);
53+
normVDrift *= refTP / tp;
5554
refTP = tp; // update reference T/P
5655
}
5756
}

0 commit comments

Comments
 (0)