]>
Commit | Line | Data |
---|---|---|
9da38526 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
16 | /* $Id: */ | |
17 | ||
18 | // Macro to generate ad hoc GMS alignment matrices in the agreed format: | |
19 | // TClonesArray saved in the Root file with a key "GMSarray" | |
20 | // containing TGeoHMatrix with TObject::fUniqueID equal to the geometry | |
21 | // module Id | |
22 | // | |
23 | // By I. Hrivnacova, IPN Orsay | |
24 | ||
25 | #if !defined(__CINT__) || defined(__MAKECINT__) | |
26 | #include "AliMpConstants.h" | |
27 | #endif | |
28 | ||
29 | MUONGenerateTestGMS() | |
30 | { | |
31 | TFile f("data/GMS.root", "RECREATE"); | |
32 | TClonesArray* array = new TClonesArray("TGeoHMatrix",100); | |
33 | ||
34 | for (Int_t i=0; i<AliMpConstants::NofGeomModules(); i++) { | |
35 | TGeoHMatrix* m = new((*array)[i]) TGeoHMatrix(); | |
36 | m->SetUniqueID(i); | |
37 | /// rotate by small angle | |
38 | m->RotateX(i*0.01); | |
39 | } | |
40 | ||
acea6e15 | 41 | f.WriteObject(array,"GMSarray"); |
9da38526 | 42 | f.Close(); |
43 | } |