82 LOG(error) <<
"Track derivatives are not yet evaluated";
90 mQ2Pt = trc.getQ2Pt();
99 for (
int ip = 0; ip < np; ip++) {
102 if (pnt->containsMeasurement()) {
108 if (pnt->containsMaterial()) {
109 int nmatpar = pnt->getNMatPar();
115 resize(nres, nlocd, nglod);
119 for (
int ip = 0; ip < np; ip++) {
121 if (pnt->containsMeasurement()) {
123 int nDGlo = pnt->getNGloDOFs();
124 if (!pnt->isStatOK()) {
125 pnt->incrementStat();
128 for (
int idim = 0; idim < 2; idim++) {
140 for (
int j = 0;
j < nParETP;
j++) {
149 int lp0 = pnt->getMinLocVarID();
150 int lp1 = pnt->getMaxLocVarID();
151 for (
int j = lp0;
j < lp1;
j++) {
152 if (TMath::IsNaN(deriv[
j])) {
153 LOGP(error,
"Deriv {} of {}:{} is NAN",
j, lp0, lp1);
169 const int* gloIDP = gloParID + gloOffs;
170 for (
int j = 0;
j < nDGlo;
j++) {
184 if (pnt->containsMaterial()) {
185 int nmatpar = pnt->getNMatPar();
187 const float* expMatCov = pnt->getMatCorrCov();
188 int offs = pnt->getMaxLocVarID() - nmatpar;
190 for (
int j = 0;
j < nmatpar;
j++) {
206 LOG(info) <<
"Track does not depend on free global parameters, discard";
224 mNDLoc =
new int16_t[nresid];
227 mResid =
new float[nresid];
230 memset(
mMeasType, 0, nresid *
sizeof(int16_t));
231 memset(
mNDLoc, 0, nresid *
sizeof(int16_t));
232 memset(
mNDGlo, 0, nresid *
sizeof(
int));
233 memset(
mVolID, 0, nresid *
sizeof(
int));
234 memset(
mResid, 0, nresid *
sizeof(
float));
235 memset(
mResErr, 0, nresid *
sizeof(
float));
240 mIDLoc =
new int16_t[nloc];
241 mDLoc =
new float[nloc];
243 memset(
mIDLoc, 0, nloc *
sizeof(int16_t));
244 memset(
mDLoc, 0, nloc *
sizeof(
float));
250 mDGlo =
new float[nglo];
252 memset(
mIDGlo, 0, nglo *
sizeof(
int));
253 memset(
mDGlo, 0, nglo *
sizeof(
float));
277 printf(
"NRes: %3d NLoc: %3d NGlo:%3d | Stored: Loc:%3d Glo:%5d\n",
280 int curLoc = 0, curGlo = 0;
281 const int kNColLoc = 5;
284 printf(
"Res:%3d Type:%d %+e (%+e) | NDLoc:%3d NDGlo:%4d [VID:%5d]\n",
287 printf(
"Local Derivatives:\n");
289 for (
int id = 0;
id < ndloc;
id++) {
290 int jd =
id + curLoc;
292 if (((
id + 1) % kNColLoc) == 0) {
305 printf(
"Global Derivatives:\n");
309 for (
int id = 0;
id < ndglo;
id++) {
310 int jd =
id + curGlo;
312 if (prvID >
mIDGlo[jd] % 100) {
Track model for the alignment.
Collection of auxillary methods.
Millepede record in root format (can be converted to proper pede binary format.
double getResidual(int dim, int pntID) const
AlignmentPoint * getPoint(int i)
const double * getDResDGlo(int dim, int id) const
const int * getGloParID() const
bool getDerivDone() const
int getNLocExtPar() const
const double * getDResDLoc(int dim, int pntID) const
double getChi2Ini() const
int getVolID(int id) const
int mNDGloTotBook
number of slots booked for local derivatives
o2::dataformats::GlobalTrackID mTrackID
int mNDLocTotBook
number of slots booked for residuals
void resize(int nresid, int nloc, int nglo)
bool fillTrack(AlignmentTrack &trc, const std::vector< int > &id2Lab)
void dummyRecord(float res, float err, float dGlo, int labGlo)
void setCosmic(bool v=true)
constexpr bool isZeroAbs(double d) noexcept
void align(gsl::span< ElinkEncoder< BareFormat, CHARGESUM > > elinks)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
o2::InteractionRecord ir(0, 0)