Skip to content
Draft
Show file tree
Hide file tree
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
16 changes: 13 additions & 3 deletions Common/Core/fwdtrackUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#ifndef COMMON_CORE_FWDTRACKUTILITIES_H_
#define COMMON_CORE_FWDTRACKUTILITIES_H_

#include <Framework/AnalysisDataModel.h>
#include <Framework/DataTypes.h>
#include <GlobalTracking/MatchGlobalFwd.h>
#include <MCHTracking/TrackExtrap.h>
Expand Down Expand Up @@ -48,22 +47,33 @@ using SMatrix55 = ROOT::Math::SMatrix<double, 5, 5, ROOT::Math::MatRepSym<double
using SMatrix55Std = ROOT::Math::SMatrix<double, 5>;
using SMatrix5 = ROOT::Math::SVector<double, 5>;

template <typename T>
concept is_fwd_track = requires (T t) {
{ t.rAtAbsorberEnd() } -> std::same_as<float>;
};

template <typename T>
concept is_fwd_cov = requires (T t)
{
{ t.sigmaX() } -> std::same_as<float>;
};

/// Produce TrackParCovFwds for MFT and FwdTracks, w/ or w/o cov, with z shift
template <typename TFwdTrack, typename... TCovariance>
o2::track::TrackParCovFwd getTrackParCovFwdShift(TFwdTrack const& track, float zshift, TCovariance const&... covOpt)
{
double chi2 = track.chi2();
if constexpr (sizeof...(covOpt) == 0) {
// No covariance passed
if constexpr (std::is_same_v<std::decay_t<TFwdTrack>, aod::FwdTracks::iterator>) {
if constexpr (is_fwd_track<TFwdTrack>) {
if (track.trackType() == o2::aod::fwdtrack::ForwardTrackTypeEnum::MuonStandaloneTrack) {
chi2 = track.chi2() * (2.f * track.nClusters() - 5.f);
}
}
} else {
// Covariance passed
using TCov = std::decay_t<decltype((covOpt, ...))>;
if constexpr (std::is_same_v<TCov, aod::FwdTracksCov::iterator>) {
if constexpr (is_fwd_cov<TCov>) {
if (track.trackType() == o2::aod::fwdtrack::ForwardTrackTypeEnum::MuonStandaloneTrack) {
chi2 = track.chi2() * (2.f * track.nClusters() - 5.f);
}
Expand Down
2 changes: 1 addition & 1 deletion PWGDQ/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ o2physics_add_library(PWGDQCore
o2physics_target_root_dictionary(PWGDQCore
HEADERS AnalysisCut.h
AnalysisCompositeCut.h
VarManager.h
VarManagerCore.h
HistogramManager.h
CutsLibrary.h
MixingHandler.h
Expand Down
2 changes: 1 addition & 1 deletion PWGDQ/Core/CutsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include "AnalysisCompositeCut.h"
#include "AnalysisCut.h"
#include "VarManager.h"
#include "VarManagerCore.h"

#include <Framework/Array2D.h>
#include <Framework/Logger.h>
Expand Down
2 changes: 1 addition & 1 deletion PWGDQ/Core/DQMlResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef PWGDQ_CORE_DQMLRESPONSE_H_
#define PWGDQ_CORE_DQMLRESPONSE_H_

#include "PWGDQ/Core/VarManager.h"
#include "PWGDQ/Core/VarManagerCore.h"

#include "Tools/ML/MlResponse.h"

Expand Down
2 changes: 1 addition & 1 deletion PWGDQ/Core/HistogramsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "PWGDQ/Core/HistogramsLibrary.h"

#include "HistogramManager.h"
#include "VarManager.h"
#include "VarManagerCore.h"

#include <CommonConstants/MathConstants.h>
#include <Framework/Logger.h>
Expand Down
2 changes: 1 addition & 1 deletion PWGDQ/Core/MixingHandler.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "PWGDQ/Core/MixingHandler.h"

#include "PWGDQ/Core/VarManager.h"
#include "PWGDQ/Core/VarManagerCore.h"

#include <TArrayF.h>
#include <TMathBase.h>
Expand Down
3 changes: 1 addition & 2 deletions PWGDQ/Core/MixingHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@
#ifndef PWGDQ_CORE_MIXINGHANDLER_H_
#define PWGDQ_CORE_MIXINGHANDLER_H_

#include "PWGDQ/Core/VarManager.h"
#include "PWGDQ/Core/VarManagerCore.h"

#include <TArrayF.h>
#include <TNamed.h>

#include <Rtypes.h>

#include <algorithm>
#include <array>
#include <iostream>
#include <map>
Expand Down
2 changes: 1 addition & 1 deletion PWGDQ/Core/MixingLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "PWGDQ/Core/MixingLibrary.h"

#include "PWGDQ/Core/MixingHandler.h"
#include "PWGDQ/Core/VarManager.h"
#include "PWGDQ/Core/VarManagerCore.h"

#include <Framework/Logger.h>

Expand Down
Loading
Loading