Skip to content

Commit 2701499

Browse files
noferinisawenzel
authored andcommitted
assure TOF code uses std::abs everywhere
1 parent 9a6e661 commit 2701499

File tree

12 files changed

+108
-86
lines changed

12 files changed

+108
-86
lines changed

Detectors/GlobalTracking/src/MatchTOF.cxx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,15 @@ void MatchTOF::run(const o2::globaltracking::RecoContainer& inp, unsigned long f
192192
bct0--;
193193
}
194194
float tof = matchingPair.getSignal() - bct0 * Geo::BC_TIME_INPS;
195-
if (abs(tof - matchingPair.getLTIntegralOut().getTOF(2)) < 600) {
196-
} else if (abs(tof - matchingPair.getLTIntegralOut().getTOF(3)) < 600) {
197-
} else if (abs(tof - matchingPair.getLTIntegralOut().getTOF(4)) < 600) {
198-
} else if (abs(tof - matchingPair.getLTIntegralOut().getTOF(0)) < 600) {
199-
} else if (abs(tof - matchingPair.getLTIntegralOut().getTOF(1)) < 600) {
200-
} else if (abs(tof - matchingPair.getLTIntegralOut().getTOF(5)) < 600) {
201-
} else if (abs(tof - matchingPair.getLTIntegralOut().getTOF(6)) < 600) {
202-
} else if (abs(tof - matchingPair.getLTIntegralOut().getTOF(7)) < 600) {
203-
} else if (abs(tof - matchingPair.getLTIntegralOut().getTOF(8)) < 600) {
195+
if (std::abs(tof - matchingPair.getLTIntegralOut().getTOF(2)) < 600) {
196+
} else if (std::abs(tof - matchingPair.getLTIntegralOut().getTOF(3)) < 600) {
197+
} else if (std::abs(tof - matchingPair.getLTIntegralOut().getTOF(4)) < 600) {
198+
} else if (std::abs(tof - matchingPair.getLTIntegralOut().getTOF(0)) < 600) {
199+
} else if (std::abs(tof - matchingPair.getLTIntegralOut().getTOF(1)) < 600) {
200+
} else if (std::abs(tof - matchingPair.getLTIntegralOut().getTOF(5)) < 600) {
201+
} else if (std::abs(tof - matchingPair.getLTIntegralOut().getTOF(6)) < 600) {
202+
} else if (std::abs(tof - matchingPair.getLTIntegralOut().getTOF(7)) < 600) {
203+
} else if (std::abs(tof - matchingPair.getLTIntegralOut().getTOF(8)) < 600) {
204204
} else { // no pion, kaon, proton, electron, muon, deuteron, triton, 3He, 4He
205205
matchingPair.setFakeMatch();
206206
}
@@ -557,7 +557,7 @@ void MatchTOF::propagateTPCTracks(int sec)
557557
}
558558

