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
4 changes: 3 additions & 1 deletion PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@

template <o2::aod::pwgem::photonmeson::photonpair::PairType pairtype, o2::soa::is_table... Types>
struct Pi0EtaToGammaGamma {
o2::framework::Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

Check failure on line 82 in PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
o2::framework::Configurable<std::string> grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"};
o2::framework::Configurable<std::string> grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
o2::framework::Configurable<bool> skipGRPOquery{"skipGRPOquery", true, "skip grpo query"};
o2::framework::Configurable<float> d_bz_input{"d_bz_input", -999, "bz field in kG, -999 is automatic"};

Check failure on line 86 in PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
o2::framework::Configurable<uint64_t> ndiff_bc_mix{"ndiff_bc_mix", 594, "difference in global BC required in mixed events"};

Check failure on line 87 in PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)

o2::framework::Configurable<int> cfgQvecEstimator{"cfgQvecEstimator", 0, "FT0M:0, FT0A:1, FT0C:2"};
o2::framework::Configurable<int> cfgCentEstimator{"cfgCentEstimator", 2, "FT0M:0, FT0A:1, FT0C:2"};
Expand Down Expand Up @@ -137,6 +137,8 @@
o2::framework::Configurable<float> cfg_max_eta_v0{"cfg_max_eta_v0", 0.8, "max eta for v0 photons at PV"};
o2::framework::Configurable<float> cfg_min_v0radius{"cfg_min_v0radius", 4.0, "min v0 radius"};
o2::framework::Configurable<float> cfg_max_v0radius{"cfg_max_v0radius", 90.0, "max v0 radius"};
o2::framework::Configurable<float> cfg_midL_v0radius{"cfg_midL_v0radius", -1.0, "middle low v0 radius for rejection if >0"};
o2::framework::Configurable<float> cfg_midH_v0radius{"cfg_midH_v0radius", -1.0, "middle high v0 radius for rejection if >0"};
o2::framework::Configurable<float> cfg_max_alpha_ap{"cfg_max_alpha_ap", 0.95, "max alpha for AP cut"};
o2::framework::Configurable<float> cfg_max_qt_ap{"cfg_max_qt_ap", 0.01, "max qT for AP cut"};
o2::framework::Configurable<float> cfg_min_cospa{"cfg_min_cospa", 0.999, "min V0 CosPA"};
Expand Down Expand Up @@ -422,10 +424,10 @@
}

