1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 // Macro for generating the geometry data files:
19 // volpath.dat, transform.dat, svmap.dat.
20 // To be run from aliroot:
21 // .x MUONGenerateGeometryData.C
23 // The generated files do not replace the existing ones
24 // but have different names (with extension ".out").
26 // Author: I. Hrivnacova, IPN Orsay
28 void MUONGenerateGeometryData(Bool_t volpaths = true,
29 Bool_t transforms = true,
31 Bool_t writeEnvelopes = true)
34 gAlice->Init("$ALICE_ROOT/MUON/Config.C");
35 cout << "Init done " << endl;
38 AliMUON* muon = (AliMUON*)gAlice->GetModule("MUON");
40 AliFatal("MUON detector not defined.");
44 // Get geometry builder
45 AliMUONGeometryBuilder* builder = muon ->GetGeometryBuilder();
48 cout << "Generating volpath file ..." << endl;
49 builder->GetTransformer()->WriteVolumePaths("volpath.dat.out");
53 cout << "Generating transformation file ..." << endl;
54 builder->GetTransformer()->WriteTransformations("transform.dat.out");
58 cout << "Generating svmaps file ..." << endl;
59 builder->WriteSVMaps("svmap.dat.out", true, writeEnvelopes);