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");
12 Bool_t toCdb = TString(gSystem->Getenv("TOCDB")) == TString("kTRUE");
13 TString storage = gSystem->Getenv("STORAGE");
16 if(!storage.BeginsWith("local://") &&
17 !storage.BeginsWith("alien://")) {
18 Error(macroname,"STORAGE=\"%s\" is not valid. Exiting\n", storage.Data());
22 AliCDBStorage* store = cdb->GetStorage(storage.Data());
24 Error(macroname,"Unable to open storage %s\n", storage.Data());
28 AliCDBPath path("GRP","Geometry","Data");
29 AliCDBEntry* entry = storage->Get(path.GetPath(),cdb->GetRun());
30 if(!entry) Fatal(macroname,"Could not get the specified CDB entry!");
33 TGeoManager* geom = static_cast<TGeoManager*>(entry->GetObject());
34 AliGeomManager::SetGeometry(geom);
36 //load geom from default CDB storage
37 AliGeomManager::LoadGeometry();
39 gSystem->Load("libFMDutil.so");
40 AliFMDAlignFaker* faker = (toCdb ?
42 new AliFMDAlignFaker(AliFMDAlignFaker::kAll,
44 "FMDfullMisalignment.root") :
45 // save in CDB storage
46 new AliFMDAlignFaker(AliFMDAlignFaker::kAll,
50 faker->SetSensorDisplacement(-0.005, -0.005, -0.005, 0.005, 0.005, 0.005);
51 faker->SetSensorRotation(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5);
52 faker->SetHalfDisplacement(-0.25, -0.25, -0.25, 0.25, 0.25, 0.25);
53 faker->SetHalfRotation(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5);