Manso tracker is now ported into AliRoot-HLT framework properly.
[u/mrichter/AliRoot.git] / FMD / MakeFMDFullMisAlignment.C
CommitLineData
1895a097 1void MakeFMDFullMisAlignment(){
2 // Create TClonesArray of full misalignment objects for FMD
3 //
6fce62af 4 const char* macroname = "MakeFMDFullMisAlignment.C";
5
6 // Activate CDB storage and load geometry from CDB
7 AliCDBManager* cdb = AliCDBManager::Instance();
8 if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT");
9 cdb->SetRun(0);
10
11 TString Storage;
12
13 if( gSystem->Getenv("TOCDB") == TString("kTRUE") ){
14 Storage = gSystem->Getenv("STORAGE");
15 if(!Storage.BeginsWith("local://") && !Storage.BeginsWith("alien://")) {
16 Error(macroname,"STORAGE variable set to %s is not valid. Exiting\n",Storage.Data());
17 return;
18 }
19 AliCDBStorage* storage = cdb->GetStorage(Storage.Data());
20 if(!storage){
21 Error(macroname,"Unable to open storage %s\n",Storage.Data());
22 return;
23 }
24 AliCDBPath path("GRP","Geometry","Data");
25 AliCDBEntry *entry = storage->Get(path.GetPath(),cdb->GetRun());
26 if(!entry) Fatal(macroname,"Could not get the specified CDB entry!");
27 entry->SetOwner(0);
28 TGeoManager* geom = (TGeoManager*) entry->GetObject();
29 AliGeomManager::SetGeometry(geom);
30 }else{
31 AliGeomManager::LoadGeometry(); //load geom from default CDB storage
32 }
1895a097 33
34 gSystem->Load("libFMDutil.so");
5bd470e1 35 if( gSystem->Getenv("TOCDB") != TString("kTRUE") ){
1895a097 36 // save on file
37 AliFMDAlignFaker faker(AliFMDAlignFaker::kAll, "geometry.root","FMDfullMisalignment.root");
38 }else{
39 // save in CDB storage
6fce62af 40 AliFMDAlignFaker faker(AliFMDAlignFaker::kAll, "geometry.root", Storage.Data());
1895a097 41 }
42
43 // fRunMax should be changed in the constructor
44
45 faker.SetSensorDisplacement(-0.005, -0.005, -0.005, 0.005, 0.005, 0.005);
46 faker.SetSensorRotation(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5);
47 faker.SetHalfDisplacement(-0.25, -0.25, -0.25, 0.25, 0.25, 0.25);
48 faker.SetHalfRotation(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5);
49 faker.Exec();
50
51}