20#include "TGeoGlobalMagField.h"
21#include "MFTBase/GeometryTGeo.h"
41 mAlignment = std::make_unique<o2::mft::TracksToRecords>();
42 mAlignment->setChi2CutNStdDev(alignConfigParam.chi2CutNStdDev);
43 mAlignment->setResidualCutInitial(alignConfigParam.residualCutInitial);
44 mAlignment->setResidualCut(alignConfigParam.residualCut);
45 mAlignment->setAllowedVariationDeltaX(alignConfigParam.allowedVarDeltaX);
46 mAlignment->setAllowedVariationDeltaY(alignConfigParam.allowedVarDeltaY);
47 mAlignment->setAllowedVariationDeltaZ(alignConfigParam.allowedVarDeltaZ);
48 mAlignment->setAllowedVariationDeltaRz(alignConfigParam.allowedVarDeltaRz);
49 mAlignment->setChi2CutFactor(alignConfigParam.chi2CutFactor);
50 for (
int sw = 0;
sw < NStopWatches;
sw++) {
54 mTimer[SWTot].Start(
false);
60 updateTimeDependentParams(pc);
61 mTimer[SWProcessTimeFrame].Start(
false);
62 mAlignment->startRecordWriter();
63 mAlignment->processTimeFrame(pc);
64 mTimer[SWProcessTimeFrame].Stop();
66 mTimer[SWProcessRecoTracks].Start(
false);
67 mAlignment->processRecoTracks();
68 mTimer[SWProcessRecoTracks].Stop();
74 mAlignment->printProcessTrackSummary();
75 mAlignment->endRecordWriter();
80 for (
int i = 0;
i < NStopWatches;
i++) {
81 LOGF(info,
"Timing %18s: Cpu: %.3e s; Real: %.3e s in %d slots", TimerName[
i], mTimer[
i].CpuTime(), mTimer[
i].RealTime(), mTimer[
i].Counter() - 1);
94 static bool initOnceDone =
false;
100 geom->fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::T2L,
101 o2::math_utils::TransformType::T2GRot,
102 o2::math_utils::TransformType::T2G));
105 double centerMFT[3] = {0, 0, -61.4};
106 auto Bz = field->
getBz(centerMFT);
107 LOG(info) <<
"Setting MFT TracksToRecords Bz = " << Bz;
108 mAlignment->setBz(Bz);
110 auto runNumber = timingInfo.runNumber;
111 mAlignment->setRunNumber(runNumber);
112 LOG(info) <<
"Setting MFT TracksToRecords run numner = " << runNumber;
113 mAlignment->setMinNumberClusterCut(alignConfigParam.minPoints);
125 LOG(info) <<
"cluster dictionary updated";
133 std::vector<InputSpec> inputs;
134 std::vector<OutputSpec> outputs;
136 inputs.emplace_back(
"compClusters",
"MFT",
"COMPCLUSTERS", 0, Lifetime::Timeframe);
137 inputs.emplace_back(
"patterns",
"MFT",
"PATTERNS", 0, Lifetime::Timeframe);
138 inputs.emplace_back(
"clustersrofs",
"MFT",
"CLUSTERSROF", 0, Lifetime::Timeframe);
139 inputs.emplace_back(
"tracksrofs",
"MFT",
"MFTTrackROF", 0, Lifetime::Timeframe);
140 inputs.emplace_back(
"tracks",
"MFT",
"TRACKS", 0, Lifetime::Timeframe);
141 inputs.emplace_back(
"trackClIdx",
"MFT",
"TRACKCLSID", 0, Lifetime::Timeframe);
142 inputs.emplace_back(
"cldict",
"MFT",
"CLUSDICT", 0, Lifetime::Condition,
ccdbParamSpec(
"MFT/Calib/ClusterDictionary"));
143 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(
false,
152 outputs.emplace_back(
"MFT",
"TRACKS2RECORDS", 0, Lifetime::Sporadic);
155 "mft-tracks2records",
158 AlgorithmSpec{adaptFromTask<o2::mft::TracksToRecordsSpec>(ggRequest)},
Definition of the base alignment parameters class.
Configuration file for MFT standalone alignment.
Definition of the MagF class.
Definition of the Names Generator class.
Class to run tracks to records needed to feed standalone alignment for MFT.
void checkUpdates(o2::framework::ProcessingContext &pc)
static GRPGeomHelper & instance()
void setRequest(std::shared_ptr< GRPGeomRequest > req)
static const AlignConfig & Instance()
Double_t getBz(const Double_t *xyz) const
Method to calculate the field at point xyz.
DataAllocator & outputs()
InputRecord & inputs()
The inputs associated with this processing context.
ServiceRegistryRef services()
The services registry associated with this processing context.
static GeometryTGeo * Instance()
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void init(o2::framework::InitContext &ic) final
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj) final
void run(o2::framework::ProcessingContext &pc) final
Defining ITS Vertex explicitly as messageable.
std::vector< ConfigParamSpec > ccdbParamSpec(std::string const &path, int runDependent, std::vector< CCDBMetadata > metadata={}, int qrate=0)
std::vector< ConfigParamSpec > Options
DataProcessorSpec getTracksToRecordsSpec()
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"