3131#include " Tools/ML/model.h"
3232
3333#include < CommonConstants/MathConstants.h>
34+ #include < CommonConstants/PhysicsConstants.h>
3435#include < DataFormatsParameters/GRPLHCIFData.h>
3536#include < Framework/AnalysisDataModel.h>
3637#include < Framework/AnalysisHelpers.h>
@@ -142,6 +143,9 @@ struct pidTPCConfigurables : o2::framework::ConfigurableGroup {
142143 o2::framework::Configurable<int > useNetworkAl{" useNetworkAl" , 1 , {" Switch for applying neural network on the alpha mass hypothesis (if network enabled) (set to 0 to disable)" }};
143144 o2::framework::Configurable<float > networkBetaGammaCutoff{" networkBetaGammaCutoff" , 0.45 , {" Lower value of beta-gamma to override the NN application" }};
144145 o2::framework::Configurable<std::string> cfgPathGrpLhcIf{" ccdb-path-grplhcif" , " GLO/Config/GRPLHCIF" , " Path on the CCDB for the GRPLHCIF object" };
146+
147+ o2::framework::Configurable<float > phiEntranceCoeff1{" phiEntranceCoeff1" , 1 .026f , " phiEntrance = phi + phiEntranceCoeff1 * LightSpeedDm2PS * 0.5 * phiEntranceCoeff2 * 1/pT[GeV/c]" };
148+ o2::framework::Configurable<float > phiEntranceCoeff2{" phiEntranceCoeff2" , 85 .f , " phiEntrance = phi + phiEntranceCoeff1 * LightSpeedDm2PS * 0.5 * phiEntranceCoeff2 * 1/pT[GeV/c]" };
145149};
146150
147151// helper getter - FIXME should be separate
@@ -456,19 +460,21 @@ class pidTPCModule
456460 constexpr double HadronicRateNormAa = 50 .;
457461 constexpr double Ft0cOccupancyNorm = 60000 .;
458462 constexpr int NumberOfTpcSectors = 18 ;
463+ constexpr float LightSpeedDm2PS = o2::constants::physics::LightSpeedCm2PS / 10 .f ;
459464
460465 struct NNVersionEntry {
461466 std::string_view versionName{};
462467 int numberOfFeatures{};
463468 int versionNumber{};
464469 };
465470
466- constexpr std::array<NNVersionEntry, 5 > nnVersionsDictionary{
471+ constexpr std::array<NNVersionEntry, 6 > nnVersionsDictionary{
467472 {{" " , 6 , 1 },
468473 {" 1" , 6 , 1 },
469474 {" 2" , 7 , 2 },
470475 {" 3" , 8 , 3 },
471- {" 4" , 9 , 4 }}};
476+ {" 4" , 9 , 4 },
477+ {" 5" , 9 , 5 }}};
472478
473479 enum IndexNnFeature : int {
474480 IdxTpcInnerParam = 0 ,
@@ -485,6 +491,7 @@ class pidTPCModule
485491 constexpr int OldestNNVersionWithFt0c{2 };
486492 constexpr int OldestNNVersionWithHadronicRate{3 };
487493 constexpr int OldestNNVersionWithModPhi{4 };
494+ constexpr int NNVersionWithModPhiEntrance{5 };
488495
489496 std::vector<float > networkPrediction;
490497
@@ -606,7 +613,11 @@ class pidTPCModule
606613 trackProperties[counterTrackProps + IdxHadronicRate] = hadronicRate / hadronicRateNorm;
607614 }
608615 if (nnVersion >= OldestNNVersionWithModPhi) {
609- trackProperties[counterTrackProps + IdxModPhi] = std::fmod (std::fmod (trk.phi (), o2::constants::math::TwoPI) + o2::constants::math::TwoPI, o2::constants::math::TwoPI / NumberOfTpcSectors);
616+ float phi = trk.phi ();
617+ if (nnVersion == NNVersionWithModPhiEntrance) {
618+ phi += pidTPCopts.phiEntranceCoeff1 * LightSpeedDm2PS * 0.5 * pidTPCopts.phiEntranceCoeff2 * trk.signed1Pt ();
619+ }
620+ trackProperties[counterTrackProps + IdxModPhi] = std::fmod (std::fmod (phi, o2::constants::math::TwoPI) + o2::constants::math::TwoPI, o2::constants::math::TwoPI / NumberOfTpcSectors);
610621 }
611622 counterTrackProps += inputDimensions;
612623 }
0 commit comments