@@ -215,6 +215,8 @@ struct TableMakerMC {
215215 Configurable<std::string> fGeoPath {" geoPath" , " GLO/Config/GeometryAligned" , " Path of the geometry file" };
216216 Configurable<std::string> fGrpMagPath {" grpmagPath" , " GLO/Config/GRPMagField" , " CCDB path of the GRPMagField object" };
217217 Configurable<std::string> fZShiftPath {" zShiftPath" , " Users/m/mcoquet/ZShift" , " CCDB path for z shift to apply to forward tracks" };
218+ Configurable<bool > fUseRemoteZShift {" cfgUseRemoteZShift" , true , " Enable getting Zshift from ccdb" };
219+ Configurable<float > fManualZShift {" cfgManualZShift" , 0 .f , " Manual value for the Zshift for muons." };
218220 Configurable<std::string> fGrpMagPathRun2 {" grpmagPathRun2" , " GLO/GRP/GRP" , " CCDB path of the GRPObject (Usage for Run 2)" };
219221 Configurable<int64_t > timestampCCDB{" timestampCCDB" , -1 , " timestamp of the ONNX file for ML model used to query in CCDB" };
220222 } fConfigCCDB ;
@@ -1194,13 +1196,17 @@ struct TableMakerMC {
11941196 }
11951197 } else {
11961198 fGrpMag = fCCDB ->getForTimeStamp <o2::parameters::GRPMagField>(fConfigCCDB .fGrpMagPath , bcs.begin ().timestamp ());
1197- auto * fZShift = fCCDB ->getForTimeStamp <std::vector<float >>(fConfigCCDB .fZShiftPath , bcs.begin ().timestamp ());
11981199 if (fGrpMag != nullptr ) {
11991200 o2::base::Propagator::initFieldFromGRP (fGrpMag );
12001201 VarManager::SetMagneticField (fGrpMag ->getNominalL3Field ());
12011202 }
1202- if (fZShift != nullptr && !fZShift ->empty ()) {
1203- VarManager::SetZShift ((*fZShift )[0 ]);
1203+ if (fConfigCCDB .fUseRemoteZShift ) {
1204+ auto * fZShift = fCCDB ->getForTimeStamp <std::vector<float >>(fConfigCCDB .fZShiftPath , bcs.begin ().timestamp ());
1205+ if (fZShift != nullptr && !fZShift ->empty ()) {
1206+ VarManager::SetZShift ((*fZShift )[0 ]);
1207+ }
1208+ } else {
1209+ VarManager::SetZShift (fConfigCCDB .fManualZShift .value );
12041210 }
12051211 if (fConfigVariousOptions .fPropMuon ) {
12061212 VarManager::SetupMuonMagField ();
0 commit comments