]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/MakeFMDFullMisAlignment.C
Using AliGeomManager in the macros (Raffaele)
[u/mrichter/AliRoot.git] / FMD / MakeFMDFullMisAlignment.C
1 void MakeFMDFullMisAlignment(){
2   // Create TClonesArray of full misalignment objects for FMD
3   //
4   if(!AliGeomManager::GetGeometry()){
5     if(!(AliCDBManager::Instance())->IsDefaultStorageSet())
6       AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
7       AliCDBManager::Instance()->SetRun(0);
8     AliGeomManager::LoadGeometry();
9   }
10   // needed for the constructors with local coordinates not to fail
11   
12   gSystem->Load("libFMDutil.so");
13   if( gSystem->Getenv("TOCDB") != TString("kTRUE") ){
14     // save on file
15     AliFMDAlignFaker faker(AliFMDAlignFaker::kAll, "geometry.root","FMDfullMisalignment.root");
16   }else{
17     // save in CDB storage
18     const char* Storage = gSystem->Getenv("STORAGE");
19     AliFMDAlignFaker faker(AliFMDAlignFaker::kAll, "geometry.root", Storage);
20   }
21
22   // fRunMax should be changed in the constructor
23
24   faker.SetSensorDisplacement(-0.005, -0.005, -0.005, 0.005, 0.005, 0.005);
25   faker.SetSensorRotation(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5);
26   faker.SetHalfDisplacement(-0.25, -0.25, -0.25, 0.25, 0.25, 0.25);
27   faker.SetHalfRotation(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5);
28   faker.Exec();
29
30 }