1313// / @since 2021-02-01
1414// / @brief Meausered point in the sensor.
1515
16- #include < stdio.h >
16+ #include < cstdio >
1717#include < TMath.h>
1818#include < TString.h>
1919#include " Align/AliAlgPoint.h"
20- #include " Align/AliAlgAux.h"
21- // #include "AliExternalTrackParam.h"
2220
2321using namespace o2 ::align::AliAlgAux;
2422using namespace TMath ;
@@ -30,7 +28,7 @@ namespace align
3028
3129// _____________________________________
3230AliAlgPoint::AliAlgPoint ()
33- : fMinLocVarID (0 ), fMaxLocVarID (0 ), fDetID (-1 ), fSID (-1 ), fAlphaSens (0 ), fXSens (0 ), fCosDiagErr (0 ), fSinDiagErr (0 ), fX2X0 (0 ), fXTimesRho (0 ), fNGloDOFs (0 ), fDGloOffs (0 ), fSensor (0 )
31+ : fMinLocVarID (0 ), fMaxLocVarID (0 ), fDetID (-1 ), fSID (-1 ), fAlphaSens (0 ), fXSens (0 ), fCosDiagErr (0 ), fSinDiagErr (0 ), fX2X0 (0 ), fXTimesRho (0 ), fNGloDOFs (0 ), fDGloOffs (0 ) // , fSensor(0) FIXME(milettri): Needs AliAlgSens
3432{
3533 // def c-tor
3634 for (int i = 3 ; i--;) {
@@ -90,10 +88,12 @@ void AliAlgPoint::Init()
9088}
9189
9290// _____________________________________
93- void AliAlgPoint::UpdatePointByTrackInfo (const AliExternalTrackParam * t)
91+ void AliAlgPoint::UpdatePointByTrackInfo (const trackParam_t * t)
9492{
95- // recalculate point errors using info about the track in the sensor tracking frame
96- fSensor ->UpdatePointByTrackInfo (this , t);
93+ LOG (FATAL) << __PRETTY_FUNCTION__ << " is disabled" ;
94+ // FIXME(milettri): needs AliAlgSens
95+ // // recalculate point errors using info about the track in the sensor tracking frame
96+ // fSensor->UpdatePointByTrackInfo(this, t);
9797}
9898
9999// _____________________________________
@@ -176,29 +176,34 @@ void AliAlgPoint::DumpCoordinates() const
176176{
177177 // dump various corrdinates for inspection
178178 // global xyz
179- double xyz[3 ];
180- GetXYZGlo (xyz);
181- for (int i = 0 ; i < 3 ; i++)
182- printf (" %+.4e " , xyz[i]);
183- //
184- AliExternalTrackParam wsb;
185- AliExternalTrackParam wsa;
179+ dim3_t xyz;
180+ GetXYZGlo (xyz.data ());
181+
182+ auto print3d = [](dim3_t & xyz) {
183+ for (auto i : xyz) {
184+ printf (" %+.4e " , i);
185+ }
186+ };
187+
188+ print3d (xyz);
189+ trackParam_t wsb;
190+ trackParam_t wsa;
186191 GetTrWSB (wsb);
187192 GetTrWSA (wsa);
188- wsb. GetXYZ (xyz);
189- for ( int i = 0 ; i < 3 ; i++)
190- printf ( " %+.4e " , xyz[i] ); // track before mat corr
191- wsa. GetXYZ (xyz);
192- for ( int i = 0 ; i < 3 ; i++)
193- printf ( " %+.4e " , xyz[i] ); // track after mat corr
194- //
193+
194+ wsb. getXYZGlo (xyz);
195+ print3d ( xyz); // track before mat corr
196+
197+ wsa. getXYZGlo (xyz);
198+ print3d ( xyz); // track after mat corr
199+
195200 printf (" %+.4f " , fAlphaSens );
196201 printf (" %+.4e " , GetXPoint ());
197202 printf (" %+.4e " , GetYTracking ());
198203 printf (" %+.4e " , GetZTracking ());
199204 //
200- printf (" %+.4e %.4e " , wsb.GetY (), wsb.GetZ ());
201- printf (" %+.4e %.4e " , wsa.GetY (), wsa.GetZ ());
205+ printf (" %+.4e %.4e " , wsb.getY (), wsb.getZ ());
206+ printf (" %+.4e %.4e " , wsa.getY (), wsa.getZ ());
202207 //
203208 printf (" %4e %4e" , Sqrt (fErrYZTracking [0 ]), Sqrt (fErrYZTracking [2 ]));
204209 printf (" \n " );
@@ -215,7 +220,7 @@ void AliAlgPoint::Clear(Option_t*)
215220 fNGloDOFs = 0 ;
216221 fDGloOffs = 0 ;
217222 //
218- fSensor = 0 ;
223+ // fSensor = 0; FIXME(milettri): needs AliAlgSens
219224}
220225
221226// __________________________________________________________________
@@ -355,29 +360,35 @@ void AliAlgPoint::DiagMatCorr(const float* nodiag, float* diag) const
355360}
356361
357362// __________________________________________________________________
358- void AliAlgPoint::GetTrWSA (AliExternalTrackParam & etp) const
363+ void AliAlgPoint::GetTrWSA (trackParam_t & etp) const
359364{
360365 // assign WSA (after material corrections) parameters to supplied track
361- double covDum[ 15 ] = {
366+ const trackParam_t::covMat_t covDum {
362367 1 .e -4 ,
363368 0 , 1 .e -4 ,
364369 0 , 0 , 1 .e -4 ,
365370 0 , 0 , 0 , 1 .e -4 ,
366371 0 , 0 , 0 , 0 , 1e-4 };
367- etp.Set (GetXPoint (), GetAlphaSens (), fTrParamWSA , covDum);
372+ params_t tmp;
373+ std::copy (std::begin (fTrParamWSA ), std::end (fTrParamWSA ), std::begin (tmp));
374+
375+ etp.set (GetXPoint (), GetAlphaSens (), tmp, covDum);
368376}
369377
370378// __________________________________________________________________
371- void AliAlgPoint::GetTrWSB (AliExternalTrackParam & etp) const
379+ void AliAlgPoint::GetTrWSB (trackParam_t & etp) const
372380{
373381 // assign WSB parameters (before material corrections) to supplied track
374- double covDum[ 15 ] = {
382+ const trackParam_t::covMat_t covDum {
375383 1 .e -4 ,
376384 0 , 1 .e -4 ,
377385 0 , 0 , 1 .e -4 ,
378386 0 , 0 , 0 , 1 .e -4 ,
379387 0 , 0 , 0 , 0 , 1e-4 };
380- etp.Set (GetXPoint (), GetAlphaSens (), fTrParamWSB , covDum);
388+ params_t tmp;
389+ std::copy (std::begin (fTrParamWSB ), std::end (fTrParamWSB ), std::begin (tmp));
390+
391+ etp.set (GetXPoint (), GetAlphaSens (), tmp, covDum);
381392}
382393
383394} // namespace align
0 commit comments