Skip to content

Commit 58af9bf

Browse files
authored
[PWGLF] Add zorro selelction in table producer and fill phi pair vs. centrality in analysis task (#17027)
1 parent d6e364f commit 58af9bf

3 files changed

Lines changed: 119 additions & 69 deletions

File tree

PWGLF/TableProducer/Resonances/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ o2physics_add_dpl_workflow(f1protonreducedtable
2222

2323
o2physics_add_dpl_workflow(doublephitable
2424
SOURCES doublephitable.cxx
25-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DetectorsVertexing
25+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DetectorsVertexing O2Physics::EventFilteringUtils
2626
COMPONENT_NAME Analysis)
2727

2828
o2physics_add_dpl_workflow(filterf1proton

PWGLF/TableProducer/Resonances/doublephitable.cxx

Lines changed: 89 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include "PWGLF/DataModel/ReducedDoublePhiTables.h"
1818

1919
#include "Common/CCDB/EventSelectionParams.h"
20+
#include "Common/Core/Zorro.h"
21+
#include "Common/Core/ZorroSummary.h"
2022
#include "Common/DataModel/Centrality.h"
2123
#include "Common/DataModel/EventSelection.h"
2224
#include "Common/DataModel/Multiplicity.h"
@@ -55,19 +57,35 @@ struct doublephitable {
5557
Produces<aod::RedPhiEvents> redPhiEvents;
5658
Produces<aod::PhiTracks> phiTrack;
5759

60+
Service<o2::ccdb::BasicCCDBManager> ccdb;
61+
o2::ccdb::CcdbApi ccdbApi;
62+
63+
Zorro zorro;
64+
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};
65+
66+
/// Event selection
67+
struct : ConfigurableGroup {
68+
std::string prefix = std::string("EventSel");
69+
Configurable<bool> ConfEvtSelectZvtx{"ConfEvtSelectZvtx", true, "Event selection includes max. z-Vertex"};
70+
Configurable<float> ConfEvtZvtx{"ConfEvtZvtx", 10.f, "Evt sel: Max. z-Vertex (cm)"};
71+
Configurable<bool> ConfEvtSel8{"ConfEvtSel8", true, "Event selection sel8"};
72+
} EventSel;
73+
5874
// events
5975
Configurable<float> cfgCutVertex{"cfgCutVertex", 10.0f, "Accepted z-vertex range"};
6076
// Configurable<float> cfgCutCentralityMax{"cfgCutCentralityMax", 0.0f, "Accepted maximum Centrality"};
6177
// Configurable<float> cfgCutCentralityMin{"cfgCutCentralityMin", 100.0f, "Accepted minimum Centrality"};
6278
// track
79+
Configurable<std::string> url{"ccdb-url", "http://alice-ccdb.cern.ch", "ccdb-url"};
80+
Configurable<bool> useTrigger{"useTrigger", true, "use Trigger"};
6381
Configurable<bool> useGlobalTrack{"useGlobalTrack", true, "use Global track"};
6482
Configurable<float> cfgCutTOFBeta{"cfgCutTOFBeta", 0.0, "cut TOF beta"};
6583
Configurable<float> cfgCutCharge{"cfgCutCharge", 0.0, "cut on Charge"};
6684
Configurable<float> cfgCutPT{"cfgCutPT", 0.2, "PT cut on daughter track"};
6785
Configurable<float> cfgCutEta{"cfgCutEta", 0.8, "Eta cut on daughter track"};
6886
Configurable<float> cfgCutDCAxy{"cfgCutDCAxy", 2.0f, "DCAxy range for tracks"};
6987
Configurable<float> cfgCutDCAz{"cfgCutDCAz", 2.0f, "DCAz range for tracks"};
70-
Configurable<float> nsigmaCutTPC{"nsigmacutTPC", 3.0, "Value of the TPC Nsigma cut"};
88+
Configurable<float> nsigmaCutTPC{"nsigmacutTPC", -2.0, "Value of the TPC Nsigma cut"};
7189
Configurable<float> nsigmaCutTOF{"nsigmaCutTOF", 3.0, "Value of the TOF Nsigma cut"};
7290
Configurable<int> cfgITScluster{"cfgITScluster", 0, "Number of ITS cluster"};
7391
Configurable<int> cfgTPCcluster{"cfgTPCcluster", 70, "Number of TPC cluster"};
@@ -77,12 +95,13 @@ struct doublephitable {
7795
ConfigurableAxis configThnAxisPt{"configThnAxisPt", {100, 0.0, 10.}, "#it{p}_{T} (GeV/#it{c})"};
7896
Configurable<float> minPhiMass{"minPhiMass", 1.01, "Minimum phi mass"};
7997
Configurable<float> maxPhiMass{"maxPhiMass", 1.03, "Maximum phi mass"};
98+
Configurable<float> nsigmaCutTPCPreSel{"nsigmacutTPCPreSel", 3.0, "Value of the TPC Nsigma cut Pre selection"};
8099

81100
Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
82101
// Filter centralityFilter = (nabs(aod::cent::centFT0C) < cfgCutCentralityMax && nabs(aod::cent::centFT0C) > cfgCutCentralityMin);
83102
Filter acceptanceFilter = (nabs(aod::track::eta) < cfgCutEta && nabs(aod::track::pt) > cfgCutPT);
84103
Filter DCAcutFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
85-
Filter PIDcutFilter = nabs(aod::pidtpc::tpcNSigmaKa) < nsigmaCutTPC;
104+
Filter PIDcutFilter = nabs(aod::pidtpc::tpcNSigmaKa) < nsigmaCutTPCPreSel;
86105

87106
using EventCandidates = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Ms>>;
88107
using TrackCandidates = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTOFbeta, aod::pidTPCFullKa, aod::pidTOFFullKa>>;
@@ -91,6 +110,7 @@ struct doublephitable {
91110
Partition<TrackCandidates> posTracks = aod::track::signed1Pt > cfgCutCharge;
92111
Partition<TrackCandidates> negTracks = aod::track::signed1Pt < cfgCutCharge;
93112

113+
OutputObj<TH1D> hProcessedEvents{TH1D("hProcessedEvents", ";; Number of events", 4, 0.0f, 4.0f)};
94114
// Histogram
95115
HistogramRegistry qaRegistry{"QAHistos", {
96116
{"hEventstat", "hEventstat", {HistType::kTH1F, {{2, 0.0f, 2.0f}}}},
@@ -102,51 +122,64 @@ struct doublephitable {
102122

103123
double massKa = o2::constants::physics::MassKPlus;
104124

125+
void init(o2::framework::InitContext&)
126+
{
127+
ccdb->setURL(url.value);
128+
ccdbApi.init(url);
129+
ccdb->setCaching(true);
130+
ccdb->setLocalObjectValidityChecking();
131+
ccdb->setCreatedNotAfter(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
132+
zorroSummary.setObject(zorro.getZorroSummary());
133+
hProcessedEvents->GetXaxis()->SetBinLabel(1, "All Trigger events");
134+
hProcessedEvents->GetXaxis()->SetBinLabel(2, "Events with Double Phi Trigger");
135+
hProcessedEvents->GetXaxis()->SetBinLabel(3, "Events eith trigger and Evsel");
136+
hProcessedEvents->GetXaxis()->SetBinLabel(4, "Final Event");
137+
}
138+
template <typename T>
139+
bool isSelectedEvent(T const& col)
140+
{
141+
if (EventSel.ConfEvtSelectZvtx && std::abs(col.posZ()) > EventSel.ConfEvtZvtx) {
142+
return false;
143+
}
144+
if (EventSel.ConfEvtSel8 && !col.sel8()) {
145+
return false;
146+
}
147+
return true;
148+
}
105149
template <typename T>
106150
bool selectionTrack(const T& candidate)
107151
{
108-
if (useGlobalTrack && !(candidate.isGlobalTrack() && candidate.isPVContributor() && candidate.itsNCls() > cfgITScluster && candidate.tpcNClsFound() > cfgTPCcluster)) {
152+
if (useGlobalTrack && !(candidate.isGlobalTrack() && candidate.isPVContributor() && candidate.itsNCls() > cfgITScluster && candidate.tpcNClsCrossedRows() > cfgTPCcluster)) {
109153
return false;
110154
}
111155
return true;
112156
}
113157
template <typename T>
114158
bool selectionPID(const T& candidate)
115159
{
116-
if (!candidate.hasTOF() && TMath::Abs(candidate.tpcNSigmaKa()) < nsigmaCutTPC) {
160+
if (candidate.pt() < 0.5 && candidate.tpcNSigmaKa() > nsigmaCutTPC && candidate.tpcNSigmaKa() < 3.0) {
117161
return true;
118162
}
119-
if (candidate.hasTOF() && candidate.beta() > cfgCutTOFBeta && TMath::Abs(candidate.tpcNSigmaKa()) < nsigmaCutTPC && TMath::Abs(candidate.tofNSigmaKa()) < nsigmaCutTOF) {
120-
return true;
163+
if (candidate.pt() >= 0.5) {
164+
if (!candidate.hasTOF() && candidate.tpcNSigmaKa() > nsigmaCutTPC && candidate.tpcNSigmaKa() < 2.0) {
165+
return true;
166+
}
167+
if (candidate.hasTOF() && candidate.beta() > cfgCutTOFBeta && TMath::Sqrt(candidate.tpcNSigmaKa() * candidate.tpcNSigmaKa() + candidate.tofNSigmaKa() * candidate.tofNSigmaKa()) < nsigmaCutTOF) {
168+
return true;
169+
}
121170
}
122171
return false;
123172
}
124-
// deep angle cut on pair to remove photon conversion
125-
template <typename T1, typename T2>
126-
bool selectionPair(const T1& candidate1, const T2& candidate2)
127-
{
128-
double pt1, pt2, pz1, pz2, p1, p2, angle;
129-
pt1 = candidate1.pt();
130-
pt2 = candidate2.pt();
131-
pz1 = candidate1.pz();
132-
pz2 = candidate2.pz();
133-
p1 = candidate1.p();
134-
p2 = candidate2.p();
135-
angle = TMath::ACos((pt1 * pt2 + pz1 * pz2) / (p1 * p2));
136-
if (isDeepAngle && angle < cfgDeepAngle) {
137-
return false;
138-
}
139-
return true;
140-
}
141173

174+
int currentRunNumber = -999;
175+
int lastRunNumber = -999;
142176
ROOT::Math::PxPyPzMVector KaonPlus, KaonMinus, PhiMesonMother, PhiVectorDummy, Phid1dummy, Phid2dummy;
143177
void processPhiReducedTable(EventCandidates::iterator const& collision, TrackCandidates const&, aod::BCsWithTimestamps const&)
144178
{
145179
o2::aod::ITSResponse itsResponse;
146180
bool keepEventDoublePhi = false;
147181
int numberPhi = 0;
148-
auto currentRunNumber = collision.bc_as<aod::BCsWithTimestamps>().runNumber();
149-
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
182+
150183
std::vector<int64_t> Phid1Index = {};
151184
std::vector<int64_t> Phid2Index = {};
152185

@@ -167,7 +200,25 @@ struct doublephitable {
167200
int Npostrack = 0;
168201
int Nnegtrack = 0;
169202
float centrality = collision.centFT0M();
170-
if (collision.sel8() && collision.selection_bit(aod::evsel::kNoTimeFrameBorder) && collision.selection_bit(aod::evsel::kNoITSROFrameBorder) && collision.selection_bit(aod::evsel::kNoSameBunchPileup) && collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) {
203+
currentRunNumber = collision.bc_as<aod::BCsWithTimestamps>().runNumber();
204+
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
205+
hProcessedEvents->Fill(0.5);
206+
bool zorroSelected = false;
207+
if (currentRunNumber != lastRunNumber) {
208+
zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), "fTriggerEventDoublePhi");
209+
zorro.populateHistRegistry(qaRegistry, bc.runNumber());
210+
lastRunNumber = currentRunNumber;
211+
}
212+
if (useTrigger) {
213+
zorroSelected = zorro.isSelected(collision.template bc_as<aod::BCsWithTimestamps>().globalBC());
214+
} else {
215+
zorroSelected = true;
216+
}
217+
if (zorroSelected) {
218+
hProcessedEvents->Fill(1.5);
219+
}
220+
if (zorroSelected && isSelectedEvent(collision)) {
221+
hProcessedEvents->Fill(2.5);
171222
auto posThisColl = posTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);
172223
auto negThisColl = negTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);
173224
for (auto track1 : posThisColl) {
@@ -179,7 +230,7 @@ struct doublephitable {
179230
if (!selectionPID(track1)) {
180231
continue;
181232
}
182-
if (!(itsResponse.nSigmaITS<o2::track::PID::Kaon>(track1) > -3.0 && itsResponse.nSigmaITS<o2::track::PID::Kaon>(track1) < 3.0)) {
233+
if (track1.pt() > 0.4 && track1.pt() < 1.0 && !(itsResponse.nSigmaITS<o2::track::PID::Kaon>(track1) > -2.0 && itsResponse.nSigmaITS<o2::track::PID::Kaon>(track1) < 3.0)) {
183234
continue;
184235
}
185236
Npostrack = Npostrack + 1;
@@ -188,7 +239,12 @@ struct doublephitable {
188239
qaRegistry.fill(HIST("hNsigmaPtkaonTOF"), track1.tofNSigmaKa(), track1.pt());
189240
}
190241
auto track1ID = track1.globalIndex();
242+
191243
for (auto track2 : negThisColl) {
244+
auto track2ID = track2.globalIndex();
245+
if (track2ID == track1ID) {
246+
continue;
247+
}
192248
// track selection
193249
if (!selectionTrack(track2)) {
194250
continue;
@@ -197,18 +253,11 @@ struct doublephitable {
197253
if (!selectionPID(track2)) {
198254
continue;
199255
}
200-
if (Npostrack == 1) {
201-
Nnegtrack = Nnegtrack + 1;
202-
}
203-
auto track2ID = track2.globalIndex();
204-
if (track2ID == track1ID) {
256+
if (track2.pt() > 0.4 && track2.pt() < 1.0 && !(itsResponse.nSigmaITS<o2::track::PID::Kaon>(track2) > -2.0 && itsResponse.nSigmaITS<o2::track::PID::Kaon>(track2) < 3.0)) {
205257
continue;
206258
}
207-
if (!(itsResponse.nSigmaITS<o2::track::PID::Kaon>(track2) > -3.0 && itsResponse.nSigmaITS<o2::track::PID::Kaon>(track2) < 3.0)) {
208-
continue;
209-
}
210-
if (!selectionPair(track1, track2)) {
211-
continue;
259+
if (Npostrack == 1) {
260+
Nnegtrack = Nnegtrack + 1;
212261
}
213262
KaonPlus = ROOT::Math::PxPyPzMVector(track1.px(), track1.py(), track1.pz(), massKa);
214263
KaonMinus = ROOT::Math::PxPyPzMVector(track2.px(), track2.py(), track2.pz(), massKa);
@@ -252,11 +301,12 @@ struct doublephitable {
252301
}
253302
}
254303
} // select collision
255-
if (numberPhi > 1 && Npostrack > 1 && Nnegtrack > 1) {
304+
if (numberPhi > 1 && zorroSelected && Nnegtrack > 1 && Npostrack > 1) {
256305
keepEventDoublePhi = true;
306+
hProcessedEvents->Fill(3.5);
257307
}
258308
qaRegistry.fill(HIST("hEventstat"), 0.5);
259-
if (keepEventDoublePhi && numberPhi > 1 && Npostrack > 1 && Nnegtrack > 1 && (phiresonance.size() == phiresonanced1.size()) && (phiresonance.size() == phiresonanced2.size())) {
309+
if (keepEventDoublePhi && numberPhi > 1 && (phiresonance.size() == phiresonanced1.size()) && (phiresonance.size() == phiresonanced2.size())) {
260310
qaRegistry.fill(HIST("hEventstat"), 1.5);
261311
/////////// Fill collision table///////////////
262312
redPhiEvents(bc.globalBC(), currentRunNumber, bc.timestamp(), collision.posZ(), collision.numContrib(), Npostrack, Nnegtrack, centrality);

PWGLF/Tasks/Resonances/doublephimeson.cxx

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,16 @@ struct doublephimeson {
6464
Configurable<float> minExoticPt{"minExoticPt", 6.0, "Minimum Exotic Pt"};
6565
Configurable<float> minExoticMass{"minExoticMass", 2.0, "Minimum Exotic mass"};
6666
Configurable<float> maxExoticMass{"maxExoticMass", 3.6, "Maximum Exotic mass"};
67-
Configurable<bool> additionalEvsel{"additionalEvsel", false, "Additional event selection"};
67+
Configurable<bool> additionalEvsel{"additionalEvsel", true, "Additional event selection"};
6868
Configurable<bool> isDeep{"isDeep", true, "Store deep angle"};
6969
Configurable<float> cutMinNsigmaTPC{"cutMinNsigmaTPC", -2.5, "nsigma cut TPC"};
7070
Configurable<float> cutNsigmaTPC{"cutNsigmaTPC", 3.0, "nsigma cut TPC"};
7171
Configurable<float> cutNsigmaTOF{"cutNsigmaTOF", 3.0, "nsigma cut TOF"};
7272
Configurable<float> momTOFCut{"momTOFCut", 1.8, "minimum pT cut for madnatory TOF"};
7373
Configurable<float> maxKaonPt{"maxKaonPt", 100.0, "maximum kaon pt cut"};
74-
74+
Configurable<float> cfgCrossPhiLow{"cfgCrossPhiLow", 1.01, "Lower edge of phi mass window for cross-pairing (ghost) veto"};
75+
Configurable<float> cfgCrossPhiHigh{"cfgCrossPhiHigh", 1.03, "Upper edge of phi mass window for cross-pairing (ghost) veto"};
76+
Configurable<bool> useParametrized{"useParametrized", false, "Use pT dependent mass peak and width"};
7577
// ------------------------------------------------------------
7678
// pT-dependent phi mass peak and width from single-phi BW fits
7779
//
@@ -181,7 +183,7 @@ struct doublephimeson {
181183
histos.add("hDeltaRkaonplus", "hDeltaRkaonplus", kTH1F, {{800, 0.0, 8.0}});
182184
histos.add("hDeltaRkaonminus", "hDeltaRkaonminus", kTH1F, {{800, 0.0, 8.0}});
183185
histos.add("hPtCorrelation", "hPtCorrelation", kTH2F, {{400, 0.0, 40.0}, {5000, 0.0, 100.0}});
184-
histos.add("hPtCent", "hPtCent", kTH2F, {{100, 0.0, 100.0}, {100, 0.0, 100.0}});
186+
histos.add("hMassCent", "hMassCent", kTH3F, {{40, 1.0, 1.04f}, {40, 1.0, 1.04f}, {100, 0.0, 100.0}});
185187
const AxisSpec thnAxisdeltapt{configThnAxisDeltaPt, "Delta pt"};
186188
const AxisSpec thnAxisdaughterpt{configThnAxisDaughterPt, "Daughter pt"};
187189
const AxisSpec thnAxisInvMass{configThnAxisInvMass, "#it{M} (GeV/#it{c}^{2})"};
@@ -1543,7 +1545,7 @@ struct doublephimeson {
15431545
}
15441546
}
15451547
PROCESS_SWITCH(doublephimeson, processopti4, "Process Optimized same event", true);
1546-
1548+
double dMNominal = 100.0;
15471549
void processopti5(aod::RedPhiEvents::iterator const& collision, aod::PhiTracks const& phitracks)
15481550
{
15491551
if (additionalEvsel && (collision.numPos() < 2 || collision.numNeg() < 2)) {
@@ -1710,29 +1712,23 @@ struct doublephimeson {
17101712
// LOGF(info,"track share",t1.phid1Index(),t1.phid2Index(),t2.phid1Index(),t2.phid2Index());
17111713
continue;
17121714
}
1713-
// const double dMNominal = deltaMPhiNominal(phi1.M(), phi2.M());
17141715
const double mCross12 = (k1p + k2m).M(); // K+ from phi1 + K- from phi2
17151716
const double mCross21 = (k2p + k1m).M(); // K+ from phi2 + K- from phi1
1716-
const double dMCross = deltaMPhiNominal(mCross12, mCross21);
1717-
// Reject this candidate only if the crossed assignment is more phi-like
1718-
if (dMCross > 1.01 && dMCross < 1.03) {
1719-
// ++nBestPairingRejected;
1720-
/*
1717+
1718+
const bool cross12IsPhiLike = (mCross12 > cfgCrossPhiLow && mCross12 < cfgCrossPhiHigh);
1719+
const bool cross21IsPhiLike = (mCross21 > cfgCrossPhiLow && mCross21 < cfgCrossPhiHigh);
1720+
1721+
if (cross12IsPhiLike || cross21IsPhiLike) {
17211722
LOGF(info,
1722-
"Best-pairing rejected: dMNominal = %.6f, dMCross = %.6f, "
1723-
"mPhi1 = %.6f, mPhi2 = %.6f, mCross12 = %.6f, mCross21 = %.6f",
1724-
dMNominal,
1725-
dMCross,
1723+
"Best-pairing rejected: mPhi1 = %3.4f, mPhi2 = %3.4f, mCross12 = %3.4f, mCross21 = %3.4f",
17261724
phi1.M(),
17271725
phi2.M(),
17281726
mCross12,
17291727
mCross21,
17301728
pair.Pt(),
17311729
pair.M());
1732-
*/
17331730
continue;
17341731
}
1735-
17361732
histos.fill(HIST("hPhiMass"), phi1.M(), phi2.M(), pair.Pt());
17371733
histos.fill(HIST("hPhiMassNormalized"), getNormalizedMPhi(phi1.M(), phi1.Pt()), getNormalizedMPhi(phi2.M(), phi2.Pt()), pair.Pt());
17381734

@@ -1767,7 +1763,11 @@ struct doublephimeson {
17671763
const double pairPt = pair.Pt();
17681764
const double dRphi = deltaR(p1.Phi(), p1.Eta(), p2.Phi(), p2.Eta());
17691765
const double minDR = minDRV[i];
1770-
const double dMNominal = getDeltaMPhi(p1.M(), p1.Pt(), p2.M(), p2.Pt());
1766+
if (!useParametrized) {
1767+
dMNominal = deltaMPhiNominal(p1.M(), p2.M());
1768+
} else {
1769+
dMNominal = getDeltaMPhi(p1.M(), p1.Pt(), p2.M(), p2.Pt());
1770+
}
17711771
const double dMNominalNsigma = getNormalizedDeltaMPhi(p1.M(), p1.Pt(), p2.M(), p2.Pt());
17721772
const double denom = std::abs(pairPt - p1.Pt());
17731773

@@ -1781,7 +1781,7 @@ struct doublephimeson {
17811781
}
17821782
if (pairPt > minExoticPt) {
17831783
histos.fill(HIST("hPtCorrelation"), pairPt, ptcorr);
1784-
histos.fill(HIST("hPtCent"), pairPt, collision.centrality());
1784+
histos.fill(HIST("hMassCent"), p1.M(), p2.M(), collision.centrality());
17851785
histos.fill(HIST("SEMassUnlike_AllVars"),
17861786
M,
17871787
pairPt,
@@ -2215,25 +2215,25 @@ struct doublephimeson {
22152215
if (dM > maxDeltaMPhi)
22162216
continue;
22172217

2218-
TLorentzVector pair = phi1 + phi2;
2219-
if (pair.M() < minExoticMass || pair.M() > maxExoticMass)
2218+
TLorentzVector pairPhiPhi = phi1 + phi2;
2219+
if (pairPhiPhi.M() < minExoticMass || pairPhiPhi.M() > maxExoticMass)
22202220
continue;
22212221

22222222
const double minDR = minKaonDeltaR(c1.kplus, c2.kplus, c1.kminus, c2.kminus);
22232223
const double dR = deltaR(phi1.Phi(), phi1.Eta(), phi2.Phi(), phi2.Eta());
22242224

22252225
// same definition as SE
2226-
const double ptcorr = (pair.Pt() - phi1.Pt() != 0.)
2227-
? phi1.Pt() / (pair.Pt() - phi1.Pt())
2226+
const double ptcorr = (pairPhiPhi.Pt() - phi1.Pt() != 0.)
2227+
? phi1.Pt() / (pairPhiPhi.Pt() - phi1.Pt())
22282228
: 0.;
22292229

22302230
histos.fill(HIST("MEMassUnlike"),
2231-
pair.M(), // M(phi-phi)
2232-
minDR, // min ΔR among all kaon pairs
2233-
pair.Pt(), // pT(phi-phi)
2234-
dR, // ΔR(phi1, phi2)
2235-
dM, // Δm(phi)
2236-
ptcorr); // pT correlation
2231+
pairPhiPhi.M(), // M(phi-phi)
2232+
minDR, // min ΔR among all kaon pairs
2233+
pairPhiPhi.Pt(), // pT(phi-phi)
2234+
dR, // ΔR(phi1, phi2)
2235+
dM, // Δm(phi)
2236+
ptcorr); // pT correlation
22372237

22382238
// --- NEW: compute z and A from phi candidates (no cuts) ---
22392239
const double pt1 = phi1.Pt();
@@ -2244,7 +2244,7 @@ struct doublephimeson {
22442244
const double z = pt1 / ptsum;
22452245
const double A = std::abs(pt1 - pt2) / ptsum;
22462246
// --- Fill NEW THnSparse (no cuts) ---
2247-
histos.fill(HIST("MEMassUnlike_DeltaRZA"), pair.M(), pair.Pt(), pair.Pt() * dR, z, A, dM);
2247+
histos.fill(HIST("MEMassUnlike_DeltaRZA"), pairPhiPhi.M(), pairPhiPhi.Pt(), pairPhiPhi.Pt() * dR, z, A, dM);
22482248
}
22492249
}
22502250
}

0 commit comments

Comments
 (0)