Repository navigation
[PWGUD] Fix code check and remove logf in upcTrackVertexingQA #18286
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a256d68
Fix code check and remove logf
atavirag 4ca1ebc
Remove extra include and use UpperCamelCase
atavirag f4d1030
Remove extra include and use UpperCamelCase
atavirag 57d2269
Fix megalinter
atavirag df5dd9e
Add vector4D include
atavirag File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,14 +14,15 @@ | |
| /// \author Andrea Tavira Garcia [email protected] | ||
| /// \author Andrea Giovanni Riffero [email protected] | ||
|
|
||
| #include "Common/CCDB/EventSelectionParams.h" | ||
| #include "Common/DataModel/PIDResponseTPC.h" | ||
| #include "Common/DataModel/TrackSelectionTables.h" | ||
|
|
||
| #include <CCDB/BasicCCDBManager.h> | ||
| #include <CommonConstants/LHCConstants.h> | ||
| #include <CommonConstants/PhysicsConstants.h> | ||
| #include <DataFormatsParameters/AggregatedRunInfo.h> | ||
| #include <Framework/AnalysisDataModel.h> | ||
| #include <Framework/AnalysisHelpers.h> | ||
| #include <Framework/AnalysisTask.h> | ||
| #include <Framework/Configurable.h> | ||
| #include <Framework/HistogramRegistry.h> | ||
|
|
@@ -30,10 +31,9 @@ | |
| #include <Framework/Logger.h> | ||
| #include <Framework/runDataProcessing.h> | ||
|
|
||
| #include <Math/Vector4D.h> | ||
| #include <TH1.h> | ||
| #include <TH2.h> | ||
| #include <TPDGCode.h> | ||
| #include <Math/GenVector/LorentzVector.h> | ||
| #include <Math/Vector4D.h> // IWYU pragma: keep (do not replace with Math/Vector4Dfwd.h) | ||
| #include <Math/Vector4Dfwd.h> | ||
|
|
||
| #include <array> | ||
| #include <cmath> | ||
|
|
@@ -72,7 +72,7 @@ struct UpcTrackVertexingQA { | |
| HistogramRegistry registry{"registry"}; | ||
|
|
||
| // services | ||
| Service<o2::ccdb::BasicCCDBManager> ccdb; // access to database | ||
| Service<o2::ccdb::BasicCCDBManager> ccdb{}; // access to database | ||
|
|
||
| // variables to store run info | ||
| int runNumberBc = 0; // run number used to process BCs | ||
|
|
@@ -85,8 +85,8 @@ struct UpcTrackVertexingQA { | |
| int64_t nTF = 0; // number of time frames in run | ||
|
|
||
| // constants | ||
| const unsigned int twoTracks = 2; | ||
| const int unassignedDCA = 999; | ||
| static constexpr unsigned int TwoTracks = 2; | ||
| static constexpr int UnassignedDCA = 999; | ||
|
|
||
| static constexpr float MassPion = o2::constants::physics::MassPionCharged; | ||
| static constexpr float MassMuon = o2::constants::physics::MassMuon; | ||
|
|
@@ -221,7 +221,7 @@ struct UpcTrackVertexingQA { | |
| if (track.pt() < ptTrackMin || std::abs(track.eta()) > etaTrackMax) { | ||
| return false; | ||
| } | ||
| if (std::abs(track.dcaZ()) >= unassignedDCA || std::abs(track.dcaXY()) >= unassignedDCA) { | ||
| if (std::abs(track.dcaZ()) >= UnassignedDCA || std::abs(track.dcaXY()) >= UnassignedDCA) { | ||
| return false; | ||
| } | ||
| return true; | ||
|
|
@@ -329,7 +329,7 @@ struct UpcTrackVertexingQA { | |
| registry.fill(HIST("TrkColl/hTrackSizePerEvent"), goodTracks.size()); | ||
|
|
||
| // build UPC candidates using events with exactly two opposite sign good tracks | ||
| if (goodTracks.size() != twoTracks) { | ||
| if (goodTracks.size() != TwoTracks) { | ||
| return; | ||
| } | ||
| auto const& track0 = goodTracks[0]; | ||
|
|
@@ -386,10 +386,7 @@ struct UpcTrackVertexingQA { | |
| registry.fill(HIST("McGen/Part/hTrackSizePerEvent"), goodMcGenParticles.size()); | ||
|
|
||
| // consider only j/psi->mumu and rho->pipi events | ||
| auto genId = mcCollision.getGeneratorId(); | ||
| LOGF(info, "Gen Id: {%d}", genId); | ||
| auto sourceId = mcCollision.getSourceId(); | ||
| LOGF(info, "Source Id: {%d}", sourceId); | ||
|
|
||
| if constexpr (isEmbedded) { | ||
| if (!sourceId) { | ||
|
|
@@ -402,7 +399,7 @@ struct UpcTrackVertexingQA { | |
| } | ||
| } | ||
|
|
||
| if (goodMcGenParticles.size() != twoTracks) { | ||
| if (goodMcGenParticles.size() != TwoTracks) { | ||
| return; | ||
| } | ||
|
|
||
|
|
@@ -413,7 +410,7 @@ struct UpcTrackVertexingQA { | |
| LOGF(fatal, "Selected particle has no mother: pdgCode=%d", goodMcGenParticles[0].pdgCode()); | ||
| return; | ||
| } | ||
| auto motherPart = mothers[0]; | ||
| auto const& motherPart = mothers[0]; | ||
|
|
||
| registry.fill(HIST("McGen/MotherPart/hMotherPdg"), std::abs(motherPart.pdgCode())); | ||
| registry.fill(HIST("McGen/MotherPart/hPt"), motherPart.pt()); | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.