Skip to content

Commit 95488ce

Browse files
committed
Implement kinematic cuts
1 parent f9517b8 commit 95488ce

1 file changed

Lines changed: 19 additions & 7 deletions

File tree

PWGDQ/Tasks/taskJPsiMu.cxx

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ struct DqJPsiMuonCorrelations {
8282
Configurable<float> fConfigBackgroundHighMass{"cfgBackgroundHighMass", 3.7, "High mass cut for the background used in analysis"};
8383

8484
// Configurables for the dilepton and associated muon cuts
85-
Configurable<float> fConfigMuonPtMin{"cfgMuonPtMin", 1.0, "Minimum pT cut for the associated muons"};
86-
Configurable<float> fConfigMuonPtMax{"cfgMuonPtMax", 10.0, "Maximum pT cut for the associated muons"};
87-
Configurable<float> fConfigMuonEtaMin{"cfgMuonEtaMin", -4.0, "Minimum eta cut for the associated muons"};
88-
Configurable<float> fConfigMuonEtaMax{"cfgMuonEtaMax", -2.5, "Maximum eta cut for the associated muons"};
85+
Configurable<float> fConfigDileptonPtMin{"cfgDileptonPtMin", 1.0, "Minimum pT cut for the associated muons"};
86+
Configurable<float> fConfigDileptonPtMax{"cfgDileptonPtMax", 10.0, "Maximum pT cut for the associated muons"};
8987
Configurable<float> fConfigDileptonEtaMin{"cfgDileptonEtaMin", -4.0, "Minimum eta cut for the dileptons"};
9088
Configurable<float> fConfigDileptonEtaMax{"cfgDileptonEtaMax", -2.5, "Maximum eta cut for the dileptons"};
89+
Configurable<float> fConfigMuonEtaMin{"cfgMuonEtaMin", -4.0, "Minimum eta cut for the associated muons"};
90+
Configurable<float> fConfigMuonEtaMax{"cfgMuonEtaMax", -2.5, "Maximum eta cut for the associated muons"};
9191

9292
// Configurables for histograms
9393
ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f, 20.0f}, "p_{T} (GeV/c)"};
@@ -153,14 +153,19 @@ struct DqJPsiMuonCorrelations {
153153
}
154154

155155
if (dileptons.size() > 0) {
156-
157-
// TODO: Implement cuts on dileptons and assocs
158-
159156
for (auto& dilepton : dileptons) {
160157
VarManager::FillTrack<fgDimuonsFillMap>(dilepton, fValuesDilepton);
158+
159+
// Dilepton kinematic cuts
160+
if ((dilepton.eta() < fConfigDileptonEtaMin || dilepton.eta() > fConfigDileptonEtaMax) ||
161+
(dilepton.pt() < fConfigDileptonPtMin || dilepton.pt() > fConfigDileptonPtMax)) {
162+
continue;
163+
}
164+
161165
registry.fill(HIST("h2dDimuonPtInvVsInvMass"), dilepton.mass(), dilepton.pt());
162166

163167
for (auto& assoc : assocs) {
168+
// Check selection bit
164169
if (!assoc.isMuonSelected_bit(0)) {
165170
continue;
166171
}
@@ -170,8 +175,15 @@ struct DqJPsiMuonCorrelations {
170175
continue;
171176
}
172177

178+
// Get muon track information
173179
auto track = assoc.template reducedmuon_as<TMuonTracks>();
174180

181+
// Muon kinematic cuts
182+
if ((track.eta() < fConfigMuonEtaMin || track.eta() > fConfigMuonEtaMax) ||
183+
(track.pt() < axisPt.value.front() || track.pt() > axisPt.value.back())) {
184+
continue;
185+
}
186+
175187
float deltaEta = track.eta() - dilepton.eta();
176188
float deltaPhi = track.phi() - dilepton.phi();
177189
if (deltaPhi < -constants::math::PI/2.0f) {

0 commit comments

Comments
 (0)