-
Notifications
You must be signed in to change notification settings - Fork 490
PWGHF: Add Xtask, add CollisionId to candidate table #5469
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
23 commits
Select commit
Hold shift + click to select a range
ade3d5e
Add untested version oft the X to Jpsi track track
ginnocen f642bbd
This commit adds the Xtask to O2
rspijkers aa51f5a
removed the filter on aod::BigTracks
rspijkers 8e78d24
Fixed clang indentation errors (hopefully)
rspijkers f230837
previous commit still had clang issues, this should resolve it (inden…
rspijkers 18a9e71
temporary commit, please ignore
rspijkers 8a0c487
Disables TPC in J/psi selector;
rspijkers 45370a6
Fixes the duplicate track check
rspijkers 2270d95
Clean up X task
rspijkers 4ca94e1
Added author and fixed variable names
rspijkers c3b190a
Fixed clang-format
rspijkers ec7cb67
Various fixes:
rspijkers 17c4f27
hf-task-add-collisionId --> hf-task-x-add-collisionId
rspijkers 07d2cd8
Create separate workflow for AddCollisionId
rspijkers 0da95d1
Minor fixes, commit for troubleshooting
rspijkers 1d4f1fc
Integrates collisionId into HFCandidateCreators
rspijkers 792177a
minor fixes:
rspijkers caad6df
jpsi candidate selector:
rspijkers f54533c
move runDataProcessing.h below customize
rspijkers 140b8b2
Add collision ID check for testing purposes
rspijkers bfc75d5
remove the collision ID check, add Y cut
rspijkers 769dda9
Pion track loops more efficient
rspijkers 8e88ba0
Update HFJpsiToEECandidateSelector.cxx
ginnocen 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,95 @@ | ||
| // Copyright CERN and copyright holders of ALICE O2. This software is | ||
| // distributed under the terms of the GNU General Public License v3 (GPL | ||
| // Version 3), copied verbatim in the file "COPYING". | ||
| // | ||
| // See http://alice-o2.web.cern.ch/license for full licensing information. | ||
| // | ||
| // 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. | ||
|
|
||
| /// \file taskX.cxx | ||
| /// \brief X(3872) analysis task | ||
| /// | ||
| /// \author Gian Michele Innocenti <gian.michele.innocenti@cern.ch>, CERN | ||
| /// \author Rik Spijkers <r.spijkers@students.uu.nl>, Utrecht University | ||
|
|
||
| #include "Framework/AnalysisTask.h" | ||
| #include "Framework/HistogramRegistry.h" | ||
| #include "AnalysisDataModel/HFSecondaryVertex.h" | ||
| #include "AnalysisDataModel/HFCandidateSelectionTables.h" | ||
|
|
||
| using namespace o2; | ||
| using namespace o2::framework; | ||
| using namespace o2::aod::hf_cand_prong2; | ||
| using namespace o2::framework::expressions; | ||
|
|
||
| void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions) | ||
| { | ||
| ConfigParamSpec optionDoMC{"doMC", VariantType::Bool, false, {"Fill MC histograms."}}; | ||
| workflowOptions.push_back(optionDoMC); | ||
| } | ||
|
|
||
| #include "Framework/runDataProcessing.h" | ||
|
|
||
| /// X(3872) analysis task | ||
| struct TaskX { | ||
| HistogramRegistry registry{ | ||
| "registry", | ||
| {{"hMassJpsi", "2-prong candidates;inv. mass (e+ e-) (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{500, 0., 5.}}}}, | ||
| {"hPtCand", "X candidates;candidate #it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}}}}; | ||
|
|
||
| Configurable<int> selectionFlagJpsi{"selectionFlagJpsi", 1, "Selection Flag for Jpsi"}; | ||
| Configurable<double> cutYCandMax{"cutYCandMax", -1., "max. cand. rapidity"}; | ||
|
|
||
| Filter filterSelectCandidates = (aod::hf_selcandidate_jpsi::isSelJpsiToEE >= selectionFlagJpsi); | ||
|
|
||
| /// aod::BigTracks is not soa::Filtered, should be added when filters are added | ||
| void process(aod::Collision const&, aod::BigTracks const& tracks, soa::Filtered<soa::Join<aod::HfCandProng2, aod::HFSelJpsiToEECandidate>> const& candidates) | ||
| { | ||
| for (auto& candidate : candidates) { | ||
| if (!(candidate.hfflag() & 1 << JpsiToEE)) { | ||
| continue; | ||
| } | ||
| if (cutYCandMax >= 0. && std::abs(YJpsi(candidate)) > cutYCandMax) { | ||
| continue; | ||
| } | ||
| registry.fill(HIST("hMassJpsi"), InvMassJpsiToEE(candidate)); | ||
|
|
||
| int index0jpsi = candidate.index0Id(); | ||
| int index1jpsi = candidate.index1Id(); | ||
| for (auto& track1 : tracks) { | ||
| int signTrack1 = track1.sign(); | ||
| int indexTrack1 = track1.globalIndex(); | ||
| if (signTrack1 > 0) { | ||
| if (indexTrack1 == index0jpsi) { | ||
| continue; | ||
| } | ||
| } else if (indexTrack1 == index1jpsi) { | ||
| continue; | ||
| } | ||
| for (auto track2 = track1 + 1; track2 != tracks.end(); ++track2) { | ||
| if (signTrack1 == track2.sign()) { | ||
| continue; | ||
| } | ||
| int indexTrack2 = track2.globalIndex(); | ||
| if (signTrack1 > 0) { | ||
| if (indexTrack2 == index1jpsi) { | ||
| continue; | ||
| } | ||
| } else if (indexTrack2 == index0jpsi) { | ||
| continue; | ||
| } | ||
| registry.fill(HIST("hPtCand"), candidate.pt() + track1.pt() + track2.pt()); | ||
| } // track2 loop (pion) | ||
| } // track1 loop (pion) | ||
| } // Jpsi loop | ||
| } // process | ||
| }; // struct | ||
|
|
||
| WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) | ||
| { | ||
| WorkflowSpec workflow{ | ||
| adaptAnalysisTask<TaskX>(cfgc, TaskName{"hf-task-x"})}; | ||
| return workflow; | ||
| } |
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.
Why do we need this check?