From: alla Date: Thu, 10 Apr 2008 12:32:12 +0000 (+0000) Subject: misalignment macros with fixed typo from tomek X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=0f7caad0b562073f831a2c75c200ad0a2186760a misalignment macros with fixed typo from tomek --- diff --git a/T0/MakeT0FullMisAlignment.C b/T0/MakeT0FullMisAlignment.C index d2cec2eede9..42e49c7deef 100644 --- a/T0/MakeT0FullMisAlignment.C +++ b/T0/MakeT0FullMisAlignment.C @@ -32,8 +32,7 @@ void MakeT0FullMisAlignment(){ 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[j++]) AliAlignObjParams(symName.Data(), volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE); } const char* macroname = "MakeT0FullMisAlignment.C"; @@ -50,108 +49,6 @@ dtheta, dphi, kTRUE); f.WriteObject(array,"T0AlignObjs","kSingleKey"); f.Close(); }else{ - - // save in CDB storage - TString Storage = gSystem->Getenv("STORAGE"); - if(!Storage.BeginsWith("local://") && !Storage.BeginsWith("alien://")) { - Error(macroname,"STORAGE variable set to %s is not valid. -Exiting\n",Storage.Data()); - return; - } - Info(macroname,"Saving alignment objects in CDB storage %s", - Storage.Data()); - AliCDBManager* cdb = AliCDBManager::Instance(); - AliCDBStorage* storage = cdb->GetStorage(Storage.Data()); - if(!storage){ - Error(macroname,"Unable to open storage %s\n",Storage.Data()); - return; - } - AliCDBMetaData* md = new AliCDBMetaData(); - md->SetResponsible("Tomasz Malkiewicz"); - md->SetComment("Full misalignment for T0, produced with sigmatr=0.05 and -sigmarot=0.3 in the local RS"); - md->SetAliRootVersion(gSystem->Getenv("$ARVERSION")); - AliCDBId id("T0/Align/Data",0,AliCDBRunRange::Infinity()); - storage->Put(array,id,md); - } - - array->Delete(); -} - - - - - - - - - - - - - - - - - - - - - - - - -void MakeT0FullMisAlignment(){ - // Create TClonesArray of full misalignment objects for T0 - // - TClonesArray *array = new TClonesArray("AliAlignObjParams",30); - 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 - - TString symName, sn; - - Int_t iIndex=0; - 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; - - 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); - } - - const char* macroname = "MakeT0FullMisAlignment.C"; - if( TString(gSystem->Getenv("TOCDB")) != TString("kTRUE") ){ - // save on file - const char* filename = "T0fullMisalignment.root"; - TFile f(filename,"RECREATE"); - if(!f){ - Error(macroname,"cannot open file for output\n"); - return; - } - Info(macroname,"Saving alignment objects to the file %s", filename); - f.cd(); - f.WriteObject(array,"T0AlignObjs","kSingleKey"); - f.Close(); TFile f(filename,"RECREATE"); - }else{ // save in CDB storage TString Storage = gSystem->Getenv("STORAGE"); if(!Storage.BeginsWith("local://") && !Storage.BeginsWith("alien://")) { @@ -159,7 +56,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){