22#include <GblTrajectory.h>
25#include <GblMeasurement.h>
26#include <MilleBinary.h>
27#include <nlohmann/json.hpp>
75 .measAlpha = frame.
alpha,
88 Eigen::MatrixXd dyn(3, sRigidBodyBasis.
nDOFs());
103 : mDataRequest(dr), mGGCCDBRequest(gr), mTracksSrc(
src), mUseMC(useMC), mWithPV(withPV), mIsITS3(!withITS), mOutOpt(out)
115 void buildHierarchy();
120 bool getTransportJacobian(
const TrackD& track,
double xTo,
double alphaTo, gbl::Matrix5d& jac, gbl::Matrix5d& err);
127 void prepareMeasurments(std::span<const itsmft::CompClusterExt>
clusters, std::span<const unsigned char> pattIt);
135 bool applyMisalignment(Eigen::Vector2d&
res,
const FrameInfoExt& frame,
const TrackD& wTrk,
size_t iTrk);
138 std::unique_ptr<o2::utils::TreeStreamRedirector> mDBGOut;
139 std::vector<dataformats::VertexBase> mPVs;
140 std::vector<int> mT2PV;
145 std::unique_ptr<steer::MCKinematicsReader> mcReader;
146 std::vector<FrameInfoExt> mITSTrackingInfo;
147 std::shared_ptr<DataRequest> mDataRequest;
148 std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
149 std::unique_ptr<AlignableVolume> mHierarchy;
155 const AlignmentParams* mParams{
nullptr};
156 MisalignmentModel mMisalignment;
157 std::array<Eigen::Matrix<double, 6, 1>, 6> mRigidBodyParams;
163 mNThreads = ic.
options().
get<
int>(
"nthreads");
166 mDBGOut = std::make_unique<o2::utils::TreeStreamRedirector>(
"its3_debug_alg.root",
"recreate");
169 mcReader = std::make_unique<steer::MCKinematicsReader>(
"collisioncontext.root");
176 updateTimeDependentParams(pc);
180 mRecoData = &recoData;
182 updateTimeDependentParams(pc);
190 if (!mITSDict && !mIT3Dict) {
191 LOGP(fatal,
"ITS data is not loaded");
194 const auto bz = prop->getNominalBz();
199 std::span<const o2::MCCompLabel> mcLbls;
203 prepareMeasurments(clusITS, patterns);
209 LOGP(info,
"Starting fits with {} threads", mNThreads);
212 std::vector<std::vector<gbl::GblTrajectory>> gblTrajSlots(mNThreads);
213 std::vector<std::vector<Track>> resTrackSlots(mNThreads);
215 auto timeStart = std::chrono::high_resolution_clock::now();
216 int cFailedRefit{0}, cFailedProp{0}, cSelected{0}, cGBLFit{0}, cGBLFitFail{0}, cGBLChi2Rej{0}, cGBLConstruct{0};
217 double chi2Sum{0}, lostWeightSum{0};
220#pragma omp parallel num_threads(mNThreads) \
221 reduction(+ : cFailedRefit) \
222 reduction(+ : cFailedProp) \
223 reduction(+ : cSelected) \
224 reduction(+ : cGBLFit) \
225 reduction(+ : cGBLFitFail) \
226 reduction(+ : cGBLChi2Rej) \
227 reduction(+ : cGBLConstruct) \
228 reduction(+ : chi2Sum) \
229 reduction(+ : lostWeightSum) \
230 reduction(+ : ndfSum)
234 const int tid = omp_get_thread_num();
238 auto& gblTrajSlot = gblTrajSlots[tid];
239 auto& resTrackSlot = resTrackSlots[tid];
242#pragma omp for schedule(dynamic)
244 for (
size_t iTrk = 0; iTrk < (
int)itsTracks.size(); ++iTrk) {
245 const auto& trk = itsTracks[iTrk];
246 if (trk.getNClusters() < mParams->
minITSCls ||
247 (trk.getChi2() / ((float)trk.getNClusters() * 2 - 5)) >= mParams->
maxITSChi2Ndf ||
248 trk.getPt() < mParams->
minPt ||
249 (mUseMC && (!mcLbls[iTrk].isValid() || !mcLbls[iTrk].isCorrect()))) {
253 Track& resTrack = resTrackSlot.emplace_back();
254 if (!prepareITSTrack((
int)iTrk, trk, resTrack)) {
256 resTrackSlot.pop_back();
262 refLin = &resTrack.
track;
266 auto wTrk = resTrack.
track;
267 const bool hasPV = resTrack.
info[0].lr == -1;
268 std::vector<gbl::GblPoint> points;
270 const int np = (
int)resTrack.
points.size();
272 lt.setTimeNotNeeded();
273 constexpr int perm[5] = {4, 2, 3, 0, 1};
274 for (
int ip{0}; ip < np; ++ip) {
275 const auto& frame = resTrack.
info[ip];
276 gbl::Matrix5d err = gbl::Matrix5d::Identity(), jacALICE = gbl::Matrix5d::Identity(), jacGBL;
281 if (!getTransportJacobian(wTrk, frame.x, frame.alpha, jacALICE, err) ||
282 !prop->propagateToAlphaX(wTrk, refLin, frame.
alpha, frame.x,
false, mParams->
maxSnp, mParams->
maxStep, 1, mParams->
corrType, <)) {
287 msErr = its::math_utils::MSangle(trk.getPID().getMass(), trk.getP(), lt.getX2X0());
289 for (
int i = 0;
i < 5;
i++) {
290 for (
int j = 0;
j < 5;
j++) {
291 jacGBL(
i,
j) = jacALICE(perm[
i], perm[
j]);
297 gbl::GblPoint point(jacGBL);
299 Eigen::Vector2d
res, prec;
300 res << frame.positionTrackingFrame[0] - wTrk.getY(), frame.positionTrackingFrame[1] - wTrk.getZ();
303 if (!applyMisalignment(
res, frame, wTrk, iTrk)) {
308 prec << 1. / resTrack.
points[ip].sig2y, 1. / resTrack.
points[ip].sig2z;
310 point.addMeasurement(
res, prec);
311 if (msErr > mParams->
minMS && ip < np - 1) {
312 Eigen::Vector2d scat(0., 0.), scatPrec = Eigen::Vector2d::Constant(1. / (msErr * msErr));
313 point.addScatterer(scat, scatPrec);
319 if (mChip2Hiearchy.find(lbl) == mChip2Hiearchy.end()) {
320 LOGP(fatal,
"Cannot find global label: {}", lbl.
asString());
326 const auto* tileVol = mChip2Hiearchy.at(lbl);
327 const auto derCtx = makeDerivativeContext(frame, wTrk);
328 Matrix36 der = getRigidBodyBaseDerivatives(derCtx);
332 for (
const auto*
v = tileVol;
v && !
v->isRoot();
v =
v->getParent()) {
333 if (
v->getRigidBody()) {
334 nColRB +=
v->getRigidBody()->nDOFs();
339 const auto* sensorVol = tileVol->getParent();
340 const auto* calibSet = sensorVol ? sensorVol->getCalib() :
nullptr;
341 const int nCalib = calibSet ? calibSet->nDOFs() : 0;
342 const int nCol = nColRB + nCalib;
344 std::vector<int> gLabels;
345 gLabels.reserve(nCol);
346 Eigen::MatrixXd gDer(3, nCol);
348 Eigen::Index curCol{0};
351 const double posTrk[3] = {frame.x, 0., 0.};
353 tileVol->getT2L().LocalToMaster(posTrk, posLoc);
355 tileVol->computeJacobianL2T(posLoc, jacL2T);
357 if (tileVol->getRigidBody()) {
358 const int nd = tileVol->getRigidBody()->nDOFs();
359 for (
int iDOF = 0; iDOF < nd; ++iDOF) {
360 gLabels.push_back(tileVol->getLabel().rawGBL(iDOF));
362 gDer.middleCols(curCol, nd) = der;
367 for (
const auto* child = tileVol; child->getParent() && !child->getParent()->isRoot(); child = child->getParent()) {
368 der *= child->getJL2P();
369 const auto* parent = child->getParent();
370 if (parent->getRigidBody()) {
371 const int nd = parent->getRigidBody()->nDOFs();
372 for (
int iDOF = 0; iDOF < nd; ++iDOF) {
373 gLabels.push_back(parent->getLabel().rawGBL(iDOF));
375 gDer.middleCols(curCol, nd) = der;
382 const int nd = calibSet->nDOFs();
383 Eigen::MatrixXd calDer(3, nd);
384 calibSet->fillDerivatives(derCtx, calDer);
385 for (
int iDOF = 0; iDOF < nd; ++iDOF) {
386 gLabels.push_back(sensorVol->getLabel().asCalib().rawGBL(iDOF));
388 gDer.middleCols(curCol, nd) = calDer;
391 point.addGlobals(gLabels, gDer);
395 static Eigen::IOFormat
fmt(4, 0,
", ",
"\n",
"[",
"]");
396 LOGP(info,
"WORKING-POINT {}", ip);
397 LOGP(info,
"Track: {}", wTrk.asString());
398 LOGP(info,
"FrameInfo: {}", frame.asString());
399 std::cout <<
"jacALICE:\n"
400 << jacALICE.format(
fmt) <<
'\n';
401 std::cout <<
"jacGBL:\n"
402 << jacGBL.format(
fmt) <<
'\n';
403 LOGP(info,
"Point {}: GBL res=({}, {}), KF stored res=({}, {})",
405 LOGP(info,
"residual: dy={} dz={}",
res[0],
res[1]);
406 LOGP(info,
"precision: precY={} precZ={}", prec[0], prec[1]);
409 points.push_back(point);
412 gbl::GblTrajectory traj(points, std::abs(bz) > 0.01);
413 if (traj.isValid()) {
414 double chi2 = NAN, lostWeight = NAN;
416 if (
auto ierr = traj.fit(chi2, ndf, lostWeight); !ierr) {
418 LOGP(info,
"GBL FIT chi2 {} ndf {}", chi2, ndf);
419 traj.printTrajectory(5);
421 if (chi2 / ndf > mParams->
maxChi2Ndf && cGBLChi2Rej++ < 10) {
422 LOGP(error,
"GBL fit exceeded red chi2 {}", chi2 / ndf);
424 LOGP(error,
"\tGBL is far away from good KF fit!!!!");
430 lostWeightSum += lostWeight;
433 gblTrajSlot.push_back(traj);
437 fit.chi2 = (float)chi2;
438 fit.chi2Ndf = (float)chi2 / (
float)ndf;
450 auto timeEnd = std::chrono::high_resolution_clock::now();
451 auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(timeEnd - timeStart);
452 LOGP(info,
"Fitted {} tracks out of {} (selected {}) in {} sec", cGBLFit, itsTracks.size(), cSelected, duration.count() / 1e3);
453 LOGP(info,
"\tRefit failed for {} tracks; Failed prop for {} tracks", cFailedRefit, cFailedProp);
454 LOGP(info,
"\tGBL SUMMARY:");
455 LOGP(info,
"\t\tGBL construction failed {}", cGBLConstruct);
456 LOGP(info,
"\t\tGBL fit failed {}", cGBLFitFail);
457 LOGP(info,
"\t\tGBL chi2Ndf rejected {}", cGBLChi2Rej);
459 LOGP(info,
"\t\tGBL Chi2/Ndf = NDF IS 0");
461 LOGP(info,
"\t\tGBL Chi2/Ndf = {}", chi2Sum / ndfSum);
463 LOGP(info,
"\t\tGBL LostWeight = {}", lostWeightSum);
464 LOGP(info,
"Streaming results to output");
467 for (
auto& slot : gblTrajSlots) {
468 for (
auto& traj : slot) {
469 traj.milleOut(mille);
474 for (
auto& slot : resTrackSlots) {
475 for (
auto&
res : slot) {
487 if (
static bool initOnce{
false}; !initOnce) {
498 for (
auto& rb : mRigidBodyParams) {
504 using json = nlohmann::json;
506 auto data = json::parse(
f);
507 for (
const auto& item :
data) {
508 int id = item[
"id"].get<
int>();
509 if (!item.contains(
"rigidBody")) {
512 auto rb = item[
"rigidBody"].get<std::vector<double>>();
513 for (
int k = 0; k < 6 && k < static_cast<int>(rb.size()); ++k) {
514 mRigidBodyParams[
id](k) = rb[k];
523void AlignmentSpec::buildHierarchy()
535 mHierarchy->finalise();
538 mHierarchy->writeTree(
tree);
540 mHierarchy->writeRigidBodyConstraints(cons);
542 mHierarchy->writeParameters(par);
546bool AlignmentSpec::getTransportJacobian(
const TrackD& track,
double xTo,
double alphaTo, gbl::Matrix5d& jac, gbl::Matrix5d& err)
549 const auto bz = prop->getNominalBz();
550 const auto minStep = std::sqrt(std::numeric_limits<double>::epsilon());
551 const gbl::Vector5d
x0(track.getParams());
558 auto propagate = [&](gbl::Vector5d&
p) ->
bool {
561 tmp.setParam(p[
i],
i);
563 if (!prop->propagateToAlphaX(tmp, refLin, alphaTo, xTo,
false, mParams->
maxSnp, mParams->
maxStep, 1, mParams->
corrType)) {
566 p = gbl::Vector5d(tmp.getParams());
577 double normErr = std::numeric_limits<double>::max();
578 gbl::Vector5d bestDeriv = gbl::Vector5d::Constant(std::numeric_limits<double>::max());
580 gbl::Vector5d xPlus =
x0, xMinus =
x0;
583 if (!propagate(xPlus) || !propagate(xMinus)) {
586 cur.col(0) = (xPlus - xMinus) / (2.0 *
h);
588 bestDeriv = cur.col(0);
594 for (
int k{1}; k <= iExt; ++k) {
595 cur.col(k) = (fac * cur.col(k - 1) - pre.col(k - 1)) / (fac - 1.0);
597 double e = std::max((cur.col(k) - cur.col(k - 1)).norm(), (cur.col(k) - pre.col(k - 1)).norm());
600 bestDeriv = cur.col(k);
601 if (normErr < mParams->ridderEps) {
606 if (normErr < mParams->ridderEps) {
611 double tableauErr = (cur.col(iExt) - pre.col(iExt - 1)).norm();
612 if (tableauErr >= 2.0 * normErr) {
618 if (bestDeriv.isApproxToConstant(std::numeric_limits<double>::max())) {
621 jac.col(iPar) = bestDeriv;
622 err.col(iPar) = gbl::Vector5d::Constant(normErr);
625 if (jac.isIdentity(1e-8)) {
626 LOGP(error,
"Near jacobian idendity for taking track from {} to {}", track.getX(), xTo);
633bool AlignmentSpec::prepareITSTrack(
int iTrk,
const o2::its::TrackITS& itsTrack, align::Track& resTrack)
636 auto trFit = convertTrack<double>(itsTrack.getParamOut());
639 const auto bz = prop->getNominalBz();
640 std::array<const FrameInfoExt*, 8> frameArr{};
643 refLin = &(trkOut = trFit);
648 if (!prop->propagateToAlphaX(tr, refLin, frameArr[
i]->alpha, frameArr[
i]->x,
false, mParams->
maxSnp, mParams->
maxStep, 1, mParams->
corrType)) {
651 meas.dy = frameArr[
i]->positionTrackingFrame[0] - tr.getY();
652 meas.dz = frameArr[
i]->positionTrackingFrame[1] - tr.getZ();
653 meas.sig2y = frameArr[
i]->covarianceTrackingFrame[0];
654 meas.sig2z = frameArr[
i]->covarianceTrackingFrame[2];
656 meas.phi = tr.getPhi();
657 o2::math_utils::bringTo02Pid(meas.phi);
658 chi2 += (float)tr.getPredictedChi2Quiet(frameArr[
i]->positionTrackingFrame, frameArr[
i]->covarianceTrackingFrame);
659 if (!tr.update(frameArr[
i]->positionTrackingFrame, frameArr[
i]->covarianceTrackingFrame)) {
663 refLin->setY(frameArr[
i]->positionTrackingFrame[0]);
664 refLin->setZ(frameArr[
i]->positionTrackingFrame[1]);
673 const int iPV = mT2PV[iTrk];
677 const auto& pv = mPVs[iPV];
678 auto tmp = convertTrack<double>(itsTrack.getParamIn());
679 if (!prop->propagateToDCA(pv, tmp, bz)) {
682 pvInfo.alpha = (float)tmp.getAlpha();
685 o2::math_utils::sincosd(pvInfo.alpha, sa, ca);
686 pvInfo.x = tmp.getX();
687 pvInfo.positionTrackingFrame[0] = -pv.getX() * sa + pv.getY() * ca;
688 pvInfo.positionTrackingFrame[1] = pv.getZ();
689 pvInfo.covarianceTrackingFrame[0] = 0.5 * (pv.getSigmaX2() + pv.getSigmaY2());
690 pvInfo.covarianceTrackingFrame[2] = pv.getSigmaY2();
693 frameArr[0] = &pvInfo;
697 int nCl = itsTrack.getNClusters();
698 for (
int i = 0;
i < nCl;
i++) {
699 const auto& curInfo = mITSTrackingInfo[itsClRefs[itsTrack.
getClusterEntry(
i)]];
700 frameArr[1 + curInfo.lr] = &curInfo;
704 resTrack.points.clear();
705 resTrack.info.clear();
706 trFit.resetCovariance();
707 trFit.setCov(trFit.getQ2Pt() * trFit.getQ2Pt() * trFit.getCov()[14], 14);
709 for (
int i{7};
i >= 0; --
i) {
711 int res = accountCluster(
i, trFit, chi2, point, refLin);
714 }
else if (
res == 0) {
715 resTrack.points.push_back(point);
716 resTrack.info.push_back(*frameArr[
i]);
717 resTrack.track = trFit;
721 std::reverse(resTrack.info.begin(), resTrack.info.end());
722 std::reverse(resTrack.points.begin(), resTrack.points.end());
723 resTrack.kfFit.chi2 = chi2;
724 resTrack.kfFit.ndf = (
int)resTrack.info.size() * 2 - 5;
725 resTrack.kfFit.chi2Ndf = chi2 / (float)resTrack.kfFit.ndf;
730void AlignmentSpec::prepareMeasurments(std::span<const itsmft::CompClusterExt>
clusters, std::span<const unsigned char> patterns)
732 LOGP(info,
"Preparing {} measurments",
clusters.size());
735 mITSTrackingInfo.clear();
736 mITSTrackingInfo.reserve(
clusters.size());
737 auto pattIt = patterns.begin();
739 const auto sens = cls.getSensorID();
740 const auto lay = geom->getLayer(sens);
741 double sigmaY2{0}, sigmaZ2{0};
751 const auto gloXYZ = geom->getMatrixL2G(sens) * locXYZ;
753 auto trkXYZf = geom->getMatrixT2L(sens) ^ locXYZ;
755 trkXYZ.SetCoordinates(trkXYZf.X(), trkXYZf.Y(), trkXYZf.Z());
760 double alpha = geom->getSensorRefAlpha(sens);
761 double x = trkXYZ.x();
765 x = std::hypot(gloXYZ.x(), gloXYZ.y());
767 alpha = std::atan2(gloXYZ.y(), gloXYZ.x());
773 mITSTrackingInfo.emplace_back(sens, lay,
x,
alpha,
774 std::array<double, 2>{trkXYZ.y(), trkXYZ.z()},
775 std::array<double, 3>{sigmaY2, 0., sigmaZ2});
779void AlignmentSpec::buildT2V()
783 mT2PV.resize(itsTracks.size(), -1);
785 mPVs.reserve(mcReader->getNEvents(0));
786 for (
int iEve{0}; iEve < mcReader->getNEvents(0); ++iEve) {
787 const auto& eve = mcReader->getMCEventHeader(0, iEve);
789 constexpr float err{22e-4f};
790 vtx.setX((
float)eve.GetX());
791 vtx.
setY((
float)eve.GetY());
792 vtx.
setZ((
float)eve.GetZ());
799 for (
size_t iTrk{0}; iTrk < mcLbls.size(); ++iTrk) {
800 const auto& lbl = mcLbls[iTrk];
801 if (!lbl.isValid() || !lbl.isCorrect()) {
804 const auto& mcTrk = mcReader->getTrack(lbl);
805 if (mcTrk->isPrimary()) {
806 mT2PV[iTrk] = lbl.getEventID();
810 LOGP(fatal,
"Data PV to track TODO");
814bool AlignmentSpec::applyMisalignment(Eigen::Vector2d&
res,
const FrameInfoExt& frame,
const TrackD& wTrk,
size_t iTrk)
822 const MisalignmentFrame misFrame{
823 .sensorID = sensorID,
826 .alpha = frame.alpha,
827 .z = frame.positionTrackingFrame[1]};
834 const auto mcTrk = mcReader->getTrack(lbl);
838 std::array<double, 3> xyz{mcTrk->GetStartVertexCoordinatesX(), mcTrk->GetStartVertexCoordinatesY(), mcTrk->GetStartVertexCoordinatesZ()};
839 std::array<double, 3> pxyz{mcTrk->GetStartVertexMomentumX(), mcTrk->GetStartVertexMomentumY(), mcTrk->GetStartVertexMomentumZ()};
840 TParticlePDG* pPDG = TDatabasePDG::Instance()->GetParticle(mcTrk->GetPdgCode());
847 if (!mcAtCl.rotate(frame.alpha) || !prop->PropagateToXBxByBz(mcAtCl, frame.x)) {
852 if (!shift.accepted) {
866 if (mChip2Hiearchy.find(lbl) == mChip2Hiearchy.end()) {
869 const auto* tileVol = mChip2Hiearchy.at(lbl);
872 Matrix36 der = getRigidBodyBaseDerivatives(makeDerivativeContext(frame, wTrk));
875 const double posTrk[3] = {frame.x, 0., 0.};
877 tileVol->getT2L().LocalToMaster(posTrk, posLoc);
879 tileVol->computeJacobianL2T(posLoc, jacL2T);
883 der *= tileVol->getJL2P();
886 Eigen::Vector3d shift = der * mRigidBodyParams[sensorID];
904 <<
"sens=" << sensorID
906 <<
"z=" << frame.positionTrackingFrame[1]
907 <<
"phi=" << frame.alpha
926 LOG(info) <<
"its cluster dictionary updated";
931 LOG(info) <<
"it3 cluster dictionary updated";
939 auto dataRequest = std::make_shared<DataRequest>();
940 std::shared_ptr<o2::base::GRPGeomRequest> ggRequest{
nullptr};
942 dataRequest->requestTracks(srcTracks, useMC);
944 dataRequest->requestIT3Clusters(useMC);
946 dataRequest->requestClusters(srcClusters, useMC);
948 if (withPV && !useMC) {
949 dataRequest->requestPrimaryVertices(useMC);
951 ggRequest = std::make_shared<o2::base::GRPGeomRequest>(
false,
961 dataRequest->inputs.emplace_back(
"dummy",
"GLO",
"DUMMY_OUT", 0);
962 ggRequest = std::make_shared<o2::base::GRPGeomRequest>(
false,
968 dataRequest->inputs);
972 {
"nthreads", VariantType::Int, 1, {
"number of threads"}},
976 .
name =
"its3-alignment",
977 .inputs = dataRequest->inputs,
979 .algorithm =
AlgorithmSpec{adaptFromTask<AlignmentSpec>(dataRequest, ggRequest, srcTracks, useMC, withPV, withITS, out)},
Definition of the BuildTopologyDictionary class for ITS3.
Helper for geometry and GRP related CCDB requests.
Definition of the GeometryTGeo class.
Referenc on track indices contributing to the vertex, with possibility chose tracks from specific sou...
std::string asString() const
Class for time synchronization of RawReader instances.
void fillDerivatives(const DerivativeContext &ctx, Eigen::Ref< Eigen::MatrixXd > out) const override
void checkUpdates(o2::framework::ProcessingContext &pc)
static GRPGeomHelper & instance()
void setRequest(std::shared_ptr< GRPGeomRequest > req)
GPUd() value_type estimateLTFast(o2 static GPUd() float estimateLTIncrement(const o2 PropagatorImpl * Instance(bool uninitialized=false)
void printKeyValues(bool showProv=true, bool useLogger=false, bool withPadding=true, bool showHash=true) const final
static const AlignmentParams & Instance()
Static class with identifiers, bitmasks and names for ALICE detectors.
T get(const char *key) const
ConfigParamRegistry const & options()
std::map< GlobalLabel, AlignableVolume * > SensorMapping
void endOfStream(EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
void run(ProcessingContext &pc) final
~AlignmentSpec() final=default
void init(InitContext &ic) final
void finaliseCCDB(ConcreteDataMatcher &matcher, void *obj) final
static GeometryTGeo * Instance()
void fillMatrixCache(int mask) override
int getClusterEntry(int i) const
std::string pstring(bool withNewline=false) const
GLfloat GLfloat GLfloat alpha
Node par(int index)
Parameters.
Defining ITS Vertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
o2::track::TrackParCovD TrackD
MisalignmentShift evaluateInextensionalShift(const SensorMisalignment &sensor, const MisalignmentFrame &frame, const TrackSlopes &slopes)
Eigen::Matrix< double, 3, 6 > Matrix36
AlignableVolume::Ptr buildHierarchyITS(AlignableVolume::SensorMapping &sensorMap)
MisalignmentModel loadMisalignmentModel(const std::string &jsonPath)
Eigen::Matrix< double, 6, 6 > Matrix66
o2::framework::DataProcessorSpec getAlignmentSpec(o2::dataformats::GlobalTrackID::mask_t srcTracks, o2::dataformats::GlobalTrackID::mask_t srcClus, bool useMC, bool withPV, bool withITS3, OutputEnum out)
MisalignmentShift evaluateLegendreShift(const SensorMisalignment &sensor, const MisalignmentFrame &frame, const TrackSlopes &slopes)
TrackSlopes computeTrackSlopes(double snp, double tgl)
void writeMillepedeResults(AlignableVolume *root, const std::string &milleResPath, const std::string &outJsonPath, const std::string &injectedJsonPath="")
void applyDOFConfig(AlignableVolume *root, const std::string &jsonPath)
AlignableVolume::Ptr buildHierarchyIT3(AlignableVolume::SensorMapping &sensorMap)
T getDetID2Layer(T detID)
o2::math_utils::Point3D< T > extractClusterData(const itsmft::CompClusterExt &c, iterator &iter, const o2::its3::TopologyDictionary *dict, T &sig2y, T &sig2z)
o2::math_utils::Point3D< T > extractClusterData(const itsmft::CompClusterExt &c, iterator &iter, const itsmft::TopologyDictionary *dict, T &sig2y, T &sig2z)
void bringToPMPid(double &phi)
TrackParametrizationWithError< double > TrackParCovD
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
auto getITSTracks() const
auto getITSTracksClusterRefs() const
auto getITSClustersPatterns() const
void collectData(o2::framework::ProcessingContext &pc, const DataRequest &request)
auto getITSTracksMCLabels() const
auto getITSClusters() const
std::string dofConfigJson
double ridderRelIniStep[5]
double ridderMaxIniStep[5]
std::string milleResOutJson
std::string milleTreeFile
std::string milleParamFile
o2::base::PropagatorD::MatCorrType corrType
std::array< double, 2 > positionTrackingFrame
std::vector< Measurement > points
o2::track::TrackParCovD track
std::vector< FrameInfoExt > info
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
std::vector< Cluster > clusters
std::unique_ptr< TTree > tree((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str()))