Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 32 additions & 9 deletions PWGJE/Tasks/jetShape.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ struct JetShapeTask {
{"tofPi", "tofPi", {HistType::kTH2F, {{nBinsPt, 0, ptMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
{"tpcPr", "tpcPr", {HistType::kTH2F, {{nBinsP, 0, pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
{"tofPr", "tofPr", {HistType::kTH2F, {{nBinsPt, 0, ptMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
{"tpcDedx", "tpcDedx", {HistType::kTHnSparseD, {{nBinsPForDedx, 0, pMax}, {nBinsTpcDedx, 0, 1000}}}},
{"tofBeta", "tofBeta", {HistType::kTH2F, {{nBinsPForBeta, 0, pMax}, {nBinsTofBeta, 0.4, 1.1}}}},
{"tpcDedx", "tpcDedx", {HistType::kTHnSparseD, {{nBinsPForDedx, 0, pMax}, {nBinsTpcDedx, 0, 1000}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
{"tofBeta", "tofBeta", {HistType::kTHnSparseD, {{nBinsPForBeta, 0, pMax}, {nBinsTofBeta, 0.4, 1.1}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
{"pVsPtForPr", "pVsPtForPr", {HistType::kTHnSparseD, {{nBinsP, 0, pMax}, {nBinsPt, 0, ptMax}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
{"pVsPtForPi", "pVsPtPi", {HistType::kTHnSparseD, {{nBinsP, 0, pMax}, {nBinsPt, 0, ptMax}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
{"tofMass", "tofMass", {HistType::kTH1F, {{90, 0, 3}}}},
Expand Down Expand Up @@ -114,7 +114,6 @@ struct JetShapeTask {
{"rho", "rho", {HistType::kTH1F, {{120, 0, 300}}}},
{"ptCorr", "Corrected jet pT; p_{T}^{corr} (GeV/c); Counts", {HistType::kTH1F, {{200, 0, 200}}}},
{"ptCorrVsDistance", "ptcorr_vs_distance", {HistType::kTH2F, {{70, 0, 0.7}, {100, 0, 100}}}},
{"distanceVsTrackpt", "trackpt_vs_distance", {HistType::kTH2F, {{70, 0, 0.7}, {100, 0, 100}}}},
{"jetDistanceVsTrackpt", "trackpt_vs_distance_injet", {HistType::kTH2F, {{70, 0, 0.7}, {100, 0, 100}}}},
{"ptSum", "ptSum", {HistType::kTHnSparseD, {{14, 0, 0.7}, {nBinsJetShapeFunc, 0, jetShapeFuncMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
{"ptSumBg1", "ptSumBg1", {HistType::kTHnSparseD, {{14, 0, 0.7}, {nBinsJetShapeFunc, 0, jetShapeFuncMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut}}}},
Expand Down Expand Up @@ -229,6 +228,10 @@ struct JetShapeTask {

void processJetShape(soa::Filtered<soa::Join<aod::JetCollisions, aod::BkgChargedRhos>>::iterator const& collision, aod::JetTracks const& tracks, soa::Join<aod::ChargedJets, aod::ChargedJetConstituents> const& jets)
{
if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits)) {
return;
}

size_t nBins = distanceCategory->size() - 1;

float maxDistance = distanceCategory->at(nBins);
Expand Down Expand Up @@ -273,7 +276,9 @@ struct JetShapeTask {
}

for (const auto& track : tracks) {

if (!jetderiveddatautilities::selectTrack(track, trackSelection)) {
continue;
}
float trkPt = track.pt();
float trkPhi = track.phi();
float trkEta = track.eta();
Expand Down Expand Up @@ -403,7 +408,9 @@ struct JetShapeTask {
}

for (const auto& track : tracks) {

if (!jetderiveddatautilities::selectTrack(track, trackSelection)) {
continue;
}
if (std::abs(track.eta()) > etaTrUp)
continue;
if (track.tpcNClsCrossedRows() < nclcrossTpcMin)
Expand Down Expand Up @@ -499,8 +506,10 @@ struct JetShapeTask {
PROCESS_SWITCH(JetShapeTask, processJetProductionRatio,
"production ratio around jets", false);

void processInclusiveProductionRatio(soa::Filtered<soa::Join<aod::Collisions, aod::CentFT0Ms>>::iterator const& collision, soa::Join<aod::Tracks, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::TracksExtra, aod::TracksDCA, aod::pidTOFbeta, aod::pidTOFmass> const& tracks)
void processInclusiveProductionRatio(soa::Filtered<soa::Join<aod::Collisions, aod::CentFT0Ms, aod::EvSels>>::iterator const& collision, soa::Join<aod::Tracks, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::TracksExtra, aod::TracksDCA, aod::pidTOFbeta, aod::pidTOFmass, o2::aod::TrackSelection> const& tracks)
{
if (!collision.sel8())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is sel8 hardcoded? I assume this should also use ?

if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the aod::Collisions table that was being used, it was not possible to implement this in the same way as in the other processes, which is why it was written in that manner.

In the latest commit, I changed the table to aod::JetCollisions and switched to the approach using jetderiveddatautilities~.

return;

// tracks conditions
for (const auto& track : tracks) {
Expand All @@ -513,6 +522,10 @@ struct JetShapeTask {
registry.fill(HIST("trackEta"), track.eta());
registry.fill(HIST("trackPhi"), track.phi());

if (!track.isGlobalTrack()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this hardcoded rather than using je track selection like for the other process functions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the aod::track table that was being used, it was not possible to implement this in the same way as in the other processes, which is why it was written in that manner.

In the latest commit, I changed the table to aod::JetTrack and updated the implementation to follow the same approach.
(The same applies to the next comment as well.)

continue;
}

if (std::abs(track.eta()) > etaTrUp)
continue;
if (track.tpcNClsCrossedRows() < nclcrossTpcMin)
Expand All @@ -534,6 +547,8 @@ struct JetShapeTask {
registry.fill(HIST("tofPi"), track.pt(), track.tofNSigmaPi());
registry.fill(HIST("tpcPr"), track.p(), track.tpcNSigmaPr());
registry.fill(HIST("tofPr"), track.pt(), track.tofNSigmaPr());
registry.fill(HIST("tpcDedx"), track.p(), track.tpcSignal(), collision.centFT0M());
registry.fill(HIST("tofBeta"), track.p(), track.beta(), collision.centFT0M());

if (std::abs(track.tofNSigmaPr()) < nSigmaTofCut) {
registry.fill(HIST("tpcTofPr"), track.p(), track.tpcNSigmaPr(), collision.centFT0M());
Expand All @@ -556,14 +571,18 @@ struct JetShapeTask {

void processReco(
soa::Filtered<soa::Join<aod::JetCollisionsMCD, aod::BkgChargedRhos>>::iterator const& collision,
soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels> const& tracks, aod::ChargedMCDetectorLevelJets const& jets, aod::McParticles const& mcParticles)
soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels, o2::aod::TrackSelection> const& tracks, aod::ChargedMCDetectorLevelJets const& jets, aod::McParticles const& mcParticles)
{
if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits)) {
return;
}

(void)mcParticles;

registry.fill(HIST("eventCounter"), 0.5);

float centrality = collision.centFT0M();
float rho = collision.rho();
// float rho = collision.rho();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is rho subtraction removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the comment. This quantity is obtained for the detector efficiency correction. I had removed it once, assuming it was not necessary, but after reviewing it again, I realized that it is indeed needed, so I restored it. Thank you for pointing this out.

registry.fill(HIST("mcCentralityReco"), centrality);

struct CachedJet {
Expand All @@ -578,11 +597,15 @@ struct JetShapeTask {
for (const auto& jet : jets) {
registry.fill(HIST("jetPt"), jet.pt());

float mcdPtCorr = jet.pt() - rho * jet.area();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to the first comment, I have restored this.

float mcdPtCorr = jet.pt();
cachedJets.push_back({jet.pt(), jet.eta(), jet.phi(), mcdPtCorr});
}

for (const auto& track : tracks) {

if (!track.isGlobalTrack())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should probably not be hard coded

continue;

if (!track.has_mcParticle())
continue;

Expand Down
Loading