]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/READMEgeometry.txt
https://savannah.cern.ch/bugs/index.php?98544
[u/mrichter/AliRoot.git] / MUON / READMEgeometry.txt
index 952e8acd8ed9280b31d88277f708b5148be0b377..271b2d6cb3fd64219d126e86be7c1456db2f59bd 100644 (file)
@@ -15,9 +15,13 @@ via the framework. Then  aliroot takes this geometry.root file as
 a unique geometrical info of our apparatus during the generation 
 and the reconstruction and analysis (if needed)
 
+The macros MakeMUONZeroMisAlignment.C, MakeMUONResMisAlignment.C
+and MakeMUONFullMisAlignment.C generate the mis-alignment
+data (see more in the chapter \ref geometry_s4 below).
+
 The code can also generate the special geometry 
 data files, transform.dat and svmap.dat, via the macro  
-MUONGenerateGeometryData.C (see more in \ref geometry_s4 below).
+MUONGenerateGeometryData.C (see more in the chapter \ref geometry_s5 below).
 The svmap.dat data file have to be recreated each time the code 
 of the geometry is modified. The info (well updated) in this file 
 is needed during the simulation.
@@ -36,10 +40,13 @@ file.
 \see http://agenda.cern.ch/fullAgenda.php?ida=a05212
 
 <pre>
-gAlice->Init("$ALICE_ROOT/MUON/Config.C");
+TGeoManager::Import("geometry.root");
 gGeoManager->GetMasterVolume()->Draw();
 </pre>
 
+A helper macro for adding and removing volumes in the
+scene, MUONGeometryViewingHelper.C is also available.
 
 \section geometry_s3  How to check the overlaps with the Root geometrical modeler
 
@@ -47,11 +54,33 @@ gGeoManager->GetMasterVolume()->Draw();
 \see  http://agenda.cern.ch/fullAgenda.php?ida=a05212
 
 <pre>
-gAlice->Init("$ALICE_ROOT/MUON/Config.C");
-gGeoManager->CheckOverlaps();
+TGeoManager::Import("geometry.root");
+gGeoManager->CheckOverlaps(0.001);
 gGeoManager->PrintOverlaps();
 </pre>
 
+More extensive, but also more time consuming checking,
+can be performed in this way:
+<pre>
+gGeoManager->CheckGeometryFull(1000000,0,0,0,"o"); >& check_full.out
+</pre>
+Then, you will find in the output file \em check_full.out the list of
+volumes where any overlaps have been detected. As TGeoManager
+does not remember all overlaps found during checking,
+in order to investigate them, one has to re-run the checking for 
+each listed volume:
+<pre>
+gGeoManager->FindVolumeFast("MyVolume")->CheckOverlaps(0.001, "s");
+gGeoManager->PrintOverlaps(); >& overlaps_MyVolume.txt 
+</pre>
+At this stage the overlaps found for the selected volume can be also browsed 
+with TBrowser. Sometimes it happens that the reported overlapping
+volumes are assemblies and nothing is visualized on the scene
+when clicking on the overlap icon in the browser.
+In this case you can use the function setDaughtersVisibility()
+from the MUONGeometryViewingHelper.C macro, which propagates the
+visibility setting through all assembly levels up to the real
+volumes.
 
 \section geometry_s4 Macro  MUONGenerateGeometryData.C
                                                
@@ -94,7 +123,7 @@ etc.
 
 If the environment variable TOCDB is not set to "kTRUE",
 the misalignment data are generated in a local file:
-MUONFullMisalignment.root, etc.
+MUONfullMisalignment.root, etc.
 
 If the data are stored in CDB, the storage can be specified in 
 the environment variable STORAGE. The misalignment data are then
@@ -106,6 +135,18 @@ misalignment after all our alignment procedure has been applied.
 Full misalignment: Default is our current estimate of initial
 misalignment.
 
+The mis-alignment data can be then retrieved from a file
+and applied to ideal geometry in this way.
+
+<pre>
+TGeoManager::Import("geometry.root");
+TFile f("MUONfullMisalignment.root"); 
+TClonesArray* misAlignObjsArray = (TClonesArray*)f.Get("MUONAlignObjs");
+AliGeomManager::ApplyAlignObjsToGeom(*misAlignObjsArray);
+</pre>
+
+Mis-aligned geometry can be then inspected in the same
+way as described in the chapters \ref geometry_s2 and \ref geometry_s3. 
 
 \section geometry_s6 How to check the alignment software
 
@@ -138,10 +179,15 @@ afterwards.
 The macro MUONCheckMisAligner.C performs the misalignment on an existing muon 
 arm geometry based on the standard definition of the detector elements.
 
+To be run from aliroot:
+<pre>
+AliMpCDB::LoadMpSegmentation2();
+.x MUONCheckMisAligner.C
+</pre>
+
 It uses AliMUONGeometryAligner : 
 - Creates a new AliMUONGeometryTransformer and AliMUONGeometryAligner
-- Reads the transformations in from the transform.dat file (make sure that
-this file is the _standard_ one by comparing it to the one in CVS)
+- Loads the geometry from the specified geometry file (default is geometry.root)
 - Creates a second AliMUONGeometryTransformer by misaligning the existing 
 one using AliMUONAligner::MisAlign