1 void MakeFMDZeroMisAlignment()
3 // Create TClonesArray of zero-misalignment objects for FMD
5 const char* macroname = "MakeFMDZeroMisAlignment.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,
51 faker->SetSensorDisplacement(0., 0., 0., 0., 0., 0.);
52 faker->SetSensorRotation(0., 0., 0., 0., 0., 0.);
53 faker->SetHalfDisplacement(0., 0., 0., 0., 0., 0.);
54 faker->SetHalfRotation(0., 0., 0., 0., 0., 0.);