|
97 | 97 |
|
98 | 98 | #include "Align/AliAlgVol.h" |
99 | 99 | #include "Align/AliAlgDOFStat.h" |
100 | | -#include "Align/AliAlgConstraint.h" |
| 100 | +//#include "Align/AliAlgConstraint.h" FIXME(milettri): needs AliAlgsConstraint |
101 | 101 | //#include "AliAlignObjParams.h" |
102 | 102 | //#include "AliGeomManager.h" |
103 | 103 | #include "Align/AliAlgAux.h" |
|
110 | 110 | #include <TAxis.h> |
111 | 111 | #include <stdio.h> |
112 | 112 |
|
113 | | -ClassImp(o2::align::AliAlgVol) |
| 113 | +ClassImp(o2::align::AliAlgVol); |
114 | 114 |
|
115 | | - using namespace TMath; |
| 115 | +using namespace TMath; |
116 | 116 | using namespace o2::align::AliAlgAux; |
117 | 117 |
|
118 | 118 | namespace o2 |
@@ -166,14 +166,16 @@ AliAlgVol::~AliAlgVol() |
166 | 166 | //_________________________________________________________ |
167 | 167 | void AliAlgVol::Delta2Matrix(TGeoHMatrix& deltaM, const Double_t* delta) const |
168 | 168 | { |
169 | | - // prepare delta matrix for the volume from its |
170 | | - // local delta vector (AliAlignObj convension): dx,dy,dz,,theta,psi,phi |
171 | | - const double *tr = &delta[0], *rt = &delta[3]; // translation(cm) and rotation(degree) |
172 | | - AliAlignObjParams tempAlignObj; |
173 | | - tempAlignObj.SetRotation(rt[0], rt[1], rt[2]); |
174 | | - tempAlignObj.SetTranslation(tr[0], tr[1], tr[2]); |
175 | | - tempAlignObj.GetMatrix(deltaM); |
| 169 | + LOG(FATAL) << __PRETTY_FUNCTION__ << " is disabled"; |
| 170 | + //FIXME(milettri): needs AliAlignObj |
| 171 | + // // prepare delta matrix for the volume from its |
| 172 | + // // local delta vector (AliAlignObj convension): dx,dy,dz,,theta,psi,phi |
| 173 | + // const double *tr = &delta[0], *rt = &delta[3]; // translation(cm) and rotation(degree) |
176 | 174 | // |
| 175 | + // AliAlignObjParams tempAlignObj; |
| 176 | + // tempAlignObj.SetRotation(rt[0], rt[1], rt[2]); |
| 177 | + // tempAlignObj.SetTranslation(tr[0], tr[1], tr[2]); |
| 178 | + // tempAlignObj.GetMatrix(deltaM); |
177 | 179 | } |
178 | 180 |
|
179 | 181 | //__________________________________________________________________ |
@@ -295,41 +297,43 @@ void AliAlgVol::Print(const Option_t* opt) const |
295 | 297 | //____________________________________________ |
296 | 298 | void AliAlgVol::PrepareMatrixL2G(Bool_t reco) |
297 | 299 | { |
298 | | - // extract from geometry L2G matrix, depending on reco flag, set it as a reco-time |
299 | | - // or current alignment matrix |
300 | | - const char* path = GetSymName(); |
301 | | - if (gGeoManager->GetAlignableEntry(path)) { |
302 | | - const TGeoHMatrix* l2g = AliGeomManager::GetMatrix(path); |
303 | | - if (!l2g) |
304 | | - AliFatalF("Failed to find L2G matrix for alignable %s", path); |
305 | | - reco ? SetMatrixL2GReco(*l2g) : SetMatrixL2G(*l2g); |
306 | | - } else { // extract from path |
307 | | - if (!gGeoManager->CheckPath(path)) |
308 | | - AliFatalF("Volume path %s not valid!", path); |
309 | | - TGeoPhysicalNode* node = (TGeoPhysicalNode*)gGeoManager->GetListOfPhysicalNodes()->FindObject(path); |
310 | | - TGeoHMatrix l2g; |
311 | | - if (!node) { |
312 | | - AliWarningF("Attention: volume %s was not misaligned, extracting original matrix", path); |
313 | | - if (!AliGeomManager::GetOrigGlobalMatrix(path, l2g)) { |
314 | | - AliFatalF("Failed to find ideal L2G matrix for %s", path); |
315 | | - } |
316 | | - } else { |
317 | | - l2g = *node->GetMatrix(); |
318 | | - } |
319 | | - reco ? SetMatrixL2GReco(l2g) : SetMatrixL2G(l2g); |
320 | | - } |
321 | | - // |
| 300 | + LOG(FATAL) << __PRETTY_FUNCTION__ << " is disabled"; |
| 301 | + // FIXME(milettri): needs AliGeomManager |
| 302 | + // // extract from geometry L2G matrix, depending on reco flag, set it as a reco-time |
| 303 | + // // or current alignment matrix |
| 304 | + // const char* path = GetSymName(); |
| 305 | + // if (gGeoManager->GetAlignableEntry(path)) { |
| 306 | + // const TGeoHMatrix* l2g = AliGeomManager::GetMatrix(path); |
| 307 | + // if (!l2g) |
| 308 | + // LOG(FATAL) << "Failed to find L2G matrix for alignable " << path; |
| 309 | + // reco ? SetMatrixL2GReco(*l2g) : SetMatrixL2G(*l2g); |
| 310 | + // } else { // extract from path |
| 311 | + // if (!gGeoManager->CheckPath(path)) |
| 312 | + // LOG(FATAL) << "Volume path " << path << " is not valid!"; |
| 313 | + // TGeoPhysicalNode* node = (TGeoPhysicalNode*)gGeoManager->GetListOfPhysicalNodes()->FindObject(path); |
| 314 | + // TGeoHMatrix l2g; |
| 315 | + // if (!node) { |
| 316 | + // LOG(WARNING) << "volume " << path << " was not misaligned, extracting original matrix"; |
| 317 | + // if (!AliGeomManager::GetOrigGlobalMatrix(path, l2g)) { |
| 318 | + // LOG(FATAL) << "Failed to find ideal L2G matrix for " << path; |
| 319 | + // } |
| 320 | + // } else { |
| 321 | + // l2g = *node->GetMatrix(); |
| 322 | + // } |
| 323 | + // reco ? SetMatrixL2GReco(l2g) : SetMatrixL2G(l2g); |
| 324 | + // } |
322 | 325 | } |
323 | 326 |
|
324 | 327 | //____________________________________________ |
325 | 328 | void AliAlgVol::PrepareMatrixL2GIdeal() |
326 | 329 | { |
327 | | - // extract from geometry ideal L2G matrix |
328 | | - TGeoHMatrix mtmp; |
329 | | - if (!AliGeomManager::GetOrigGlobalMatrix(GetSymName(), mtmp)) |
330 | | - AliFatalF("Failed to find ideal L2G matrix for %s", GetSymName()); |
331 | | - SetMatrixL2GIdeal(mtmp); |
332 | | - // |
| 330 | + LOG(FATAL) << __PRETTY_FUNCTION__ << " is disabled"; |
| 331 | + // FIXME(milettri): needs AliGeomManager |
| 332 | + // // extract from geometry ideal L2G matrix |
| 333 | + // TGeoHMatrix mtmp; |
| 334 | + // if (!AliGeomManager::GetOrigGlobalMatrix(GetSymName(), mtmp)) |
| 335 | + // LOG(FATAL) << "Failed to find ideal L2G matrix for " << GetSymName(); |
| 336 | + // SetMatrixL2GIdeal(mtmp); |
333 | 337 | } |
334 | 338 |
|
335 | 339 | //____________________________________________ |
@@ -382,7 +386,7 @@ void AliAlgVol::SetTrackingFrame() |
382 | 386 | // Define tracking frame of the sensor |
383 | 387 | // This method should be implemented for sensors, which receive the T2L |
384 | 388 | // matrix from the geometry |
385 | | - AliErrorF("Volume %s was supposed to implement its own method", GetName()); |
| 389 | + LOG(ERROR) << "Volume " << GetName() << " was supposed to implement its own method"; |
386 | 390 | } |
387 | 391 |
|
388 | 392 | //__________________________________________________________________ |
@@ -412,14 +416,12 @@ void AliAlgVol::InitDOFs() |
412 | 416 | // |
413 | 417 | // Do we need this strict condition? |
414 | 418 | if (GetInitDOFsDone()) |
415 | | - AliFatalF("Something is wrong, DOFs are already initialized for %s", GetName()); |
| 419 | + LOG(FATAL) << "DOFs are already initialized for " << GetName(); |
416 | 420 | for (int i = 0; i < fNDOFs; i++) |
417 | 421 | if (fParErrs[i] < -9999 && IsZeroAbs(fParVals[i])) |
418 | 422 | FixDOF(i); |
419 | 423 | CalcFree(kTRUE); |
420 | | - // |
421 | 424 | SetInitDOFsDone(); |
422 | | - // |
423 | 425 | } |
424 | 426 |
|
425 | 427 | //__________________________________________________________________ |
@@ -465,7 +467,7 @@ void AliAlgVol::SetParVals(Int_t npar, Double_t* vl, Double_t* er) |
465 | 467 | { |
466 | 468 | // set parameters |
467 | 469 | if (npar > fNDOFs) |
468 | | - AliFatalF("Volume %s has %d dofs", GetName(), fNDOFs); |
| 470 | + LOG(FATAL) << "Volume " << GetName() << " has " << fNDOFs << " dofs"; |
469 | 471 | for (int i = 0; i < npar; i++) { |
470 | 472 | fParVals[i] = vl[i]; |
471 | 473 | fParErrs[i] = er ? er[i] : 0; |
@@ -728,7 +730,6 @@ void AliAlgVol::CreateAlignmenMatrix(TGeoHMatrix& alg) const |
728 | 730 | alg.MultiplyLeft(&par->GetMatrixL2GIdeal()); |
729 | 731 | } |
730 | 732 | */ |
731 | | - // |
732 | 733 | } |
733 | 734 |
|
734 | 735 | /* |
@@ -763,48 +764,52 @@ void AliAlgVol::CreateAlignmenMatrix(TGeoHMatrix& alg) const |
763 | 764 | //_________________________________________________________________ |
764 | 765 | void AliAlgVol::CreateAlignmentObjects(TClonesArray* arr) const |
765 | 766 | { |
| 767 | + LOG(FATAL) << __PRETTY_FUNCTION__ << " is disabled"; |
| 768 | + // FIXME(milettri): needs AliAlignObjParams |
766 | 769 | // add to supplied array alignment object for itself and children |
767 | | - TClonesArray& parr = *arr; |
768 | | - TGeoHMatrix algM; |
769 | | - CreateAlignmenMatrix(algM); |
770 | | - new (parr[parr.GetEntriesFast()]) AliAlignObjParams(GetName(), GetVolID(), algM, kTRUE); |
771 | | - int nch = GetNChildren(); |
772 | | - for (int ich = 0; ich < nch; ich++) |
773 | | - GetChild(ich)->CreateAlignmentObjects(arr); |
| 770 | + // TClonesArray& parr = *arr; |
| 771 | + // TGeoHMatrix algM; |
| 772 | + // CreateAlignmenMatrix(algM); |
| 773 | + // new (parr[parr.GetEntriesFast()]) AliAlignObjParams(GetName(), GetVolID(), algM, kTRUE); |
| 774 | + // int nch = GetNChildren(); |
| 775 | + // for (int ich = 0; ich < nch; ich++) |
| 776 | + // GetChild(ich)->CreateAlignmentObjects(arr); |
774 | 777 | // |
775 | 778 | } |
776 | 779 |
|
777 | 780 | //_________________________________________________________________ |
778 | 781 | void AliAlgVol::UpdateL2GRecoMatrices(const TClonesArray* algArr, const TGeoHMatrix* cumulDelta) |
779 | 782 | { |
780 | | - // recreate fMatL2GReco matrices from ideal L2G matrix and alignment objects |
781 | | - // used during data reconstruction. For the volume at level J we have |
782 | | - // L2G' = Delta_J * Delta_{J-1} *...* Delta_0 * L2GIdeal |
783 | | - // cumulDelta is Delta_{J-1} * ... * Delta_0, supplied by the parent |
784 | | - // |
785 | | - fMatL2GReco = fMatL2GIdeal; |
786 | | - // find alignment object for this volume |
787 | | - int nalg = algArr->GetEntriesFast(); |
788 | | - const AliAlignObjParams* par = 0; |
789 | | - for (int i = 0; i < nalg; i++) { |
790 | | - par = (AliAlignObjParams*)algArr->At(i); |
791 | | - if (!strcmp(par->GetSymName(), GetSymName())) |
792 | | - break; |
793 | | - par = 0; |
794 | | - } |
795 | | - TGeoHMatrix delta; |
796 | | - if (!par) |
797 | | - AliInfoF("Alignment for %s is absent in Reco-Time alignment object", GetSymName()); |
798 | | - else |
799 | | - par->GetMatrix(delta); |
800 | | - if (cumulDelta) |
801 | | - delta *= *cumulDelta; |
802 | | - // |
803 | | - fMatL2GReco.MultiplyLeft(&delta); |
804 | | - // propagate to children |
805 | | - for (int ich = GetNChildren(); ich--;) |
806 | | - GetChild(ich)->UpdateL2GRecoMatrices(algArr, &delta); |
807 | | - // |
| 783 | + LOG(FATAL) << __PRETTY_FUNCTION__ << " is disabled"; |
| 784 | + // FIXME(milettri): needs AliAlignObjParams |
| 785 | + // // recreate fMatL2GReco matrices from ideal L2G matrix and alignment objects |
| 786 | + // // used during data reconstruction. For the volume at level J we have |
| 787 | + // // L2G' = Delta_J * Delta_{J-1} *...* Delta_0 * L2GIdeal |
| 788 | + // // cumulDelta is Delta_{J-1} * ... * Delta_0, supplied by the parent |
| 789 | + // // |
| 790 | + // fMatL2GReco = fMatL2GIdeal; |
| 791 | + // // find alignment object for this volume |
| 792 | + // int nalg = algArr->GetEntriesFast(); |
| 793 | + // const AliAlignObjParams* par = 0; |
| 794 | + // for (int i = 0; i < nalg; i++) { |
| 795 | + // par = (AliAlignObjParams*)algArr->At(i); |
| 796 | + // if (!strcmp(par->GetSymName(), GetSymName())) |
| 797 | + // break; |
| 798 | + // par = 0; |
| 799 | + // } |
| 800 | + // TGeoHMatrix delta; |
| 801 | + // if (!par) |
| 802 | + // LOG(INFO) << "Alignment for " << GetSymName() << " is absent in Reco-Time alignment object"; |
| 803 | + // else |
| 804 | + // par->GetMatrix(delta); |
| 805 | + // if (cumulDelta) |
| 806 | + // delta *= *cumulDelta; |
| 807 | + // // |
| 808 | + // fMatL2GReco.MultiplyLeft(&delta); |
| 809 | + // // propagate to children |
| 810 | + // for (int ich = GetNChildren(); ich--;) |
| 811 | + // GetChild(ich)->UpdateL2GRecoMatrices(algArr, &delta); |
| 812 | + // // |
808 | 813 | } |
809 | 814 |
|
810 | 815 | //______________________________________________________ |
@@ -862,28 +867,29 @@ void AliAlgVol::FillDOFStat(AliAlgDOFStat* h) const |
862 | 867 | //________________________________________ |
863 | 868 | void AliAlgVol::AddAutoConstraints(TObjArray* constrArr) |
864 | 869 | { |
865 | | - // adds automatic constraints |
866 | | - int nch = GetNChildren(); |
867 | | - // |
868 | | - if (HasChildrenConstraint()) { |
869 | | - AliAlgConstraint* constr = new AliAlgConstraint(); |
870 | | - constr->SetConstrainPattern(fConstrChild); |
871 | | - constr->SetParent(this); |
872 | | - for (int ich = nch; ich--;) { |
873 | | - AliAlgVol* child = GetChild(ich); |
874 | | - if (child->GetExcludeFromParentConstraint()) |
875 | | - continue; |
876 | | - constr->AddChild(child); |
877 | | - } |
878 | | - if (constr->GetNChildren()) |
879 | | - constrArr->Add(constr); |
880 | | - else |
881 | | - delete constr; |
882 | | - } |
883 | | - // |
884 | | - for (int ich = 0; ich < nch; ich++) |
885 | | - GetChild(ich)->AddAutoConstraints(constrArr); |
886 | | - // |
| 870 | + LOG(FATAL) << __PRETTY_FUNCTION__ << " is disabled"; |
| 871 | + // FIXME(milettri): needs AliAlgConstraint |
| 872 | + // // adds automatic constraints |
| 873 | + // int nch = GetNChildren(); |
| 874 | + // // |
| 875 | + // if (HasChildrenConstraint()) { |
| 876 | + // AliAlgConstraint* constr = new AliAlgConstraint(); |
| 877 | + // constr->SetConstrainPattern(fConstrChild); |
| 878 | + // constr->SetParent(this); |
| 879 | + // for (int ich = nch; ich--;) { |
| 880 | + // AliAlgVol* child = GetChild(ich); |
| 881 | + // if (child->GetExcludeFromParentConstraint()) |
| 882 | + // continue; |
| 883 | + // constr->AddChild(child); |
| 884 | + // } |
| 885 | + // if (constr->GetNChildren()) |
| 886 | + // constrArr->Add(constr); |
| 887 | + // else |
| 888 | + // delete constr; |
| 889 | + // } |
| 890 | + // for (int ich = 0; ich < nch; ich++) { |
| 891 | + // GetChild(ich)->AddAutoConstraints(constrArr); |
| 892 | + // } |
887 | 893 | } |
888 | 894 |
|
889 | 895 | } // namespace align |
|
0 commit comments