Skip to content

Commit f5931b3

Browse files
committed
PWGJE: exclude jets with constituents have pT larger than some threshold
1 parent 039aadc commit f5931b3

1 file changed

Lines changed: 64 additions & 33 deletions

File tree

PWGJE/Tasks/recoilJets.cxx

Lines changed: 64 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ struct RecoilJets {
126126
Configurable<float> recoilRegion{"recoilRegion", 0.6,
127127
"Width of recoil acceptance"};
128128

129+
Configurable<float> maxJetConstituentPt{"maxJetConstituentPt", 100.,
130+
"Remove jets with constituent above this pt cut"};
131+
129132
// List of configurable parameters for histograms
130133
Configurable<uint16_t> histJetPt{"histJetPt", 100,
131134
"Maximum value of jet pT shown in histograms"};
@@ -416,9 +419,9 @@ struct RecoilJets {
416419
spectra.add("hScaleMultFT0C", "Scaled mult. signal from FTOC", kTH1F,
417420
{{200, 0.0, 20.}});
418421
spectra.add("hScaleMultFT0M", "Scaled total mult. signal from FT0A & FTOC", kTH1F,
419-
{{200, 0.0, 20.}});
422+
{{2000, 0.0, 20.}});
420423
spectra.add("hScaleMultFT0M_v2", "Scaled total mult. signal from FT0A & FTOC", kTH1F,
421-
{{200, 0.0, 20.}});
424+
{{2000, 0.0, 20.}});
422425

423426
spectra.add("hMultZNA", "Mult. signal from ZDC A-side", kTH1F,
424427
{{500, 0.0, 10000.}});
@@ -505,6 +508,9 @@ struct RecoilJets {
505508
}
506509

