Skip to content

Commit 604f776

Browse files
authored
Change division to use float for massInv
1 parent 0f02172 commit 604f776

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

DataFormats/Reconstruction/src/TrackParametrizationWithError.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,12 +1364,12 @@ GPUd() bool TrackParametrizationWithError<value_T>::correctForMaterial(value_t x
13641364
}
13651365
auto m = this->getPID().getMass();
13661366
int charge2 = this->getAbsCharge() * this->getAbsCharge();
1367-
value_t p = this->getP(), p0 = p, p02 = p * p, e2 = p02 + this->getPID().getMass2(), massInv = 1. / m, bg = p * massInv, dETot = 0.;
1367+
value_t p = this->getP(), p0 = p, p02 = p * p, e2 = p02 + this->getPID().getMass2(), massInv = 1.f / m, bg = p * massInv, dETot = 0.f;
13681368
value_t e = gpu::CAMath::Sqrt(e2), e0 = e;
13691369
if (m > 0 && xrho != 0.f) {
13701370
value_t ekin = e - m, dedx = this->getdEdxBBOpt(bg);
13711371
#ifdef _BB_NONCONST_CORR_
1372-
value_t dedxDer = 0., dedx1 = dedx;
1372+
value_t dedxDer = 0.f, dedx1 = dedx;
13731373
#endif
13741374
if (charge2 != 1) {
13751375
dedx *= charge2;
@@ -1391,11 +1391,11 @@ GPUd() bool TrackParametrizationWithError<value_T>::correctForMaterial(value_t x
13911391
}
13921392
while (na--) {
13931393
#ifdef _BB_NONCONST_CORR_
1394-
if (dedxDer != 0.) { // correction for non-constantness of dedx vs beta*gamma (in linear approximation): for a single step dE -> dE * [(exp(dedxDer) - 1)/dedxDer]
1394+
if (dedxDer != 0.f) { // correction for non-constantness of dedx vs beta*gamma (in linear approximation): for a single step dE -> dE * [(exp(dedxDer) - 1)/dedxDer]
13951395
if (xrho < 0) {
13961396
dedxDer = -dedxDer; // E.loss ( -> positive derivative)
13971397
}
1398-
auto corrC = (gpu::CAMath::Exp(dedxDer) - 1.) / dedxDer;
1398+
auto corrC = (gpu::CAMath::Exp(dedxDer) - 1.f) / dedxDer;
13991399
dE *= corrC;
14001400
}
14011401
#endif
@@ -1499,12 +1499,12 @@ GPUd() bool TrackParametrizationWithError<value_T>::correctForMaterial(TrackPara
14991499
auto pid = linRef.getPID();
15001500
auto m = pid.getMass();
15011501
int charge2 = linRef.getAbsCharge() * linRef.getAbsCharge();
1502-
value_t p = linRef.getP(), p0 = p, p02 = p * p, e2 = p02 + pid.getMass2(), massInv = 1. / m, bg = p * massInv, dETot = 0.;
1502+
value_t p = linRef.getP(), p0 = p, p02 = p * p, e2 = p02 + pid.getMass2(), massInv = 1.f / m, bg = p * massInv, dETot = 0.f;
15031503
value_t e = gpu::CAMath::Sqrt(e2), e0 = e;
15041504
if (m > 0 && xrho != 0.f) {
15051505
value_t ekin = e - m, dedx = this->getdEdxBBOpt(bg);
15061506
#ifdef _BB_NONCONST_CORR_
1507-
value_t dedxDer = 0., dedx1 = dedx;
1507+
value_t dedxDer = 0.f, dedx1 = dedx;
15081508
#endif
15091509
if (charge2 != 1) {
15101510
dedx *= charge2;
@@ -1526,11 +1526,11 @@ GPUd() bool TrackParametrizationWithError<value_T>::correctForMaterial(TrackPara
15261526
}
15271527
while (na--) {
15281528
#ifdef _BB_NONCONST_CORR_
1529-
if (dedxDer != 0.) { // correction for non-constantness of dedx vs beta*gamma (in linear approximation): for a single step dE -> dE * [(exp(dedxDer) - 1)/dedxDer]
1529+
if (dedxDer != 0.f) { // correction for non-constantness of dedx vs beta*gamma (in linear approximation): for a single step dE -> dE * [(exp(dedxDer) - 1)/dedxDer]
15301530
if (xrho < 0) {
15311531
dedxDer = -dedxDer; // E.loss ( -> positive derivative)
15321532
}
1533-
auto corrC = (gpu::CAMath::Exp(dedxDer) - 1.) / dedxDer;
1533+
auto corrC = (gpu::CAMath::Exp(dedxDer) - 1.f) / dedxDer;
15341534
dE *= corrC;
15351535
}
15361536
#endif

0 commit comments

Comments
 (0)