1 void MakeFMDFullMisAlignment(){
2 // Create TClonesArray of full misalignment objects for FMD
4 const char* macroname = "MakeFMDFullMisAlignment.C";
6 // Activate CDB storage and load geometry from CDB
7 AliCDBManager* cdb = AliCDBManager::Instance();
8 if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT");
13 if( TString(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());
19 AliCDBStorage* storage = cdb->GetStorage(Storage.Data());
21 Error(macroname,"Unable to open storage %s\n",Storage.Data());
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!");
28 TGeoManager* geom = (TGeoManager*) entry->GetObject();
29 AliGeomManager::SetGeometry(geom);
31 AliGeomManager::LoadGeometry(); //load geom from default CDB storage
34 gSystem->Load("libFMDutil.so");
35 if( TString(gSystem->Getenv("TOCDB")) != TString("kTRUE") ){
37 AliFMDAlignFaker faker(AliFMDAlignFaker::kAll, "geometry.root","FMDfullMisalignment.root");
39 // save in CDB storage
40 AliFMDAlignFaker faker(AliFMDAlignFaker::kAll, "geometry.root", Storage.Data());
43 // fRunMax should be changed in the constructor
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);