-//_____________________________________________________________________________
-void
-AliMUONContourMakerTest::GenerateTransformations(AliMpExMap*& real, AliMpExMap*& exploded)
-{
- /// Generate geometric transformations to be used to compute the contours
- /// (real are, as the name implies, real ones, while the other ones are
- /// a bit tweaked to look fine on screen).
-
- AliCodeTimerAuto("");
-
- AliMUONGeometryTransformer transformer;
- Bool_t ok = transformer.LoadGeometryData("transform.dat");
- // transformer.LoadGeometryData("geometry.root"); //FIXME: add a protection if geometry.root file does not exist
- if (!ok)
- {
- cout << "ERROR : cannot get geometry !" << endl;
- return;
- }
- real = new AliMpExMap;
- exploded = new AliMpExMap;
- AliMpDEIterator deIt;
- deIt.First();
- while ( !deIt.IsDone() )
- {
- Int_t detElemId = deIt.CurrentDEId();
- const AliMUONGeometryDetElement* de = transformer.GetDetElement(detElemId);
-
- real->Add(detElemId,de->GetGlobalTransformation()->Clone());
-
- TGeoHMatrix* matrix = static_cast<TGeoHMatrix*>(de->GetGlobalTransformation()->Clone());
- Double_t* translation = matrix->GetTranslation();
-
- if ( AliMpDEManager::GetStationType(detElemId) == AliMp::kStation345 )
- {
- translation[0] *= 1.0;
- translation[1] *= 1.5;
- }
- else
- {
- Double_t shift = 5; // cm
- Double_t xshift[] = { shift, -shift, -shift, shift };
- Double_t yshift[] = { shift, shift, -shift, -shift };
- Int_t ishift = detElemId % 100;
-
- translation[0] += xshift[ishift];
- translation[1] += yshift[ishift];
- }
- matrix->SetTranslation(translation);
- exploded->Add(detElemId,matrix);
- deIt.Next();
- }
-}