Skip to content

Commit 3969347

Browse files
committed
[PWGDQ] added configurable magnetic feield z bias
The z bias parameter allows to apply a longitudinal shift to the magnetic field map, which then affects all track extrapolations and refitting.
1 parent 9ffa18c commit 3969347

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

PWGDQ/Tasks/global-muon-matcher.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ struct GlobalMuonMatching {
202202
Configurable<float> cfgMFTAlignmentCorrYOffsetBottom{"cfgMFTAlignmentCorrYOffsetBottom", 0.f, "MFT Y offset correction - bottom half"};
203203
} configMftAlignmentCorrections;
204204

205+
// Magnetic field position bias
206+
Configurable<float> cfgFieldOriginBiasZ{"cfgFieldOriginBiasZ", 0.0f, "Bias applied to the magnetic field z position"};
207+
205208
// Variables for CCDB objects access and retrieval
206209
struct : ConfigurableGroup {
207210
Configurable<std::string> cfgCcdbUrl{"cfgCcdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
@@ -755,6 +758,9 @@ struct GlobalMuonMatching {
755758
fCCDBApi.init(configCcdb.cfgCcdbUrl);
756759
mRunNumber = 0;
757760

761+
// configure magnetic field position bias
762+
o2::conf::ConfigurableParam::setValue("FieldOriginBias.z", std::to_string(cfgFieldOriginBiasZ.value));
763+
758764
// Configuration for track fitter
759765
const auto& trackerParam = mch::TrackerParam::Instance();
760766
trackFitter.setBendingVertexDispersion(trackerParam.bendingVertexDispersion);

PWGDQ/Tasks/muonGlobalAlignment.cxx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ struct muonGlobalAlignment {
148148

149149
Configurable<uint32_t> fMftTracksMultiplicityMax{"cfgMftTracksMultiplicityMax", 0, "Maximum number of MFT tracks to be processed per event (zero means no limit)"};
150150

151+
// Magnetic field position bias
152+
Configurable<float> cfgFieldOriginBiasZ{"cfgFieldOriginBiasZ", 0.0f, "Bias applied to the magnetic field z position"};
151153
Configurable<float> fVertexZshift{"cfgVertexZshift", 0.0f, "Correction to the vertex z position"};
152154
Configurable<float> fDipoleZshift{"cfgDipoleZshift", 0.0f, "Correction to the dipole z position"};
153155

@@ -418,10 +420,8 @@ struct muonGlobalAlignment {
418420
ccdbApi.init(configCCDB.ccdburl);
419421
mRunNumber = 0;
420422

421-
if (!o2::base::GeometryManager::isGeometryLoaded()) {
422-
LOGF(info, "Load geometry from CCDB");
423-
ccdbManager->get<TGeoManager>(configCCDB.geoPath);
424-
}
423+
// configure magnetic field position bias
424+
o2::conf::ConfigurableParam::setValue("FieldOriginBias.z", std::to_string(cfgFieldOriginBiasZ.value));
425425

426426
// Configuration for track fitter
427427
const auto& trackerParam = TrackerParam::Instance();
@@ -431,6 +431,9 @@ struct muonGlobalAlignment {
431431
trackFitter.useChamberResolution();
432432
mImproveCutChi2 = 2. * configRealign.fSigmaCutImprove * configRealign.fSigmaCutImprove;
433433

434+
// use the Runge-Kutta extrapolation v2
435+
TrackExtrap::useExtrapV2();
436+
434437
// Fill table of MCH alignment corrections
435438
rapidjson::Document document;
436439
// Check that the json is parsed correctly

0 commit comments

Comments
 (0)