-
Notifications
You must be signed in to change notification settings - Fork 502
Split track extension and selection #4640
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| // 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 TrackSelectionDefaults.h | ||
| /// \brief Class for the definition of standard track selection objects | ||
| /// \since 20-10-2020 | ||
| /// | ||
|
|
||
| #ifndef TrackSelectionDefaults_H | ||
| #define TrackSelectionDefaults_H | ||
|
|
||
| #include "Framework/DataTypes.h" | ||
|
|
||
| // Default track selection requiring one hit in the SPD | ||
| TrackSelection getGlobalTrackSelection() | ||
| { | ||
| TrackSelection selectedTracks; | ||
| selectedTracks.SetTrackType(o2::aod::track::Run2GlobalTrack); | ||
| selectedTracks.SetPtRange(0.1f, 1e10f); | ||
| selectedTracks.SetEtaRange(-0.8f, 0.8f); | ||
| selectedTracks.SetRequireITSRefit(true); | ||
| selectedTracks.SetRequireTPCRefit(true); | ||
| selectedTracks.SetRequireGoldenChi2(true); | ||
| selectedTracks.SetMinNCrossedRowsTPC(70); | ||
| selectedTracks.SetMinNCrossedRowsOverFindableClustersTPC(0.8f); | ||
| selectedTracks.SetMaxChi2PerClusterTPC(4.f); | ||
| selectedTracks.SetRequireHitsInITSLayers(1, {0, 1}); // one hit in any SPD layer | ||
| selectedTracks.SetMaxChi2PerClusterITS(36.f); | ||
| selectedTracks.SetMaxDcaXYPtDep([](float pt) { return 0.0105f + 0.0350f / pow(pt, 1.1f); }); | ||
| selectedTracks.SetMaxDcaZ(2.f); | ||
| return selectedTracks; | ||
| } | ||
|
|
||
| // Default track selection requiring no hit in the SPD and one in the innermost | ||
| // SDD -> complementary tracks to global selection | ||
| TrackSelection getGlobalTrackSelectionSDD() | ||
| { | ||
| TrackSelection selectedTracks = getGlobalTrackSelection(); | ||
| selectedTracks.ResetITSRequirements(); | ||
| selectedTracks.SetRequireNoHitsInITSLayers({0, 1}); // no hit in SPD layers | ||
| selectedTracks.SetRequireHitsInITSLayers(1, {2}); // one hit in first SDD layer | ||
| return selectedTracks; | ||
| } | ||
|
|
||
| #endif |
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,16 @@ | ||
| # 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. | ||
|
|
||
| o2_add_dpl_workflow(alice3-trackselection | ||
| SOURCES alice3-trackselection.cxx | ||
| PUBLIC_LINK_LIBRARIES O2::Framework O2::AnalysisDataModel O2::AnalysisCore | ||
| COMPONENT_NAME Analysis) | ||
|
|
||
|
|
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,56 @@ | ||
| // 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. | ||
|
|
||
| // | ||
| // Task performing basic track selection. | ||
| // | ||
|
|
||
| #include "Framework/AnalysisDataModel.h" | ||
| #include "Framework/AnalysisTask.h" | ||
| #include "Framework/runDataProcessing.h" | ||
| #include "Analysis/TrackSelection.h" | ||
| #include "Analysis/TrackSelectionTables.h" | ||
| #include "Analysis/trackUtilities.h" | ||
|
|
||
| using namespace o2; | ||
| using namespace o2::framework; | ||
| using namespace o2::framework::expressions; | ||
|
|
||
| //**************************************************************************************** | ||
| /** | ||
| * Produce track filter table. | ||
| */ | ||
| //**************************************************************************************** | ||
| struct TrackSelectionTask { | ||
| Produces<aod::TrackSelection> filterTable; | ||
|
|
||
| void init(InitContext&) | ||
| { | ||
| } | ||
|
|
||
| void process(soa::Join<aod::FullTracks, aod::TracksExtended> const& tracks) | ||
| { | ||
| for (auto& track : tracks) { | ||
| filterTable(kTRUE, | ||
| kTRUE); | ||
| } | ||
| } | ||
| }; | ||
|
|
||
| //**************************************************************************************** | ||
| /** | ||
| * Workflow definition. | ||
| */ | ||
| //**************************************************************************************** | ||
| WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) | ||
| { | ||
| WorkflowSpec workflow{adaptAnalysisTask<TrackSelectionTask>("track-selection")}; | ||
| return workflow; | ||
| } |
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,65 @@ | ||
| // 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. | ||
|
|
||
| // | ||
| // Task performing basic track selection. | ||
| // | ||
|
|
||
| #include "Framework/AnalysisDataModel.h" | ||
| #include "Framework/AnalysisTask.h" | ||
| #include "Framework/runDataProcessing.h" | ||
| #include "Analysis/TrackSelection.h" | ||
| #include "Analysis/TrackSelectionTables.h" | ||
| #include "Analysis/trackUtilities.h" | ||
|
|
||
| using namespace o2; | ||
| using namespace o2::framework; | ||
| using namespace o2::framework::expressions; | ||
|
|
||
| //**************************************************************************************** | ||
| /** | ||
| * Produce the more complicated derived track quantities needed for track selection. | ||
| * FIXME: we shall run this only if all other selections are passed to avoid | ||
| * FIXME: computing overhead and errors in calculations | ||
| */ | ||
| //**************************************************************************************** | ||
| struct TrackExtensionTask { | ||
|
|
||
| Produces<aod::TracksExtended> extendedTrackQuantities; | ||
|
|
||
| void process(aod::Collision const& collision, aod::FullTracks const& tracks) | ||
| { | ||
| for (auto& track : tracks) { | ||
|
|
||
| std::array<float, 2> dca{1e10f, 1e10f}; | ||
| // FIXME: temporary solution to remove tracks that should not be there after conversion | ||
| if (track.trackType() == o2::aod::track::TrackTypeEnum::Run2GlobalTrack && track.itsChi2NCl() != 0.f && track.tpcChi2NCl() != 0.f && std::abs(track.x()) < 10.f) { | ||
| float magField = 5.0; // in kG (FIXME: get this from CCDB) | ||
| auto trackPar = getTrackPar(track); | ||
| trackPar.propagateParamToDCA({collision.posX(), collision.posY(), collision.posZ()}, magField, &dca); | ||
| } | ||
| extendedTrackQuantities(dca[0], dca[1]); | ||
|
|
||
| // TODO: add realtive pt resolution sigma(pt)/pt \approx pt * sigma(1/pt) | ||
| // TODO: add geometrical length / fiducial volume | ||
| } | ||
| } | ||
| }; | ||
|
|
||
| //**************************************************************************************** | ||
| /** | ||
| * Workflow definition. | ||
| */ | ||
| //**************************************************************************************** | ||
| WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) | ||
| { | ||
| WorkflowSpec workflow{adaptAnalysisTask<TrackExtensionTask>("track-extension")}; | ||
| return workflow; | ||
| } |
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
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.