From: kharlov Date: Tue, 7 Mar 2006 19:23:06 +0000 (+0000) Subject: Ideal 5-module PHOS geometry X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=a3a8cfad14bc6ffea83dd50cf590b1d851efc3ed Ideal 5-module PHOS geometry --- diff --git a/PHOS/macros/AlignmentDB/AliPHOSSetAlignment.C b/PHOS/macros/AlignmentDB/AliPHOSSetAlignment.C index b5ad5f8e1c1..cccc26b62c0 100644 --- a/PHOS/macros/AlignmentDB/AliPHOSSetAlignment.C +++ b/PHOS/macros/AlignmentDB/AliPHOSSetAlignment.C @@ -1,16 +1,15 @@ /* $Id$*/ // Script to create alignment parameters and store them into CDB -// Two sets of alignment parameters can be created: -// 1) 1 PHOS module with exact position -// 2) 5 PHOS modules with small disalignments +// Three sets of alignment parameters can be created: +// 0) 1 PHOS module with ideal geometry +// 1) 5 PHOS modules with small disalignments +// 2) 5 PHOS modules with ideal geometry #if !defined(__CINT__) #include "TControlBar.h" #include "TString.h" #include "TRandom.h" -#include "TH2F.h" -#include "TCanvas.h" #include "AliRun.h" #include "AliPHOSAlignData.h" @@ -27,14 +26,21 @@ void AliPHOSSetAlignment() TControlBar *menu = new TControlBar("vertical","PHOS alignment control"); menu->AddButton("Help to run PHOS alignment control","Help()", "Explains how to use PHOS alignment control menus"); + menu->AddButton("PHOS 2007","SetAlignment(0)", "Set PHOS alignment for the LHC run 2007"); - menu->AddButton("Full PHOS","SetAlignment(1)", + menu->AddButton("Full misaligned PHOS","SetAlignment(1)", + "Set all 5 modules with random displacement"); + menu->AddButton("Full ideal PHOS","SetAlignment(2)", "Set all 5 modules with random displacement"); + menu->AddButton("Read PHOS 2007","GetAlignment(0)", "Read PHOS geometry for the LHC run 2007"); - menu->AddButton("Read full PHOS","GetAlignment(1)", + menu->AddButton("Read full misaligned PHOS","GetAlignment(1)", "Read full PHOS geometry with random displacements"); + menu->AddButton("Read full ideal PHOS","GetAlignment(2)", + "Read full PHOS geometry with random displacements"); + menu->Show(); } @@ -123,6 +129,42 @@ void SetAlignment(Int_t flag=0) alignda->SetModuleAngle(iModule,2,0,theta); alignda->SetModuleAngle(iModule,2,1,phi); } + case 2: + DBFolder ="local://AlignDB"; + firstRun = 0; + lastRun = 10; + objFormat = "PHOS disaligned geometry with 5 modules"; + + Int_t nModules = 5; + alignda->SetNModules(nModules); + + Float_t dAngle= 20; + Float_t r0 = 460.; + Float_t theta, phi; + for (Int_t iModule=0; iModuleSetModuleCenter(iModule,0,x); + alignda->SetModuleCenter(iModule,1,y); + alignda->SetModuleCenter(iModule,2,z); + + theta = 90; + phi = angle; + alignda->SetModuleAngle(iModule,0,0,theta); + alignda->SetModuleAngle(iModule,0,1,phi); + theta = 0; + phi = 0; + alignda->SetModuleAngle(iModule,1,0,theta); + alignda->SetModuleAngle(iModule,1,1,phi); + theta = 90; + phi = 270+angle; + alignda->SetModuleAngle(iModule,2,0,theta); + alignda->SetModuleAngle(iModule,2,1,phi); + } break; default: printf("Unknown flag %d, can be 0 or 1 only\n",flag); @@ -165,6 +207,9 @@ void GetAlignment(Int_t flag=0) case 1: DBFolder ="local://DisAlignDB"; break; + case 2: + DBFolder ="local://AlignDB"; + break; default: printf("Unknown flag %d, can be 0 or 1 only\n",flag); return;