Skip to content

Commit f4ec8f3

Browse files
committed
use lorentz angle to define better fit range
1 parent f364ce5 commit f4ec8f3

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

Detectors/TRD/calibration/src/CalibratorVdExB.cxx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "CCDB/BasicCCDBManager.h"
2525
#include "CommonUtils/NameConf.h"
2626
#include "CommonUtils/MemFileHelper.h"
27-
//#include "DetectorsBase/Propagator.h"
27+
#include "DetectorsBase/Propagator.h"
2828
#include <TFile.h>
2929
#include <TTree.h>
3030

@@ -107,17 +107,16 @@ void CalibratorVdExB::initProcessing()
107107
}
108108

109109
// fit is done in region where ion tails are small, close to lorentz angle
110-
// we want an approximate value of the lorentz angle in order to define better fit boundaries
111-
// TODO: find a way to obtain the magnetic field even in standalone calibration
112-
//float bz = o2::base::Propagator::Instance()->getNominalBz();
110+
// we want an approximate value of the lorentz angle in order to define better fit boundaries, coinciding with profile bin edges
111+
float bz = o2::base::Propagator::Instance()->getNominalBz();
113112
// default angle with zero field is slightly shifted
114113
float lorentzAngleAvg = -1.f;
115-
/*if (TMath::Abs(bz - 2) < 0.1f) { lorentzAngleAvg = 2.f;}
116-
if (TMath::Abs(bz + 2) < 0.1f) { lorentzAngleAvg = -4.f;}
114+
if (TMath::Abs(bz - 2) < 0.1f) { lorentzAngleAvg = 3.f;}
115+
if (TMath::Abs(bz + 2) < 0.1f) { lorentzAngleAvg = -5.f;}
117116
if (TMath::Abs(bz - 5) < 0.1f) { lorentzAngleAvg = 7.f;}
118-
if (TMath::Abs(bz + 5) < 0.1f) { lorentzAngleAvg = -9.5f;}
117+
if (TMath::Abs(bz + 5) < 0.1f) { lorentzAngleAvg = -9.f;}
119118

120-
LOGP(info, "b field: {} lorentz angle start: {}", bz, lorentzAngleAvg);*/
119+
LOGP(info, "b field: {} lorentz angle start: {}", bz, lorentzAngleAvg);
121120

122121
mFitFunctor.lowerBoundAngleFit = (80 + lorentzAngleAvg) * TMath::DegToRad();
123122
mFitFunctor.upperBoundAngleFit = (100 + lorentzAngleAvg) * TMath::DegToRad();
@@ -249,7 +248,7 @@ void CalibratorVdExB::finalizeSlot(Slot& slot)
249248
auto flName = o2::ccdb::CcdbApi::generateFileName(clName);
250249
std::map<std::string, std::string> metadata; // TODO: do we want to store any meta data?
251250
long startValidity = slot.getStartTimeMS() - 10 * o2::ccdb::CcdbObjectInfo::SECOND;
252-
mInfoVector.emplace_back("TRD/Calib/CalVdriftExB", clName, flName, metadata, startValidity, startValidity + 3 * o2::ccdb::CcdbObjectInfo::DAY);
251+
mInfoVector.emplace_back("TRD/Calib/CalVdriftExB", clName, flName, metadata, startValidity, startValidity + 1 * o2::ccdb::CcdbObjectInfo::HOUR);
253252
mObjectVector.push_back(calObject);
254253
}
255254

Detectors/TRD/workflow/include/TRDWorkflow/VdAndExBCalibSpec.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ DataProcessorSpec getTRDVdAndExBCalibSpec()
147147
auto ccdbRequest = std::make_shared<o2::base::GRPGeomRequest>(true, // orbitResetTime
148148
true, // GRPECS=true
149149
false, // GRPLHCIF
150-
false, // GRPMagField
150+
true, // GRPMagField
151151
false, // askMatLUT
152152
o2::base::GRPGeomRequest::None, // geometry
153153
inputs);

0 commit comments

Comments
 (0)