]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - macros/Config.C
Small bug fixes to TPC files
[u/mrichter/AliRoot.git] / macros / Config.C
index e02cf5261cd3b866979a3e81c7ee4383702d7fa0..b28dfc60bab231ac184c855a495d466456fd5f93 100644 (file)
@@ -1,7 +1,7 @@
 void Config()
 {
 
-new TGeant3("C++ Interface to Geant3");
+new AliGeant3("C++ Interface to Geant3");
 
 //=======================================================================
 //  Create the output file
@@ -33,6 +33,8 @@ geant3->SetRAYL(1);
 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
+geant3->SetERAN(5.e-7);
+
 Float_t cut    = 1.e-3; // 1MeV cut by default
 Float_t tofmax = 1.e10;
 //             GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
@@ -74,7 +76,6 @@ Int_t iPIPE=1;
 Int_t iFMD=1;
 Int_t iMUON=1;
 Int_t iPHOS=1;
-Int_t iCPV=1;
 Int_t iPMD=1;
 Int_t iSTART=0;
 
@@ -92,7 +93,7 @@ AliMAG *MAG  = new AliMAG("MAG","Magnet");
 
 if(iABSO) {
 //=================== ABSO parameters ============================
-AliABSO *ABSO  = new AliABSO("ABSO","Muon Absorber");
+AliABSO *ABSO  = new AliABSOv0("ABSO","Muon Absorber");
 }
 
 if(iDIPO) {
@@ -112,12 +113,13 @@ if(iFRAME) {
 //=================== FRAME parameters ============================
 
 AliFRAME *FRAME  = new AliFRAMEv0("FRAME","Space Frame");
+
 }
 
 if(iSHIL) {
 //=================== SHIL parameters ============================
 
-AliSHIL *SHIL  = new AliSHIL("SHIL","Shielding");
+AliSHIL *SHIL  = new AliSHILv0("SHIL","Shielding");
 }
 
 
@@ -140,6 +142,7 @@ AliITS *ITS  = new AliITSv5("ITS","normal ITS");
 ITS->SetEUCLID(0);
 }
 
+
 if(iTPC) {
 //============================ TPC parameters ================================
 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
@@ -157,44 +160,26 @@ if(iTPC) {
 //
 //-----------------------------------------------------------------------------
 
-AliTPC *TPC  = new AliTPCv2("TPC","Normal TPC");
-AliTPCD *paramd = TPC->GetDigParam();
-AliTPCParam *param = &(paramd->GetParam());
-
-// Set geometrical parameters
-
-param->SetSectorAngles(20.,0.,20.,0.);
-param->SetInnerRadiusLow(83.9);
-param->SetInnerRadiusUp(141.3);
-param->SetOuterRadiusLow(146.9);
-param->SetOuterRadiusUp(249.4);
-param->SetInSecLowEdge(81.6);
-param->SetInSecUpEdge(143.6);
-param->SetOuSecLowEdge(144.2);
-param->SetOuSecUpEdge(252.1);
-param->SetEdge(1.5);
-param->SetDeadZone(1.15);
-param->SetPadLength(2.0);
-param->SetPadWidth(0.3);
-param->SetPadPitchLength(2.05);
-param->SetPadPitchWidth(0.35);
-param->Update();
-
-if (TPC->IsVersion() != 2) paramd->Write("Param1");
+  gROOT->LoadMacro("SetTPCParam.C");
+  AliTPCParam *param = SetTPCParam();
+  AliTPC *TPC  = new AliTPCv1("TPC","Normal TPC"); //v1 is default
+  TPC->SetParam(param); // pass the parameter object to the TPC
 
 // set gas mixture
 
 TPC->SetGasMixt(2,20,10,-1,0.9,0.1,0.);
-TPC->SetSecAL(1);
-TPC->SetSecAU(1);
-TPC->SetSecLows(1, 2, 3, 1+18, 2+18, 3+18);
-TPC->SetSecUps(1+36, 2+36, 3+36, 1+38+18, 2+38+18, 3+38+18, -1,-1,-1,-1,-1,-1);
+TPC->SetSecAL(4);
+TPC->SetSecAU(4);
+TPC->SetSecLows(1,  2,  3, 19, 20, 21);
+TPC->SetSecUps(37, 38, 39, 37+18, 38+18, 39+18, -1, -1, -1, -1, -1, -1);
 TPC->SetSens(1);
+
+if (TPC->IsVersion()==1) param->Write(param->GetTitle());
 }
 
 if(iTOF) {
 //=================== TOF parameters ============================
-AliTOF *TOF  = new AliTOFv2("TOF","normal TOF");
+AliTOF *TOF  = new AliTOFv1("TOF","normal TOF");
 }
 
 if(iRICH) {
@@ -249,10 +234,9 @@ AliCASTOR *CASTOR  = new AliCASTORv1("CASTOR","normal CASTOR");
 if(iTRD) {
 //=================== TRD parameters ============================
 
-AliTRD *TRD  = new AliTRDv0("TRD","TRD version 0");
+AliTRD *TRD  = new AliTRDv1("TRD","TRD version 0");
 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
 TRD->SetGasMix(0);
-TRD->SetHits(1);
 }
 
 if(iFMD) {
@@ -584,69 +568,7 @@ AliMUON *MUON  = new AliMUONv0("MUON","normal MUON");
 //=================== PHOS parameters ===========================
 
 if(iPHOS) {
-AliPHOS *PHOS  = new AliPHOSv1("PHOS","normal PHOS");
-// * PHOSflags:    YES: X<>0   NO: X=0
-// * PHOSflags(1) : -----X  Create branch for TObjArray of AliPHOSCradle
-// *                ----X-  Create file (ftn03 on HP-UX) with list of SHAKER particles (7Mb/event)
-// *                
-PHOS->SetFlags(000001);
-PHOS->SetRadius(460); //Distance from beam to PHOS crystals.
-// (crystal_side_size,crystal_length,wrap_thikness,air_thikness,PIN_size,PIN length)
-PHOS->SetCell(2.2,          18.,         0.01,        0.01,        1.,      0.1);
-PHOS->SetCradleSize(48, 90, 4); // Nz (along beam), Nphi, Ncradles
-PHOS->SetCradleA(0);   //Angle between Cradles
-// *  ===============
-// * PHOS extra parameters (contact Maxim Volkov volkov@mail.cern.ch)
-// * 1. STE_THICK         Steel cover thickness
-// * 2. SUP_Y             Crystal support height
-// * 3. FTIU_THICK        Thermo Insulating outer cover Upper plate thickness
-// * 4. UFP_Y             Upper Polystyrene Foam plate thickness
-// * 5. TCB_THICK         Thermo insulating Crystal Block wall thickness
-// * 6. UCP_Y             Upper Cooling Plate thickness
-// * 7. ASP_Y             Al Support Plate thickness
-// * 8. TIP_Y             Lower Thermo Insulating Plate thickness
-// * 9. TXP_Y             Lower Textolit Plate thickness
-PHOS->SetExtra(0.001, 6.95, 4., 5., 2., 0.06, 10., 3., 1.);   
-PHOS->SetTextolitWall(209., 71., 250.);    //Textolit Wall box dimentions
-PHOS->SetInnerAir(206.,    66.,     244.); //Inner AIR volume dimensions
-// *  ===============================
-// * 1. FTI_X             Foam Thermo Insulating outer cover dimensions
-// * 2. FTI_Y             ==//==
-// * 3. FTI_Z             ==//==
-// * 4. FTI_R             Distance from IP to Foam Thermo Insulating top plate
-PHOS->SetFoam(214.6,  80.,  260., 467.); 
-//    =================================
-// *******************************************************************************
-// * KINE 700  - SHAKER generator
-// * KINE 700 x y z NDNDY YLIM PTLIM ChargeFlag
-// *     JWEAK=0
-// *     JPI0=JETA=1
-// *     JPIC=JPRO=JKAC=JKA0=JRHO=JOME=JPHI=JPSI=JDRY=ChargeFlag
-// *     Int_t               JWEI;           // Unweighted generation
-// *     Int_t               NDNDY;          // Density of charged particles
-// *     Float_t             YLIM;           // Rapidity Limit
-// *     Float_t             PTLIM;          // Pt limit in GeV/c
-// *     Int_t               JWEAK;          // Disable weak decays
-// *     Int_t               JPI0;           // pi0 generation
-// *     Int_t               JETA;           // eta generation
-// *     Int_t               JPIC;           // pi+/- generation
-// *     Int_t               JPRO;           // proton generation
-// *     Int_t               JKAC;           // K+/- generation
-// *     Int_t               JKA0;           // K0 generation
-// *     Int_t               JRHO;           // rho generation
-// *     Int_t               JOME;           // omega generation
-// *     Int_t               JPHI;           // phi generation
-// *     Int_t               JPSI;           // J/psi generation
-// *     Int_t               JDRY;           // Drell-Yan generation
-// * KINE  700     5.    175.    0.          800. 1.5 5. 1.
-// *******************************************************************************
-}
-
-if(iCPV) {
-//=================== CPV parameters ============================
-
-  printf ("CPV in initializing\n");
-  AliCPV *CPV  = new AliCPVv0("CPV","normal CPV");
+  AliPHOS *PHOS  = new AliPHOSv0("PHOS","GPS2");
 }