507510
for (const auto& jet : jets) {
511+
//skip jets which have a constituent with pT above specified cut
512+
if(isJetWithHighPtConstituent(jet, tracks)) continue;
513+
508514
spectra.fill(HIST("hJetPtEtaPhiRhoArea"), jet.pt(), jet.eta(), jet.phi(),
509515
collision.rho(), jet.area(), weight);
510516

@@ -674,13 +680,13 @@ struct RecoilJets {
674680
for (const auto& jetBase : jetsBase) {
675681
bool bIsBaseJetRecoil =
676682
get<1>(isRecoilJet(jetBase, phiTTSig)) && bIsThereTTSig;
677-
dataForUnfolding(jetBase, jetsTag, bIsBaseJetRecoil, weight);
683+
dataForUnfolding(jetBase, jetsTag, bIsBaseJetRecoil, tracks, weight);
678684
}
679685
}
680686

681687
template <typename Collision>
682688
void fillMultiplicityHistograms(Collision const& collision,
683-
float weight = 1.0)
689+
float weight = 1.)
684690
{
685691

686692
spectra.fill(HIST("hMultFT0A"), collision.multFT0A(), weight);
@@ -830,12 +836,11 @@ struct RecoilJets {
830836
PROCESS_SWITCH(RecoilJets, processJetsMatched,
831837
"process matching of MC jets (no weight)", false);
832838

833-
void
834-
processJetsMatchedWeighted(FilteredCollDetLevelGetWeight const& collision,
835-
aod::JetMcCollisions const&,
836-
FilteredTracks const& tracks,
837-
FilteredMatchedJetsDetLevel const& mcdjets,
838-
FilteredMatchedJetsPartLevel const& mcpjets)
839+
void processJetsMatchedWeighted(FilteredCollDetLevelGetWeight const& collision,
840+
aod::JetMcCollisions const&,
841+
FilteredTracks const& tracks,
842+
FilteredMatchedJetsDetLevel const& mcdjets,
843+
FilteredMatchedJetsPartLevel const& mcpjets)
839844
{
840845
if (skipEvent(collision) || skipMBGapEvent(collision))
841846
return;
@@ -903,38 +908,62 @@ struct RecoilJets {
903908
return 10. / (std::pow(weight, 1.0 / pTHatExponent));
904909
}
905910

906-
template <typename PartJet, typename DetJet>
911+
template <typename Jet, typename Tracks>
912+
bool isJetWithHighPtConstituent(Jet const& jet, Tracks const&)
913+
{
914+
bool bIsJetWithHighPtConstituent = false;
915+
for (const auto& jetConstituent : jet.template tracks_as<Tracks>()) {
916+
if (jetConstituent.pt() > maxJetConstituentPt) {
917+
bIsJetWithHighPtConstituent = true;
918+
break;
919+
}
920+
}
921+
return bIsJetWithHighPtConstituent;
922+
}
923+
924+
template <typename PartJet, typename DetJet, typename TracksTable>
907925
void dataForUnfolding(PartJet const& partJet, DetJet const& detJets,
908-
bool bIsBaseJetRecoil, float weight = 1.0)
926+
bool bIsBaseJetRecoil, TracksTable const& tracks, float weight = 1.)
909927
{
910928

911-
bool bIsThereMatchedJet = partJet.has_matchedJetGeo();
929+
bool bIsThereMatchedJet = partJet.has_matchedJetGeo();
912930

913-
if (bIsThereMatchedJet) {
914-
const auto& jetsMatched =
915-
partJet.template matchedJetGeo_as<std::decay_t<DetJet>>();
931+
if (bIsThereMatchedJet) {
932+
const auto& jetsMatched =
933+
partJet.template matchedJetGeo_as<std::decay_t<DetJet>>();
916934

917935
for (const auto& jetMatched : jetsMatched) {
918-
spectra.fill(HIST("hNumberMatchedJetsPerOneBaseJet"),
919-
jetsMatched.size(), jetMatched.pt(), weight);
920-
spectra.fill(HIST("hJetPt_DetLevel_vs_PartLevel"), jetMatched.pt(),
921-
partJet.pt(), weight);
922-
spectra.fill(HIST("hJetPt_resolution"),
923-
(partJet.pt() - jetMatched.pt()) / partJet.pt(),
924-
partJet.pt(), weight);
925-
spectra.fill(HIST("hJetPhi_resolution"),
926-
partJet.phi() - jetMatched.phi(), partJet.pt(), weight);
927-
928-
if (bIsBaseJetRecoil) {
929-
spectra.fill(HIST("hJetPt_DetLevel_vs_PartLevel_RecoilJets"),
930-
jetMatched.pt(), partJet.pt(), weight);
931-
spectra.fill(HIST("hJetPt_resolution_RecoilJets"),
932-
(partJet.pt() - jetMatched.pt()) / partJet.pt(),
936+
937+
//skip matches where detector level jets have a constituent with pT above specified cut
938+
bool skipMatchedDetJet = isJetWithHighPtConstituent(jetMatched, tracks);
939+
940+
if (skipMatchedDetJet) {
941+
// Miss jets
942+
spectra.fill(HIST("hMissedJets_pT"), partJet.pt(), weight);
943+
if (bIsBaseJetRecoil)
944+
spectra.fill(HIST("hMissedJets_pT_RecoilJets"), partJet.pt(), weight);
945+
} else {
946+
spectra.fill(HIST("hNumberMatchedJetsPerOneBaseJet"),
947+
jetsMatched.size(), jetMatched.pt(), weight);
948+
spectra.fill(HIST("hJetPt_DetLevel_vs_PartLevel"), jetMatched.pt(),
949+
partJet.pt(), weight);
950+
spectra.fill(HIST("hJetPt_resolution"),
951+
(partJet.pt() - jetMatched.pt()) / partJet.pt(),
933952
partJet.pt(), weight);
934-
spectra.fill(HIST("hJetPhi_resolution_RecoilJets"),
953+
spectra.fill(HIST("hJetPhi_resolution"),
935954
partJet.phi() - jetMatched.phi(), partJet.pt(), weight);
955+
956+
if (bIsBaseJetRecoil) {
957+
spectra.fill(HIST("hJetPt_DetLevel_vs_PartLevel_RecoilJets"),
958+
jetMatched.pt(), partJet.pt(), weight);
959+
spectra.fill(HIST("hJetPt_resolution_RecoilJets"),
960+
(partJet.pt() - jetMatched.pt()) / partJet.pt(),
961+
partJet.pt(), weight);
962+
spectra.fill(HIST("hJetPhi_resolution_RecoilJets"),
963+
partJet.phi() - jetMatched.phi(), partJet.pt(), weight);
964+
}
936965
}
937-
}
966+
}
938967
} else {
939968
// Miss jets
940969
spectra.fill(HIST("hMissedJets_pT"), partJet.pt(), weight);
@@ -944,6 +973,8 @@ struct RecoilJets {
944973

945974
// Fake jets
946975
for (const auto& detJet : detJets) {
976+
if(isJetWithHighPtConstituent(detJet, tracks)) continue;
977+
947978
bIsThereMatchedJet = detJet.has_matchedJetGeo();
948979
if (!bIsThereMatchedJet) {
949980
spectra.fill(HIST("hFakeJets_pT"), detJet.pt(), weight);

0 commit comments

Comments
 (0)