Skip to content

Commit b9d32aa

Browse files
committed
[PWGEM/Dilepton] add a flag to use PDG mass of Jpsi
1 parent c5b4c23 commit b9d32aa

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

PWGEM/Dilepton/Tasks/dimuonV1.cxx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@
5454
#include <utility>
5555
#include <vector>
5656

57-
#include <math.h>
58-
5957
struct dimuonV1 {
6058

6159
// // Configurables
@@ -82,6 +80,7 @@ struct dimuonV1 {
8280
o2::framework::Configurable<float> cfgRotationMin{"cfgRotationMin", -M_PI / 4, "min. rotation angle for rotation bkg"};
8381
o2::framework::Configurable<float> cfgRotationMax{"cfgRotationMax", +M_PI / 4, "max. rotation angle for rotation bkg"};
8482
o2::framework::Configurable<bool> cfgUseRapidity{"cfgUseRapidity", true, "flag to use rapidity. if false, pseudorapidity"};
83+
o2::framework::Configurable<bool> cfgUsePDGJPsiMass{"cfgUsePDGJPsiMass", true, "flag to use pdg mass of Jpsi"};
8584

8685
EMEventCut fEMEventCut;
8786
struct : o2::framework::ConfigurableGroup {
@@ -328,6 +327,7 @@ struct dimuonV1 {
328327
ROOT::Math::PtEtaPhiMVector v1(t1.pt(), t1.eta(), RecoDecay::constrainAngle(t1.phi(), 0, 1U), o2::constants::physics::MassMuon);
329328
ROOT::Math::PtEtaPhiMVector v2(t2.pt(), t2.eta(), RecoDecay::constrainAngle(t2.phi(), 0, 1U), o2::constants::physics::MassMuon);
330329
ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
330+
ROOT::Math::PtEtaPhiMVector v12pdg(v12.Pt(), v12.Eta(), v12.Phi(), o2::constants::physics::MassJPsi);
331331
float phi = RecoDecay::constrainAngle(v12.Phi(), 0, 1U);
332332

333333
float uxQxt = std::cos(1.f * phi) * collision.qxZDCC();
@@ -337,7 +337,11 @@ struct dimuonV1 {
337337

338338
if (t1.sign() * t2.sign() < 0) { // ULS
339339
if (cfgUseRapidity) {
340-
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hs"), v12.M(), v12.Pt(), v12.Rapidity(), uxQxp - uxQxt, uyQyp - uyQyt, centrality, weight);
340+
if (cfgUsePDGJPsiMass) {
341+
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hs"), v12.M(), v12.Pt(), v12pdg.Rapidity(), uxQxp - uxQxt, uyQyp - uyQyt, centrality, weight);
342+
} else {
343+
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hs"), v12.M(), v12.Pt(), v12.Rapidity(), uxQxp - uxQxt, uyQyp - uyQyt, centrality, weight);
344+
}
341345
} else {
342346
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hs"), v12.M(), v12.Pt(), v12.Eta(), uxQxp - uxQxt, uyQyp - uyQyt, centrality, weight);
343347
}
@@ -346,8 +350,13 @@ struct dimuonV1 {
346350
float dphi = distDPhi(engine);
347351
ROOT::Math::PtEtaPhiMVector v2rot(t2.pt(), t2.eta(), RecoDecay::constrainAngle(t2.phi() + M_PI + dphi, 0, 1U), o2::constants::physics::MassMuon);
348352
ROOT::Math::PtEtaPhiMVector v12bkg = v1 + v2rot;
353+
ROOT::Math::PtEtaPhiMVector v12bkgpdg(v12bkg.Pt(), v12bkg.Eta(), v12bkg.Phi(), o2::constants::physics::MassJPsi);
349354
if (cfgUseRapidity) {
350-
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hsRotBkg"), v12bkg.M(), v12bkg.Pt(), v12bkg.Rapidity(), weight * 1.f / static_cast<float>(cfgNrotation));
355+
if (cfgUsePDGJPsiMass) {
356+
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hsRotBkg"), v12bkgpdg.M(), v12bkg.Pt(), v12bkg.Rapidity(), weight * 1.f / static_cast<float>(cfgNrotation));
357+
} else {
358+
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hsRotBkg"), v12bkg.M(), v12bkg.Pt(), v12bkg.Rapidity(), weight * 1.f / static_cast<float>(cfgNrotation));
359+
}
351360
} else {
352361
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hsRotBkg"), v12bkg.M(), v12bkg.Pt(), v12bkg.Eta(), weight * 1.f / static_cast<float>(cfgNrotation));
353362
}

0 commit comments

Comments
 (0)