-
Notifications
You must be signed in to change notification settings - Fork 4.6k
EXOnanoAODv1 producers and setup #48502
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
base: master
Are you sure you want to change the base?
Conversation
|
cms-bot internal usage |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/45439
|
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/45445
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/45446
|
|
Pull request #48502 was updated. |
|
enable nano |
|
please test |
|
-1 Failed Tests: Build ClangBuild BuildI found compilation warning when building: See details on the summary page. Clang BuildI found compilation warning while trying to compile with clang. Command used: See details on the summary page. |
battibass
left a comment
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.
As promised, some review of the muon part from my side comes now, apologies for the belated action.
I will also have a look at the rest of the code in the coming days.
| int getMatches(const pat::Muon& muon, const reco::Track& dsaMuon, float minPositionDiff = 1e-6) const; | ||
| int getDTMatches(const pat::Muon& muon, const reco::Track& dsaMuon, float minPositionDiff = 1e-6) const; | ||
| int getCSCMatches(const pat::Muon& muon, const reco::Track& dsaMuon, float minPositionDiff = 1e-6) const; |
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 three functions are essentially performing the same logic modulo minor differences. Such approach implies repeating almost-identical loops multiple times.
I would suggest writing a single function that accumulates on a struct containing three int reporting about all matches, DT matches and CSC matches, and returning the struct.
Also you could even store in the struct just two int if all matches is fully redundant.
| pt.push_back(dsaMuon.pt()); | ||
| ptErr.push_back(dsaMuon.ptError()); | ||
| eta.push_back(dsaMuon.eta()); | ||
| etaErr.push_back(dsaMuon.etaError()); | ||
| phi.push_back(dsaMuon.phi()); | ||
| phiErr.push_back(dsaMuon.phiError()); | ||
| charge.push_back(dsaMuon.charge()); | ||
| dxy.push_back(dsaMuon.dxy()); | ||
| dz.push_back(dsaMuon.dz()); | ||
| vx.push_back(dsaMuon.vx()); | ||
| vy.push_back(dsaMuon.vy()); | ||
| vz.push_back(dsaMuon.vz()); | ||
| chi2.push_back(dsaMuon.chi2()); | ||
| ndof.push_back(dsaMuon.ndof()); | ||
|
|
||
| trkNumPlanes.push_back(dsaMuon.hitPattern().muonStationsWithValidHits()); | ||
| trkNumHits.push_back(dsaMuon.hitPattern().numberOfValidMuonHits()); | ||
| trkNumDTHits.push_back(dsaMuon.hitPattern().numberOfValidMuonDTHits()); | ||
| trkNumCSCHits.push_back(dsaMuon.hitPattern().numberOfValidMuonCSCHits()); | ||
| normChi2.push_back(dsaMuon.normalizedChi2()); | ||
|
|
||
| outerEta.push_back(dsaMuon.extra().isNonnull() && dsaMuon.extra().isAvailable() ? dsaMuon.outerEta() : -999); | ||
| outerPhi.push_back(dsaMuon.extra().isNonnull() && dsaMuon.extra().isAvailable() ? dsaMuon.outerPhi() : -999); |
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't variables such as those ones be ntuplised using a SimpleTrackFlatTableProducer? If so, I would recommend using existing modules and configure them to extract the variables you need.
| innerTrackValidFraction.push_back((!muon.innerTrack().isNull()) ? muon.innerTrack()->validFraction() : -1); | ||
| globalTrackNormalizedChi2.push_back((!muon.globalTrack().isNull()) ? muon.globalTrack()->normalizedChi2() : -1); | ||
| CQChi2Position.push_back(muon.combinedQuality().chi2LocalPosition); | ||
| CQTrackKink.push_back(muon.combinedQuality().trkKink); | ||
| numberOfMatchedStation.push_back(muon.numberOfMatchedStations()); | ||
| numberOfValidPixelHits.push_back( | ||
| (!muon.innerTrack().isNull()) ? muon.innerTrack()->hitPattern().numberOfValidPixelHits() : 0); | ||
| numberOfValidTrackerHits.push_back( | ||
| (!muon.innerTrack().isNull()) ? muon.innerTrack()->hitPattern().numberOfValidTrackerHits() : 0); |
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.
Also in this module, one can delegate the extraction of variables such as these ones to a simplePATMuonFlatTableProducer.
| DEFINE_FWK_MODULE(SimpleTriggerTrackFlatTableProducer); | ||
| DEFINE_FWK_MODULE(SimpleGsfTrackFlatTableProducer); | ||
| DEFINE_FWK_MODULE(SimpleCompositeCandidateFlatTableProducer); | ||
| DEFINE_FWK_MODULE(SimpleMuonRecHitClusterFlatTableProducer); |
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.
Is this ever used?
| int getTotSegments(const reco::Track& dsaMuon) const; | ||
| int getDTSegments(const reco::Track& dsaMuon) const; | ||
| int getCSCSegments(const reco::Track& dsaMuon) const; |
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.
The same strategy proposed above could apply here as well
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/47781
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48502/47782
|
|
Pull request #48502 was updated. @AdrianoDee, @DickyChant, @antoniovagnerini, @battibass, @cmsbuild, @ftorrresd, @miquork can you please check and sign again. |
|
enable nano |
|
please test |
|
Sorry for the delay in responding to all comments. I have made changes to all comments on the muon implementations, but we still need to go over the remaining comments on displaced tau and displaced jets. As I did not make the original implementations myself, these fixes might take slightly longer. |
|
-1 Failed Tests: RelVals-NANO Failed RelVals-NANO
Comparison SummarySummary:
|
PR description:
This PR includes producers and setup for a first version of EXO PAG customizations of nanoAOD, with customization combined from multiple analysis teams working with long-lived particles, including:
Previously discussed at the nanoAOD deep dive, within XPOG April 2 2025 and July 9 2025, and within EXO at the EXO workshop and general meeting.
The PR depends on cms-data/RecoTauTag-TrainingFiles#15 PR with training data for the displaced tau tag.
PR validation:
Collections with number of variables and sizes for different datasets has been evaluated:

Timing study done for running AOD -> EXOnanoAODv1 in one step tested on one file from TTto4Q MC dataset, accounting for differences on different machines. The study shows the relative time difference between producing standard nanoAOD and EXOnanoAODv1 as a function of number of events, with less than a factor 2 relative time increase.

The test script PhysicsTools/NanoAOD/test/test-exoNano.sh runs CMS driver command for AOD->EXOnanoAODv1 in one step (with --step PAT,NANO:(at)EXO) and works for this setup.
@enibigir @jniedzie