Skip to content

Commit b503777

Browse files
authored
[MFT] Use residual instead of measurement to make Mille records (#10726)
* test with residual instead of measurement used to make records * also store Pede errors and pulls on alignment corrections * Use ClassDefOverride to avoid countless warnings in ROOT interpreter * Forgot to use ClassDefOverride here
1 parent 48c767d commit b503777

File tree

15 files changed

+54
-46
lines changed

15 files changed

+54
-46
lines changed

Detectors/ITSMFT/MFT/alignment/include/MFTAlignment/Aligner.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ class Aligner
5454
void setAllowedVariationDeltaRz(const double value) { mAllowVar[2] = value; }
5555
void setChi2CutFactor(const double value) { mStartFac = value; }
5656

57+
/// \brief return the number of DOF per sensor
58+
int getNDofPerSensor() const { return mNDofPerSensor; }
59+
5760
protected:
5861
static constexpr int mNumberOfTrackParam = 4; ///< Number of track (= local) parameters (X0, Tx, Y0, Ty)
5962
static constexpr int mNDofPerSensor = 4; ///< translation in global x, y, z, and rotation Rz around global z-axis

Detectors/ITSMFT/MFT/alignment/include/MFTAlignment/MatrixSparse.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class MatrixSparse : public MatrixSq
7777
protected:
7878
VectorSparse** fVecs = nullptr;
7979

80-
ClassDef(MatrixSparse, 0);
80+
ClassDefOverride(MatrixSparse, 0);
8181
};
8282

8383
//___________________________________________________

Detectors/ITSMFT/MFT/alignment/include/MFTAlignment/MatrixSq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class MatrixSq : public TMatrixDBase
144144
protected:
145145
Bool_t fSymmetric; ///< is the matrix symmetric? Only lower triangle is filled
146146

147-
ClassDef(MatrixSq, 1);
147+
ClassDefOverride(MatrixSq, 1);
148148
};
149149

150150
//___________________________________________________________

Detectors/ITSMFT/MFT/alignment/include/MFTAlignment/MillePede2.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ class MillePede2
181181
void SetSigmaPar(int i, double par);
182182

183183
/// \brief performs a requested number of global iterations
184-
int GlobalFit(double* par = nullptr, double* error = nullptr, double* pull = nullptr);
184+
int GlobalFit(std::vector<double>& par,
185+
std::vector<double>& error,
186+
std::vector<double>& pull);
185187

186188
/// \brief perform global parameters fit once all the local equations have been fitted
187189
int GlobalFitIteration();

Detectors/ITSMFT/MFT/alignment/include/MFTAlignment/MillePedeRecord.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class MillePedeRecord : public TObject
127127
Double32_t* fValue; ///< [fSize] array of values: derivs,residuals
128128
Double32_t fWeight; ///< global weight for the record
129129

130-
ClassDef(MillePedeRecord, 3);
130+
ClassDefOverride(MillePedeRecord, 3);
131131
};
132132

133133
//_____________________________________________________________________________

Detectors/ITSMFT/MFT/alignment/include/MFTAlignment/MinResSolve.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class MinResSolve : public TObject
132132
MatrixSparse* fMatU; // aux. space
133133
SymBDMatrix* fMatBD; // aux. space
134134

135-
ClassDef(MinResSolve, 0);
135+
ClassDefOverride(MinResSolve, 0);
136136
};
137137

138138
} // namespace mft

Detectors/ITSMFT/MFT/alignment/include/MFTAlignment/RecordsToAlignParams.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#ifndef ALICEO2_MFT_RECORDS_TO_ALIGN_PARAMS_H
1717
#define ALICEO2_MFT_RECORDS_TO_ALIGN_PARAMS_H
1818

19+
#include <vector>
1920
#include <TChain.h>
2021

2122
#include "MFTAlignment/MillePede2.h"
@@ -53,6 +54,15 @@ class RecordsToAlignParams : public Aligner
5354
/// \brief provide access to the AlignParam vector
5455
void getAlignParams(std::vector<o2::detectors::AlignParam>& alignParams) { alignParams = mAlignParams; }
5556

57+
/// \brief provide access to the vector of alignment corrections
58+
void getPedeOutParams(std::vector<double>& output) { output = mPedeOutParams; }
59+
60+
/// \brief provide access to the vector of errors on the alignement corrections
61+
void getPedeOutParamsErrors(std::vector<double>& output) { output = mPedeOutParamsErrors; }
62+
63+
/// \brief provide access to the vector of pulls on the alignement corrections
64+
void getPedeOutParamsPulls(std::vector<double>& output) { output = mPedeOutParamsPulls; }
65+
5666
/// \brief connect data record reader to input TChain of records
5767
void connectRecordReaderToChain(TChain* ch);
5868

@@ -67,8 +77,11 @@ class RecordsToAlignParams : public Aligner
6777
bool mWithConstraintsRecReader; ///< boolean to set to true if one wants to also read constraints records
6878
o2::mft::MilleRecordReader* mConstraintsRecReader; ///< utility that handles the reading of the constraints records
6979
o2::mft::MillePede2* mMillepede; ///< Millepede2 implementation copied from AliROOT
80+
std::vector<double> mPedeOutParams; ///< Vector to store the outputs (alignment corrections) of the MillePede simulatenous fit
81+
std::vector<double> mPedeOutParamsErrors; ///< Vector to store the outputs (errors on the alignement corrections) of the MillePede simulatenous fit
82+
std::vector<double> mPedeOutParamsPulls; ///< Vector to store the outputs (pulls on the alignement corrections) of the MillePede simulatenous fit
7083

71-
ClassDef(RecordsToAlignParams, 0);
84+
ClassDefOverride(RecordsToAlignParams, 0);
7285
};
7386

7487
} // namespace mft

Detectors/ITSMFT/MFT/alignment/include/MFTAlignment/RectMatrix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class RectMatrix : public TObject
6767
Int_t fNCols; ///< Number of columns
6868
Double_t** fRows; ///< pointers on rows
6969

70-
ClassDef(RectMatrix, 0);
70+
ClassDefOverride(RectMatrix, 0);
7171
};
7272

7373
//___________________________________________________________

Detectors/ITSMFT/MFT/alignment/include/MFTAlignment/SymBDMatrix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class SymBDMatrix : public MatrixSq
106106
protected:
107107
Double_t* fElems; ///< Elements booked by constructor
108108

109-
ClassDef(SymBDMatrix, 0);
109+
ClassDefOverride(SymBDMatrix, 0);
110110
};
111111

112112
//___________________________________________________________

Detectors/ITSMFT/MFT/alignment/include/MFTAlignment/SymMatrix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class SymMatrix : public MatrixSq
215215
static SymMatrix* fgBuffer; ///< buffer for fast solution
216216
static Int_t fgCopyCnt; ///< matrix copy counter
217217

218-
ClassDef(SymMatrix, 0);
218+
ClassDefOverride(SymMatrix, 0);
219219
};
220220

221221
//___________________________________________________________

0 commit comments

Comments
 (0)