Skip to content

Commit 828c413

Browse files
authored
[PWGEM/Dilepton] update matCorr in SVMC (#17022)
1 parent 9634e53 commit 828c413

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

PWGEM/Dilepton/Core/DileptonSVMC.h

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ struct DileptonSVMC {
115115
o2::framework::Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
116116
o2::framework::Configurable<std::string> grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"};
117117
o2::framework::Configurable<std::string> grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
118+
o2::framework::Configurable<std::string> lutPath{"lutPath", "GLO/Param/MatLUT", "Path of the Lut parametrization"};
119+
o2::framework::Configurable<std::string> geoPath{"geoPath", "GLO/Config/GeometryAligned", "Path of the geometry file"};
120+
o2::framework::Configurable<int> matCorrType{"matCorrType", 1, "0: none, 1: TGeo, 2: LUT, else: none"};
118121

119122
o2::framework::Configurable<int> cfgEventGeneratorType{"cfgEventGeneratorType", -1, "if positive, select event generator type. i.e. gap or signal"};
120123
o2::framework::Configurable<int> cfgCentEstimator{"cfgCentEstimator", 2, "FT0M:0, FT0A:1, FT0C:2"};
@@ -683,6 +686,36 @@ struct DileptonSVMC {
683686
mFwdDCAFitter.setMinParamChange(fdfGroup.minParamChange);
684687
mFwdDCAFitter.setMinRelChi2Change(fdfGroup.minRelChi2Change);
685688
mFwdDCAFitter.setUseAbsDCA(fdfGroup.useAbsDCA);
689+
690+
if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDimuon) {
691+
switch (matCorrType.value) {
692+
case static_cast<int>(o2::aod::pwgem::dilepton::utils::pairutil::MatCorrType::kNone):
693+
mFwdDCAFitter.setTGeoMat(false);
694+
break;
695+
case static_cast<int>(o2::aod::pwgem::dilepton::utils::pairutil::MatCorrType::kTGeo):
696+
LOGF(info, "TGeo correction requested, loading geometry");
697+
if (!o2::base::GeometryManager::isGeometryLoaded()) {
698+
ccdb->get<TGeoManager>(geoPath);
699+
}
700+
// matCorr = o2::base::Propagator::MatCorrType::USEMatCorrTGeo;
701+
mFwdDCAFitter.setTGeoMat(true);
702+
break;
703+
case static_cast<int>(o2::aod::pwgem::dilepton::utils::pairutil::MatCorrType::kLUT): {
704+
LOGF(info, "LUT correction requested, loading LUT");
705+
o2::base::MatLayerCylSet* lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->get<o2::base::MatLayerCylSet>(lutPath));
706+
// matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;
707+
mFwdDCAFitter.setTGeoMat(false);
708+
mFwdDCAFitter.setMatLUT(lut);
709+
break;
710+
}
711+
default:
712+
LOGF(info, "no correction requested, loading LUT by default!");
713+
// lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->get<o2::base::MatLayerCylSet>(lutPath));
714+
// matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT;
715+
mFwdDCAFitter.setTGeoMat(false);
716+
break;
717+
}
718+
}
686719
}
687720

688721
template <typename TCollision>

0 commit comments

Comments
 (0)