[PWGJE,Infrastructure] Create qg tree creator#15555
[PWGJE,Infrastructure] Create qg tree creator#15555Physicistdana wants to merge 29 commits intoAliceO2Group:masterfrom
Conversation
PWGJE/Tasks/qgTreeCreator.cxx
Outdated
| return std::remainder(phi1 - phi2, 2.f * static_cast<float>(M_PI)); | ||
| } | ||
|
|
||
| float deltaR(float eta1, float phi1, float eta2, float phi2) |
There was a problem hiding this comment.
Isn't this an existing method?
|
Hi @Physicistdana , please:
|
| constexpr int kGluon = 21; | ||
| constexpr int kQuarkMin = 1; | ||
| constexpr int kQuarkMax = 6; |
| // or submit itself to any jurisdiction. | ||
| #include "PWGJE/DataModel/Jet.h" | ||
| #include "PWGJE/DataModel/JetMatching.h" |
There was a problem hiding this comment.
Add Doxygen documentation.
| // find initiating parton by ancestry | ||
| //------------------------------------------------ | ||
| int getInitiatingParton(auto const& particle, | ||
| aod::McParticles const& mcParticles) |
There was a problem hiding this comment.
please use the derived tables such as JetParticles
| const int mpdg = mom.pdgCode(); | ||
|
|
||
| if (std::abs(mpdg) == kGluon || | ||
| (std::abs(mpdg) >= kQuarkMin && std::abs(mpdg) <= kQuarkMax)) { |
There was a problem hiding this comment.
what happens in the case of g->qqbar? you wrongly get a q as the mother whereas it should be a g
| void process(aod::ChargedMCDetectorLevelJets const& recoJets, | ||
| aod::ChargedMCParticleLevelJets const& truthJets, | ||
| aod::ChargedMCDetectorLevelJetsMatchedToChargedMCParticleLevelJets const& matches, | ||
| aod::McParticles const& mcParticles) |
| qg = 1; | ||
| } else if (std::abs(pdg) >= kQuarkMin && std::abs(pdg) <= kQuarkMax) { | ||
| qg = 0; | ||
| } |
There was a problem hiding this comment.
the indentations look wrong somehow
| int pdg = 0; | ||
|
|
||
| for (auto const& tc : | ||
| truthJet.tracks_as<aod::ChargedMCParticleLevelJetConstituent>()) { |
There was a problem hiding this comment.
this is not correct, as the table given here should be JetParticles. Does this even compile?
| float sumPt2 = 0; | ||
| float sumPtDr = 0; | ||
|
|
||
| for (auto const& c : jet.tracks_as<aod::ChargedMCDetectorLevelJetConstituent>()) { |
There was a problem hiding this comment.
here the table is wrong too, please see below
|
|
||
| void process(aod::ChargedMCDetectorLevelJets const& recoJets, | ||
| aod::ChargedMCParticleLevelJets const& truthJets, | ||
| aod::ChargedMCDetectorLevelJetsMatchedToChargedMCParticleLevelJets const& matches, |
There was a problem hiding this comment.
this table should be joined to ChargedMCDetectorLevelJets
| float ptResp = -1; | ||
| int qg = -1; | ||
|
|
||
| for (auto const& match : matches) { |
There was a problem hiding this comment.
once it is joined you can access it differently
| int qg = -1; | ||
|
|
||
| for (auto const& match : matches) { | ||
| if (match.chargedMCDetectorLevelJetId() != jet.globalIndex()) { |
| continue; | ||
| } | ||
|
|
||
| auto truthJet = truthJets.iteratorAt( |
|
Hi @vkucera , |
Jet analysis code