Skip to content
Merged
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
13 changes: 10 additions & 3 deletions PWGEM/Dilepton/Tasks/dileptonPolarization.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "PWGEM/Dilepton/Utils/EMFwdTrack.h"
#include "PWGEM/Dilepton/Utils/EMTrack.h"
#include "PWGEM/Dilepton/Utils/EMTrackUtilities.h"
// #include "PWGEM/Dilepton/Utils/EventHistograms.h"
#include "PWGEM/Dilepton/Utils/EventMixingHandler.h"
#include "PWGEM/Dilepton/Utils/PairUtilities.h"

Expand Down Expand Up @@ -111,8 +110,8 @@

struct : ConfigurableGroup {
std::string prefix = "dileptoncut_group";
Configurable<float> cfg_min_mass{"cfg_min_mass", 0.0, "min mass"};
Configurable<float> cfg_max_mass{"cfg_max_mass", 1e+10, "max mass"};
Configurable<float> cfg_min_pair_mass{"cfg_min_pair_mass", 0.0, "min pair mass"};
Configurable<float> cfg_max_pair_mass{"cfg_max_pair_mass", 1e+10, "max pair mass"};
Configurable<float> cfg_min_pair_pt{"cfg_min_pair_pt", 0.0, "min pair pT"};
Configurable<float> cfg_max_pair_pt{"cfg_max_pair_pt", 1e+10, "max pair pT"};
Configurable<float> cfg_min_pair_y{"cfg_min_pair_y", -0.9, "min pair rapidity"};
Expand Down Expand Up @@ -464,6 +463,14 @@
ROOT::Math::PtEtaPhiMVector v2(dilepton.pt2(), dilepton.eta2(), dilepton.phi2(), leptonM2);
ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;

if (v12.M() < dileptoncuts.cfg_min_pair_mass || dileptoncuts.cfg_max_pair_mass < v12.M()) {
return false;
}

if (v12.Pt() < dileptoncuts.cfg_min_pair_pt || dileptoncuts.cfg_max_pair_pt < v12.Pt()) {
return false;
}

if (v12.Rapidity() < dileptoncuts.cfg_min_pair_y || dileptoncuts.cfg_max_pair_y < v12.Rapidity()) {
return false;
}
Expand Down Expand Up @@ -493,21 +500,21 @@
int mbin = lower_bound(mll_bin_edges.begin(), mll_bin_edges.end(), v12.M()) - mll_bin_edges.begin() - 1;
if (mbin < 0) {
mbin = 0;
} else if (static_cast<int>(mll_bin_edges.size()) - 2 < mbin) {

Check failure on line 503 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

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.
mbin = static_cast<int>(mll_bin_edges.size()) - 2;
}

int ptbin = lower_bound(ptll_bin_edges.begin(), ptll_bin_edges.end(), v12.Pt()) - ptll_bin_edges.begin() - 1;
if (ptbin < 0) {
ptbin = 0;
} else if (static_cast<int>(ptll_bin_edges.size()) - 2 < ptbin) {

Check failure on line 510 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

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.
ptbin = static_cast<int>(ptll_bin_edges.size()) - 2;
}

int etabin = lower_bound(etall_bin_edges.begin(), etall_bin_edges.end(), v12.Eta()) - etall_bin_edges.begin() - 1;
if (etabin < 0) {
etabin = 0;
} else if (static_cast<int>(etall_bin_edges.size()) - 2 < etabin) {

Check failure on line 517 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

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.
etabin = static_cast<int>(etall_bin_edges.size()) - 2;
}

Expand All @@ -516,7 +523,7 @@
int phibin = lower_bound(phill_bin_edges.begin(), phill_bin_edges.end(), phi12) - phill_bin_edges.begin() - 1;
if (phibin < 0) {
phibin = 0;
} else if (static_cast<int>(phill_bin_edges.size()) - 2 < phibin) {

Check failure on line 526 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

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.
phibin = static_cast<int>(phill_bin_edges.size()) - 2;
}

Expand Down Expand Up @@ -611,21 +618,21 @@
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 621 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

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;
}

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 628 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

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;
}

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 635 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

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 @@ -640,7 +647,7 @@

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

Check failure on line 650 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

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 Expand Up @@ -675,14 +682,14 @@
int mbin = lower_bound(mll_bin_edges.begin(), mll_bin_edges.end(), empair1.mass()) - mll_bin_edges.begin() - 1;
if (mbin < 0) {
mbin = 0;
} else if (static_cast<int>(mll_bin_edges.size()) - 2 < mbin) {

Check failure on line 685 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

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.
mbin = static_cast<int>(mll_bin_edges.size()) - 2;
}

int ptbin = lower_bound(ptll_bin_edges.begin(), ptll_bin_edges.end(), empair1.pt()) - ptll_bin_edges.begin() - 1;
if (ptbin < 0) {
ptbin = 0;
} else if (static_cast<int>(ptll_bin_edges.size()) - 2 < ptbin) {

Check failure on line 692 in PWGEM/Dilepton/Tasks/dileptonPolarization.cxx

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.
ptbin = static_cast<int>(ptll_bin_edges.size()) - 2;
}

Expand Down
Loading