Skip to content

Commit 9753c6c

Browse files
authored
[PWGHF] Fix missing std prefix (#10231)
1 parent d0c8f15 commit 9753c6c

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

PWGHF/D2H/Macros/HFInvMassFitter.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,8 @@ void HFInvMassFitter::calculateSignificance(Double_t& significance, Double_t& er
591591
Double_t sgnErrSquare = errSignal * errSignal;
592592
Double_t bkgErrSquare = errBkg * errBkg;
593593
Double_t totalSgnBkg = signal + bkg;
594-
significance = signal / sqrt(signal + bkg);
595-
errSignificance = significance * sqrt((sgnErrSquare + bkgErrSquare) / (mNSigmaForSidebands * totalSgnBkg * totalSgnBkg) + (bkg / totalSgnBkg) * (sgnErrSquare / signal / signal));
594+
significance = signal / std::sqrt(signal + bkg);
595+
errSignificance = significance * std::sqrt((sgnErrSquare + bkgErrSquare) / (mNSigmaForSidebands * totalSgnBkg * totalSgnBkg) + (bkg / totalSgnBkg) * (sgnErrSquare / signal / signal));
596596
}
597597

598598
// estimate Signnal

PWGHF/D2H/Macros/runMassFitter.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ using namespace rapidjson;
4040
int runMassFitter(TString configFileName = "config_massfitter.json");
4141

4242
template <typename ValueType>
43-
void readArray(const Value& jsonArray, vector<ValueType>& output)
43+
void readArray(const Value& jsonArray, std::vector<ValueType>& output)
4444
{
4545
for (auto it = jsonArray.Begin(); it != jsonArray.End(); it++) {
4646
auto value = it->template Get<ValueType>();
4747
output.emplace_back(value);
4848
}
4949
}
5050

51-
void parseStringArray(const Value& jsonArray, vector<string>& output)
51+
void parseStringArray(const Value& jsonArray, std::vector<string>& output)
5252
{
5353
size_t arrayLength = jsonArray.Size();
5454
for (size_t i = 0; i < arrayLength; i++) {

PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ struct HfDataCreatorCharmResoReduced {
102102
Produces<aod::HfRedCollisions> hfReducedCollision; // Defined in PWGHF/D2H/DataModel/ReducedDataModel.h
103103
Produces<aod::HfOrigColCounts> hfCollisionCounter; // Defined in PWGHF/D2H/DataModel/ReducedDataModel.h
104104
// tracks, V0 and D candidates reduced tables
105-
Produces<aod::HfRedVzeros> hfCandV0; // Defined in PWGHF/D2H/DataModel/ReducedDataModel.h
105+
Produces<aod::HfRedVzeros> hfCandV0; // Defined in PWGHF/D2H/DataModel/ReducedDataModel.h
106106
Produces<aod::HfRedTrkNoParams> hfTrackNoParam; // Defined in PWGHF/D2H/DataModel/ReducedDataModel.h
107-
Produces<aod::HfRed3PrNoTrks> hfCandD; // Defined in PWGHF/D2H/DataModel/ReducedDataModel.h
107+
Produces<aod::HfRed3PrNoTrks> hfCandD; // Defined in PWGHF/D2H/DataModel/ReducedDataModel.h
108108
// ML optional Tables
109109
Produces<aod::HfRed3ProngsMl> hfCandDMl; // Defined in PWGHF/D2H/DataModel/ReducedDataModel.h
110110
// MC Tables
@@ -368,7 +368,7 @@ struct HfDataCreatorCharmResoReduced {
368368
auto trackNegPar = getTrackPar(trackNeg);
369369
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackNegPar, 2.f, fitter.getMatCorrType(), &dcaInfo);
370370
auto trackNegDcaXY = dcaInfo[0];
371-
if (fabs(trackPosDcaXY) < cfgV0Cuts.dcaMaxDauToPv || fabs(trackNegDcaXY) < cfgV0Cuts.dcaMaxDauToPv) {
371+
if (std::fabs(trackPosDcaXY) < cfgV0Cuts.dcaMaxDauToPv || std::fabs(trackNegDcaXY) < cfgV0Cuts.dcaMaxDauToPv) {
372372
return false;
373373
}
374374
// vertex reconstruction

PWGHF/D2H/Tasks/taskLb.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ struct HfTaskLb {
6666

6767
bool passesImpactParameterResolution(float pT, float d0Resolution)
6868
{
69-
float expectedResolution(0.001 + 0.0052 * exp(-0.655 * pT));
69+
float expectedResolution(0.001 + 0.0052 * std::exp(-0.655 * pT));
7070
return (d0Resolution <= expectedResolution * 1.5);
7171
} // Compares to pT dependent cut on impact parameter resolution
7272

PWGHF/HFC/Macros/ExtractOutputCorrel.C

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
using namespace rapidjson;
2727

2828
template <typename ValueType>
29-
void readArray(const Value& jsonArray, vector<ValueType>& output)
29+
void readArray(const Value& jsonArray, std::vector<ValueType>& output)
3030
{
3131
for (auto it = jsonArray.Begin(); it != jsonArray.End(); it++) {
3232
auto value = it->template Get<ValueType>();
3333
output.emplace_back(value);
3434
}
3535
}
3636

37-
void parseStringArray(const Value& jsonArray, vector<string>& output)
37+
void parseStringArray(const Value& jsonArray, std::vector<string>& output)
3838
{
3939
size_t arrayLength = jsonArray.Size();
4040
for (size_t i = 0; i < arrayLength; i++) {
@@ -45,7 +45,7 @@ void parseStringArray(const Value& jsonArray, vector<string>& output)
4545
}
4646

4747
void SetInputCorrelNames(DhCorrelationExtraction* plotter, TString pathFileMass, TString pathFileSE, TString pathFileME, TString dirSE, TString dirME, TString histoNameCorrSignal, TString histoNameCorrSideba);
48-
void SetInputHistoInvMassNames(DhCorrelationExtraction* plotter, vector<string> inputMassNames);
48+
void SetInputHistoInvMassNames(DhCorrelationExtraction* plotter, std::vector<string> inputMassNames);
4949

5050
void ExtractOutputCorrel(TString cfgFileName = "config_CorrAnalysis.json")
5151
{
@@ -185,7 +185,7 @@ void SetInputCorrelNames(DhCorrelationExtraction* plotter, TString pathFileMass,
185185
return;
186186
}
187187

188-
void SetInputHistoInvMassNames(DhCorrelationExtraction* plotter, vector<string> inputMassNames)
188+
void SetInputHistoInvMassNames(DhCorrelationExtraction* plotter, std::vector<std::string> inputMassNames)
189189
{ // to use if sgn and bkg extraction is done apart
190190

191191
plotter->SetMassHistoNameSgn(inputMassNames[0].data());

PWGHF/HFC/Macros/FitCorrel.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
using namespace rapidjson;
3232

3333
template <typename ValueType>
34-
void readArray(const Value& jsonArray, vector<ValueType>& output)
34+
void readArray(const Value& jsonArray, std::vector<ValueType>& output)
3535
{
3636
for (auto it = jsonArray.Begin(); it != jsonArray.End(); it++) {
3737
auto value = it->template Get<ValueType>();

PWGHF/HFC/TableProducer/femtoDreamProducer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ struct HfFemtoDreamProducer {
249249
auto motherparticlesMc = particleMc.template mothers_as<aod::McParticles>();
250250
// check pdg code
251251
// if this fails, the particle is a fake
252-
if (abs(pdgCode) == abs(trkPDGCode.value)) {
252+
if (std::abs(pdgCode) == std::abs(trkPDGCode.value)) {
253253
// check first if particle is from pile up
254254
// check if the collision associated with the particle is the same as the analyzed collision by checking their Ids
255255
if ((col.has_mcCollision() && (particleMc.mcCollisionId() != col.mcCollisionId())) || !col.has_mcCollision()) {

PWGHF/TableProducer/candidateSelectorLbToLcPi.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct HfCandidateSelectorLbToLcPi {
6262

6363
bool passesImpactParameterResolution(float pT, float d0Resolution)
6464
{
65-
float expectedResolution(0.001 + 0.0052 * exp(-0.655 * pT));
65+
float expectedResolution(0.001 + 0.0052 * std::exp(-0.655 * pT));
6666
if (d0Resolution > expectedResolution * 1.5)
6767
return false;
6868
else
@@ -149,7 +149,7 @@ struct HfCandidateSelectorLbToLcPi {
149149
float diffXVert = hfCandLb.xSecondaryVertex() - hfCandLc.xSecondaryVertex();
150150
float diffYVert = hfCandLb.ySecondaryVertex() - hfCandLc.ySecondaryVertex();
151151
float diffZVert = hfCandLb.zSecondaryVertex() - hfCandLc.zSecondaryVertex();
152-
float vertexDistance = sqrt(diffXVert * diffXVert + diffYVert * diffYVert + diffZVert * diffZVert);
152+
float vertexDistance = std::sqrt(diffXVert * diffXVert + diffYVert * diffYVert + diffZVert * diffZVert);
153153
if (vertexDistance > maxVertexDistanceLbLc) {
154154
return false;
155155
}

PWGHF/TableProducer/mcPidTof.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ struct tofEventTime {
593593
if constexpr (removeTOFEvTimeBias) {
594594
evTimeMakerTOF.removeBias<TrksWtof::iterator, filterForTOFEventTime>(trk, nGoodTracksForTOF, t0TOF[0], t0TOF[1], 2);
595595
}
596-
if (t0TOF[1] < errDiamond && (maxEvTimeTOF <= 0 || abs(t0TOF[0]) < maxEvTimeTOF)) {
596+
if (t0TOF[1] < errDiamond && (maxEvTimeTOF <= 0 || std::abs(t0TOF[0]) < maxEvTimeTOF)) {
597597
flags |= o2::aod::pidflags::enums::PIDFlags::EvTimeTOF;
598598

599599
weight = 1.f / (t0TOF[1] * t0TOF[1]);
@@ -621,7 +621,7 @@ struct tofEventTime {
621621
} else {
622622
tableFlags(flags);
623623
}
624-
tableEvTime(eventTime / sumOfWeights, sqrt(1. / sumOfWeights));
624+
tableEvTime(eventTime / sumOfWeights, std::sqrt(1. / sumOfWeights));
625625
if (enableTableEvTimeTOFOnly) {
626626
tableEvTimeTOFOnly((uint8_t)filterForTOFEventTime(trk), t0TOF[0], t0TOF[1], evTimeMakerTOF.mEventTimeMultiplicity);
627627
}
@@ -657,7 +657,7 @@ struct tofEventTime {
657657
evTimeMakerTOF.removeBias<TrksWtof::iterator, filterForTOFEventTime>(trk, nGoodTracksForTOF, et, erret, 2);
658658
}
659659
uint8_t flags = 0;
660-
if (erret < errDiamond && (maxEvTimeTOF <= 0.f || abs(et) < maxEvTimeTOF)) {
660+
if (erret < errDiamond && (maxEvTimeTOF <= 0.f || std::abs(et) < maxEvTimeTOF)) {
661661
flags |= o2::aod::pidflags::enums::PIDFlags::EvTimeTOF;
662662
} else {
663663
et = 0.f;

0 commit comments

Comments
 (0)