-
Notifications
You must be signed in to change notification settings - Fork 103
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
Added jets_TwoHemispheres to Algorithms. #241
Conversation
It splits an event in two hemispheres based on the thrust axis, and gathers together all reco'ed particles that belong to each hemisphere into a "jet", in the format of JetClustering::FCCAnalysesJet, such that algorithms (e.g. tagging) developed on JetClustering::FCCAnalysesJet's can be used. On Z -> had events, the resulting jets are very similar to jets from Durham exclusive, N = 2, although a few particles occasionnaly get clustered differently in the two approaches. Example usage: .Define("FCCAnalysesJets_hemispheres", "Algorithms::jets_TwoHemispheres( 1, 0) ( ReconstructedParticles )") .Define("jets_hemispheres", "JetClusteringUtils::get_pseudoJets( FCCAnalysesJets_hemispheres )") .Define("jets_hemispheres_px", " JetClusteringUtils::get_px( jets_hemispheres )")
@@ -6,6 +6,9 @@ | |||
|
|||
#include "edm4hep/ReconstructedParticleData.h" | |||
|
|||
#include "FCCAnalyses/JetClusteringUtils.h" | |||
#include "FCCAnalyses/ReconstructedParticle.h" | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move those includes to the .cc file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I've updated the implementation. I still need JetClustering.h, though.
|
||
ROOT::VecOps::RVec<float> mt = minimize_thrust("Minuit2","Migrad")(RP_px, RP_py, RP_pz) ; | ||
ROOT::VecOps::RVec<float> costheta = getAxisCosTheta( mt, RP_px, RP_py, RP_pz) ; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be inputs to the function. Maybe then the additional includes won't be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had chosen the implementation that maximally hides the complexity to the user. But OK, I have updated the implementation along the lines you suggested.
Here is the new usage:
.Define("RP_px", "ReconstructedParticle::get_px(ReconstructedParticles) ")
.Define("RP_py", "ReconstructedParticle::get_py(ReconstructedParticles) ")
.Define("RP_pz", "ReconstructedParticle::get_pz(ReconstructedParticles) ")
.Define("RP_e", "ReconstructedParticle::get_e(ReconstructedParticles) ")
.Define("thrust", 'Algorithms::minimize_thrust("Minuit2","Migrad")(RP_px, RP_py, RP_pz)')
.Define("RP_costheta", "Algorithms::getAxisCosTheta( thrust, RP_px, RP_py, RP_pz)" )
.Define("FCCAnalysesJets_hemispheres", "Algorithms::jets_TwoHemispheres( 1, 0) ( RP_px, RP_py, RP_pz, RP_e, RP_costheta )")
looks good to me :) |
It splits an event in two hemispheres based on the thrust axis, and gathers together all reco'ed particles that belong to each hemisphere into a "jet", in the format of JetClustering::FCCAnalysesJet, such that algorithms (e.g. tagging) developed on JetClustering::FCCAnalysesJet's can be used.
On Z -> had events, the resulting jets are very similar to jets from Durham exclusive, N = 2, although a few particles occasionnaly get clustered differently in the two approaches.
Example usage: