1 void MakeFMDResMisAlignment()
3 // Create TClonesArray of residual misalignment objects for FMD
5 const char* macroname = "MakeFMDResMisAlignment.C";
7 // Activate CDB storage and load geometry from CDB
8 AliCDBManager* cdb = AliCDBManager::Instance();
9 if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT");
14 if( TString(gSystem->Getenv("TOCDB")) == TString("kTRUE") ){
15 Storage = gSystem->Getenv("STORAGE");
16 if(!Storage.BeginsWith("local://") && !Storage.BeginsWith("alien://")) {
17 Error(macroname,"STORAGE variable set to %s is not valid. Exiting\n",Storage.Data());
20 AliCDBStorage* storage = cdb->GetStorage(Storage.Data());
22 Error(macroname,"Unable to open storage %s\n",Storage.Data());
25 AliCDBPath path("GRP","Geometry","Data");
26 AliCDBEntry *entry = storage->Get(path.GetPath(),cdb->GetRun());
27 if(!entry) Fatal(macroname,"Could not get the specified CDB entry!");
29 TGeoManager* geom = (TGeoManager*) entry->GetObject();
30 AliGeomManager::SetGeometry(geom);
32 AliGeomManager::LoadGeometry(); //load geom from default CDB storage
35 gSystem->Load("libFMDutil.so");
36 if( TString(gSystem->Getenv("TOCDB")) != TString("kTRUE") ){
38 AliFMDAlignFaker faker(AliFMDAlignFaker::kAll, "geometry.root","FMDresidualMisalignment.root");
40 // save in CDB storage
41 AliFMDAlignFaker faker(AliFMDAlignFaker::kAll, "geometry.root", Storage.Data());
44 // fRunMax should be changed in the constructor
46 faker.SetSensorDisplacement(-0.005, -0.005, -0.005, 0.005, 0.005, 0.005);
47 faker.SetSensorRotation(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5);
48 faker.SetHalfDisplacement(-0.25, -0.25, -0.25, 0.25, 0.25, 0.25);
49 faker.SetHalfRotation(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5);