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
6 changes: 4 additions & 2 deletions PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ struct Pi0EtaToGammaGamma {
o2::framework::ConfigurableAxis ConfEPBins{"ConfEPBins", {o2::framework::VARIABLE_WIDTH, -o2::constants::math::PIHalf, -o2::constants::math::PIQuarter, 0.0f, +o2::constants::math::PIQuarter, +o2::constants::math::PIHalf}, "Mixing bins - event plane angle"};
o2::framework::ConfigurableAxis ConfOccupancyBins{"ConfOccupancyBins", {o2::framework::VARIABLE_WIDTH, -1, 1e+10}, "Mixing bins - occupancy"};
o2::framework::Configurable<bool> cfgSparseFullAxes{"cfgSparseFullAxes", false, "add event plane, occupancy and z-vertex axes to Pair/same/hs and Pair/mix/hs"};
o2::framework::Configurable<int> cfgNbinsMass{"cfgNbinsMass", 400, "number of bins for the mass axis in same and mixed events"};
o2::framework::Configurable<std::vector<double>> cfgMassBinRange{"cfgMassBinRange", {0., 0.8}, "range for the mass-axis in GeV/c2"};

o2::framework::Configurable<int> cfgAlphaMesonCut{"cfgAlphaMesonCut", 0, "flag for photon energy asymmetry distribution cut: 0: no cut, 1: cut specific value, 2: cut depending on pT"};
o2::framework::Configurable<float> cfgAlphaMeson{"cfgAlphaMeson", 0.65, "photon energy asymmetry distribution parameter for specific value cut"};
Expand Down Expand Up @@ -428,9 +430,9 @@ struct Pi0EtaToGammaGamma {
std::vector<double> epBinsForHs(ep_bin_edges.begin(), ep_bin_edges.end());
std::vector<double> vtxBinsForHs(zvtx_bin_edges.begin(), zvtx_bin_edges.end());
if constexpr (pairtype == o2::aod::pwgem::photonmeson::photonpair::PairType::kPCMDalitzEE) {
o2::aod::pwgem::photonmeson::utils::nmhistogram::addNMHistograms(&fRegistry, false, "ee#gamma", cfgSparseFullAxes.value, occBinsForHs, epBinsForHs, vtxBinsForHs);
o2::aod::pwgem::photonmeson::utils::nmhistogram::addNMHistograms(&fRegistry, false, "ee#gamma", cfgSparseFullAxes.value, occBinsForHs, epBinsForHs, vtxBinsForHs, cfgNbinsMass, {cfgMassBinRange->at(0), cfgMassBinRange->at(1)});
} else {
o2::aod::pwgem::photonmeson::utils::nmhistogram::addNMHistograms(&fRegistry, false, "#gamma#gamma", cfgSparseFullAxes.value, occBinsForHs, epBinsForHs, vtxBinsForHs);
o2::aod::pwgem::photonmeson::utils::nmhistogram::addNMHistograms(&fRegistry, false, "#gamma#gamma", cfgSparseFullAxes.value, occBinsForHs, epBinsForHs, vtxBinsForHs, cfgNbinsMass, {cfgMassBinRange->at(0), cfgMassBinRange->at(1)});
}
DefineEMEventCut();
DefinePCMCut();
Expand Down
7 changes: 5 additions & 2 deletions PWGEM/PhotonMeson/Core/Pi0EtaToGammaGammaMC.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ struct Pi0EtaToGammaGammaMC {
o2::framework::Configurable<std::string> fd_k0s_to_pi0{"fd_k0s_pi0", "1.0", "feed down correction to pi0"};
o2::framework::Configurable<bool> cfgRequireTrueAssociation{"cfgRequireTrueAssociation", false, "flag to require true mc collision association"};

o2::framework::Configurable<int> cfgNbinsMass{"cfgNbinsMass", 400, "number of bins for the mass axis in same and mixed events"};
o2::framework::Configurable<std::vector<double>> cfgMassBinRange{"cfgMassBinRange", {0., 0.8}, "range for the mass-axis in GeV/c2"};

o2::framework::Configurable<int> cfgAlphaMesonCut{"cfgAlphaMesonCut", 0, "flag for photon energy asymmetry distribution cut: 0: no cut, 1: cut specific value, 2: cut depending on pT"};
o2::framework::Configurable<float> cfgAlphaMeson{"cfgAlphaMeson", 0.65, "photon energy asymmetry distribution parameter for specific value cut"};
o2::framework::Configurable<float> cfgAlphaMesonA{"cfgAlphaMesonA", 0.65, "photon energy asymmetry distribution parameter A for pT dependent cut (A * tanh(B*pT))"};
Expand Down Expand Up @@ -276,9 +279,9 @@ struct Pi0EtaToGammaGammaMC {
{
o2::aod::pwgem::photonmeson::utils::eventhistogram::addEventHistograms(&fRegistry);
if constexpr (pairtype == o2::aod::pwgem::photonmeson::photonpair::PairType::kPCMDalitzEE) {
o2::aod::pwgem::photonmeson::utils::nmhistogram::addNMHistograms(&fRegistry, true, "ee#gamma");
o2::aod::pwgem::photonmeson::utils::nmhistogram::addNMHistograms(&fRegistry, true, "ee#gamma", false, {}, {}, {}, cfgNbinsMass, {cfgMassBinRange->at(0), cfgMassBinRange->at(1)});
} else {
o2::aod::pwgem::photonmeson::utils::nmhistogram::addNMHistograms(&fRegistry, true, "#gamma#gamma");
o2::aod::pwgem::photonmeson::utils::nmhistogram::addNMHistograms(&fRegistry, true, "#gamma#gamma", false, {}, {}, {}, cfgNbinsMass, {cfgMassBinRange->at(0), cfgMassBinRange->at(1)});
}
DefineEMEventCut();
DefinePCMCut();
Expand Down
16 changes: 10 additions & 6 deletions PWGEM/PhotonMeson/Utils/NMHistograms.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <TPDGCode.h>
#include <TString.h>

#include <array>
#include <vector>

namespace o2::aod::pwgem::photonmeson::utils::nmhistogram
Expand All @@ -40,12 +41,15 @@ namespace o2::aod::pwgem::photonmeson::utils::nmhistogram
/// \param occBins data only: occupancy bin edges
/// \param epBins data only: event plane bin edges
/// \param vtxBins data only: z-vertex bin edges
inline void addNMHistograms(o2::framework::HistogramRegistry* fRegistry, bool isMC,
inline void addNMHistograms(o2::framework::HistogramRegistry* fRegistry,
bool isMC,
const char* pairname = "#gamma#gamma",
bool sparseFullAxes = false,
std::vector<double> const& occBins = {0, 500, 1000, 2000, 3000, 5000, 10000},
std::vector<double> const& epBins = {-o2::constants::math::PIHalf, -o2::constants::math::PIQuarter, 0, o2::constants::math::PIQuarter, o2::constants::math::PIHalf},
std::vector<double> const& vtxBins = {-10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10})
std::vector<double> const& vtxBins = {-10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10},
const int nBinsMass = 400,
const std::array<double, 2> massBinRange = {0., 0.8})
{
// !!Don't change pt,eta,y binning. These binnings have to be consistent with binned data at skimming.!!
std::vector<double> ptbins;
Expand All @@ -63,7 +67,10 @@ inline void addNMHistograms(o2::framework::HistogramRegistry* fRegistry, bool is
ptbins.emplace_back(1.0 * (i - 61) + 10.0); // from 10 to 20 GeV/c, every 1 GeV/c
}
const o2::framework::AxisSpec axis_pt{ptbins, Form("p_{T,%s} (GeV/c)", pairname)};
const o2::framework::AxisSpec axis_mass{400, 0, 0.8, Form("m_{%s} (GeV/c^{2})", pairname)};
const o2::framework::AxisSpec axis_mass{nBinsMass, massBinRange[0], massBinRange[1], Form("m_{%s} (GeV/c^{2})", pairname)};
const o2::framework::AxisSpec axis_occ{occBins, "occupancy"};
const o2::framework::AxisSpec axis_ep{epBins, "#Psi_{2} (rad)"};
const o2::framework::AxisSpec axis_vtx{vtxBins, "Z_{vtx} (cm)"};

if (isMC) {
fRegistry->add("Pair/Pi0/hs_Primary", "rec. true pi0", o2::framework::HistType::kTHnSparseD, {axis_mass, axis_pt}, true);
Expand All @@ -88,9 +95,6 @@ inline void addNMHistograms(o2::framework::HistogramRegistry* fRegistry, bool is
fRegistry->get<TH2>(HIST("Generated/Eta/hPtY"))->SetYTitle("rapidity |y|");
} else {
if (sparseFullAxes) {
const o2::framework::AxisSpec axis_occ{occBins, "occupancy"};
const o2::framework::AxisSpec axis_ep{epBins, "#Psi_{2} (rad)"};
const o2::framework::AxisSpec axis_vtx{vtxBins, "Z_{vtx} (cm)"};
fRegistry->add("Pair/same/hs", "diphoton",
o2::framework::HistType::kTHnSparseD,
{axis_mass, axis_pt, axis_ep, axis_occ, axis_vtx}, true);
Expand Down
Loading