]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/MakeFMDResMisAlignment.C
Added script for runnings Yves QA stuff
[u/mrichter/AliRoot.git] / FMD / MakeFMDResMisAlignment.C
CommitLineData
1895a097 1void MakeFMDResMisAlignment()
2{
3 // Create TClonesArray of residual misalignment objects for FMD
4 //
6fce62af 5 const char* macroname = "MakeFMDResMisAlignment.C";
6
7 // Activate CDB storage and load geometry from CDB
8 AliCDBManager* cdb = AliCDBManager::Instance();
9 if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT");
10 cdb->SetRun(0);
11
12 TString Storage;
13
14 if( 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());
18 return;
19 }
20 AliCDBStorage* storage = cdb->GetStorage(Storage.Data());
21 if(!storage){
22 Error(macroname,"Unable to open storage %s\n",Storage.Data());
23 return;
24 }
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!");
28 entry->SetOwner(0);
29 TGeoManager* geom = (TGeoManager*) entry->GetObject();
30 AliGeomManager::SetGeometry(geom);
31 }else{
32 AliGeomManager::LoadGeometry(); //load geom from default CDB storage
33 }
1895a097 34
35 gSystem->Load("libFMDutil.so");
5bd470e1 36 if( gSystem->Getenv("TOCDB") != TString("kTRUE") ){
1895a097 37 // save on file
6804c20f 38 AliFMDAlignFaker faker(AliFMDAlignFaker::kAll, "geometry.root","FMDresidualMisalignment.root");
1895a097 39 }else{
40 // save in CDB storage
6fce62af 41 AliFMDAlignFaker faker(AliFMDAlignFaker::kAll, "geometry.root", Storage.Data());
1895a097 42 }
43
44 // fRunMax should be changed in the constructor
45
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);
50 faker.Exec();
51
52
53}