Skip to content
Merged
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
32 changes: 16 additions & 16 deletions PWGHF/Core/SelectorCuts.h
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ static const std::vector<std::string> labelsCutVar = {"m", "pT p", "pT K", "pT P
namespace hf_cuts_xic_to_xi_pi_pi
{
static constexpr int NBinsPt = 13;
static constexpr int NCutVars = 11;
static constexpr int NCutVars = 13;
// default values for the pT bin edges (can be used to configure histogram axis)
// offset by 1 from the bin numbers in cuts array
constexpr double BinsPt[NBinsPt + 1] = {
Expand All @@ -808,20 +808,20 @@ constexpr double BinsPt[NBinsPt + 1] = {
20.};
auto vecBinsPt = std::vector<double>{BinsPt, BinsPt + NBinsPt + 1};

// default values for the cuts m Y Eta EtaDau ptPi0 ptPi1 chi2SV dL dLXY invMass Xi-Pi pairs
constexpr double Cuts[NBinsPt][NCutVars] = {{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 0 < pT < 1 */
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 1 < pT < 2 */
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 2 < pT < 3 */
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 3 < pT < 4 */
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 4 < pT < 5 */
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 5 < pT < 6 */
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 6 < pT < 7 */
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 7 < pT < 8 */
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 8 < pT < 9 */
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 9 < pT < 10 */
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 10 < pT < 11 */
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}, /* 11 < pT < 12 */
{0.4, 0.8, 0.8, 0.8, 0.4, 0.4, 100, 0.0, 0.0, 2.4, 2.4}}; /* 12 < pT < 20 */
// default values for the cuts m Y Eta EtaPi EtaXi pT Pi0 Pi1 Sum chi2SV dL dLXY invMass Xi-Pi pairs
constexpr double Cuts[NBinsPt][NCutVars] = {{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 0 < pT < 1 */
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 1 < pT < 2 */
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 2 < pT < 3 */
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 3 < pT < 4 */
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 4 < pT < 5 */
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 5 < pT < 6 */
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 6 < pT < 7 */
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 7 < pT < 8 */
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 8 < pT < 9 */
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 9 < pT < 10 */
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 10 < pT < 11 */
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}, /* 11 < pT < 12 */
{0.4, 0.8, 0.8, 0.8, 1.0, 0.1, 0.1, 0.2, 100, 0.0, 0.0, 2.4, 2.4}}; /* 12 < pT < 20 */

// row labels
static const std::vector<std::string> labelsPt = {
Expand All @@ -840,7 +840,7 @@ static const std::vector<std::string> labelsPt = {
"pT bin 12"};

// column labels
static const std::vector<std::string> labelsCutVar = {"m", "y", "eta", "eta Daughters", "pT Pi0", "pT Pi1", "chi2SV", "min decay length", "min decay length XY", "max inv mass Xi-Pi0", "max inv mass Xi-Pi1"};
static const std::vector<std::string> labelsCutVar = {"m", "y", "eta", "eta Pi from XicPlus", "eta Xi Daughters", "pT Pi0", "pT Pi1", "pT Pi0 + Pi1", "chi2SV", "min decay length", "min decay length XY", "max inv mass Xi-Pi0", "max inv mass Xi-Pi1"};
} // namespace hf_cuts_xic_to_xi_pi_pi

namespace hf_cuts_xicc_to_p_k_pi_pi
Expand Down
51 changes: 17 additions & 34 deletions PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,16 @@ struct HfCandidateCreatorXicToXiPiPi {
}

// add histograms to registry
registry.add("hVertexerType", "Use DCAFitter or KFParticle;;entries", {HistType::kTH1F, {{2, -0.5, 1.5}}});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use TH1D for 1D histograms to avoid truncation of bin content in case of large number of entries

Suggested change
registry.add("hVertexerType", "Use DCAFitter or KFParticle;;entries", {HistType::kTH1F, {{2, -0.5, 1.5}}});
registry.add("hVertexerType", "Use DCAFitter or KFParticle;;entries", {HistType::kTH1D, {{2, -0.5, 1.5}}});

registry.get<TH1>(HIST("hVertexerType"))->GetXaxis()->SetBinLabel(1 + aod::hf_cand::VertexerType::DCAFitter, "DCAFitter");
registry.get<TH1>(HIST("hVertexerType"))->GetXaxis()->SetBinLabel(1 + aod::hf_cand::VertexerType::KfParticle, "KFParticle");
registry.add("hCandCounter", "hCandCounter", {HistType::kTH1D, {{4, -0.5, 3.5}}});
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + TotalSkimmedTriplets, "total");
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + SelEvent, "Event selected");
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + CascPreSel, "Cascade preselection");
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + VertexFit, "Successful vertex fit");
// physical variables
if (fillHistograms) {
// counter
registry.add("hVertexerType", "Use DCAFitter or KFParticle;;entries", {HistType::kTH1F, {{2, -0.5, 1.5}}});
registry.get<TH1>(HIST("hVertexerType"))->GetXaxis()->SetBinLabel(1 + aod::hf_cand::VertexerType::DCAFitter, "DCAFitter");
registry.get<TH1>(HIST("hVertexerType"))->GetXaxis()->SetBinLabel(1 + aod::hf_cand::VertexerType::KfParticle, "KFParticle");
registry.add("hCandCounter", "hCandCounter", {HistType::kTH1F, {{4, -0.5, 3.5}}});
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + TotalSkimmedTriplets, "total");
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + SelEvent, "Event selected");
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + CascPreSel, "Cascade preselection");
registry.get<TH1>(HIST("hCandCounter"))->GetXaxis()->SetBinLabel(1 + VertexFit, "Successful vertex fit");
// physical variables
registry.add("hMass3", "3-prong candidates;inv. mass (#Xi #pi #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1D, {{500, 2.3, 2.7}}});
registry.add("hCovPVXX", "3-prong candidates;XX element of cov. matrix of prim. vtx. position (cm^{2});entries", {HistType::kTH1D, {{100, 0., 1.e-4}}});
registry.add("hCovSVXX", "3-prong candidates;XX element of cov. matrix of sec. vtx. position (cm^{2});entries", {HistType::kTH1D, {{100, 0., 0.2}}});
Expand Down Expand Up @@ -205,9 +204,7 @@ struct HfCandidateCreatorXicToXiPiPi {
{
// loop over triplets of track indices
for (const auto& rowTrackIndexXicPlus : rowsTrackIndexXicPlus) {
if (fillHistograms) {
registry.fill(HIST("hCandCounter"), TotalSkimmedTriplets);
}
registry.fill(HIST("hCandCounter"), TotalSkimmedTriplets);

// check if the event is selected
auto collision = rowTrackIndexXicPlus.collision_as<Collision>();
Expand All @@ -217,9 +214,7 @@ struct HfCandidateCreatorXicToXiPiPi {
/// at least one event selection not satisfied --> reject the candidate
continue;
}
if (fillHistograms) {
registry.fill(HIST("hCandCounter"), SelEvent);
}
registry.fill(HIST("hCandCounter"), SelEvent);

// Retrieve skimmed cascade and pion tracks
auto cascAodElement = rowTrackIndexXicPlus.cascade_as<CascadesLinked>();
Expand All @@ -239,9 +234,7 @@ struct HfCandidateCreatorXicToXiPiPi {
continue;
}
}
if (fillHistograms) {
registry.fill(HIST("hCandCounter"), CascPreSel);
}
registry.fill(HIST("hCandCounter"), CascPreSel);

//----------------------Set the magnetic field from ccdb---------------------------------------
/// The static instance of the propagator was already modified in the HFTrackIndexSkimCreator,
Expand Down Expand Up @@ -294,9 +287,7 @@ struct HfCandidateCreatorXicToXiPiPi {
LOG(info) << "Run time error found: " << error.what() << ". DCAFitterN cannot work, skipping the candidate.";
continue;
}
if (fillHistograms) {
registry.fill(HIST("hCandCounter"), VertexFit);
}
registry.fill(HIST("hCandCounter"), VertexFit);

//----------------------------calculate physical properties-----------------------
// Charge of charm baryon
Expand Down Expand Up @@ -446,9 +437,7 @@ struct HfCandidateCreatorXicToXiPiPi {
{
// loop over triplets of track indices
for (const auto& rowTrackIndexXicPlus : rowsTrackIndexXicPlus) {
if (fillHistograms) {
registry.fill(HIST("hCandCounter"), TotalSkimmedTriplets);
}
registry.fill(HIST("hCandCounter"), TotalSkimmedTriplets);

// check if the event is selected
auto collision = rowTrackIndexXicPlus.collision_as<Collision>();
Expand All @@ -458,9 +447,7 @@ struct HfCandidateCreatorXicToXiPiPi {
/// at least one event selection not satisfied --> reject the candidate
continue;
}
if (fillHistograms) {
registry.fill(HIST("hCandCounter"), SelEvent);
}
registry.fill(HIST("hCandCounter"), SelEvent);

// Retrieve skimmed cascade and pion tracks
auto cascAodElement = rowTrackIndexXicPlus.cascade_as<aod::KFCascadesLinked>();
Expand All @@ -480,9 +467,7 @@ struct HfCandidateCreatorXicToXiPiPi {
continue;
}
}
if (fillHistograms) {
registry.fill(HIST("hCandCounter"), CascPreSel);
}
registry.fill(HIST("hCandCounter"), CascPreSel);

//----------------------Set the magnetic field from ccdb-----------------------------
/// The static instance of the propagator was already modified in the HFTrackIndexSkimCreator,
Expand Down Expand Up @@ -539,9 +524,7 @@ struct HfCandidateCreatorXicToXiPiPi {
LOG(debug) << "Failed to construct XicPlus : " << e.what();
continue;
}
if (fillHistograms) {
registry.fill(HIST("hCandCounter"), VertexFit);
}
registry.fill(HIST("hCandCounter"), VertexFit);

// get chi2 values
float chi2GeoXicPlus = kfXicPlus.GetChi2() / kfXicPlus.GetNDF();
Expand Down
Loading
Loading