# AlignmentTrackChi2 and gbl error

**URL:** <https://corryvreckan-forum.web.cern.ch/t/alignmenttrackchi2-and-gbl-error/95>\
**Category:** Uncategorized\
**Created:** [March 20, 2024, 8:51pm UTC](https://corryvreckan-forum.web.cern.ch/t/alignmenttrackchi2-and-gbl-error/95 "2024-03-20T20:51:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebuchana](https://corryvreckan-forum.web.cern.ch/letter_avatar_proxy/v4/letter/e/0ea827/32.png) [@ebuchana](https://corryvreckan-forum.web.cern.ch/u/ebuchana)\
**Post date:** [March 20, 2024, 8:51pm UTC](https://corryvreckan-forum.web.cern.ch/t/alignmenttrackchi2-and-gbl-error/95/1 "2024-03-20T20:51:13Z")

</div>

Hello,

Can anyone help me understand this error. I am running a telescope alignment and I get this error when it reaches the orientation iteration of the alignment. I know that at least two planes have a large angle misalignment.

(FATAL) [F:AlignmentTrackChi2] Fatal internal error  
Track Object Track cannot update plane before track has been fitted.  
Cannot continue…

I do manage to run the alignment successfully using ‘straightline’ instead of ‘gbl’ and the alignment finishes without error. This does improve the residuals on the original planes that had large angle misalignments but produces a worse alignment for the other planes compared to ‘gbl’. When I try to run ‘gbl’ with the input geometry being the final geometry file of the “straightlines”, I still get the same error.

Any ideas?

Thanks,  
Emma

---

<div class="post-metadata">

**Author:** ![simonspa](https://corryvreckan-forum.web.cern.ch/letter_avatar_proxy/v4/letter/s/f04885/32.png) [@simonspa](https://corryvreckan-forum.web.cern.ch/u/simonspa)\
**Post date:** [March 21, 2024, 3:36pm UTC](https://corryvreckan-forum.web.cern.ch/t/alignmenttrackchi2-and-gbl-error/95/2 "2024-03-21T15:36:23Z")

</div>

Hi @ebuchana

huh, this is an interesting problem - the code where this error stems from is _exactly the same_ for straight-line tracks and GBL tracks.

We have an alignment test running as part of the CI pipeline, by default using `straightline` as track model. But I just switched it for `gbl` and apart from a few failed fits during the event loop, the alignment itself runs through just fine.

May I ask which version of Corry you are using? (i.e. the commit you have checked out, in the absence of a proper release in a long time…)

Best,  
Simon

---

<div class="post-metadata">

**Author:** ![ebuchana](https://corryvreckan-forum.web.cern.ch/letter_avatar_proxy/v4/letter/e/0ea827/32.png) [@ebuchana](https://corryvreckan-forum.web.cern.ch/u/ebuchana)\
**Post date:** [March 21, 2024, 3:51pm UTC](https://corryvreckan-forum.web.cern.ch/t/alignmenttrackchi2-and-gbl-error/95/3 "2024-03-21T15:51:10Z")

</div>

Hi Simon,

Thanks for your response. I have checked (git log -4) and the result is:

commit 02811f9e67f366eb999ff2fb74b753339d1d984f  
Merge: 05dfd63 c71db91  
Author: Simon Spannagel [simon.spannagel@cern.ch](mailto:simon.spannagel@cern.ch)  
Date: Thu Feb 22 15:43:42 2024 +0100

```
Merge branch 'ReadmeParticleFlux' into 'master'

ReadmeParticleFlux: change description of parameter for plot unit control

See merge request corryvreckan/corryvreckan!680

```

commit c71db917210e4ad7d5ee508866b42e66ea77ce55  
Author: Annika Vauth [annika.vauth@uni-hamburg.de](mailto:annika.vauth@uni-hamburg.de)  
Date: Thu Feb 22 15:14:59 2024 +0100

```
change readme to contain correct parameter for plot unit control

```

commit 05dfd633d63a7de15adbfeaf2ecae6f2ab8af7b9  
Merge: 03e0959 0f0f66d  
Author: Simon Spannagel [simon.spannagel@cern.ch](mailto:simon.spannagel@cern.ch)  
Date: Thu Feb 15 14:58:23 2024 +0100

```
Merge branch 'support_mp11' into 'master'

adding support of mupix11

See merge request corryvreckan/corryvreckan!679

```

commit 0f0f66d1083c3a2568b5817590fcb59a4d2629bf  
Author: Lennart Huth [lennart.huth@cern.ch](mailto:lennart.huth@cern.ch)  
Date: Thu Feb 15 14:52:01 2024 +0100

```
adding support of mupix11

```

So I guess I am using a fairly recent version?

Thanks,  
Emma

---

<div class="post-metadata">

**Author:** ![simonspa](https://corryvreckan-forum.web.cern.ch/letter_avatar_proxy/v4/letter/s/f04885/32.png) [@simonspa](https://corryvreckan-forum.web.cern.ch/u/simonspa)\
**Post date:** [March 21, 2024, 4:06pm UTC](https://corryvreckan-forum.web.cern.ch/t/alignmenttrackchi2-and-gbl-error/95/4 "2024-03-21T16:06:10Z")

</div>

Hi @ebuchana

if you read “fairly” as “the very latest” then definitely yes, fairly recent! 🙂

This makes it all the more weird, I just ran with the exact same version. If you would be able to share a sample file and config with me, I could have a look and see where things go wrong!

All the best,  
Simon