// In case override, don't proceed, please - no CCDB access required
if (d_bz_input > -990) {

Check failure on line 427 in PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
d_bz = d_bz_input;
o2::parameters::GRPMagField grpmag;
if (std::fabs(d_bz) > 1e-5) {

Check failure on line 430 in PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
grpmag.setL3Current(30000.f / (d_bz / 5.0f));
}
mRunNumber = collision.runNumber();
Expand Down Expand Up @@ -493,7 +495,7 @@
fV0PhotonCut.SetMinCosPA(pcmcuts.cfg_min_cospa);
fV0PhotonCut.SetMaxPCA(pcmcuts.cfg_max_pca);
fV0PhotonCut.SetMaxChi2KF(pcmcuts.cfg_max_chi2kf);
fV0PhotonCut.SetRxyRange(pcmcuts.cfg_min_v0radius, pcmcuts.cfg_max_v0radius);
fV0PhotonCut.SetRxyRange(pcmcuts.cfg_min_v0radius, pcmcuts.cfg_max_v0radius, pcmcuts.cfg_midL_v0radius, pcmcuts.cfg_midH_v0radius);
fV0PhotonCut.SetAPRange(pcmcuts.cfg_max_alpha_ap, pcmcuts.cfg_max_qt_ap);
fV0PhotonCut.RejectITSib(pcmcuts.cfg_reject_v0_on_itsib);

Expand Down Expand Up @@ -636,7 +638,7 @@
void RotationBackground(const ROOT::Math::PtEtaPhiMVector& meson, ROOT::Math::PtEtaPhiMVector photon1, ROOT::Math::PtEtaPhiMVector photon2, TPhotons const& photons_coll, unsigned int ig1, unsigned int ig2, float eventWeight)
{
// if less than 3 clusters are present skip event since we need at least 3 clusters
if (photons_coll.size() < 3) {

Check failure on line 641 in PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return;
}
const float rotationAngle = o2::constants::math::PIHalf; // rotaion angle 90 degree
Expand Down Expand Up @@ -747,7 +749,7 @@
int zbin = lower_bound(zvtx_bin_edges.begin(), zvtx_bin_edges.end(), collision.posZ()) - zvtx_bin_edges.begin() - 1;
if (zbin < 0) {
zbin = 0;
} else if (static_cast<int>(zvtx_bin_edges.size()) - 2 < zbin) {

Check failure on line 752 in PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
zbin = static_cast<int>(zvtx_bin_edges.size()) - 2;
}

Expand All @@ -755,7 +757,7 @@
int centbin = lower_bound(cent_bin_edges.begin(), cent_bin_edges.end(), centrality) - cent_bin_edges.begin() - 1;
if (centbin < 0) {
centbin = 0;
} else if (static_cast<int>(cent_bin_edges.size()) - 2 < centbin) {

Check failure on line 760 in PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
centbin = static_cast<int>(cent_bin_edges.size()) - 2;
}

Expand All @@ -763,7 +765,7 @@
int epbin = lower_bound(ep_bin_edges.begin(), ep_bin_edges.end(), ep2) - ep_bin_edges.begin() - 1;
if (epbin < 0) {
epbin = 0;
} else if (static_cast<int>(ep_bin_edges.size()) - 2 < epbin) {

Check failure on line 768 in PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
epbin = static_cast<int>(ep_bin_edges.size()) - 2;
}

Expand All @@ -778,7 +780,7 @@

if (occbin < 0) {
occbin = 0;
} else if (static_cast<int>(occ_bin_edges.size()) - 2 < occbin) {

Check failure on line 783 in PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
occbin = static_cast<int>(occ_bin_edges.size()) - 2;
}

Expand Down
4 changes: 3 additions & 1 deletion PWGEM/PhotonMeson/Core/Pi0EtaToGammaGammaMC.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ struct Pi0EtaToGammaGammaMC {
o2::framework::Configurable<float> cfg_max_eta_v0{"cfg_max_eta_v0", 0.8, "max eta for v0 photons at PV"};
o2::framework::Configurable<float> cfg_min_v0radius{"cfg_min_v0radius", 4.0, "min v0 radius"};
o2::framework::Configurable<float> cfg_max_v0radius{"cfg_max_v0radius", 90.0, "max v0 radius"};
o2::framework::Configurable<float> cfg_midL_v0radius{"cfg_midL_v0radius", -1.0, "middle low v0 radius for rejection if >0"};
o2::framework::Configurable<float> cfg_midH_v0radius{"cfg_midH_v0radius", -1.0, "middle high v0 radius for rejection if >0"};
o2::framework::Configurable<float> cfg_max_alpha_ap{"cfg_max_alpha_ap", 0.95, "max alpha for AP cut"};
o2::framework::Configurable<float> cfg_max_qt_ap{"cfg_max_qt_ap", 0.01, "max qT for AP cut"};
o2::framework::Configurable<float> cfg_min_cospa{"cfg_min_cospa", 0.999, "min V0 CosPA"};
Expand Down Expand Up @@ -341,7 +343,7 @@ struct Pi0EtaToGammaGammaMC {
fV0PhotonCut.SetMinCosPA(pcmcuts.cfg_min_cospa);
fV0PhotonCut.SetMaxPCA(pcmcuts.cfg_max_pca);
fV0PhotonCut.SetMaxChi2KF(pcmcuts.cfg_max_chi2kf);
fV0PhotonCut.SetRxyRange(pcmcuts.cfg_min_v0radius, pcmcuts.cfg_max_v0radius);
fV0PhotonCut.SetRxyRange(pcmcuts.cfg_min_v0radius, pcmcuts.cfg_max_v0radius, pcmcuts.cfg_midL_v0radius, pcmcuts.cfg_midH_v0radius);
fV0PhotonCut.SetAPRange(pcmcuts.cfg_max_alpha_ap, pcmcuts.cfg_max_qt_ap);
fV0PhotonCut.RejectITSib(pcmcuts.cfg_reject_v0_on_itsib);

Expand Down
8 changes: 7 additions & 1 deletion PWGEM/PhotonMeson/Core/V0PhotonCut.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,17 @@ void V0PhotonCut::SetMaxMeePsiPairDep(std::function<float(float)> psiDepCut)
mMaxMeePsiPairDep = psiDepCut;
LOG(info) << "V0 Photon Cut, set max mee psi pair dep: " << mMaxMeePsiPairDep(0.1);
}
void V0PhotonCut::SetRxyRange(float min, float max)
void V0PhotonCut::SetRxyRange(float min, float max, float midL, float midH)
{
mMinRxy = min;
mMaxRxy = max;
mMidRxyLow = midL;
mMidRxyHigh = midH;
LOG(info) << "V0 Photon selection, set Rxy range: " << mMinRxy << " - " << mMaxRxy;
if (midL >= 0.f && midH >= 0.f && midH > midL) {
LOG(info) << "Rejecting Rxy interval: "
<< mMidRxyLow << " - " << mMidRxyHigh;
}
}
void V0PhotonCut::SetMinCosPA(float min)
{
Expand Down
7 changes: 6 additions & 1 deletion PWGEM/PhotonMeson/Core/V0PhotonCut.h
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,10 @@ class V0PhotonCut : public TNamed
if (v0.v0radius() < mMinRxy || mMaxRxy < v0.v0radius()) {
return false;
}
if (mMidRxyLow > 0.f && mMidRxyHigh > 0.f &&
v0.v0radius() >= mMidRxyLow && v0.v0radius() <= mMidRxyHigh) {
return false;
}
return true;
}

Expand Down Expand Up @@ -1093,7 +1097,7 @@ class V0PhotonCut : public TNamed
void SetPsiPairRange(float min = -3.15, float max = +3.15);
void SetPhivPairRange(float min = 0.f, float max = +3.15);
void SetAPRange(float max_alpha = 0.95, float max_qt = 0.05); // Armenteros Podolanski
void SetRxyRange(float min = 0.f, float max = 180.f);
void SetRxyRange(float min = 0.f, float max = 180.f, float midL = -1.f, float midH = -1.f);
void SetMinCosPA(float min = 0.95);
void SetMaxPCA(float max = 2.f);
void SetMaxChi2KF(float max = 1e+10);
Expand Down Expand Up @@ -1169,6 +1173,7 @@ class V0PhotonCut : public TNamed
float mMinPsiPair{-3.15}, mMaxPsiPair{+3.15};
float mMinPhivPair{0.f}, mMaxPhivPair{+3.15};
float mMinRxy{0.f}, mMaxRxy{180.f};
float mMidRxyLow{-1.f}, mMidRxyHigh{-1.f};
float mMinCosPA{0.95};
float mMaxPCA{2.f};
float mMaxChi2KF{1e+10};
Expand Down
5 changes: 3 additions & 2 deletions PWGEM/PhotonMeson/Tasks/pcmQC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ struct PCMQC {
Configurable<float> cfg_max_eta_v0{"cfg_max_eta_v0", +0.8, "max eta for v0 photons at PV"};
Configurable<float> cfg_min_v0radius{"cfg_min_v0radius", 4.0, "min v0 radius"};
Configurable<float> cfg_max_v0radius{"cfg_max_v0radius", 90.0, "max v0 radius"};
Configurable<float> cfg_midL_v0radius{"cfg_midL_v0radius", -1.0, "middle low v0 radius for rejection if >0"};
Configurable<float> cfg_midH_v0radius{"cfg_midH_v0radius", -1.0, "middle high v0 radius for rejection if >0"};
Configurable<float> cfg_max_alpha_ap{"cfg_max_alpha_ap", 0.95, "max alpha for AP cut"};
Configurable<float> cfg_max_qt_ap{"cfg_max_qt_ap", 0.01, "max qT for AP cut"};
Configurable<float> cfg_min_cospa{"cfg_min_cospa", 0.999, "min V0 CosPA"};
Expand Down Expand Up @@ -320,7 +322,7 @@ struct PCMQC {
fV0PhotonCut.SetMinCosPA(pcmcuts.cfg_min_cospa);
fV0PhotonCut.SetMaxPCA(pcmcuts.cfg_max_pca);
fV0PhotonCut.SetMaxChi2KF(pcmcuts.cfg_max_chi2kf);
fV0PhotonCut.SetRxyRange(pcmcuts.cfg_min_v0radius, pcmcuts.cfg_max_v0radius);
fV0PhotonCut.SetRxyRange(pcmcuts.cfg_min_v0radius, pcmcuts.cfg_max_v0radius, pcmcuts.cfg_midL_v0radius, pcmcuts.cfg_midH_v0radius);
fV0PhotonCut.SetAPRange(pcmcuts.cfg_max_alpha_ap, pcmcuts.cfg_max_qt_ap);
fV0PhotonCut.RejectITSib(pcmcuts.cfg_reject_v0_on_itsib);

Expand Down Expand Up @@ -513,7 +515,6 @@ struct PCMQC {
for (const auto& v0 : v0photons_coll) {
auto pos = v0.template posTrack_as<aod::V0Legs>();
auto ele = v0.template negTrack_as<aod::V0Legs>();

if (!fV0PhotonCut.IsSelected<decltype(v0), aod::V0Legs>(v0)) {
continue;
}
Expand Down
4 changes: 3 additions & 1 deletion PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ struct PCMQCMC {
Configurable<float> cfg_max_eta_v0{"cfg_max_eta_v0", +0.8, "max eta for v0 photons at PV"};
Configurable<float> cfg_min_v0radius{"cfg_min_v0radius", 4.0, "min v0 radius"};
Configurable<float> cfg_max_v0radius{"cfg_max_v0radius", 90.0, "max v0 radius"};
Configurable<float> cfg_midL_v0radius{"cfg_midL_v0radius", -1.0, "middle low v0 radius for rejection if >0"};
Configurable<float> cfg_midH_v0radius{"cfg_midH_v0radius", -1.0, "middle high v0 radius for rejection if >0"};
Configurable<float> cfg_max_alpha_ap{"cfg_max_alpha_ap", 0.95, "max alpha for AP cut"};
Configurable<float> cfg_max_qt_ap{"cfg_max_qt_ap", 0.01, "max qT for AP cut"};
Configurable<float> cfg_min_cospa{"cfg_min_cospa", 0.999, "min V0 CosPA"};
Expand Down Expand Up @@ -404,7 +406,7 @@ struct PCMQCMC {
fV0PhotonCut.SetMinCosPA(pcmcuts.cfg_min_cospa);
fV0PhotonCut.SetMaxPCA(pcmcuts.cfg_max_pca);
fV0PhotonCut.SetMaxChi2KF(pcmcuts.cfg_max_chi2kf);
fV0PhotonCut.SetRxyRange(pcmcuts.cfg_min_v0radius, pcmcuts.cfg_max_v0radius);
fV0PhotonCut.SetRxyRange(pcmcuts.cfg_min_v0radius, pcmcuts.cfg_max_v0radius, pcmcuts.cfg_midL_v0radius, pcmcuts.cfg_midH_v0radius);
fV0PhotonCut.SetAPRange(pcmcuts.cfg_max_alpha_ap, pcmcuts.cfg_max_qt_ap);
fV0PhotonCut.RejectITSib(pcmcuts.cfg_reject_v0_on_itsib);

Expand Down
4 changes: 3 additions & 1 deletion PWGEM/PhotonMeson/Tasks/prefilterPhoton.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ struct prefilterPhoton {
Configurable<float> cfg_max_eta_v0{"cfg_max_eta_v0", +0.9, "max eta for v0 photons at PV"};
Configurable<float> cfg_min_v0radius{"cfg_min_v0radius", 4.0, "min v0 radius"};
Configurable<float> cfg_max_v0radius{"cfg_max_v0radius", 90.0, "max v0 radius"};
Configurable<float> cfg_midL_v0radius{"cfg_midL_v0radius", -1.0, "middle low v0 radius for rejection if >0"};
Configurable<float> cfg_midH_v0radius{"cfg_midH_v0radius", -1.0, "middle high v0 radius for rejection if >0"};
Configurable<float> cfg_max_alpha_ap{"cfg_max_alpha_ap", 0.95, "max alpha for AP cut"};
Configurable<float> cfg_max_qt_ap{"cfg_max_qt_ap", 0.01, "max qT for AP cut"};
Configurable<float> cfg_min_cospa{"cfg_min_cospa", 0.99, "min V0 CosPA"};
Expand Down Expand Up @@ -274,7 +276,7 @@ struct prefilterPhoton {
fV0PhotonCut.SetMinCosPA(pcmcuts.cfg_min_cospa);
fV0PhotonCut.SetMaxPCA(pcmcuts.cfg_max_pca);
fV0PhotonCut.SetMaxChi2KF(pcmcuts.cfg_max_chi2kf);
fV0PhotonCut.SetRxyRange(pcmcuts.cfg_min_v0radius, pcmcuts.cfg_max_v0radius);
fV0PhotonCut.SetRxyRange(pcmcuts.cfg_min_v0radius, pcmcuts.cfg_max_v0radius, pcmcuts.cfg_midL_v0radius, pcmcuts.cfg_midH_v0radius);
fV0PhotonCut.SetAPRange(pcmcuts.cfg_max_alpha_ap, pcmcuts.cfg_max_qt_ap);
fV0PhotonCut.RejectITSib(pcmcuts.cfg_reject_v0_on_itsib);

Expand Down
Loading