Skip to content

Commit c735708

Browse files
authored
[PWGEM/Dilepton] add a flag to use PDG mass of Jpsi (#17559)
1 parent bb8ee4f commit c735708

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

PWGEM/Dilepton/Tasks/dimuonV1.cxx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ struct dimuonV1 {
8282
o2::framework::Configurable<float> cfgRotationMin{"cfgRotationMin", -M_PI / 4, "min. rotation angle for rotation bkg"};
8383
o2::framework::Configurable<float> cfgRotationMax{"cfgRotationMax", +M_PI / 4, "max. rotation angle for rotation bkg"};
8484
o2::framework::Configurable<bool> cfgUseRapidity{"cfgUseRapidity", true, "flag to use rapidity. if false, pseudorapidity"};
85+
o2::framework::Configurable<bool> cfgUsePDGJPsiMass{"cfgUsePDGJPsiMass", true, "flag to use pdg mass of Jpsi"};
8586

8687
EMEventCut fEMEventCut;
8788
struct : o2::framework::ConfigurableGroup {
@@ -198,14 +199,6 @@ struct dimuonV1 {
198199
mRunNumber = collision.runNumber();
199200
}
200201

201-
~dimuonV1()
202-
{
203-
// delete emh_pos;
204-
// emh_pos = 0x0;
205-
// delete emh_neg;
206-
// emh_neg = 0x0;
207-
}
208-
209202
void addhistograms()
210203
{
211204
// event info
@@ -328,6 +321,7 @@ struct dimuonV1 {
328321
ROOT::Math::PtEtaPhiMVector v1(t1.pt(), t1.eta(), RecoDecay::constrainAngle(t1.phi(), 0, 1U), o2::constants::physics::MassMuon);
329322
ROOT::Math::PtEtaPhiMVector v2(t2.pt(), t2.eta(), RecoDecay::constrainAngle(t2.phi(), 0, 1U), o2::constants::physics::MassMuon);
330323
ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
324+
ROOT::Math::PtEtaPhiMVector v12pdg(v12.Pt(), v12.Eta(), v12.Phi(), o2::constants::physics::MassJPsi);
331325
float phi = RecoDecay::constrainAngle(v12.Phi(), 0, 1U);
332326

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

338332
if (t1.sign() * t2.sign() < 0) { // ULS
339333
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);
334+
if (cfgUsePDGJPsiMass) {
335+
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);
336+
} else {
337+
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);
338+
}
341339
} else {
342340
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);
343341
}
@@ -346,8 +344,13 @@ struct dimuonV1 {
346344
float dphi = distDPhi(engine);
347345
ROOT::Math::PtEtaPhiMVector v2rot(t2.pt(), t2.eta(), RecoDecay::constrainAngle(t2.phi() + M_PI + dphi, 0, 1U), o2::constants::physics::MassMuon);
348346
ROOT::Math::PtEtaPhiMVector v12bkg = v1 + v2rot;
347+
ROOT::Math::PtEtaPhiMVector v12bkgpdg(v12bkg.Pt(), v12bkg.Eta(), v12bkg.Phi(), o2::constants::physics::MassJPsi);
349348
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));
349+
if (cfgUsePDGJPsiMass) {
350+
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));
351+
} else {
352+
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));
353+
}
351354
} else {
352355
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));
353356
}

0 commit comments

Comments
 (0)