-
Notifications
You must be signed in to change notification settings - Fork 661
[PWGDQ] Add globalBc to DQ MC data model for MC truth BC checks #16398
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
Open
sigurdnese
wants to merge
7
commits into
AliceO2Group:master
Choose a base branch
from
sigurdnese:reducedMcEvents
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+201
−6
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2e13835
Add globalBc to reducedMcEvents and use it in MC TF and ROF border
sigurdnese e702ca6
Add calculation of TF border check in VarManager
sigurdnese 5e4b5b9
Add a converter for version 002 of reduced MC events
sigurdnese 0edf272
Use metadata to get the correct number of orbits per TF for MC
sigurdnese 50e01f6
Fix template type
sigurdnese 84e1ee3
clang
sigurdnese 8d566f4
Fix filename
sigurdnese 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
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
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
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
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
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
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 |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| // Copyright 2019-2020 CERN and copyright holders of ALICE O2. | ||
| // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
| // All rights not expressly granted are reserved. | ||
| // | ||
| // This software is distributed under the terms of the GNU General Public | ||
| // License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
| // | ||
| // In applying this license CERN does not waive the privileges and immunities | ||
| // granted to it by virtue of its status as an Intergovernmental Organization | ||
| // or submit itself to any jurisdiction. | ||
| // | ||
| // Contact: iarsene@cern.ch, i.c.arsene@fys.uio.no | ||
| // | ||
| // Task used to convert the data model from the old format to the new format. To avoid | ||
| // the conflict with the old data model. | ||
|
|
||
| #include "PWGDQ/DataModel/ReducedInfoTables.h" | ||
|
|
||
| #include <Framework/AnalysisDataModel.h> | ||
| #include <Framework/AnalysisHelpers.h> | ||
| #include <Framework/AnalysisTask.h> | ||
| #include <Framework/runDataProcessing.h> | ||
|
|
||
| using namespace o2; | ||
| using namespace o2::framework; | ||
| using namespace o2::framework::expressions; | ||
| using namespace o2::aod; | ||
|
|
||
| struct reducedMCeventConverter002 { | ||
| Produces<aod::ReducedMCEvents_002> reducedMCevent_002; | ||
|
|
||
| void init(InitContext const&) | ||
| { | ||
| if (doprocessV000ToV002 == false && doprocessV001ToV002 == false) { | ||
| LOGF(fatal, "Neither processV000ToV002 nor processV001ToV002 is enabled. Please choose one!"); | ||
| } | ||
| if (doprocessV000ToV002 == true && doprocessV001ToV002 == true) { | ||
| LOGF(fatal, "Both processV000ToV002 and processV001ToV002 are enabled. Please choose only one!"); | ||
| } | ||
| } | ||
|
|
||
| void processV000ToV002(aod::ReducedMCEvents_000 const& events) | ||
| { | ||
| for (const auto& event : events) { | ||
| uint64_t globalBc = 0; | ||
| reducedMCevent_002(globalBc, event.generatorsID(), event.mcPosX(), event.mcPosY(), event.mcPosZ(), | ||
| event.t(), event.weight(), event.impactParameter(), | ||
| -1.0f, -1.0f, -1.0f, -1.0f); | ||
| } | ||
| } | ||
| PROCESS_SWITCH(reducedMCeventConverter002, processV000ToV002, "process v000-to-v002 conversion", false); | ||
|
|
||
| void processV001ToV002(aod::ReducedMCEvents_001 const& events) | ||
| { | ||
| for (const auto& event : events) { | ||
| uint64_t globalBc = 0; | ||
| reducedMCevent_002(globalBc, event.generatorsID(), event.mcPosX(), event.mcPosY(), event.mcPosZ(), | ||
| event.t(), event.weight(), event.impactParameter(), | ||
| event.centFT0C(), event.multMCNParticlesEta05(), event.multMCNParticlesEta08(), event.multMCNParticlesEta10()); | ||
| } | ||
| } | ||
| PROCESS_SWITCH(reducedMCeventConverter002, processV001ToV002, "process v001-to-v002 conversion", true); | ||
| }; | ||
|
|
||
| WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) | ||
| { | ||
| return WorkflowSpec{ | ||
| adaptAnalysisTask<reducedMCeventConverter002>(cfgc)}; | ||
| } |
Oops, something went wrong.
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.
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.
This is not a task. This is a table producer.