559559
if (trc.getX() < o2::constants::geom::XTPCOuterRef - 1.) {
560-
if (!propagateToRefXWithoutCov(trc, o2::constants::geom::XTPCOuterRef, 10, mBz) || TMath::Abs(trc.getZ()) > Geo::MAXHZTOF) { // we check that the propagat>
560+
if (!propagateToRefXWithoutCov(trc, o2::constants::geom::XTPCOuterRef, 10, mBz) || std::abs(trc.getZ()) > Geo::MAXHZTOF) { // we check that the propagat>
561561
mNotPropagatedToTOF[trkType::UNCONS]++;
562562
continue;
563563
}
@@ -566,7 +566,7 @@ void MatchTOF::propagateTPCTracks(int sec)
566566
o2::base::Propagator::Instance()->estimateLTFast(intLT0, trc);
567567

568568
// the "rough" propagation worked; now we can propagate considering also the cov matrix
569-
if (!propagateToRefX(trc, mXRef, 2, intLT0)) { // || TMath::Abs(trc.getZ()) > Geo::MAXHZTOF) { // we check that the propagation with the cov matrix w>
569+
if (!propagateToRefX(trc, mXRef, 2, intLT0)) { // || std::abs(trc.getZ()) > Geo::MAXHZTOF) { // we check that the propagation with the cov matrix w>
570570
mNotPropagatedToTOF[trkType::UNCONS]++;
571571
continue;
572572
}
@@ -603,7 +603,7 @@ void MatchTOF::propagateConstrTracks(int sec)
603603
}
604604

605605
// the "rough" propagation worked; now we can propagate considering also the cov matrix
606-
if (!propagateToRefX(trc, mXRef, 2, intLT0) || TMath::Abs(trc.getZ()) > Geo::MAXHZTOF) { // we check that the propagation with the cov matrix worked;>
606+
if (!propagateToRefX(trc, mXRef, 2, intLT0) || std::abs(trc.getZ()) > Geo::MAXHZTOF) { // we check that the propagation with the cov matrix worked;>
607607
mNotPropagatedToTOF[trkType::CONSTR]++;
608608
continue;
609609
}
@@ -706,7 +706,7 @@ void MatchTOF::addTPCSeed(const o2::tpc::TrackTPC& _tr, o2::dataformats::GlobalT
706706
// compute track length up to now
707707
mLTinfos[sector][trkType::UNCONS].emplace_back(intLT0);
708708
float vz0 = _tr.getZAt(0, mBz);
709-
if (abs(vz0) > 9000) {
709+
if (std::abs(vz0) > 9000) {
710710
vz0 = _tr.getZ() - _tr.getX() * _tr.getTgl();
711711
}
712712
mVZtpcOnly[sector].push_back(vz0);
@@ -727,14 +727,14 @@ void MatchTOF::addTPCSeed(const o2::tpc::TrackTPC& _tr, o2::dataformats::GlobalT
727727
}
728728
729729
if (trc.getX() < o2::constants::geom::XTPCOuterRef - 1.) {
730-
if (!propagateToRefX(trc, o2::constants::geom::XTPCOuterRef, 10, intLT0) || TMath::Abs(trc.getZ()) > Geo::MAXHZTOF) { // we check that the propagation with the cov matrix worked; CHECK: can it happ
730+
if (!propagateToRefX(trc, o2::constants::geom::XTPCOuterRef, 10, intLT0) || std::abs(trc.getZ()) > Geo::MAXHZTOF) { // we check that the propagation with the cov matrix worked; CHECK: can it happ
731731
mNotPropagatedToTOF[trkType::UNCONS]++;
732732
return;
733733
}
734734
}
735735
736736
// the "rough" propagation worked; now we can propagate considering also the cov matrix
737-
if (!propagateToRefX(trc, mXRef, 2, intLT0)) { // || TMath::Abs(trc.getZ()) > Geo::MAXHZTOF) { // we check that the propagation with the cov matrix worked; CHECK: can it happen that it does not if the prop>
737+
if (!propagateToRefX(trc, mXRef, 2, intLT0)) { // || std::abs(trc.getZ()) > Geo::MAXHZTOF) { // we check that the propagation with the cov matrix worked; CHECK: can it happen that it does not if the prop>
738738
mNotPropagatedToTOF[trkType::UNCONS]++;
739739
return;
740740
}
@@ -1411,10 +1411,10 @@ void MatchTOF::doMatchingForTPC(int sec)
14111411
}
14121412

14131413
if (mMatchParams->applyPIDcutTPConly) { // for TPC only tracks allowing possibility to apply a PID cut
1414-
if (abs(tof - trkLTInt[ibc][iPropagation].getTOF(2)) < 2000) { // pion hypotesis
1415-
} else if (abs(tof - trkLTInt[ibc][iPropagation].getTOF(3)) < 2000) { // kaon hypoteis
1416-
} else if (abs(tof - trkLTInt[ibc][iPropagation].getTOF(4)) < 2000) { // proton hypotesis
1417-
} else { // reject matching
1414+
if (std::abs(tof - trkLTInt[ibc][iPropagation].getTOF(2)) < 2000) { // pion hypotesis
1415+
} else if (std::abs(tof - trkLTInt[ibc][iPropagation].getTOF(3)) < 2000) { // kaon hypoteis
1416+
} else if (std::abs(tof - trkLTInt[ibc][iPropagation].getTOF(4)) < 2000) { // proton hypotesis
1417+
} else { // reject matching
14181418
continue;
14191419
}
14201420
}
@@ -1518,7 +1518,7 @@ int MatchTOF::findFITIndex(int bc, const gsl::span<const o2::ft0::RecPoints>& FI
15181518
if (mHasFillScheme && !mFillScheme[ir.bc]) {
15191519
continue;
15201520
}
1521-
bool quality = (fabs(FITRecPoints[i].getCollisionTime(0)) < 1000 && fabs(FITRecPoints[i].getVertex()) < 1000);
1521+
bool quality = (std::abs(FITRecPoints[i].getCollisionTime(0)) < 1000 && std::abs(FITRecPoints[i].getVertex()) < 1000);
15221522
if (bestQuality && !quality) { // if current has no good quality and the one previoulsy selected has -> discard the current one
15231523
continue;
15241524
}
@@ -1596,7 +1596,7 @@ void MatchTOF::BestMatches(std::vector<o2::dataformats::MatchInfoTOFReco>& match
15961596
float timeNew = TOFClusWork[matchingPair.getTOFClIndex()].getTime() - deltaT;
15971597
float timeOld = TOFClusWork[prevMatching.getTOFClIndex()].getTime();
15981598

1599-
if (fabs(timeNew - timeOld) < 200) {
1599+
if (std::abs(timeNew - timeOld) < 200) {
16001600
// update time information averaging the two (the second one corrected for the difference in the track length)
16011601
prevMatching.setSignal((timeNew + timeOld) * 0.5);
16021602
prevMatching.setChi2(0); // flag such cases with chi2 equal to zero
@@ -1820,7 +1820,7 @@ bool MatchTOF::propagateToRefX(o2::track::TrackParCov& trc, float xRef, float st
18201820
refReached = true; // we reached the 371cm reference
18211821
}
18221822
istep++;
1823-
if (fabs(trc.getY()) > trc.getX() * tanHalfSector) { // we are still in the same sector
1823+
if (std::abs(trc.getY()) > trc.getX() * tanHalfSector) { // we are still in the same sector
18241824
// we need to rotate the track to go to the new sector
18251825
//Printf("propagateToRefX: changing sector");
18261826
auto alphaNew = o2::math_utils::angle2Alpha(trc.getPhiPos());
@@ -1860,7 +1860,7 @@ bool MatchTOF::propagateToRefXWithoutCov(const o2::track::TrackParCov& trc, floa
18601860
refReached = true; // we reached the 371cm reference
18611861
}
18621862
istep++;
1863-
if (fabs(trcNoCov.getY()) > trcNoCov.getX() * tanHalfSector) { // we are still in the same sector
1863+
if (std::abs(trcNoCov.getY()) > trcNoCov.getX() * tanHalfSector) { // we are still in the same sector
18641864
// we need to rotate the track to go to the new sector
18651865
//Printf("propagateToRefX: changing sector");
18661866
auto alphaNew = o2::math_utils::angle2Alpha(trcNoCov.getPhiPos());
@@ -1877,7 +1877,7 @@ bool MatchTOF::propagateToRefXWithoutCov(const o2::track::TrackParCov& trc, floa
18771877
// if (std::abs(trc.getSnp()) > MAXSNP) Printf("propagateToRefX: condition on snp not ok, returning false");
18781878
//Printf("propagateToRefX: snp of teh track is %f (--> %f grad)", trcNoCov.getSnp(), TMath::ASin(trcNoCov.getSnp())*TMath::RadToDeg());
18791879

1880-
return refReached && std::abs(trcNoCov.getSnp()) < 0.95 && TMath::Abs(trcNoCov.getZ()) < Geo::MAXHZTOF; // Here we need to put MAXSNP
1880+
return refReached && std::abs(trcNoCov.getSnp()) < 0.95 && std::abs(trcNoCov.getZ()) < Geo::MAXHZTOF; // Here we need to put MAXSNP
18811881
}
18821882

18831883
//______________________________________________
@@ -1900,7 +1900,7 @@ void MatchTOF::updateTimeDependentParams()
19001900
mTPCBin2Z = mTPCTBinMUS * mTPCVDrift;
19011901

19021902
mBz = o2::base::Propagator::Instance()->getNominalBz();
1903-
mMaxInvPt = abs(mBz) > 0.1 ? 1. / (abs(mBz) * 0.05) : 999.;
1903+
mMaxInvPt = std::abs(mBz) > 0.1 ? 1. / (std::abs(mBz) * 0.05) : 999.;
19041904

19051905
const auto& trackTune = TrackTuneParams::Instance();
19061906
float scale = mTPCCorrMapsHelper->getInstLumiCTP();

Detectors/GlobalTrackingWorkflow/src/TOFEventTimeChecker.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,10 @@ void TOFEventTimeChecker::processEvent(std::vector<MyTrack>& tracks)
266266
float betaexpPr = mL / mExpPr * cinv;
267267

268268
//Mass
269-
float mass = mP / beta * TMath::Sqrt(TMath::Abs(1 - beta * beta));
270-
float massexpPi = mP / betaexpPi * TMath::Sqrt(TMath::Abs(1 - betaexpPi * betaexpPi));
271-
float massexpKa = mP / betaexpKa * TMath::Sqrt(TMath::Abs(1 - betaexpKa * betaexpKa));
272-
float massexpPr = mP / betaexpPr * TMath::Sqrt(TMath::Abs(1 - betaexpPr * betaexpPr));
269+
float mass = mP / beta * TMath::Sqrt(std::abs(1 - beta * beta));
270+
float massexpPi = mP / betaexpPi * TMath::Sqrt(std::abs(1 - betaexpPi * betaexpPi));
271+
float massexpKa = mP / betaexpKa * TMath::Sqrt(std::abs(1 - betaexpKa * betaexpKa));
272+
float massexpPr = mP / betaexpPr * TMath::Sqrt(std::abs(1 - betaexpPr * betaexpPr));
273273

274274
if (massexpPi < 0.13) { // remove wrong track lengths
275275
continue;

Detectors/TOF/base/src/EventTimeMaker.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void computeEvTime(const std::vector<eventTimeTrack>& tracks, const std::vector<
152152
}
153153
float err = evtime.mTrackTimes[i] - averageBest;
154154
err *= sqrt(evtime.mWeights[i]);
155-
err = fabs(err);
155+
err = std::abs(err);
156156
if (err > errworse) {
157157
errworse = err;
158158
worse = i;
@@ -293,7 +293,7 @@ int getStartTimeInSet(const std::vector<eventTimeTrack>& tracks, std::vector<int
293293
const eventTimeTrack& ctrack = tracks[trackInSet[itrk]];
294294
starttime[itrk] = ctrack.mSignal - ctrack.expTimes[hypo[itrk]];
295295

296-
if (fabs(starttime[itrk] - refT0) < 2000) { // otherwise time inconsistent with the int BC
296+
if (std::abs(starttime[itrk] - refT0) < 2000) { // otherwise time inconsistent with the int BC
297297
weighttime[itrk] = 1. / (ctrack.expSigma[hypo[itrk]] * ctrack.expSigma[hypo[itrk]]);
298298
average += starttime[itrk] * weighttime[itrk];
299299
sumweights += weighttime[itrk];
@@ -329,7 +329,7 @@ int getStartTimeInSet(const std::vector<eventTimeTrack>& tracks, std::vector<int
329329
const eventTimeTrack& ctrack = tracks[trackInSet[itrk]];
330330
float err = ctrack.mSignal - ctrack.expTimes[hypo[itrk]] - averageBest;
331331
err /= ctrack.expSigma[hypo[itrk]];
332-
err = fabs(err);
332+
err = std::abs(err);
333333
if (err > errworse) {
334334
errworse = err;
335335
worse = itrk;
@@ -404,7 +404,7 @@ int getStartTimeInSetFast(const std::vector<eventTimeTrack>& tracks, std::vector
404404
const eventTimeTrack& ctrack = tracks[trackInSet[itrk]];
405405
float err = ctrack.mSignal - ctrack.expTimes[hypo[itrk]] - averageBest;
406406
err /= ctrack.expSigma[hypo[itrk]];
407-
err = fabs(err);
407+
err = std::abs(err);
408408
if (err > errworse) {
409409
errworse = err;
410410
worse = itrk;

Detectors/TOF/base/src/Geo.cxx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -773,10 +773,10 @@ Int_t Geo::fromPlateToStrip(Float_t* pos, Int_t iplate, Int_t isector)
773773
step[2] = -getGeoDistances(isector, iplate, istrip);
774774
translate(posLoc2[0], posLoc2[1], posLoc2[2], step);
775775

776-
if (fabs(posLoc2[1]) > 10) {
776+
if (std::abs(posLoc2[1]) > 10) {
777777
continue;
778778
}
779-
if (fabs(posLoc2[2]) > 10) {
779+
if (std::abs(posLoc2[2]) > 10) {
780780
continue;
781781
}
782782

@@ -788,8 +788,8 @@ Int_t Geo::fromPlateToStrip(Float_t* pos, Int_t iplate, Int_t isector)
788788

789789
rotateToStrip(posLoc2, iplate, istrip, isector);
790790

791-
if ((TMath::Abs(posLoc2[0]) <= STRIPLENGTH * 0.5) && (TMath::Abs(posLoc2[1]) <= HSTRIPY * 0.5) &&
792-
(TMath::Abs(posLoc2[2]) <= WCPCBZ * 0.5)) {
791+
if ((std::abs(posLoc2[0]) <= STRIPLENGTH * 0.5) && (std::abs(posLoc2[1]) <= HSTRIPY * 0.5) &&
792+
(std::abs(posLoc2[2]) <= WCPCBZ * 0.5)) {
793793
step[0] = -0.5 * NPADX * XPAD;
794794
step[1] = 0.;
795795
step[2] = -0.5 * NPADZ * ZPAD;
@@ -891,11 +891,11 @@ Int_t Geo::getPlate(const Float_t* pos)
891891
Float_t zLocal = pos[2];
892892

893893
Float_t deltaRhoLoc = (RMAX - RMIN) * 0.5 - MODULEWALLTHICKNESS + yLocal;
894-
Float_t deltaZetaLoc = TMath::Abs(zLocal);
894+
Float_t deltaZetaLoc = std::abs(zLocal);
895895

896896
Float_t deltaRHOmax = 0.;
897897

898-
if (TMath::Abs(zLocal) >= EXTERINTERMODBORDER1 && TMath::Abs(zLocal) <= EXTERINTERMODBORDER2) {
898+
if (std::abs(zLocal) >= EXTERINTERMODBORDER1 && std::abs(zLocal) <= EXTERINTERMODBORDER2) {
899899
deltaRhoLoc -= LENGTHEXINMODBORDER;
900900
deltaZetaLoc = EXTERINTERMODBORDER2 - deltaZetaLoc;
901901
deltaRHOmax = (RMAX - RMIN) * 0.5 - MODULEWALLTHICKNESS - 2. * LENGTHEXINMODBORDER; // old 5.35, new 4.8
@@ -913,7 +913,7 @@ Int_t Geo::getPlate(const Float_t* pos)
913913
iPlate = 3;
914914
}
915915
}
916-
} else if (TMath::Abs(zLocal) >= INTERCENTRMODBORDER1 && TMath::Abs(zLocal) <= INTERCENTRMODBORDER2) {
916+
} else if (std::abs(zLocal) >= INTERCENTRMODBORDER1 && std::abs(zLocal) <= INTERCENTRMODBORDER2) {
917917
deltaRhoLoc -= LENGTHINCEMODBORDERD;
918918
deltaZetaLoc = deltaZetaLoc - INTERCENTRMODBORDER1;
919919
deltaRHOmax = (RMAX - RMIN) * 0.5 - MODULEWALLTHICKNESS - 2. * LENGTHINCEMODBORDERD; // old 0.39, new 0.2

Detectors/TOF/base/src/Utils.cxx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -143,20 +143,20 @@ double Utils::subtractInteractionBC(double time, int& mask, bool subLatency)
143143
if (deltaCBC >= -8 && deltaCBC < 8) {
144144
mask += (1 << (deltaCBC + 8)); // fill bc candidates
145145
}
146-
if (abs(deltaCBC) < dbc) {
146+
if (std::abs(deltaCBC) < dbc) {
147147
bcc = bc - deltaCBC;
148148
dbcSigned = deltaCBC;
149-
dbc = abs(dbcSigned);
149+
dbc = std::abs(dbcSigned);
150150
}
151-
if (abs(deltaCBC + o2::constants::lhc::LHCMaxBunches) < dbc) { // in case k is close to the right border (last BC of the orbit)
151+
if (std::abs(deltaCBC + o2::constants::lhc::LHCMaxBunches) < dbc) { // in case k is close to the right border (last BC of the orbit)
152152
bcc = bc - deltaCBC - o2::constants::lhc::LHCMaxBunches;
153153
dbcSigned = deltaCBC + o2::constants::lhc::LHCMaxBunches;
154-
dbc = abs(dbcSigned);
154+
dbc = std::abs(dbcSigned);
155155
}
156-
if (abs(deltaCBC - o2::constants::lhc::LHCMaxBunches) < dbc) { // in case k is close to the left border (BC=0)
156+
if (std::abs(deltaCBC - o2::constants::lhc::LHCMaxBunches) < dbc) { // in case k is close to the left border (BC=0)
157157
bcc = bc - deltaCBC + o2::constants::lhc::LHCMaxBunches;
158158
dbcSigned = deltaCBC - o2::constants::lhc::LHCMaxBunches;
159-
dbc = abs(dbcSigned);
159+
dbc = std::abs(dbcSigned);
160160
}
161161
}
162162
if (dbcSigned >= -8 && dbcSigned < 8) {
@@ -192,20 +192,20 @@ float Utils::subtractInteractionBC(float time, int& mask, bool subLatency)
192192
if (deltaCBC >= -8 && deltaCBC < 8) {
193193
mask += (1 << (deltaCBC + 8)); // fill bc candidates
194194
}
195-
if (abs(deltaCBC) < dbc) {
195+
if (std::abs(deltaCBC) < dbc) {
196196
bcc = bc - deltaCBC;
197197
dbcSigned = deltaCBC;
198-
dbc = abs(dbcSigned);
198+
dbc = std::abs(dbcSigned);
199199
}
200-
if (abs(deltaCBC + o2::constants::lhc::LHCMaxBunches) < dbc) { // in case k is close to the right border (last BC of the orbit)
200+
if (std::abs(deltaCBC + o2::constants::lhc::LHCMaxBunches) < dbc) { // in case k is close to the right border (last BC of the orbit)
201201
bcc = bc - deltaCBC - o2::constants::lhc::LHCMaxBunches;
202202
dbcSigned = deltaCBC + o2::constants::lhc::LHCMaxBunches;
203-
dbc = abs(dbcSigned);
203+
dbc = std::abs(dbcSigned);
204204
}
205-
if (abs(deltaCBC - o2::constants::lhc::LHCMaxBunches) < dbc) { // in case k is close to the left border (BC=0)
205+
if (std::abs(deltaCBC - o2::constants::lhc::LHCMaxBunches) < dbc) { // in case k is close to the left border (BC=0)
206206
bcc = bc - deltaCBC + o2::constants::lhc::LHCMaxBunches;
207207
dbcSigned = deltaCBC - o2::constants::lhc::LHCMaxBunches;
208-
dbc = abs(dbcSigned);
208+
dbc = std::abs(dbcSigned);
209209
}
210210
}
211211
if (dbcSigned >= -8 && dbcSigned < 8) {

Detectors/TOF/calibration/src/CalibTOF.cxx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ void CalibTOF::run(int flag, int sector)
212212
int channelInSector = (ipad + ich) % o2::tof::Geo::NPADSXSECTOR;
213213

214214
mTimeSlewingObj->setFractionUnderPeak(sector, channelInSector, fractionUnderPeak);
215-
mTimeSlewingObj->setSigmaPeak(sector, channelInSector, abs(funcChOffset->GetParameter(2)));
215+
mTimeSlewingObj->setSigmaPeak(sector, channelInSector, std::abs(funcChOffset->GetParameter(2)));
216216

217217
// now fill 2D histo for time-slewing using current channel offset
218218

@@ -237,7 +237,7 @@ void CalibTOF::run(int flag, int sector)
237237
int istrip = ((ich + ipad) / o2::tof::Geo::NPADS) % o2::tof::Geo::NSTRIPXSECTOR;
238238
gTimeVsTot->SetName(Form("pad_%02d_%02d_%02d", sector, istrip, ipad % o2::tof::Geo::NPADS));
239239
gTimeVsTot->Write();
240-
// histoChTimeSlewingTemp->Write(Form("histoChTimeSlewingTemp_%02d_%02d_%02d", sector, istrip, ipad%o2::tof::Geo::NPADS)); // no longer written since it produces a very large output
240+
// histoChTimeSlewingTemp->Write(Form("histoChTimeSlewingTemp_%02d_%02d_%02d", sector, istrip, ipad%o2::tof::Geo::NPADS)); // no longer written since it produces a very large output
241241
}
242242
} else if (flag & kChannelOffset) {
243243
mTimeSlewingObj->addTimeSlewingInfo(ich + ipad, 0, mCalibChannelOffset[ich + ipad]);
@@ -603,8 +603,8 @@ Int_t CalibTOF::FitPeak(TF1* fitFunc, TH1* h, Float_t startSigma, Float_t nSigma
603603
/* refit with better range */
604604
for (Int_t i = 0; i < 3; i++) {
605605
fitCent = fitFunc->GetParameter(1);
606-
fitMin = fitCent - nSigmaMin * abs(fitFunc->GetParameter(2));
607-
fitMax = fitCent + nSigmaMax * abs(fitFunc->GetParameter(2));
606+
fitMin = fitCent - nSigmaMin * std::abs(fitFunc->GetParameter(2));
607+
fitMax = fitCent + nSigmaMax * std::abs(fitFunc->GetParameter(2));
608608
if (fitMin < -12500) {
609609
fitMin = -12500;
610610
}
@@ -735,9 +735,9 @@ void CalibTOF::flagProblematics()
735735
hsigmapeak->Fit(fFuncSigma, "WWq0");
736736
hfractionpeak->Fit(fFuncFraction, "WWq0");
737737

738-
sigmaMin = fFuncSigma->GetParameter(1) - mNsigmaSigmaProblematicCut * abs(fFuncSigma->GetParameter(2));
739-
sigmaMax = fFuncSigma->GetParameter(1) + mNsigmaSigmaProblematicCut * abs(fFuncSigma->GetParameter(3));
740-
fractionMin = fFuncFraction->GetParameter(1) - mNsigmaFractionProblematicCut * abs(fFuncFraction->GetParameter(2));
738+
sigmaMin = fFuncSigma->GetParameter(1) - mNsigmaSigmaProblematicCut * std::abs(fFuncSigma->GetParameter(2));
739+
sigmaMax = fFuncSigma->GetParameter(1) + mNsigmaSigmaProblematicCut * std::abs(fFuncSigma->GetParameter(3));
740+
fractionMin = fFuncFraction->GetParameter(1) - mNsigmaFractionProblematicCut * std::abs(fFuncFraction->GetParameter(2));
741741

742742
for (int k = 0; k < o2::tof::Geo::NPADX; k++) {
743743
ipad = 48 * iz + k;

0 commit comments

Comments
 (0)