Skip to content

Commit c6c2506

Browse files
committed
Add delta pT distribution in data with random cone + QC plots for rho estimated with area median and perpendicular cone methods
1 parent ea2aebe commit c6c2506

1 file changed

Lines changed: 73 additions & 11 deletions

File tree

PWGLF/Tasks/Strangeness/strangenessInJetsIons.cxx

Lines changed: 73 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ struct StrangenessInJetsIons {
280280
const AxisSpec qtarmAxis{1000, 0.0f, 0.30f, "q_{T}^{arm}"};
281281
const AxisSpec numBkgParticles{500, 0.0, 500.0, "Number of particles"};
282282
const AxisSpec deltaPtAxis{2400, -60.0, 60.0, "#delta #it{p}_{T} (GeV/#it{c})"};
283+
const AxisSpec rhoAxis{100, 0.0, 50.0, "#it{#rho} (GeV/#it{c})"};
283284

284285
// Join enum ParticleOfInterest and the configurable vector particlesOfInterest in a map particleOfInterestDict
285286
const std::vector<int>& particleOnOff = particleOfInterest;
@@ -330,8 +331,13 @@ struct StrangenessInJetsIons {
330331
registryData.add("n_jets_vs_mult", "n_jets_vs_mult", HistType::kTH2F, {multAxis, numJets});
331332

332333
// Delta pT distribution
333-
registryData.add("delta_pT_data", "delta_pT_data", HistType::kTH2F, {multAxis, deltaPtAxis});
334-
registryData.add("delta_pT_RC_data", "delta_pT_RC_data", HistType::kTH2F, {multAxis, deltaPtAxis});
334+
// registryData.add("delta_pT_data", "delta_pT_data", HistType::kTH2F, {multAxis, deltaPtAxis});
335+
// registryData.add("delta_pT_RC_data", "delta_pT_RC_data", HistType::kTH2F, {multAxis, deltaPtAxis});
336+
registryData.add("h2_centrality_deltaPt_RandomCone", "h2_centrality_deltaPt_RandomCone", HistType::kTH2F, {multAxis, deltaPtAxis});
337+
registryData.add("h2_centrality_rhoPerp", "h2_centrality_rhoPerp", HistType::kTH2F, {multAxis, rhoAxis});
338+
339+
registryData.add("rho_perp", "rho_perp", HistType::kTH2F, {multAxis, rhoAxis});
340+
registryData.add("rho_median", "rho_median", HistType::kTH2F, {multAxis, rhoAxis});
335341

336342
// Armenteros-Podolanski plot
337343
// registryQC.add("ArmenterosPreSel_DATA", "ArmenterosPreSel_DATA", HistType::kTH2F, {alphaArmAxis, qtarmAxis});
@@ -756,6 +762,54 @@ struct StrangenessInJetsIons {
756762
u2.SetXYZ(u2x, u2y, pz);
757763
}
758764

765+
void computeRandomConeDeltaPt(const std::vector<fastjet::PseudoJet>& fjParticles,
766+
const std::vector<fastjet::PseudoJet>& jets,
767+
float multiplicity, double rhoPerp)
768+
{
769+
// Generate eta and phi for random cone in acceptance region
770+
double randomConeEta = fRng.Uniform(configTracks.etaMin + rJet, configTracks.etaMax - rJet);
771+
double randomConePhi = fRng.Uniform(0.0, TMath::TwoPi());
772+
773+
// Exclude leading jet region
774+
if (!jets.empty()) {
775+
float dPhiLeadingJet = getDeltaPhi(jets[0].phi(), randomConePhi);
776+
float dEtaLeadingJet = jets[0].eta() - randomConeEta;
777+
float dRLeadingJet = std::sqrt(dEtaLeadingJet * dEtaLeadingJet + dPhiLeadingJet * dPhiLeadingJet);
778+
779+
int attempts = 0;
780+
const int maxAttempts = 100;
781+
// If the random cone overlaps with the leading jet (distance < 1.5), then generate the coordinates again
782+
while (dRLeadingJet < 1.5 && attempts < maxAttempts) {
783+
randomConeEta = fRng.Uniform(configTracks.etaMin + rJet, configTracks.etaMax - rJet);
784+
randomConePhi = fRng.Uniform(0.0, TMath::TwoPi());
785+
786+
dPhiLeadingJet = getDeltaPhi(jets[0].phi(), randomConePhi);
787+
dEtaLeadingJet = jets[0].eta() - randomConeEta;
788+
dRLeadingJet = std::sqrt(dEtaLeadingJet * dEtaLeadingJet + dPhiLeadingJet * dPhiLeadingJet);
789+
attempts++;
790+
}
791+
}
792+
793+
// Sum pT of all the particles (charged tracks + V0 if included) falling in the random cone
794+
float randomConePt = 0.0;
795+
for (auto const& part : fjParticles) {
796+
float dPhi = getDeltaPhi(part.phi(), randomConePhi);
797+
float dEta = part.eta() - randomConeEta;
798+
float dR = std::sqrt(dEta * dEta + dPhi * dPhi);
799+
800+
if (dR < rJet) {
801+
randomConePt += part.pt();
802+
}
803+
}
804+
805+
// Compute delta pT: pT_cone - (Area_cone * rho)
806+
double coneArea = TMath::Pi() * rJet * rJet;
807+
double deltaPtRandomCone = randomConePt - (coneArea * rhoPerp);
808+
809+
registryData.fill(HIST("h2_centrality_deltaPt_RandomCone"), multiplicity, deltaPtRandomCone);
810+
registryData.fill(HIST("h2_centrality_rhoPerp"), multiplicity, rhoPerp);
811+
}
812+
759813
// Find ITS hit
760814
template <typename TrackIts>
761815
bool hasITSHitOnLayer(const TrackIts& track, int layer)
@@ -1949,6 +2003,7 @@ struct StrangenessInJetsIons {
19492003
continue;
19502004
auto mother = mcParticles.iteratorAt(mcPart.mothersIds()[0]);
19512005
int motherPdg = std::abs(mother.pdgCode());
2006+
LOG(info) << "[AddV0sForJetReconstructionMCP] Mother pdg code:" << motherPdg;
19522007
if (motherPdg == kK0Short || motherPdg == kLambda0) {
19532008
isTrackReplaced[i] = true;
19542009
// LOG(info) << "[AddV0sForJetReconstructionMCP] V0 daughter particle found in fjParticleObj.";
@@ -2151,13 +2206,7 @@ struct StrangenessInJetsIons {
21512206
fastjet::ClusterSequenceArea cs(fjParticles, jetDef, areaDef);
21522207
std::vector<fastjet::PseudoJet> jets = fastjet::sorted_by_pt(cs.inclusive_jets());
21532208
auto [rhoPerp, rhoMPerp] = jetutilities::estimateRhoPerpCone(fjParticles, jets[0], rJet);
2154-
2155-
// Jet selection
2156-
bool isAtLeastOneJetSelected = false;
2157-
std::vector<TVector3> selectedJet;
2158-
std::vector<TVector3> ue1;
2159-
std::vector<TVector3> ue2;
2160-
std::vector<double> jetPt;
2209+
auto [rhoMedian, rhoMMedian] = backgroundSub.estimateRhoAreaMedian(fjParticles, true);
21612210

21622211
// Event multiplicity
21632212
float multiplicity;
@@ -2167,6 +2216,19 @@ struct StrangenessInJetsIons {
21672216
multiplicity = collision.centFT0M();
21682217
}
21692218

2219+
registryData.fill(HIST("rho_perp"), multiplicity, rhoPerp);
2220+
registryData.fill(HIST("rho_median"), multiplicity, rhoMedian);
2221+
2222+
// Delta pT distributions with random cone technique
2223+
computeRandomConeDeltaPt(fjParticles, jets, multiplicity, rhoPerp);
2224+
2225+
// Jet selection
2226+
bool isAtLeastOneJetSelected = false;
2227+
std::vector<TVector3> selectedJet;
2228+
std::vector<TVector3> ue1;
2229+
std::vector<TVector3> ue2;
2230+
std::vector<double> jetPt;
2231+
21702232
// Loop over reconstructed jets
21712233
for (const auto& jet : jets) {
21722234

@@ -2182,8 +2244,8 @@ struct StrangenessInJetsIons {
21822244
isAtLeastOneJetSelected = true;
21832245

21842246
// delta pT distribution after jet selection by pT
2185-
double deltaPt = jet.pt() - jetMinusBkg.pt();
2186-
registryData.fill(HIST("delta_pT_data"), multiplicity, deltaPt);
2247+
// double deltaPt = jet.pt() - jetMinusBkg.pt();
2248+
// registryData.fill(HIST("delta_pT_data"), multiplicity, deltaPt);
21872249

21882250
// Calculation of perpendicular cones
21892251
TVector3 jetAxis(jet.px(), jet.py(), jet.pz());

0 commit comments

Comments
 (0)