1 void MakeFMDFullMisAlignment()
3 // 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");
11 Bool_t toCdb = TString(gSystem->Getenv("TOCDB")) == TString("kTRUE");
12 TString storage = gSystem->Getenv("STORAGE");
15 if(!storage.BeginsWith("local://") &&
16 !storage.BeginsWith("alien://")) {
17 Error(macroname,"STORAGE=\"%s\" is not valid. Exiting\n", storage.Data());
21 AliCDBStorage* store = cdb->GetStorage(storage.Data());
23 Error(macroname,"Unable to open storage %s\n", storage.Data());
27 AliCDBPath path("GRP","Geometry","Data");
28 AliCDBEntry* entry = storage->Get(path.GetPath(),cdb->GetRun());
29 if(!entry) Fatal(macroname,"Could not get the specified CDB entry!");
32 TGeoManager* geom = static_cast<TGeoManager*>(entry->GetObject());
33 AliGeomManager::SetGeometry(geom);
35 //load geom from default CDB storage
36 AliGeomManager::LoadGeometry();
38 gSystem->Load("libFMDutil.so");
39 AliFMDAlignFaker* faker = (toCdb ?
41 new AliFMDAlignFaker(AliFMDAlignFaker::kAll,
43 "FMDfullMisalignment.root") :
44 // save in CDB storage
45 new AliFMDAlignFaker(AliFMDAlignFaker::kAll,
49 // Displacements and rotations
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);