Skip to content
Open
8 changes: 4 additions & 4 deletions PWGHF/ALICE3/TableProducer/candidateCreatorXicc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ struct HfCandidateCreatorXicc {
trackParVarPi.propagateToDCA(primaryVertex, bz, &impactParameter1);

// get uncertainty of the decay length
double phi, theta;
double phi{}, theta{};
getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexXicc, phi, theta);
auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));
auto errorDecayLengthXY = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, 0.) + getRotatedCovMatrixXX(covMatrixPCA, phi, 0.));
Expand Down Expand Up @@ -224,9 +224,9 @@ struct HfCandidateCreatorXiccMc {
aod::TracksWMc const&,
aod::McParticles const& mcParticles)
{
int8_t sign = 0;
int8_t flag;
int8_t origin;
int8_t sign{};
int8_t flag{};
int8_t origin{};

// Match reconstructed candidates.
for (const auto& candidate : candidates) {
Expand Down
33 changes: 19 additions & 14 deletions PWGHF/ALICE3/Tasks/taskQaPidRejection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,29 @@
/// \author Henrique J C Zanoli <henrique.zanoli@cern.ch>, Utrecht University
/// \author Nicolo' Jacazio <nicolo.jacazio@cern.ch>, CERN

#include <utility>
#include <vector>

#include <TEfficiency.h>
#include <TList.h>
#include <TPDGCode.h>

#include "Framework/AnalysisTask.h"
#include "Framework/HistogramRegistry.h"
#include "ReconstructionDataFormats/DCA.h"

#include "ALICE3/DataModel/MID.h"
#include "ALICE3/DataModel/RICH.h"
#include "Common/Core/TrackSelectorPID.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/DataModel/PIDResponseTOF.h"

#include <Framework/ASoA.h>
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisHelpers.h>
#include <Framework/AnalysisTask.h>
#include <Framework/Configurable.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>
#include <Framework/InitContext.h>
#include <Framework/Variant.h>
#include <ReconstructionDataFormats/PID.h>

#include <TPDGCode.h>
#include <TString.h>

#include "PWGHF/DataModel/CandidateReconstructionTables.h"
#include <cstdint>
#include <cstdlib>
#include <utility>
#include <vector>

using namespace o2;
using namespace o2::framework;
Expand Down
7 changes: 5 additions & 2 deletions PWGHF/D2H/Macros/HFInvMassFitter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <TDatabasePDG.h>
#include <TLine.h>
#include <TPaveText.h>
#include <TString.h>
#include <TStyle.h>
#include <TVirtualPad.h>

Expand Down Expand Up @@ -791,15 +792,17 @@ void HFInvMassFitter::plotRefl(RooAbsPdf* pdf)
// Calculate fit to data ratio
void HFInvMassFitter::calculateFitToDataRatio() const
{
if (!mInvMassFrame)
if (!mInvMassFrame) {
return;
}

// Get the data and fit curves from the frame
auto* dataHist = dynamic_cast<RooHist*>(mInvMassFrame->findObject("data_c"));
auto* fitCurve = dynamic_cast<RooCurve*>(mInvMassFrame->findObject("Tot_c")); // or the relevant fit curve

if (!dataHist || !fitCurve)
if (!dataHist || !fitCurve) {
return;
}

RooHist* ratioHist = new RooHist();

Expand Down
1 change: 0 additions & 1 deletion PWGHF/D2H/Macros/runMassFitter.C
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include <map>
#include <stdexcept>
#include <string>
#include <tuple>
#include <type_traits>
#include <vector>

Expand Down
4 changes: 2 additions & 2 deletions PWGHF/D2H/TableProducer/candidateCreatorB0Reduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ struct HfCandidateCreatorB0Reduced {
trackParCovPi.propagateToDCA(primaryVertex, bz, &dcaBachPion);

// get uncertainty of the decay length
float phi, theta;
float phi{}, theta{};
// getPointDirection modifies phi and theta
getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexB0, phi, theta);
auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));
Expand Down Expand Up @@ -312,7 +312,7 @@ struct HfCandidateCreatorB0Reduced {
trackParCovPi.propagateToDCA(primaryVertex, bz, &dcaPion);

// get uncertainty of the decay length
float phi, theta;
float phi{}, theta{};
// getPointDirection modifies phi and theta
getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexB0, phi, theta);
auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));
Expand Down
4 changes: 2 additions & 2 deletions PWGHF/D2H/TableProducer/candidateCreatorBToJpsiReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ struct HfCandidateCreatorBToJpsiReduced {
trackParCovLf0.propagateToDCA(primaryVertex, bz, &dcaKaon);

// get uncertainty of the decay length
double phi, theta;
double phi{}, theta{};
// getPointDirection modifies phi and theta
getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexBplus, phi, theta);
auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));
Expand Down Expand Up @@ -330,7 +330,7 @@ struct HfCandidateCreatorBToJpsiReduced {
trackParCovLf1.propagateToDCA(primaryVertex, bz, &dcaTrackLf1);

// get uncertainty of the decay length
double phi, theta;
double phi{}, theta{};
// getPointDirection modifies phi and theta
getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexBs, phi, theta);
auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/D2H/TableProducer/candidateCreatorBplusReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ struct HfCandidateCreatorBplusReduced {
trackParCovPi.propagateToDCA(primaryVertex, bz, &dcaPion);

// get uncertainty of the decay length
double phi, theta;
double phi{}, theta{};
// getPointDirection modifies phi and theta
getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexBplus, phi, theta);
auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/D2H/TableProducer/candidateCreatorBsReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ struct HfCandidateCreatorBsReduced {
trackParCovPi.propagateToDCA(primaryVertex, bz, &dcaPion);

// get uncertainty of the decay length
float phi, theta;
float phi{}, theta{};
// getPointDirection modifies phi and theta
getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexB, phi, theta);
auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ struct HfCandidateCreatorCharmResoReduced {
registry.fill(HIST("hMassV0DauVsPt"), invMassV0Tr, candV0Tr.pt());
}
} else if constexpr (DType == DMesonType::Dstar) {
float invMassD0;
float invMassD0{};
if (candD.sign() > 0) {
invMassD = candD.invMassDstar();
invMassD0 = candD.invMassD0();
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/D2H/TableProducer/candidateCreatorLbReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ struct HfCandidateCreatorLbReduced {
trackParCovPi.propagateToDCA(primaryVertex, bz, &dcaPion);

// get uncertainty of the decay length
float phi, theta;
float phi{}, theta{};
// getPointDirection modifies phi and theta
getPointDirection(std::array{collision.posX(), collision.posY(), collision.posZ()}, secondaryVertexLb, phi, theta);
auto errorDecayLength = std::sqrt(getRotatedCovMatrixXX(covMatrixPV, phi, theta) + getRotatedCovMatrixXX(covMatrixPCA, phi, theta));
Expand Down
4 changes: 2 additions & 2 deletions PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ struct HfDataCreatorCharmHadPiReduced {
o2::hf_evsel::HfEventSelectionMc hfEvSelMc;

// CCDB service
Service<o2::ccdb::BasicCCDBManager> ccdb;
Service<o2::ccdb::BasicCCDBManager> ccdb{};
o2::base::Propagator::MatCorrType noMatCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE;
int runNumber{};

// O2DatabasePDG service
Service<o2::framework::O2DatabasePDG> pdg;
Service<o2::framework::O2DatabasePDG> pdg{};

double massC{0.};
double massB{0.};
Expand Down
4 changes: 2 additions & 2 deletions PWGHF/D2H/TableProducer/dataCreatorCharmResoToD0Reduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ struct HfDataCreatorCharmResoToD0Reduced {

// CCDB service
o2::ccdb::CcdbApi ccdbApi;
Service<o2::ccdb::BasicCCDBManager> ccdb;
Service<o2::ccdb::BasicCCDBManager> ccdb{};
double bz{0.};
int runNumber{0}; // needed to detect if the run changed and trigger update of calibrations etc.

Expand All @@ -111,7 +111,7 @@ struct HfDataCreatorCharmResoToD0Reduced {
o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;

// O2DatabasePDG service
Service<o2::framework::O2DatabasePDG> pdg;
Service<o2::framework::O2DatabasePDG> pdg{};

// vertex fitter
o2::vertexing::DCAFitterN<2> fitter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ struct HfDataCreatorCharmResoToDplusReduced {

// CCDB service
o2::ccdb::CcdbApi ccdbApi;
Service<o2::ccdb::BasicCCDBManager> ccdb;
Service<o2::ccdb::BasicCCDBManager> ccdb{};
double bz{0.};
int runNumber{0}; // needed to detect if the run changed and trigger update of calibrations etc.

Expand All @@ -111,7 +111,7 @@ struct HfDataCreatorCharmResoToDplusReduced {
o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;

// O2DatabasePDG service
Service<o2::framework::O2DatabasePDG> pdg;
Service<o2::framework::O2DatabasePDG> pdg{};

// vertex fitter
o2::vertexing::DCAFitterN<2> fitter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ struct HfDataCreatorCharmResoToDstarReduced {

// CCDB service
o2::ccdb::CcdbApi ccdbApi;
Service<o2::ccdb::BasicCCDBManager> ccdb;
Service<o2::ccdb::BasicCCDBManager> ccdb{};
double bz{0.};
int runNumber{0}; // needed to detect if the run changed and trigger update of calibrations etc.

Expand All @@ -110,7 +110,7 @@ struct HfDataCreatorCharmResoToDstarReduced {
o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;

// O2DatabasePDG service
Service<o2::framework::O2DatabasePDG> pdg;
Service<o2::framework::O2DatabasePDG> pdg{};

// vertex fitter
o2::vertexing::DCAFitterN<2> fitter;
Expand Down
4 changes: 2 additions & 2 deletions PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ struct HfDataCreatorJpsiHadReduced {
TrackSelectorEl selectorElectron;

// CCDB service
Service<o2::ccdb::BasicCCDBManager> ccdb;
Service<o2::ccdb::BasicCCDBManager> ccdb{};
// O2DatabasePDG service
Service<o2::framework::O2DatabasePDG> pdg;
Service<o2::framework::O2DatabasePDG> pdg{};

using TracksPid = soa::Join<aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidTPCFullKa, aod::pidTOFFullKa, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::pidTPCFullEl, aod::pidTOFFullEl>;
using TracksPidWithSel = soa::Join<aod::TracksWCovDcaExtra, TracksPid, aod::TrackSelection>;
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/D2H/Tasks/taskB0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct HfTaskB0 {
Configurable<bool> checkDecayTypeMc{"checkDecayTypeMc", false, "Flag to enable DecayType histogram"};

// O2DatabasePDG service
Service<o2::framework::O2DatabasePDG> pdg;
Service<o2::framework::O2DatabasePDG> pdg{};

using TracksWithSel = soa::Join<aod::Tracks, aod::TrackSelection>;

Expand Down
2 changes: 1 addition & 1 deletion PWGHF/D2H/Tasks/taskBplus.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct HfTaskBplus {
Configurable<std::vector<double>> binsPt{"binsPt", std::vector<double>{hf_cuts_bplus_to_d0_pi::vecBinsPt}, "pT bin limits"};

// O2DatabasePDG service
Service<o2::framework::O2DatabasePDG> pdg;
Service<o2::framework::O2DatabasePDG> pdg{};

Partition<soa::Join<aod::HfCandBplus, aod::HfSelBplusToD0Pi>> selectedBPlusCandidates = aod::hf_sel_candidate_bplus::isSelBplusToD0Pi >= selectionFlagBplus;
Partition<soa::Join<aod::HfCandBplus, aod::HfSelBplusToD0Pi, aod::HfCandBplusMcRec>> selectedBPlusCandidatesMC = aod::hf_sel_candidate_bplus::isSelBplusToD0Pi >= selectionFlagBplus;
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/D2H/Tasks/taskBs.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct HfTaskBs {
// MC checks
Configurable<bool> checkDecayTypeMc{"checkDecayTypeMc", false, "Flag to enable DecayType histogram"};

Service<o2::framework::O2DatabasePDG> pdg;
Service<o2::framework::O2DatabasePDG> pdg{};

using TracksWithSel = soa::Join<aod::Tracks, aod::TrackSelection>;

Expand Down
5 changes: 5 additions & 0 deletions PWGHF/D2H/Tasks/taskCd.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/PIDResponseITS.h"
#include "Common/DataModel/PIDResponseTOF.h"
#include "Common/DataModel/PIDResponseTPC.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include <Framework/ASoA.h>
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisHelpers.h>
#include <Framework/AnalysisTask.h>
#include <Framework/Configurable.h>
#include <Framework/HistogramRegistry.h>
Expand All @@ -41,6 +45,7 @@

#include <array>
#include <cmath>
#include <cstdint>
#include <numeric>
#include <string>
#include <vector> // std::vector
Expand Down
Loading
Loading