[PWGLF] Table producer for photonDe correlation study#15509
[PWGLF] Table producer for photonDe correlation study#15509arvindkhuntia wants to merge 9 commits intoAliceO2Group:masterfrom
Conversation
Please consider the following formatting changes to AliceO2Group#15509
Please consider the following formatting changes to AliceO2Group#15509
|
Error while checking build/O2Physics/o2 for 9dd013d at 2026-03-24 20:10: Full log here. |
|
@arvindkhuntia How did you test your changes? They don't compile. |
| #include "Framework/HistogramRegistry.h" | ||
| #include "Framework/runDataProcessing.h" | ||
|
|
||
| #include <TLorentzVector.h> |
There was a problem hiding this comment.
Useless. You don't need TLorentzVector.
There was a problem hiding this comment.
Removed and move to Recodecay.
| #include <TLorentzVector.h> | ||
| #include <TVector3.h> | ||
|
|
||
| #include <iostream> |
There was a problem hiding this comment.
The iostream header is forbidden. If you need to print messages, use the O2 logging system.
There was a problem hiding this comment.
Thank you. Done.
| using namespace o2::framework; | ||
| using namespace o2::framework::expressions; | ||
|
|
||
| struct PhotonDeuteronCorrelation { |
There was a problem hiding this comment.
Why is it different from the file name?
| o2physics_add_dpl_workflow(photon-deuteron-corr | ||
| SOURCES photonDeuteron.cxx |
There was a problem hiding this comment.
Why do these names consist of different words?
There was a problem hiding this comment.
Now changed according to the filename. Thank you.
| // Particle masses (in GeV/c²) | ||
| static constexpr float massProton = o2::constants::physics::MassProton; | ||
| static constexpr float massNeutron = o2::constants::physics::MassNeutron; | ||
| static constexpr float massDeuteron = o2::constants::physics::MassDeuteron; |
There was a problem hiding this comment.
Useless. Do not hide the use of common constants. You literally just use MassProton directly in your code if you import it in the global namespace.
There was a problem hiding this comment.
Thank you. Now directly using those constants.
| float getDeltaPhi(float phi1, float phi2) | ||
| { | ||
| float dphi = phi1 - phi2; | ||
| if (dphi > 1.5 * M_PI) { | ||
| dphi -= 2.0 * M_PI; | ||
| } | ||
| if (dphi < -0.5 * M_PI) { | ||
| dphi += 2.0 * M_PI; | ||
| } | ||
| return dphi; | ||
| } |
There was a problem hiding this comment.
Why are you reinventing the wheel? There is RecoDecay::constrainAngle for this.
There was a problem hiding this comment.
Changed to RecoDecay.
| TLorentzVector photonVec, deuteronVec; | ||
| photonVec.SetPtEtaPhiM(photon.pt(), photon.eta(), photon.phi(), 0.0); // Photon-mass = 0 | ||
| deuteronVec.SetPtEtaPhiM(deuteron.pt(), deuteron.eta(), deuteron.phi(), massDeuteron); // Deuteron-mass | ||
|
|
||
| TLorentzVector combinedVec = photonVec + deuteronVec; | ||
| float invMass = combinedVec.M(); |
There was a problem hiding this comment.
You don't need TLorentzVector for these simple calculations. Use RecoDecay methods.
There was a problem hiding this comment.
Moved to RecoDecay.
|
O2 linter results: ❌ 1 errors, |
No description provided.