Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions Common/Tools/TrackPropagationModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

struct TrackPropagationConfigurables : o2::framework::ConfigurableGroup {
std::string prefix = "trackPropagation";
o2::framework::Configurable<float> minPropagationRadius{"minPropagationDistance", o2::constants::geom::XTPCInnerRef + 0.1, "Only tracks which are at a smaller radius will be propagated, defaults to TPC inner wall"};

Check failure on line 75 in Common/Tools/TrackPropagationModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
// for TrackTuner only (MC smearing)
o2::framework::Configurable<bool> useTrackTuner{"useTrackTuner", false, "Apply track tuner corrections to MC"};
o2::framework::Configurable<bool> useTrkPid{"useTrkPid", false, "use pid in tracking"};
Expand Down Expand Up @@ -177,7 +177,7 @@
/// to understand whether the TrackTuner::getDcaGraphs function can be called here (input path from string/configurables)
/// or inside the process function, to "auto-detect" the input file based on the run number
const auto& workflows = initContext.services().template get<o2::framework::RunningWorkflowInfo const>();
for (const o2::framework::DeviceSpec& device : workflows.devices) { /// loop over devices

Check failure on line 180 in Common/Tools/TrackPropagationModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (device.name == "propagation-service") {
// loop over the options
// to find the value of TrackTuner::autoDetectDcaCalib
Expand Down Expand Up @@ -234,18 +234,24 @@
return; // suppress everything
}

// Reserve every cursor filled in the loop below: reserve() switches the
// cursor to the unsafe (no bounds check) append, so a cursor filled
// without it pays the safe per-row append. The Par/ParExtension/DCA
// tables are filled in the covariance branch as well.
cursors.tracksParPropagated.reserve(tracks.size());
cursors.tracksParExtensionPropagated.reserve(tracks.size());
if (fillTracksDCA) {
cursors.tracksDCA.reserve(tracks.size());
}
if (fillTracksCov) {
cursors.tracksParCovPropagated.reserve(tracks.size());
cursors.tracksParCovExtensionPropagated.reserve(tracks.size());
if (fillTracksDCACov) {
cursors.tracksDCACov.reserve(tracks.size());
}
} else {
cursors.tracksParPropagated.reserve(tracks.size());
cursors.tracksParExtensionPropagated.reserve(tracks.size());
if (fillTracksDCA) {
cursors.tracksDCA.reserve(tracks.size());
}
}
if (cGroup.useTrackTuner.value && cGroup.fillTrackTunerTable.value) {
cursors.tunertable.reserve(tracks.size());
}

for (const auto& track : tracks) {
Expand Down
Loading