Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introducing gamma-jet tree producer task #7367

Merged
merged 6 commits into from
Sep 9, 2024

Conversation

fjonasALICE
Copy link
Contributor

  • addition of new workflow which allows to store a tree containing photons and jets, including isolation information for the jet. Ideal derived data to perform any gamma-jet analysis

PWGJE/DataModel/GammaJetAnalysisTree.h Outdated Show resolved Hide resolved
PWGJE/Tasks/gammajettreeproducer.cxx Outdated Show resolved Hide resolved
// an integer instead
Filter clusterDefinitionSelection = (o2::aod::jcluster::definition == mClusterDefinition);
// Process clusters
void processClusters(soa::Join<JetCollisions, aod::BkgChargedRhos, aod::JCollisionBCs>::iterator const& collision, aod::JBCs const&, selectedClusters const& clusters, JetTracks const& tracks)
Copy link
Collaborator

Choose a reason for hiding this comment

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

you can remove JBCs once you remove zorro

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi Florian this is not resolved yet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed JBCs

PWGJE/Tasks/gammajettreeproducer.cxx Show resolved Hide resolved
fjonasALICE added a commit to fjonasALICE/O2Physics that referenced this pull request Sep 4, 2024
Please consider the following formatting changes to AliceO2Group#7367
@fjonasALICE
Copy link
Contributor Author

Hi @nzardosh I implemented almost all your comments, except for the filter for jet pt, which i will implement later (but i think it is not crucial)

// an integer instead
Filter clusterDefinitionSelection = (o2::aod::jcluster::definition == mClusterDefinition);
// Process clusters
void processClusters(soa::Join<JetCollisions, aod::BkgChargedRhos, aod::JCollisionBCs>::iterator const& collision, aod::JBCs const&, selectedClusters const& clusters, JetTracks const& tracks)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi Florian this is not resolved yet

o2physics_add_dpl_workflow(gamma-jet-tree-producer
SOURCES gammajettreeproducer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2::EMCALBase O2::EMCALCalib O2Physics::PWGJECore O2Physics::AnalysisCore
O2Physics::EventFilteringUtils
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is not needed anymore since you dont interface with zorro

Copy link
Contributor Author

Choose a reason for hiding this comment

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

both removed

using namespace o2;
using namespace o2::framework;
using namespace o2::framework::expressions;
using bcEvSelIt = o2::soa::Join<o2::aod::BCs, o2::aod::BcSels>::iterator;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this isnt used anywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

Configurable<float> isoR{"isoR", 0.4, "isolation cone radius"};

// cluster cuts
Configurable<int> mClusterDefinition{"clusterDefinition", 10, "cluster definition to be selected, e.g. 10=kV3Default"};
Copy link
Collaborator

Choose a reason for hiding this comment

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

might be more useful to take this input as a string so that if the definitions change you'e still safe. you can see how in the jetfinder

Copy link
Contributor Author

Choose a reason for hiding this comment

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

prefer to keep consistent with other tasks for now, will change eventually


double dPhi = TVector2::Phi_0_2pi(phi1) - TVector2::Phi_0_2pi(phi2);
if (abs(dPhi) > M_PI) {
dPhi = 2 * M_PI - abs(dPhi);
Copy link
Collaborator

Choose a reason for hiding this comment

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

use the deltaR function from jetutilities. you can give it to objects and it gives you back the DeltaR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

replaced with deltaR function. I did some additional fixes to deltaR function in jetutilities that should improve convenience and safety

if (collision.posZ() > mVertexCut) {
return false;
}
if (!jetderiveddatautilities::selectCollision(collision, eventSelection) || !jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

in the jet finder i dont think we apply collision selection in parallel to emcal selections. Check that this is what you want

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will leave for now but will clarify with Nicolas Strangmann for a future update

// dEta = 0;
// }

gammasTable(collisionMapping[collision.globalIndex()], cluster.energy(), cluster.eta(), cluster.phi(), cluster.m02(), cluster.m20(), cluster.nCells(), cluster.time(), cluster.isExotic(), cluster.distanceToBadChannel(), cluster.nlm(), isoraw, perpconerho, dPhi, dEta, p);
Copy link
Collaborator

Choose a reason for hiding this comment

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

here I am not sure you can get the table index via collisionMapping[collision.globalIndex()]
You should use the find function and then get the second element of the pair returned with a protection that it doesnt reach the end.

For here however you can actually just use eventsTable.lastIndex() since it should be fine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed and changed to unordered map to improve performance


Filter jetCuts = aod::jet::pt > jetPtMin&& aod::jet::r == nround(jetR.node() * 100.0f);
// Process charged jets
void processChargedJets(soa::Join<JetCollisions, aod::BkgChargedRhos, aod::JCollisionBCs>::iterator const& collision, aod::JBCs const&, soa::Filtered<soa::Join<aod::ChargedJets, aod::ChargedJetConstituents>> const& chargedJets, JetTracks const&)
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove JBCs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

nconst++;
}

chargedJetsTable(collisionMapping[collision.globalIndex()], jet.pt(), jet.eta(), jet.phi(), jet.energy(), jet.mass(), jet.area(), nconst);
Copy link
Collaborator

Choose a reason for hiding this comment

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

here get the pair according to the comment above. If you need an example you can look in the derived data write. I'm surprised it compiles actually.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
WorkflowSpec workflow{
adaptAnalysisTask<GammaJetTreeProducer>(cfgc, TaskName{"gamma-jet-tree-producer"}, SetDefaultProcesses{{{"processClearMaps", true}, {"processClusters", true}, {"processChargedJets", true}}})};
Copy link
Collaborator

Choose a reason for hiding this comment

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

instead of adding the process functions as true here you can instead remove it here and add them as true in the process switches

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Please consider the following formatting changes to AliceO2Group#7367
@nzardosh nzardosh self-requested a review September 9, 2024 12:22
@nzardosh nzardosh merged commit 59a7b7a into AliceO2Group:master Sep 9, 2024
10 checks passed
fchinu pushed a commit to fchinu/O2Physics that referenced this pull request Sep 18, 2024
* introducing gamma-jet tree producer task

* fix missing new line in gj tree producer

* update of software triggers for GJ tree

* delection of obsolete table subscription, map improvements

* Please consider the following formatting changes

---------

Co-authored-by: ALICE Action Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants