Skip to content

Commit c47a76f

Browse files
committed
Define and fill histogrmas for SS/OS dileptons
1 parent ccfcc13 commit c47a76f

1 file changed

Lines changed: 31 additions & 14 deletions

File tree

PWGDQ/Tasks/jPsiMuonCorrelations.cxx

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,16 @@ struct DqJPsiMuonCorrelations {
140140

141141
// Define trigger histograms
142142
ConfigurableAxis axisTriggerMass{"axisTriggerMass", {VARIABLE_WIDTH, fConfigBackgroundLowMass, fConfigDileptonLowMass, fConfigDileptonHighMass, fConfigBackgroundHighMass}, "Invariant Mass (GeV/c^{2}) for trigger counting"};
143-
registry.add("h2dDimuonPtInvVsInvMass", "h2dDimuonPtInvVsInvMass", kTH2D, {axisInvMass, axisPt});
144-
registry.add("h2dTriggersPtInvVsInvMassRegion", "h2dTriggersPtInvVsInvMassRegion", kTH2D, {axisTriggerMass, axisPt});
145-
146-
// Define histograms for the dilepton-muon correlations
147-
registry.add("h2dDimuonMuonDeltaEtaVsMuonPtSignal", "h2dDimuonMuonDeltaEtaVsMuonPtSignal", kTH2D, {axisDeltaEta, axisPt});
148-
registry.add("h2dDimuonMuonDeltaPhiVsMuonPtSignal", "h2dDimuonMuonDeltaPhiVsMuonPtSignal", kTH2D, {axisDeltaPhi, axisPt});
149-
registry.add("h2dDimuonMuonDeltaEtaVsMuonPtBackground", "h2dDimuonMuonDeltaEtaVsMuonPtBackground", kTH2D, {axisDeltaEta, axisPt});
150-
registry.add("h2dDimuonMuonDeltaPhiVsMuonPtBackground", "h2dDimuonMuonDeltaPhiVsMuonPtBackground", kTH2D, {axisDeltaPhi, axisPt});
143+
for (const auto& signDilepton : {"dileptonOS", "dileptonSS"}) {
144+
registry.add(Form("%s/h2dDimuonPtInvVsInvMass", signDilepton), "h2dDimuonPtInvVsInvMass", kTH2D, {axisInvMass, axisPt});
145+
registry.add(Form("%s/h2dTriggersPtInvVsInvMassRegion", signDilepton), "h2dTriggersPtInvVsInvMassRegion", kTH2D, {axisTriggerMass, axisPt});
146+
147+
// Define histograms for the dilepton-muon correlations
148+
registry.add(Form("%s/h2dDimuonMuonDeltaEtaVsMuonPtSignal", signDilepton), "h2dDimuonMuonDeltaEtaVsMuonPtSignal", kTH2D, {axisDeltaEta, axisPt});
149+
registry.add(Form("%s/h2dDimuonMuonDeltaPhiVsMuonPtSignal", signDilepton), "h2dDimuonMuonDeltaPhiVsMuonPtSignal", kTH2D, {axisDeltaPhi, axisPt});
150+
registry.add(Form("%s/h2dDimuonMuonDeltaEtaVsMuonPtBackground", signDilepton), "h2dDimuonMuonDeltaEtaVsMuonPtBackground", kTH2D, {axisDeltaEta, axisPt});
151+
registry.add(Form("%s/h2dDimuonMuonDeltaPhiVsMuonPtBackground", signDilepton), "h2dDimuonMuonDeltaPhiVsMuonPtBackground", kTH2D, {axisDeltaPhi, axisPt});
152+
}
151153

152154
// QA histograms
153155
registry.add("hEventPosZMuon", "hEventPosZMuon", kTH1D, {{50, -25, 25}});
@@ -186,8 +188,13 @@ struct DqJPsiMuonCorrelations {
186188
// Fill invariant mass vs pT histogram for the dileptons and for trigger counting
187189
double weightDilepton = getWeight(dilepton.pt(), axisPt.value, fConfigBinEffJPsi.value, fConfigDileptonEtaMin, fConfigDileptonEtaMax);
188190

189-
registry.fill(HIST("h2dDimuonPtInvVsInvMass"), dilepton.mass(), dilepton.pt(), weightDilepton);
190-
registry.fill(HIST("h2dTriggersPtInvVsInvMassRegion"), dilepton.mass(), dilepton.pt(), weightDilepton);
191+
if (dilepton.sign() == 0) {
192+
registry.fill(HIST("dileptonOS/h2dDimuonPtInvVsInvMass"), dilepton.mass(), dilepton.pt(), weightDilepton);
193+
registry.fill(HIST("dileptonOS/h2dTriggersPtInvVsInvMassRegion"), dilepton.mass(), dilepton.pt(), weightDilepton);
194+
} else {
195+
registry.fill(HIST("dileptonSS/h2dDimuonPtInvVsInvMass"), dilepton.mass(), dilepton.pt(), weightDilepton);
196+
registry.fill(HIST("dileptonSS/h2dTriggersPtInvVsInvMassRegion"), dilepton.mass(), dilepton.pt(), weightDilepton);
197+
}
191198

192199
for (const auto& assoc : assocs) {
193200
// Check selection bit
@@ -217,11 +224,21 @@ struct DqJPsiMuonCorrelations {
217224
double weightMuon = getWeight(track.pt(), axisPt.value, fConfigBinEffMuon.value, fConfigMuonEtaMin, fConfigMuonEtaMax);
218225

219226
if (dilepton.mass() > fConfigDileptonLowMass && dilepton.mass() < fConfigDileptonHighMass) {
220-
registry.fill(HIST("h2dDimuonMuonDeltaEtaVsMuonPtSignal"), deltaEta, track.pt(), weightDilepton * weightMuon);
221-
registry.fill(HIST("h2dDimuonMuonDeltaPhiVsMuonPtSignal"), deltaPhi, track.pt(), weightDilepton * weightMuon);
227+
if (dilepton.sign() == 0) {
228+
registry.fill(HIST("dileptonOS/h2dDimuonMuonDeltaEtaVsMuonPtSignal"), deltaEta, track.pt(), weightDilepton * weightMuon);
229+
registry.fill(HIST("dileptonOS/h2dDimuonMuonDeltaPhiVsMuonPtSignal"), deltaPhi, track.pt(), weightDilepton * weightMuon);
230+
} else {
231+
registry.fill(HIST("dileptonSS/h2dDimuonMuonDeltaEtaVsMuonPtSignal"), deltaEta, track.pt(), weightDilepton * weightMuon);
232+
registry.fill(HIST("dileptonSS/h2dDimuonMuonDeltaPhiVsMuonPtSignal"), deltaPhi, track.pt(), weightDilepton * weightMuon);
233+
}
222234
} else if (dilepton.mass() > fConfigBackgroundLowMass && dilepton.mass() < fConfigBackgroundHighMass) {
223-
registry.fill(HIST("h2dDimuonMuonDeltaEtaVsMuonPtBackground"), deltaEta, track.pt(), weightDilepton * weightMuon);
224-
registry.fill(HIST("h2dDimuonMuonDeltaPhiVsMuonPtBackground"), deltaPhi, track.pt(), weightDilepton * weightMuon);
235+
if (dilepton.sign() == 0) {
236+
registry.fill(HIST("dileptonOS/h2dDimuonMuonDeltaEtaVsMuonPtBackground"), deltaEta, track.pt(), weightDilepton * weightMuon);
237+
registry.fill(HIST("dileptonOS/h2dDimuonMuonDeltaPhiVsMuonPtBackground"), deltaPhi, track.pt(), weightDilepton * weightMuon);
238+
} else {
239+
registry.fill(HIST("dileptonSS/h2dDimuonMuonDeltaEtaVsMuonPtBackground"), deltaEta, track.pt(), weightDilepton * weightMuon);
240+
registry.fill(HIST("dileptonSS/h2dDimuonMuonDeltaPhiVsMuonPtBackground"), deltaPhi, track.pt(), weightDilepton * weightMuon);
241+
}
225242
}
226243
}
227244
}

0 commit comments

Comments
 (0)