Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions PWGCF/Core/CorrelationContainer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ CorrelationContainer::CorrelationContainer(const CorrelationContainer& c) : TNam
// CorrelationContainer copy constructor
//

((CorrelationContainer&)c).Copy(*this);
c.Copy(*this);
}

//____________________________________________________________________
Expand Down Expand Up @@ -195,7 +195,7 @@ CorrelationContainer& CorrelationContainer::operator=(const CorrelationContainer
// assigment operator

if (this != &c) {
((CorrelationContainer&)c).Copy(*this);
c.Copy(*this);
}

return *this;
Expand All @@ -206,7 +206,7 @@ void CorrelationContainer::Copy(TObject& c) const
{
// copy function

CorrelationContainer& target = (CorrelationContainer&)c;
CorrelationContainer& target = dynamic_cast<CorrelationContainer&>(c);

if (mPairHist) {
target.mPairHist = dynamic_cast<StepTHn*>(mPairHist->Clone());
Expand Down Expand Up @@ -423,7 +423,7 @@ void CorrelationContainer::getHistsZVtxMult(CorrelationContainer::CFStep step, F

Int_t dimensions[] = {4, 0, 5, 3};
THnBase* tmpTrackHist = sparse->ProjectionND(4, dimensions, "E");
*eventHist = (TH2*)mTriggerHist->getTHn(step)->Projection(1, 2); // NOTE the syntax is Projection(Y, X) --> produces a histogram where x = axis 2 (vertex) and y = axis 1 (multiplicity)
*eventHist = static_cast<TH2*>(mTriggerHist->getTHn(step)->Projection(1, 2)); // NOTE the syntax is Projection(Y, X) --> produces a histogram where x = axis 2 (vertex) and y = axis 1 (multiplicity)
// convert to THn
*trackHist = changeToThn(tmpTrackHist);
delete tmpTrackHist;
Expand Down Expand Up @@ -523,7 +523,7 @@ TH2* CorrelationContainer::getSumOfRatios(CorrelationContainer* mixed, Correlati
Int_t nCorrelationFunctions = 0;

getHistsZVtxMult(step, ptTriggerMin, ptTriggerMax, &trackSameAll, &eventSameAll);
mixed->getHistsZVtxMult((stepForMixed == -1) ? step : (CFStep)stepForMixed, ptTriggerMin, ptTriggerMax, &trackMixedAll, &eventMixedAll);
mixed->getHistsZVtxMult((stepForMixed == -1) ? step : static_cast<CFStep>(stepForMixed), ptTriggerMin, ptTriggerMax, &trackMixedAll, &eventMixedAll);

// If we ask for histograms from step8 (TTR cut applied) there is a hole at 0,0; so this cannot be used for the
// mixed-event normalization. If step6 is available, the normalization factor is read out from that one.
Expand Down Expand Up @@ -728,7 +728,7 @@ TH2* CorrelationContainer::getSumOfRatios(CorrelationContainer* mixed, Correlati
*/

if (!totalTracks) {
totalTracks = (TH2*)tracksSame->Clone("totalTracks");
totalTracks = dynamic_cast<TH2*>(tracksSame->Clone("totalTracks"));
} else {
totalTracks->Add(tracksSame);
}
Expand Down Expand Up @@ -766,7 +766,7 @@ TH2* CorrelationContainer::getSumOfRatios(CorrelationContainer* mixed, Correlati
}
}
if (trigger != nullptr) {
*trigger = (Int_t)totalEvents;
*trigger = static_cast<Int_t>(totalEvents);
}

// normalizate to dphi width
Expand Down Expand Up @@ -836,7 +836,7 @@ THnBase* CorrelationContainer::getTrackEfficiencyND(EfficiencyStep step1, Effici
resetBinLimits(sourceContainer->getTHn(step1));
resetBinLimits(sourceContainer->getTHn(step2));

THnBase* clone = (THnBase*)measured->Clone();
THnBase* clone = dynamic_cast<THnBase*>(measured->Clone());

clone->Divide(measured, generated, 1, 1, "B");

Expand Down Expand Up @@ -936,7 +936,7 @@ TH1* CorrelationContainer::getTrackEfficiency(EfficiencyStep step1, EfficiencySt

if (mPtMax > mPtMin) {
// TODO this is just checking up to 15 for now
Float_t ptMax = TMath::Min((Float_t)15., mPtMax);
Float_t ptMax = TMath::Min(static_cast<Float_t>(15.), mPtMax);
if (axis1 == 1) {
binBegin[0] = generated->GetXaxis()->FindBin(mPtMin);
binEnd[0] = generated->GetXaxis()->FindBin(ptMax);
Expand Down Expand Up @@ -1010,7 +1010,7 @@ TH1* CorrelationContainer::getTrackEfficiency(EfficiencyStep step1, EfficiencySt
measured = new TH2D(Form("%s_rebinned", tmp->GetName()), tmp->GetTitle(), axis->GetNbins(), axis->GetXbins()->GetArray(), tmp->GetNbinsY(), tmp->GetYaxis()->GetXbins()->GetArray());
for (Int_t x = 1; x <= tmp->GetNbinsX(); x++) {
for (Int_t y = 1; y <= tmp->GetNbinsY(); y++) {
((TH2*)measured)->Fill(tmp->GetXaxis()->GetBinCenter(x), tmp->GetYaxis()->GetBinCenter(y), tmp->GetBinContent(x, y));
(dynamic_cast<TH2*>(measured))->Fill(tmp->GetXaxis()->GetBinCenter(x), tmp->GetYaxis()->GetBinCenter(y), tmp->GetBinContent(x, y));
measured->SetBinError(x, y, 0); // cannot trust bin error, set to 0
}
}
Expand All @@ -1020,7 +1020,7 @@ TH1* CorrelationContainer::getTrackEfficiency(EfficiencyStep step1, EfficiencySt
generated = new TH2D(Form("%s_rebinned", tmp->GetName()), tmp->GetTitle(), axis->GetNbins(), axis->GetXbins()->GetArray(), tmp->GetNbinsY(), tmp->GetYaxis()->GetXbins()->GetArray());
for (Int_t x = 1; x <= tmp->GetNbinsX(); x++) {
for (Int_t y = 1; y <= tmp->GetNbinsY(); y++) {
((TH2*)generated)->Fill(tmp->GetXaxis()->GetBinCenter(x), tmp->GetYaxis()->GetBinCenter(y), tmp->GetBinContent(x, y));
(dynamic_cast<TH2*>(generated))->Fill(tmp->GetXaxis()->GetBinCenter(x), tmp->GetYaxis()->GetBinCenter(y), tmp->GetBinContent(x, y));
generated->SetBinError(x, y, 0); // cannot trust bin error, set to 0
}
}
Expand Down Expand Up @@ -1170,14 +1170,14 @@ TH1* CorrelationContainer::getBias(EfficiencyStep step1, EfficiencyStep step2, c
resetBinLimits(mTriggerHist->getTHn(step2), 3);
setBinLimits(tmp->getTHn(step2));

TH1D* events1 = (TH1D*)mTriggerHist->getTHn(step1)->Projection(0);
TH3D* hist1 = (TH3D*)tmp->getTHn(step1)->Projection(0, tmp->getNVar() - 1, 2);
TH1D* events1 = mTriggerHist->getTHn(step1)->Projection(0);
TH3D* hist1 = tmp->getTHn(step1)->Projection(0, tmp->getNVar() - 1, 2);
if (weighting == 0) {
weightHistogram(hist1, events1);
}

TH1D* events2 = (TH1D*)mTriggerHist->getTHn(step2)->Projection(0);
TH3D* hist2 = (TH3D*)tmp->getTHn(step2)->Projection(0, tmp->getNVar() - 1, 2);
TH1D* events2 = mTriggerHist->getTHn(step2)->Projection(0);
TH3D* hist2 = tmp->getTHn(step2)->Projection(0, tmp->getNVar() - 1, 2);
if (weighting == 0) {
weightHistogram(hist2, events2);
}
Expand Down Expand Up @@ -1430,7 +1430,7 @@ void CorrelationContainer::symmetrizepTBins()
}

// for symmetric bins
THnBase* source = (THnBase*)target->Clone();
THnBase* source = dynamic_cast<THnBase*>(target->Clone());

// axes: 0 delta eta; 1 pT,a; 2 pT,t; 3 centrality; 4 delta phi; 5 vtx-z
for (Int_t i3 = 1; i3 <= target->GetAxis(3)->GetNbins(); i3++) {
Expand Down Expand Up @@ -1573,7 +1573,7 @@ void CorrelationContainer::extendTrackingEfficiency(Bool_t verbose)
new TCanvas;
proj->DrawCopy();
}
if ((Int_t)proj->Fit("pol0", (verbose) ? "+" : "Q0+", "SAME", fitRangeBegin, fitRangeEnd) == 0) {
if (static_cast<Int_t>(proj->Fit("pol0", (verbose) ? "+" : "Q0+", "SAME", fitRangeBegin, fitRangeEnd)) == 0) {
target[i] = proj->GetFunction("pol0")->GetParameter(0);
} else {
target[i] = 0;
Expand Down
2 changes: 1 addition & 1 deletion PWGCF/EbyEFluctuations/Tasks/NetProtonCumulants.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct NetProtonCumulants_Table_QA {

// Filter command***********
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
Filter trackFilter = (nabs(aod::track::eta) < 0.8f) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl);
Filter trackFilter = (nabs(aod::track::eta) < 0.8f) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast<uint8_t>(true))) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl);

// Connect to ccdb
Service<ccdb::BasicCCDBManager> ccdb;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1699,7 +1699,7 @@ struct RobustFluctuationObservables {
histosEvent.fill(HIST("h2D_diffFoundBC_vs_BC"), collBC, diffFoundBC_vs_BC);

if (collision.has_foundBC())
histosEvent.fill(HIST("h2D_diffFoundBC_vs_BC_inTF"), collBC, static_cast<int64_t>(foundBcInTF) - static_cast<int64_t>(bcInTF));
histosEvent.fill(HIST("h2D_diffFoundBC_vs_BC_inTF"), collBC, foundBcInTF - bcInTF);

// with FT0 conditions
if (isFT0) {
Expand Down
6 changes: 3 additions & 3 deletions PWGCF/EbyEFluctuations/Tasks/antiprotonCumulantsMc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ struct AntiprotonCumulantsMc {

// Filter command for rec (data)***********
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (aod::track::itsChi2NCl < cfgCutItsChi2NCl) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy);
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast<uint8_t>(true))) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (aod::track::itsChi2NCl < cfgCutItsChi2NCl) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy);

// filtering collisions and tracks for real data***********
using AodCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFDDMs>>;
Expand Down Expand Up @@ -138,8 +138,8 @@ struct AntiprotonCumulantsMc {
ccdb->setCreatedNotAfter(ccdbNoLaterThan.value);
LOGF(info, "Getting object %s", ccdbPath.value.data());
TList* lst = ccdb->getForTimeStamp<TList>(ccdbPath.value, ccdbNoLaterThan.value);
hRatio2DEtaVsPtProton = reinterpret_cast<TH2F*>(lst->FindObject("hRatio2DEtaVsPtProton"));
hRatio2DEtaVsPtAntiproton = reinterpret_cast<TH2F*>(lst->FindObject("hRatio2DEtaVsPtAntiproton"));
hRatio2DEtaVsPtProton = dynamic_cast<TH2F*>(lst->FindObject("hRatio2DEtaVsPtProton"));
hRatio2DEtaVsPtAntiproton = dynamic_cast<TH2F*>(lst->FindObject("hRatio2DEtaVsPtAntiproton"));
if (!hRatio2DEtaVsPtProton || !hRatio2DEtaVsPtAntiproton)
LOGF(info, "FATAL!! could not get efficiency---------> check");
}
Expand Down
2 changes: 1 addition & 1 deletion PWGCF/EbyEFluctuations/Tasks/eventMeanPtId.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ struct EventMeanPtId {
// ccdb->setCreatedNotAfter(ccdbNoLaterThan.value);
// LOGF(info, "Getting object %s", ccdbPath.value.data());
TList* lst = ccdb->getForTimeStamp<TList>(cfgPathCCDB.value, 1);
ptHistogramAllchargeRec = reinterpret_cast<TH2D*>(lst->FindObject("hPtEta_rec"));
ptHistogramAllchargeRec = dynamic_cast<TH2D*>(lst->FindObject("hPtEta_rec"));
}
std::vector<double> ptBinning = {0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0};
AxisSpec vtxZAxis = {100, -20.0, 20.0, "Z (cm)"};
Expand Down
4 changes: 2 additions & 2 deletions PWGCF/EbyEFluctuations/Tasks/kaonIsospinFluctuations.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2440,8 +2440,8 @@ struct KaonIsospinFluctuations {

void processSim(MyMcCollisions const& mcCollisions, aod::McParticles const& mcParticles)
{
auto finalParticleIdList = (std::vector<int>)cfgFinalParticleIdList;
auto nonFinalParticleIdList = (std::vector<int>)cfgNonFinalParticleIdList;
auto finalParticleIdList = std::vector<int>(cfgFinalParticleIdList);
auto nonFinalParticleIdList = std::vector<int>(cfgNonFinalParticleIdList);
std::sort(finalParticleIdList.begin(), finalParticleIdList.end());
std::sort(nonFinalParticleIdList.begin(), nonFinalParticleIdList.end());

Expand Down
6 changes: 3 additions & 3 deletions PWGCF/EbyEFluctuations/Tasks/netprotcumulants.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ struct NetProtCumulants {

// Filter command for rec (data)***********
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (aod::track::itsChi2NCl < cfgCutItsChi2NCl) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy);
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast<uint8_t>(true))) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (aod::track::itsChi2NCl < cfgCutItsChi2NCl) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy);

// filtering collisions and tracks for real data***********
using AodCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFDDMs>>;
Expand Down Expand Up @@ -203,8 +203,8 @@ struct NetProtCumulants {
ccdb->setCreatedNotAfter(ccdbNoLaterThan.value);
LOGF(info, "Getting object %s", ccdbPath.value.data());
TList* lst = ccdb->getForTimeStamp<TList>(ccdbPath.value, ccdbNoLaterThan.value);
hRatio2DEtaVsPtProton = reinterpret_cast<TH2F*>(lst->FindObject("hRatio2DEtaVsPtProton"));
hRatio2DEtaVsPtAntiproton = reinterpret_cast<TH2F*>(lst->FindObject("hRatio2DEtaVsPtAntiproton"));
hRatio2DEtaVsPtProton = dynamic_cast<TH2F*>(lst->FindObject("hRatio2DEtaVsPtProton"));
hRatio2DEtaVsPtAntiproton = dynamic_cast<TH2F*>(lst->FindObject("hRatio2DEtaVsPtAntiproton"));
if (!hRatio2DEtaVsPtProton || !hRatio2DEtaVsPtAntiproton)
LOGF(info, "FATAL!! could not get efficiency---------> check");
}
Expand Down
6 changes: 3 additions & 3 deletions PWGCF/EbyEFluctuations/Tasks/netprotonCumulantsMc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ struct NetprotonCumulantsMc {

// Filter command for rec (data)***********
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (aod::track::itsChi2NCl < cfgCutItsChi2NCl) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy);
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtLower) && (aod::track::pt < 5.0f) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast<uint8_t>(true))) && (aod::track::tpcChi2NCl < cfgCutTpcChi2NCl) && (aod::track::itsChi2NCl < cfgCutItsChi2NCl) && (nabs(aod::track::dcaZ) < cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgCutDCAxy);

// filtering collisions and tracks for real data***********
using AodCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFDDMs>>;
Expand Down Expand Up @@ -138,8 +138,8 @@ struct NetprotonCumulantsMc {
ccdb->setCreatedNotAfter(ccdbNoLaterThan.value);
LOGF(info, "Getting object %s", ccdbPath.value.data());
TList* lst = ccdb->getForTimeStamp<TList>(ccdbPath.value, ccdbNoLaterThan.value);
hRatio2DEtaVsPtProton = reinterpret_cast<TH2F*>(lst->FindObject("hRatio2DEtaVsPtProton"));
hRatio2DEtaVsPtAntiproton = reinterpret_cast<TH2F*>(lst->FindObject("hRatio2DEtaVsPtAntiproton"));
hRatio2DEtaVsPtProton = dynamic_cast<TH2F*>(lst->FindObject("hRatio2DEtaVsPtProton"));
hRatio2DEtaVsPtAntiproton = dynamic_cast<TH2F*>(lst->FindObject("hRatio2DEtaVsPtAntiproton"));
if (!hRatio2DEtaVsPtProton || !hRatio2DEtaVsPtAntiproton)
LOGF(info, "FATAL!! could not get efficiency---------> check");
}
Expand Down
10 changes: 5 additions & 5 deletions PWGCF/EbyEFluctuations/Tasks/v0ptHadPiKaProt.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ struct V0ptHadPiKaProt {
ccdb->setCreatedNotAfter(ccdbNoLaterThan.value);
LOGF(info, "Getting object %s", ccdbPath.value.data());
TList* lst = ccdb->getForTimeStamp<TList>(ccdbPath.value, ccdbNoLaterThan.value);
hWeightPhiFunctionVzEtaPhi = reinterpret_cast<TH3D*>(lst->FindObject("hWeightPhiFunctionVzEtaPhi"));
hWeightPhiFunctionVzEtaPhi = dynamic_cast<TH3D*>(lst->FindObject("hWeightPhiFunctionVzEtaPhi"));
if (!hWeightPhiFunctionVzEtaPhi)
LOGF(info, "FATAL!! could not get phi weights---------> check");
}
Expand All @@ -299,10 +299,10 @@ struct V0ptHadPiKaProt {
ccdb->setCreatedNotAfter(ccdbNoLaterThanPtEff.value);
LOGF(info, "Getting object %s", ccdbPathPtEff.value.data());
TList* lst = ccdb->getForTimeStamp<TList>(ccdbPathPtEff.value, ccdbNoLaterThanPtEff.value);
hEffAllCharged = reinterpret_cast<TH1D*>(lst->FindObject("hEffAllCharged"));
hEffPion = reinterpret_cast<TH1D*>(lst->FindObject("hEffPion"));
hEffKaon = reinterpret_cast<TH1D*>(lst->FindObject("hEffKaon"));
hEffProton = reinterpret_cast<TH1D*>(lst->FindObject("hEffProton"));
hEffAllCharged = dynamic_cast<TH1D*>(lst->FindObject("hEffAllCharged"));
hEffPion = dynamic_cast<TH1D*>(lst->FindObject("hEffPion"));
hEffKaon = dynamic_cast<TH1D*>(lst->FindObject("hEffKaon"));
hEffProton = dynamic_cast<TH1D*>(lst->FindObject("hEffProton"));
if (!hEffAllCharged || !hEffPion || !hEffKaon || !hEffProton)
LOGF(info, "FATAL!! could not get efficiency files---------> !!! check !!!");
}
Expand Down
4 changes: 2 additions & 2 deletions PWGCF/Femto3D/Core/femto3dPairTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ Type getBinIndex(float const& value, std::vector<float> const& binning, int cons
for (unsigned int i = 0; i < binning.size() - 1; i++) {
if (value >= binning[i] && binning[i + 1] > value) {
if (NsubBins < 2) {
res = (Type)i;
res = static_cast<Type>(i);
break;
} else {
float subBinWidth = (binning[i + 1] - binning[i]) / NsubBins;
int subBin = std::floor((value - binning[i]) / subBinWidth);
int delimeter = std::pow(10, std::to_string(NsubBins).size());

res = (Type)i + (Type)subBin / delimeter;
res = static_cast<Type>(i) + static_cast<Type>(subBin) / delimeter;
break;
}
}
Expand Down
6 changes: 3 additions & 3 deletions PWGCF/Femto3D/Tools/checkPacking.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ bool process(const TString& outputName, const int nevents = 100000)
LOG(info) << "Bin width = " << T::bin_width << " vs histo " << hgaus->GetXaxis()->GetBinWidth(1);
hgaus->SetLineColor(2);
hgaus->SetLineStyle(1);
TH1F* hgausPacked = static_cast<TH1F*>(hgaus->Clone("hgausPacked"));
TH1F* hgausPacked = dynamic_cast<TH1F*>(hgaus->Clone("hgausPacked"));
hgausPacked->SetLineColor(4);
hgausPacked->SetLineStyle(2);

TH1F* huniform = static_cast<TH1F*>(hgaus->Clone("huniform"));
TH1F* huniform = dynamic_cast<TH1F*>(hgaus->Clone("huniform"));
huniform->SetLineColor(2);
huniform->SetLineStyle(1);
TH1F* huniformPacked = static_cast<TH1F*>(hgaus->Clone("huniformPacked"));
TH1F* huniformPacked = dynamic_cast<TH1F*>(hgaus->Clone("huniformPacked"));
huniformPacked->SetLineColor(4);
huniformPacked->SetLineStyle(2);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ struct femtoDreamProducerReducedTask {

if (ConfIsDebug) {
outputDebugParts(track.sign(),
(uint8_t)track.tpcNClsFound(),
static_cast<uint8_t>(track.tpcNClsFound()),
track.tpcNClsFindable(),
(uint8_t)track.tpcNClsCrossedRows(),
static_cast<uint8_t>(track.tpcNClsCrossedRows()),
track.tpcNClsShared(),
track.tpcInnerParam(),
track.itsNCls(),
Expand Down
Loading
Loading