Skip to content

Commit c0cdc11

Browse files
author
Isabel Kantak
committed
Add an optional alpha meson cut Pi0EtaToGammaGamma(MC)
1 parent 2134a4b commit c0cdc11

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@
7070
#include <utility>
7171
#include <vector>
7272

73+
enum AlphaMesonCutOption {
74+
Off = 0,
75+
SpecificValue = 1,
76+
PTDependent = 2
77+
};
78+
7379
template <o2::aod::pwgem::photonmeson::photonpair::PairType pairtype, o2::soa::is_table... Types>
7480
struct Pi0EtaToGammaGamma {
7581
o2::framework::Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
@@ -92,6 +98,11 @@ struct Pi0EtaToGammaGamma {
9298
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"};
9399
o2::framework::ConfigurableAxis ConfOccupancyBins{"ConfOccupancyBins", {o2::framework::VARIABLE_WIDTH, -1, 1e+10}, "Mixing bins - occupancy"};
94100

101+
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"};
102+
o2::framework::Configurable<float> cfgAlphaMeson{"cfgAlphaMeson", 0.65, "photon energy asymmetry distribution parameter for specific value cut"};
103+
o2::framework::Configurable<float> cfgAlphaMesonA{"cfgAlphaMesonA", 0.65, "photon energy asymmetry distribution parameter A for pT dependent cut"};
104+
o2::framework::Configurable<float> cfgAlphaMesonB{"cfgAlphaMesonB", 1.2, "photon energy asymmetry distribution parameter B for pT dependent cut"};
105+
95106
EMPhotonEventCut fEMEventCut;
96107
struct : o2::framework::ConfigurableGroup {
97108
std::string prefix = "eventcut_group";
@@ -880,6 +891,25 @@ struct Pi0EtaToGammaGamma {
880891
continue;
881892
}
882893

894+
float alpha_meson = std::fabs(g1.e() -g2.e())/(g1.e() + g2.e());
895+
float alpha_cut = 999.f;
896+
switch(cfgAlphaMesonCut) {
897+
case AlphaMesonCutOption::Off:
898+
break;
899+
case AlphaMesonCutOption::SpecificValue:
900+
alpha_cut = cfgAlphaMeson;
901+
break;
902+
case AlphaMesonCutOption::PTDependent: {
903+
alpha_cut = cfgAlphaMesonA * std::tanh(cfgAlphaMesonB * v12.pt());
904+
break;
905+
}
906+
default:
907+
LOGF(error, "Invalid option for alpha meson cut. No alpha cut will be applied.");
908+
}
909+
if (alpha_meson > alpha_cut) {
910+
continue;
911+
}
912+
883913
fRegistry.fill(HIST("Pair/same/hs"), v12.M(), v12.Pt(), weight);
884914

885915
if (std::find(used_photonIds_per_col.begin(), used_photonIds_per_col.end(), g1.globalIndex()) == used_photonIds_per_col.end()) {

PWGEM/PhotonMeson/Core/Pi0EtaToGammaGammaMC.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@
6565
#include <type_traits>
6666
#include <vector>
6767

68+
enum AlphaMesonCutOption {
69+
Off = 0,
70+
SpecificValue = 1,
71+
PTDependent = 2
72+
};
73+
6874
template <o2::aod::pwgem::photonmeson::photonpair::PairType pairtype, o2::soa::is_table... Types>
6975
struct Pi0EtaToGammaGammaMC {
7076
o2::framework::Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
@@ -81,6 +87,11 @@ struct Pi0EtaToGammaGammaMC {
8187
o2::framework::Configurable<std::string> fd_k0s_to_pi0{"fd_k0s_pi0", "1.0", "feed down correction to pi0"};
8288
o2::framework::Configurable<bool> cfgRequireTrueAssociation{"cfgRequireTrueAssociation", false, "flag to require true mc collision association"};
8389

90+
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"};
91+
o2::framework::Configurable<float> cfgAlphaMeson{"cfgAlphaMeson", 0.65, "photon energy asymmetry distribution parameter for specific value cut"};
92+
o2::framework::Configurable<float> cfgAlphaMesonA{"cfgAlphaMesonA", 0.65, "photon energy asymmetry distribution parameter A for pT dependent cut"};
93+
o2::framework::Configurable<float> cfgAlphaMesonB{"cfgAlphaMesonB", 1.2, "photon energy asymmetry distribution parameter B for pT dependent cut"};
94+
8495
EMPhotonEventCut fEMEventCut;
8596
struct : o2::framework::ConfigurableGroup {
8697
std::string prefix = "eventcut_group";
@@ -672,6 +683,25 @@ struct Pi0EtaToGammaGammaMC {
672683
continue;
673684
}
674685

686+
float alpha_meson = std::fabs(g1.e() -g2.e())/(g1.e() + g2.e());
687+
float alpha_cut = 999.f;
688+
switch(cfgAlphaMesonCut) {
689+
case AlphaMesonCutOption::Off:
690+
break;
691+
case AlphaMesonCutOption::SpecificValue:
692+
alpha_cut = cfgAlphaMeson;
693+
break;
694+
case AlphaMesonCutOption::PTDependent: {
695+
alpha_cut = cfgAlphaMesonA * std::tanh(cfgAlphaMesonB * v12.pt());
696+
break;
697+
}
698+
default:
699+
LOGF(error, "Invalid option for alpha meson cut. No alpha cut will be applied.");
700+
}
701+
if (alpha_meson > alpha_cut) {
702+
continue;
703+
}
704+
675705
if (pairtype == o2::aod::pwgem::photonmeson::photonpair::PairType::kEMCEMC) {
676706
float openingAngle = std::acos(v1.Vect().Dot(v2.Vect()) / (v1.P() * v2.P()));
677707
if (openingAngle < emccuts.minOpenAngle) {

0 commit comments

Comments
 (0)