]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - T0/MakeT0FullMisAlignment.C
warning fixed
[u/mrichter/AliRoot.git] / T0 / MakeT0FullMisAlignment.C
index 32cb09509609ce4081106a7ccd75bd27443c93f3..1c7073fc38bf9fec34677614979162199732bf61 100644 (file)
@@ -1,13 +1,13 @@
 void MakeT0FullMisAlignment(){
   // Create TClonesArray of full misalignment objects for T0
   //
-  TClonesArray *array = new TClonesArray("AliAlignObjParams",30);
+  TClonesArray *array = new TClonesArray("AliAlignObjParams",4);
   TClonesArray &alobj = *array;
 
   Double_t dx, dy, dz, dpsi, dtheta, dphi;
-  TRandom *rnd   = new TRandom(4321);
-  Double_t sigmatr = 0.05; // sigma for shifts in cm
-  Double_t sigmarot = 0.3; // sigma for tilts in degrees
+  TRandom3 *rnd   = new TRandom3(4321);
+  Double_t sigmatr = 0.006; // sigma for shifts in cm
+  Double_t sigmarot = 0.001; // sigma for tilts in degrees
 
   TString symName, sn;
 
@@ -15,26 +15,19 @@ void MakeT0FullMisAlignment(){
   AliGeomManager::ELayerID iLayer = AliGeomManager::kInvalidLayer;
   UShort_t volid = AliGeomManager::LayerToVolUID(iLayer,iIndex);
 
-  Int_t j=0;
-  for (Int_t imod=0; imod<24; imod++){
-    if (imod < 12){
-      sn="T0/C/PMT";
-    }else{
-      sn="T0/A/PMT";
-    }
-    symName = sn;
-    symName += imod+1;
-    
+  for (Int_t imod=0; imod<2; imod++)
+  {
+    symName="/ALIC_1/0STR_1";
+    if(imod==1) symName="/ALIC_1/0STL_1";      
     dx = rnd->Gaus(0.,sigmatr);
     dy = rnd->Gaus(0.,sigmatr);
     dz = rnd->Gaus(0.,sigmatr);
     dpsi = rnd->Gaus(0.,sigmarot);
     dtheta = rnd->Gaus(0.,sigmarot);
     dphi = rnd->Gaus(0.,sigmarot);
-    
-    new(alobj[j++]) AliAlignObjParams(symName.Data(), volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);
+    new(alobj[imod]) AliAlignObjParams(symName.Data(), volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);
   }
-  
+    
   const char* macroname = "MakeT0FullMisAlignment.C";
   if( TString(gSystem->Getenv("TOCDB")) != TString("kTRUE") ){
     // save on file
@@ -47,7 +40,7 @@ void MakeT0FullMisAlignment(){
     Info(macroname,"Saving alignment objects to the file %s", filename);
     f.cd();
     f.WriteObject(array,"T0AlignObjs","kSingleKey");
-    f.Close();    TFile f(filename,"RECREATE");
+    f.Close();
   }else{
     // save in CDB storage
     TString Storage = gSystem->Getenv("STORAGE");
@@ -56,7 +49,7 @@ void MakeT0FullMisAlignment(){
       return;
     }
     Info(macroname,"Saving alignment objects in CDB storage %s",
-        Storage.Data());
+         Storage.Data());
     AliCDBManager* cdb = AliCDBManager::Instance();
     AliCDBStorage* storage = cdb->GetStorage(Storage.Data());
     if(!storage){