M: variable shadowing corrected.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 May 2008 08:02:07 +0000 (08:02 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 May 2008 08:02:07 +0000 (08:02 +0000)
D: Obsolete code removed from svn.

STRUCT/AliABSOv3.cxx
STRUCT/AliALIFE.cxx [deleted file]
STRUCT/AliALIFE.h [deleted file]
STRUCT/AliDIPOv3.cxx
STRUCT/AliFRAMEv2.cxx
STRUCT/AliFieldReader.cxx [deleted file]
STRUCT/AliFieldReader.h [deleted file]
STRUCT/AliSHILv3.cxx
STRUCT/AliSHILvF.cxx [deleted file]
STRUCT/AliSHILvF.h [deleted file]
STRUCT/STRUCTLinkDef.h

index 4f3a09a..bb17840 100644 (file)
@@ -319,8 +319,8 @@ void AliABSOv3::CreateGeometry()
       for (Int_t i = 1; i < 5; i++) {
          Float_t rmin = shFaWPlateA->GetRmin(i+2);
          Float_t rmax = shFaWPlateA->GetRmax(i+2) - 3.;        
-         Float_t z    = shFaWPlateA->GetZ(i+2);
-         shFaWPlateAI->DefineSection(i, z, rmin, rmax);
+         Float_t zpos = shFaWPlateA->GetZ(i+2);
+         shFaWPlateAI->DefineSection(i, zpos, rmin, rmax);
       }
       TGeoVolume* voFaWPlateAI = new TGeoVolume("AFaWPlateAI", shFaWPlateAI, kMedNiWsh);
       voFaWPlateA->AddNode(voFaWPlateAI, 1, gGeoIdentity);
@@ -714,10 +714,10 @@ void AliABSOv3::CreateGeometry()
 //    Assemble volumes inside acceptance
       TGeoPcon* shFaAccM = new TGeoPcon(0., 360., 7);
       for (Int_t i = 0; i < 4; i++) {
-         Float_t z     = shFaGraphiteCone->GetZ(i);
+         Float_t zpos  = shFaGraphiteCone->GetZ(i);
          Float_t rmin  = shFaGraphiteCone->GetRmin(i);
          Float_t rmax  = shFaGraphiteCone->GetRmax(i);
-         shFaAccM->DefineSection(i, z, rmin, rmax);
+         shFaAccM->DefineSection(i, zpos, rmin, rmax);
       }
       z  = dzFaGraphiteCone + dzFaConcreteCone + dzFaSteelCone25;
       z0 = z + zFa + dzFaFlange;
diff --git a/STRUCT/AliALIFE.cxx b/STRUCT/AliALIFE.cxx
deleted file mode 100644 (file)
index 37dad7f..0000000
+++ /dev/null
@@ -1,491 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-
-/* $Id$ */
-
-//----------------------------------------------------------------------
-// Helper class to write geometry in ALIFE format
-// in parallel with Geant geometry definition.
-// Author: A.Morsch
-//----------------------------------------------------------------------
-
-#include <AliALIFE.h>
-
-ClassImp(AliALIFE)
-
-AliALIFE::AliALIFE(const char* file1, const char* file2):
-    fNBodies(0), 
-    fNVolumes(0), 
-    fBodyFile(file1),
-    fVolumeFile(file2),
-    fFile1(fopen(fBodyFile,"w")),
-    fFile2(fopen(fVolumeFile,"w")),
-    fDefaultVolume1("DEFAU1"),
-    fDefaultVolume2("DEFAU2")    
-{  
-// Constructor
-    BodyHeader();
-    VolumeHeader();
-}
-
-AliALIFE::AliALIFE():
-    fNBodies(0), 
-    fNVolumes(0), 
-    fBodyFile("FlukaBody.inp"),
-    fVolumeFile("FlukaVolume.inp"),
-    fFile1(fopen(fBodyFile,"w")),
-    fFile2(fopen(fVolumeFile,"w")),
-    fDefaultVolume1("DEFAU1"),
-    fDefaultVolume2("DEFAU2")    
-{
-// Default constructor
-    BodyHeader();
-    VolumeHeader();
-}
-
-
-AliALIFE::AliALIFE(const AliALIFE &rhs): 
-    TObject(rhs),
-    fNBodies(0), 
-    fNVolumes(0), 
-    fBodyFile(0),
-    fVolumeFile(0),
-    fFile1(0),
-    fFile2(0),
-    fDefaultVolume1(0),
-    fDefaultVolume2(0)   
-{
-    // Copy Constructor
-    rhs.Copy(*this);
-}
-
-void AliALIFE::BodyHeader()
-{
-// Write header for body definitions
-    fprintf(fFile1,"*\n");        
-    fprintf(fFile1,"GEOBEGIN                                                              COMBINAT\n");
-    fprintf(fFile1,"    0    0         AliRoot Generated\n");
-    fprintf(fFile1,"*\n");
-    fprintf(fFile1,"*== Body Definitions ================================================\n");
-    fprintf(fFile1,"*\n");
-                            
-}
-
-
-void AliALIFE::VolumeHeader()
-{
-// Write header for region (volume)  definitions
-    fprintf(fFile2,"REGIONS\n");
-    fprintf(fFile2,"*\n");
-    fprintf(fFile2,"*== Region Definitions =================================================\n");
-    fprintf(fFile2,"*\n");
-}
-
-
-void AliALIFE:: Cylinder(Float_t rmin, Float_t rmax, 
-                        Float_t zmin, Float_t zmax, 
-                        Float_t pos[3], 
-                        const char* Material,
-                        const char* Field,
-                        const char* Cuts) 
-{
-// Simple cylinder
-//
-// Bodies
-// ^^^^^^
-    char name1[6], name2[6], name3[6], name4[6];
-
-//  outer radius
-    sprintf(name1, "R%4.4d", fNBodies++);
-    fprintf(fFile1,"%5s ZCC%10.3f%10.3f%10.3f\n",name1, pos[0], pos[1], rmax); // inner radius
-    sprintf(name2, "R%4.4d", fNBodies++);
-    fprintf(fFile1,"%5s ZCC%10.3f%10.3f%10.3f\n",name2, pos[0], pos[1], rmin); 
-// z-max
-    sprintf(name3, "Z%4.4d", fNBodies++);
-    fprintf(fFile1,"%5s XYP%10.3f\n",name3, zmax); 
-// z-min
-    sprintf(name4, "Z%4.4d", fNBodies++);
-    fprintf(fFile1,"%5s XYP%10.3f\n",name4, zmin); 
-//
-// Volumes
-// ^^^^^^^
-
-    fprintf(fFile2,">%s:%s\n", Material, Field);
-    fprintf(fFile2,"EMFCUT=%s\n", Cuts);
-    fprintf(fFile2,"WW-FACTOR=%s\n", Cuts);
-    if (rmin >0) {
-       fprintf(fFile2,"+%s-%s+%s-%s\n", name1, name2, name3, name4);
-    } else {
-       fprintf(fFile2,"+%s+%s-%s\n", name1, name3, name4);
-    }
-    
-    fprintf(fFile2,"\n");    
-}
-
-void AliALIFE::OnionCylinder(Float_t* r, Int_t nr, Float_t zmin, Float_t zmax,
-                            Float_t pos[3], const char** Materials, 
-                            const char** Fields, const char** Cuts) 
-{
-//
-// Concentric cylinders
-//
-
-// Bodies
-// ^^^^^^
-    char nameRin[6], nameRou[6], nameZin[6], nameZou[6];
-// z-limits
-// z-max
-    sprintf(nameZou, "Z%4.4d", fNBodies++);
-    nameZou[5]='\0';
-    
-    fprintf(fFile1,"%5s XYP%10.3f\n",nameZou, zmax); 
-// z-min
-    sprintf(nameZin, "Z%4.4d", fNBodies++);
-    nameZin[5]='\0';
-    fprintf(fFile1,"%5s XYP%10.3f\n",nameZin, zmin); 
-
-// inner radius
-    sprintf(nameRin, "R%4.4d", fNBodies++);
-    nameRin[5]='\0';
-    fprintf(fFile1,"%5s ZCC%10.3f%10.3f%10.3f\n",nameRin, pos[0], pos[1], r[0]); 
-
-    Int_t i;
-    for (i=1; i<nr; i++) {
-//  outer radius
-       sprintf(nameRou, "R%4.4d", fNBodies++);
-       nameRou[5]='\0';
-       fprintf(fFile1,"%5s ZCC%10.3f%10.3f%10.3f\n",
-               nameRou, pos[0], pos[1], r[i]);         
-//
-// Volumes
-// ^^^^^^^
-       if (Fields && Cuts) {
-           fprintf(fFile2,">%s:%s\n", Materials[i-1], Fields[i-1]);
-           fprintf(fFile2,"EMFCUT=%s\n", Cuts[i-1]);
-           fprintf(fFile2,"WW-FACTOR=%s\n", Cuts[i-1]);
-       } else {
-           fprintf(fFile2,">%s:%s\n", Materials[i-1], "MF");
-           fprintf(fFile2,"EMFCUT=%s\n", "$UNSHIELDED");
-           fprintf(fFile2,"WW-FACTOR=%s\n", "$UNSHIELDED");
-       }
-       if (r[i-1] != 0.) {
-           fprintf(fFile2,"+%5s-%5s+%5s-%5s\n", nameZou, nameZin, nameRou, nameRin);
-       } else {
-           fprintf(fFile2,"+%5s-%5s+%5s\n", nameZou, nameZin, nameRou);
-       }
-       fprintf(fFile2,"\n");
-       strcpy(nameRin,nameRou);
-    }
-}
-
-
-void AliALIFE::Cone(Float_t rmin1, Float_t rmin2, 
-                    Float_t rmax1, Float_t rmax2,
-                    Float_t zmin, Float_t zmax, 
-                    Float_t pos[3], 
-                    const char* Material,
-                    const char* Field,
-                    const char* Cuts) 
-{
-// Simple cone 
-
-//
-// Bodies
-// ^^^^^^
-    char nameCou[6], nameCin[6];
-    Float_t d, r1, r2;
-    char nameZin[6], nameZou[6];
-// z-max
-    sprintf(nameZou, "Z%4.4d", fNBodies++);
-    fprintf(fFile1,"%5s XYP%10.3f\n",nameZou, zmax); 
-// z-min
-    sprintf(nameZin, "Z%4.4d", fNBodies++);
-    fprintf(fFile1,"%5s XYP%10.3f\n",nameZin, zmin); 
-    
-//  outer radius
-    d=zmax-zmin;
-    sprintf(nameCou, "C%4.4d", fNBodies++);
-    if (rmax1 >= 0. && rmax2 >= 0.) {
-       if (rmax1!=rmax2) {
-           if (rmax1 > rmax2) {
-               pos[2]=zmin;
-               r1=rmax1;
-               r2=rmax2;
-           } else {
-               d=-d;
-               pos[2]=zmax;
-               r1=rmax2;
-               r2=rmax1;
-           }
-           fprintf(fFile1,"%5s TRC%10.3f%10.3f%10.3f%10.3f%10.3f%10.3f\n",
-                   nameCou, pos[0], pos[1], pos[2], 0., 0., d); 
-           fprintf(fFile1,"         %10.3f%10.3f\n",r1,r2);
-       } else {
-           fprintf(fFile1,"%5s ZCC%10.3f%10.3f%10.3f\n",
-                   nameCou, pos[0], pos[1], rmax1); 
-       } 
-    }else {
-      fDefaultVolume1 = nameCou;
-    }
-
-    
-    
-// inner radius
-    sprintf(nameCin, "C%4.4d", fNBodies++);
-    if (rmin1 >= 0. && rmin2 >= 0.) {
-       if (rmin1!=rmin2) {
-           if (rmin1 != 0 && rmin2 !=0) {
-               d=zmax-zmin;
-               if (rmin1 > rmin2) {
-                   pos[2]=zmin;
-                   r1=rmin1;
-                   r2=rmin2;
-               } else {
-                   pos[2]=zmax;
-                   r1=rmin2;
-                   r2=rmin1;
-                   d=-d;
-               }
-               fprintf(fFile1,"%5s TRC%10.3f%10.3f%10.3f%10.3f%10.3f%10.3f\n",
-                       nameCin, pos[0], pos[1], pos[2], 0., 0., d); 
-               fprintf(fFile1,"         %10.3f%10.3f\n",r1,r2);
-           } 
-       } else {
-           fprintf(fFile1,"%5s ZCC%10.3f%10.3f%10.3f\n",
-                   nameCin, pos[0], pos[1], rmin1); 
-       } 
-    }else {
-      fDefaultVolume2 = nameCin;
-    }
-
-
-
-//
-// Volumes
-// ^^^^^^^
-    fprintf(fFile2,">%s:%s\n", Material, Field);
-    fprintf(fFile2,"EMFCUT=%s\n", Cuts);
-    fprintf(fFile2,"WW-FACTOR=%s\n", Cuts);
-    if (rmin1 != 0 && rmin2 !=0) {
-       fprintf(fFile2,"+%s-%s+%s-%s\n", nameCou, nameCin, nameZou, nameZin);
-    } else {
-       fprintf(fFile2,"+%s+%s-%s\n", nameCou, nameZou, nameZin);
-    }
-    fprintf(fFile2,"\n");        
-}
-
-void AliALIFE::OnionCone (Float_t* r1, Float_t* r2, Int_t nr, 
-                         Float_t zmin, Float_t zmax,
-                         Float_t pos[3], const char** Materials,
-                         const char** Fields, const char** Cuts) 
-{
-// Concentric cones
-//
-    char nameCin[6], nameCou[6], nameZin[6], nameZou[6];
-//
-// Bodies
-// ^^^^^^
-    Float_t ri1, ri2, ro1, ro2, d;
-
-// z-max
-    sprintf(nameZou, "Z%4.4d", fNBodies++);
-    fprintf(fFile1,"%5s XYP%10.3f\n",nameZou, zmax); 
-// z-min
-    sprintf(nameZin, "Z%4.4d", fNBodies++);
-    fprintf(fFile1,"%5s XYP%10.3f\n",nameZin, zmin); 
-     
-//  inner radius
-    d=zmax-zmin;
-    Bool_t hasInner=kFALSE;
-    Bool_t isCylinder=kFALSE;
-    if (r1[0]>=0 && r2[0]>=0) {
-       if (r1[0] != 0. &&  r2[0] !=0.) {
-           if (r1[0]!=r2[0]) {
-               hasInner=kTRUE;
-               if (r1[0] > r2[0]) {
-                   pos[2]=zmin;
-                   ri1=r1[0];
-                   ri2=r2[0];
-               } else {
-                   d=-d;
-                   pos[2]=zmax;
-                   ri1=r2[0];
-                   ri2=r1[0];
-               }
-               sprintf(nameCin, "C%4.4d", fNBodies++);
-               nameCin[5]='\0';
-               fprintf(fFile1,"%5s TRC%10.3f%10.3f%10.3f%10.3f%10.3f%10.3f\n",
-                       nameCin, pos[0], pos[1], pos[2], 0., 0., d); 
-               fprintf(fFile1,"         %10.3f%10.3f\n",ri1,ri2);
-           } else {
-               isCylinder=kTRUE;
-               sprintf(nameCin, "C%4.4d", fNBodies++);
-               nameCin[5]='\0';
-               fprintf(fFile1,"%5s ZCC%10.3f%10.3f%10.3f\n",
-                       nameCin, pos[0], pos[1], r1[0]); 
-           }
-       }
-    } else {
-      fDefaultVolume1 = nameCin;
-    }
-    
-    
-    
-// outer radius
-    Int_t i;
-    for (i=1; i<nr; i++) {
-       if (r1[i] >= 0. && r2[i] >=0) {
-           if (r1[i]!=r2[i]) {
-               d=zmax-zmin;
-               if (r1[i] > r2[i]) {
-                   pos[2]=zmin;
-                   ro1=r1[i];
-                   ro2=r2[i];
-               } else {
-                   pos[2]=zmax;
-                   ro1=r2[i];
-                   ro2=r1[i];
-                   d=-d;
-               }
-               sprintf(nameCou, "C%4.4d", fNBodies++);
-               nameCou[5]='\0';
-               fprintf(fFile1,"%5s TRC%10.3f%10.3f%10.3f%10.3f%10.3f%10.3f\n",
-                       nameCou, pos[0], pos[1], pos[2], 0., 0., d); 
-               fprintf(fFile1,"         %10.3f%10.3f\n",ro1,ro2);
-           } else {
-               isCylinder=kTRUE;
-               sprintf(nameCou, "C%4.4d", fNBodies++);
-               nameCou[5]='\0';
-               fprintf(fFile1,"%5s ZCC%10.3f%10.3f%10.3f\n",
-                       nameCou, pos[0], pos[1], r1[i]); 
-           }
-       } else {
-         fDefaultVolume1 = nameCou;
-       }
-       
-// Volumes
-// ^^^^^^^
-       if (Fields && Cuts) {
-           fprintf(fFile2,">%s:%s\n", Materials[i-1], Fields[i-1]);
-           fprintf(fFile2,"EMFCUT=%s\n", Cuts[i-1]);
-           fprintf(fFile2,"WW-FACTOR=%s\n", Cuts[i-1]);
-       } else {
-           fprintf(fFile2,">%s:%s\n", Materials[i-1], "MF");
-           fprintf(fFile2,"EMFCUT=%s\n", "$UNSHIELDED");
-           fprintf(fFile2,"WW-FACTOR=%s\n", "$UNSHIELDED");
-       }
-       if (hasInner || isCylinder) {
-           if (!isCylinder) fprintf(fFile2,"+%5s-%5s+%5s-%5s\n", 
-                   nameCou, nameCin, nameZou, nameZin);
-           if (isCylinder)  fprintf(fFile2,"+%5s+%5s-%5s\n",
-                   nameCou, nameZou, nameZin); 
-       } else {
-           fprintf(fFile2,"+%5s\n", nameCou);
-           hasInner=kTRUE;
-       }
-       fprintf(fFile2,"\n");        
-       strcpy(nameCin,nameCou);
-    }
-}
-
-
-void AliALIFE::PolyCone(Float_t* rmin, Float_t* rmax, Float_t* z, 
-                       Int_t nz,
-                       Float_t pos[3], 
-                       const char* Material,
-                       const char* Field,
-                       const char* Cuts) 
-{
-//
-// Equivalent to the Geant3 PCON
-    Int_t i;
-    for (i=0; i<nz-1; i++) {
-// skip (z_i = z_i+1)
-       if (z[i] == z[i+1]) continue;
-       Cone(rmin[i], rmin[i+1], rmax[i], rmax[i+1], z[i], z[i+1], pos,
-            Material, Field, Cuts);
-    }
-}
-
-void AliALIFE::OnionPolyCone(Float_t** r, Float_t* z,
-                            Int_t nr, Int_t nz,
-                            Float_t pos[3], 
-                            const char** Materials,
-                            const char** Fields,const  char** Cuts)
-{
-//
-// Concentric PCONS
-    Int_t i, j;
-    for (i=0; i<nz-1; i++) {
-// skip (z_i = z_i+1)
-       if (z[i] == z[i+1]) continue;
-       for (j=0; j<nr-1; j++) {
-           if (Fields && Cuts) {
-               Cone(r[i][j], r[i+1][j], r[i][j+1], r[i+1][j+1], 
-                    z[i], z[i+1], pos,
-                    Materials[i], Fields[i], Cuts[i]);
-           } else {
-               Cone(r[i][j], r[i+1][j], r[i][j+1], r[i+1][j+1], 
-                    z[i], z[i+1], pos,
-                    Materials[i]);
-           }
-       }
-    }
-}
-
-void AliALIFE::Comment(const char* Comment)
-{
-// Insert comment line
-    fprintf(fFile1,"*%s\n", Comment);        
-    fprintf(fFile2,"*%s\n", Comment);        
-}
-
-
-void AliALIFE::Finish(Bool_t iremove)
-{
-// Finish geometry definition
-    char s[BUFSIZ];
-    fprintf(fFile1,"      END\n");
-    fclose(fFile2);
-    fFile2=fopen(fVolumeFile,"r");
-    while (fgets(s, BUFSIZ, fFile2)) {
-       fputs(s,fFile1);
-    }
-    
-    fclose(fFile1);
-    fclose(fFile2);    
-    if (iremove) {
-       remove(fVolumeFile);
-       remove(fBodyFile);
-    }
-}
-
-void AliALIFE::Copy(TObject&) const
-{
-    //
-    // Copy 
-    //
-    Fatal("Copy","Not implemented!\n");
-}
-
-
-
-
-
-
-
-
-
-
diff --git a/STRUCT/AliALIFE.h b/STRUCT/AliALIFE.h
deleted file mode 100644 (file)
index 32e9d84..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-#ifndef ALIALIFE_H
-#define ALIALIFE_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-/* $Id$ */
-
-#include "TObject.h"
-#include "TString.h"
-
-class AliALIFE : public  TObject {
- public:
-    AliALIFE(const char *name1, const char *name2);
-    AliALIFE();    
-    AliALIFE(const AliALIFE &rhs);
-
-    virtual ~AliALIFE() {}
-    void Cylinder(Float_t rmin, Float_t rmax,
-                 Float_t zmin, Float_t zmax,
-                 Float_t pos[3],
-                 const char* Material, 
-                 const char* Field="MF", 
-                 const char* Cuts="$UNSHIELDED");
-    void OnionCylinder(Float_t* r, Int_t nr, Float_t zmin, Float_t zmax,
-                      Float_t pos[3],
-                      const char** Materials,
-                      const char** Fields=0,
-                      const char** Cuts=0);
-    
-    void Cone(Float_t rmin1, Float_t rmin2,
-             Float_t rmax1, Float_t rmax2,
-             Float_t zmin, Float_t zmax,
-             Float_t pos[3],
-             const char* Material, 
-             const char* Field="MF", 
-             const char* Cuts="$UNSHIELDED");
-    
-    void OnionCone(Float_t* r1, Float_t* r2, Int_t nr,
-                  Float_t zmin, Float_t zmax,
-                  Float_t pos[3],
-                  const char** Materials,
-                  const char** Fields=0,
-                  const char** Cuts=0);
-
-    void PolyCone(Float_t* rmin, Float_t* rmax, Float_t* z, Int_t nz,
-                 Float_t pos[3], 
-                 const char* Material, 
-                 const char* Field="MF", 
-                 const char* Cuts="$UNSHIELDED");
-
-    void OnionPolyCone(Float_t** r , Float_t* z, Int_t nr, Int_t nz,
-                      Float_t pos[3], 
-                      const char** Materials,
-                      const char** Fields=0,
-                      const char** Cuts=0);
-    
-    void Comment(const char* Comment);
-
-    void Finish(Bool_t remove = 0);
-
-    void SetDefaultVolume(TString vol1, TString vol2) 
-       {fDefaultVolume1=vol1; fDefaultVolume2=vol2;}
-    
-    void SetDefaultVolume(TString vol) 
-       {fDefaultVolume1=vol;}
-
- protected:
-    Int_t        fNBodies;          // current number of bodies
-    Int_t        fNVolumes;         // current number of volumes
-    TString       fBodyFile;        // File for Fluka bodies
-    TString       fVolumeFile;      // File for Fluka volumes
-    FILE         *fFile1;           // ! output file for fluka geometry in ALIFE format  
-    FILE         *fFile2;           // ! scratch file
-    TString      fDefaultVolume1;   // default external volume 1 
-    TString      fDefaultVolume2;   // default external volume 2   
- private:
-    void BodyHeader();
-    void VolumeHeader();
-    void Copy(TObject &alife) const;
-
-    AliALIFE & operator = (const AliALIFE &rhs) {
-       rhs.Copy(*this);
-       return (*this);
-    }
-   ClassDef(AliALIFE,1)
-};
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
index 9104792..b08997a 100644 (file)
@@ -347,10 +347,10 @@ void AliDIPOv3::CreateSpectrometerDipole()
     asDCoilSupport->AddNode(voDCS04, 1, gGeoIdentity);    
     for (Int_t i = 0; i < 9; i++) 
     {
-       char name[16];
-       sprintf(name, "rotdcs%1d", i);
+       char nameR[16];
+       sprintf(nameR, "rotdcs%1d", i);
        Float_t phi = Float_t(i) * 3.75;
-       TGeoRotation* rot   = new TGeoRotation(name, 90., phi, 90., 90. + phi,    0.,   0.);    
+       TGeoRotation* rot   = new TGeoRotation(nameR, 90., phi, 90., 90. + phi,    0.,   0.);   
        asDCoilSupport->AddNode(voDCS021, i, new TGeoCombiTrans(0., 0., -(sW - coilH)/2., rot));    
     }
     
index d8b1d6b..121ff14 100644 (file)
@@ -491,20 +491,20 @@ void AliFRAMEv2::CreateGeometry()
 
       module[i] = name;
       // Place volume i
-      Float_t phi  = i * 20.;
-      Float_t phi2 = 270 + phi;
+      Float_t phi1  = i * 20.;
+      Float_t phi2 = 270 + phi1;
       if (phi2 >= 360.) phi2 -= 360.;
       
-      dx =  TMath::Sin(phi*kdeg2rad)*r;
-      dy = -TMath::Cos(phi*kdeg2rad)*r;
+      dx =  TMath::Sin(phi1*kdeg2rad)*r;
+      dy = -TMath::Cos(phi1*kdeg2rad)*r;
       
-      AliMatrix(idrotm[2034+i],  90.0, phi, 0., 0., 90., phi2);  
+      AliMatrix(idrotm[2034+i],  90.0, phi1, 0., 0., 90., phi2);  
       gMC->Gspos(name, 1, "B077", dx, dy, 0., idrotm[2034+i], "ONLY");
 //
 //    Position elements of outer Frame
 //
-      dx =  TMath::Sin(phi*kdeg2rad)*rout1;
-      dy = -TMath::Cos(phi*kdeg2rad)*rout1;
+      dx =  TMath::Sin(phi1*kdeg2rad)*rout1;
+      dy = -TMath::Cos(phi1*kdeg2rad)*rout1;
       for (j = 0; j < 3; j++)
       {
          dz = dymodU[j];
@@ -512,12 +512,12 @@ void AliFRAMEv2::CreateGeometry()
          gMC->Gspos("B042", 6*i+2*j+2, "B076", dx, dy, -dz, idrotm[2034+i], "ONLY");     
       }
 
-      phi = i*20.+10;
-      phi2 = 270+phi;
-      AliMatrix(idrotm[2052+i],  90.0, phi, 90., phi2, 0., 0.);  
+      phi1 = i*20.+10;
+      phi2 = 270+phi1;
+      AliMatrix(idrotm[2052+i],  90.0, phi1, 90., phi2, 0., 0.);  
 
-      dx =  TMath::Sin(phi*kdeg2rad)*rout2;
-      dy = -TMath::Cos(phi*kdeg2rad)*rout2;
+      dx =  TMath::Sin(phi1*kdeg2rad)*rout2;
+      dy = -TMath::Cos(phi1*kdeg2rad)*rout2;
       gMC->Gspos("B033", i+1, "B076", dx, dy,  0., idrotm[2052+i], "ONLY");      
 //
   }
@@ -1038,18 +1038,18 @@ void AliFRAMEv2::CreateGeometry()
       Float_t ro   = kBFMRou - kBFBd / 2.;
       Float_t ri   = kBFMRin + kBFBd / 2.;
 
-      Float_t phi = Float_t(i) * 20.;
+      Float_t phi0 = Float_t(i) * 20.;
       
-      Float_t x = ri * TMath::Cos(phi * kDegrad);
-      Float_t y = ri * TMath::Sin(phi * kDegrad);
-      AliMatrix(idrotm[2090+i],  90.0, phi,  90.0, phi + 270., 0., 0.);
+      Float_t xb = ri * TMath::Cos(phi0 * kDegrad);
+      Float_t yb = ri * TMath::Sin(phi0 * kDegrad);
+      AliMatrix(idrotm[2090+i],  90.0, phi0,  90.0, phi0 + 270., 0., 0.);
       
-      gMC->Gspos("BFLB", i + 1, "BFMO", x, y, 0., idrotm[2090 + i], "ONLY");      
+      gMC->Gspos("BFLB", i + 1, "BFMO", xb, yb, 0., idrotm[2090 + i], "ONLY");      
 
-      x = ro * TMath::Cos(phi * kDegrad);
-      y = ro * TMath::Sin(phi * kDegrad);
+      xb = ro * TMath::Cos(phi0 * kDegrad);
+      yb = ro * TMath::Sin(phi0 * kDegrad);
 
-      gMC->Gspos("BFLB", i + 19, "BFMO", x, y, 0., idrotm[2090 +i], "ONLY");       
+      gMC->Gspos("BFLB", i + 19, "BFMO", xb, yb, 0., idrotm[2090 +i], "ONLY");       
  }
 
   // 
@@ -1078,14 +1078,14 @@ void AliFRAMEv2::CreateGeometry()
   for (i = 0; i < 10; i++)
   {
       
-      Float_t r   = (kBFMRin + kBFMRou)/2.;
+      Float_t rb   = (kBFMRin + kBFMRou)/2.;
       Float_t phi = Float_t(iphi[i]) * 20.;
       
-      Float_t x = r * TMath::Cos(phi * kDegrad);
-      Float_t y = r * TMath::Sin(phi * kDegrad);
+      Float_t xb = rb * TMath::Cos(phi * kDegrad);
+      Float_t yb = rb * TMath::Sin(phi * kDegrad);
       
-      gMC->Gspos("BFRB", i + 1,  "BFMO", x, y,  dz, idrotm[2034 + iphi[i]], "ONLY");      
-      gMC->Gspos("BFRB", i + 11, "BFMO", x, y, -dz, idrotm[2034 + iphi[i]], "ONLY");      
+      gMC->Gspos("BFRB", i + 1,  "BFMO", xb, yb,  dz, idrotm[2034 + iphi[i]], "ONLY");      
+      gMC->Gspos("BFRB", i + 11, "BFMO", xb, yb, -dz, idrotm[2034 + iphi[i]], "ONLY");      
 
  }
 
diff --git a/STRUCT/AliFieldReader.cxx b/STRUCT/AliFieldReader.cxx
deleted file mode 100644 (file)
index 7fc6d79..0000000
+++ /dev/null
@@ -1,861 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-
-/* $Id$ */
-
-#include <TCanvas.h>
-#include <TFile.h>
-#include <TGraph.h>
-#include <TH1F.h>
-#include <TMath.h>
-#include <TMultiGraph.h>
-#include <TNtuple.h>
-#include <TObjString.h>
-#include <TString.h>
-#include <TStyle.h>
-
-#include "AliFieldReader.h"
-#include "AliMagFMaps.h"
-
-ClassImp(AliFieldReader)
-
-
-
-//_______________________________________________________________________
-AliFieldReader::AliFieldReader():
-    fField(0),
-    fMap(0),
-    fCatalogue(0),
-    fHtmlMain(0),
-    fStepSize(0.),
-    fZStart(1383.),
-    fDd(0.08),
-    fDz(0.064),
-    fPolarity(1.),
-    fCatalogueName("goodfiles.list")
-{
-//
-//  Constructor
-//
-}
-
-AliFieldReader::AliFieldReader(const AliFieldReader& reader):
-    TObject(reader),
-    fField(0),
-    fMap(0),
-    fCatalogue(0),
-    fHtmlMain(0),
-    fStepSize(0.),
-    fZStart(0.),
-    fDd(0.),
-    fDz(0.),
-    fPolarity(0.),
-    fCatalogueName(0)
-{
-//
-//  Constructor
-//
-    reader.Copy(*this);
-}
-
-//_______________________________________________________________________
-AliFieldReader::~AliFieldReader()
-{
-  //
-  // Destructor
-  //
-}
-
-//_______________________________________________________________________
-void AliFieldReader::Init()
-{   
-//
-// Initialize the reader
-//
-    // Calculated map
-    fField = new AliMagFMaps("Maps","Maps", 2, 1., 10., 2);
-    // Catalogue
-    fCatalogue = fopen(fCatalogueName, "r");
-    
-    // HTML
-    fHtmlMain = fopen("bmap.html", "w");
-    MakeHtmlHeaderMain(fHtmlMain);
-    
-}
-
-
-void AliFieldReader::ReadMap()
-{   
-//
-// Read the measured dipole field map 
-//    
-    
-    Float_t zA[450], bxzA[200], byzA[200], bzzA[200], bxzcA[200], byzcA[200], bzzcA[200];
-    Float_t yA[450], bxyA[200], byyA[200], bzyA[200], bxycA[200], byycA[200], bzycA[200];
-    Float_t xA[450], bxxA[200], byxA[200], bzxA[200], bxxcA[200], byxcA[200], bzxcA[200];
-    
-    Char_t sLine[255];
-    Char_t fLine[255];
-    
-    Float_t xpos, ypos, zpos;
-    Int_t iboxpos;
-    
-    Float_t h[3], x[3], b[3];
-    Float_t temp;
-    Float_t xnt[17];
-    Int_t ires;
-    
-    Int_t iret, ipos;
-    Int_t ic115 = 0;
-    Float_t  dx = 0.;
-    Float_t  dy = 0.;
-    
-    Init();
-    // Read register
-    ReadRegisterMap();
-    // n-tuple
-    fMap = new TNtuple("Field Map", "Map", 
-                      "x:y:z:ix:iy:iz:bx:by:bz:bxc:byc:bzc:ifile:ireg:irot:temp:cal", 4000);
-    
-    //
-    // Loop over files
-    // 
-    Int_t ifiles = 0;
-    // File catalogue
-    while ((fgets(fLine, 255, fCatalogue)) != NULL && ifiles <= 2000) {
-
-       if (strncmp(fLine,"#HEADER", 7) == 0) {
-         iret = sscanf(&fLine[7],"%f", &fZStart);
-         continue;
-       }       
-       ifiles++;
-       
-//     if (ifiles != 87) continue;
-       char fileName[32];
-       iret = sscanf(fLine, "%s", fileName);
-       printf("Reading File %s\n", fileName);
-       
-//  Get run name
-       TString* tsFile          = new TString(fileName);
-       TObjArray * tokens       =  tsFile->Tokenize(".");
-       const char* runName      = (((TObjString*) tokens->At(0))->GetString()).Data();
-       FILE* file               =  fopen(fileName, "r");
-       
-       
-       Float_t bdl   = 0.;
-       Float_t bdlc  = 0.;
-       Int_t iz      = 0;
-       Int_t izz     = 0;
-       Int_t iy      = 0;
-       Int_t ix      = 0;
-       Int_t iheader = 0;
-       Float_t stepsz = 0.;
-    // Graphs go here
-       TMultiGraph* bxzmg  = new TMultiGraph("bxzmg", "B_{x}");
-       TMultiGraph* byzmg  = new TMultiGraph("byzmg", "B_{y}");
-       TMultiGraph* bzzmg  = new TMultiGraph("bzzmg", "B_{z}");
-       while ((fgets(sLine, 255, file)) != NULL) {
-// read z-position
-           
-           if (strncmp(sLine," Current", 8) == 0) {
-               Float_t current;
-               iret = sscanf(&sLine[9],"%f", &current);
-               printf("Current %f \n", current);
-               
-               fPolarity = current / 6000.;
-           }
-           if (strncmp(sLine," z", 2) == 0) {
-               Float_t zmin, zmax;
-               Int_t nsteps;
-               iret = sscanf(&sLine[3],"%f %f %d", &zmin, &zmax, &nsteps);
-               printf("zmin zmax %13.3f %13.3f %13.3f\n", 
-                      zmin, zmax, TMath::Abs(zmax - zmin)/Float_t(nsteps));
-               zmax = TMath::Max(zmin, zmax);
-               stepsz  = TMath::Abs(zmax - zmin)/Float_t(nsteps);
-           }
-           
-           if (strncmp(sLine," X position", 11) == 0)
-           {
-               TString string;
-               TString* tsLine = new TString(sLine);
-               TObjArray * tokens =  tsLine->Tokenize("=");    
-               string = ((TObjString*) tokens->At(1))->GetString();
-               iret = sscanf(string.Data(), "%f", &xpos);
-               string = ((TObjString*) tokens->At(2))->GetString();
-               iret = sscanf(string.Data(), "%f", &ypos);
-               string = ((TObjString*) tokens->At(3))->GetString();
-               iret = sscanf(string.Data(), "%d", &iboxpos);
-               
-               
-               printf("This file is for  x = %13.3f y = %13.3f Box Position %1d\n", xpos, ypos, iboxpos);
-               iheader++;
-               
-           }
-           
-           if (strncmp(sLine," R       Z-pos",8) == 0)
-           {
-               iret = sscanf(&sLine[8],"%e", &zpos);
-               ipos  = 0;
-               ic115 = 0;
-               izz++;
-           }
-           
-           
-           if (strncmp(sLine,"C",1) == 0) {
-               ipos++;
-               Int_t ireg;
-               iret = sscanf(&sLine[2],"%d %f %f %f %f %d", &ireg, &h[0], &h[1], &h[2], &temp, &ires);
-               //
-               // fix for address 115
-               //
-               if (ireg == 115) ic115++;
-               if (ic115 == 2 && ireg == 115) ireg = 119;
-               
-               if (iheader == 1) {
-
-                   Float_t bx = 0., by = 0., bz = 0.;
-                   Int_t jx = fRegMap[ireg][0];
-                   Int_t jy = fRegMap[ireg][1];
-                   Int_t jz = fRegMap[ireg][2];
-
-                   switch (iboxpos) {
-                   case 0:
-                       bx =  h[1];
-                       by =  h[2];
-                       dx = -0.36 + jx * fDd;
-                       dy =  jy * fDd;
-                       break;
-                   case 1:
-                       bx = -h[2];
-                       by =  h[1];
-                       dx =  0.36 + jy * fDd;
-                       dy = -(-0.36 + jx * fDd);
-                       break;
-                   case 2:
-                       bx = -h[1];
-                       by = -h[2];
-                       dx =  0.36 - jx * fDd;
-                       dy = -jy * fDd;
-                       break;
-                   case 3:
-                       bx =   h[2];
-                       by =  -h[1];
-                       dx =  -0.36 - jy * fDd;
-                       dy =   -(0.36 - jx * fDd);
-                       break;
-                   } // switch
-
-                   bz =  h[0];
-                   if (jz == 0) {
-                       bz = -bz;
-                       if (iboxpos == 1 || iboxpos == 3) {
-                           by = -by;
-                       } else {
-                           bx = -bx;
-                       }
-                   }
-                   
-                   
-                   Float_t dz = (jz == 0)?  fDz/2. : - fDz/2.;
-                   dz *= 100.;
-                   
-
-                   Float_t xc = xpos + dx;
-                   Float_t yc = ypos + dy;
-
-                   
-                   x[0] =  - xc * 100.;
-                   x[1] =  + yc * 100.;
-                   x[2] =  - (-zpos * 100. + fZStart + dz);
-
-                   fField->Field(x, b);
-                   b[0] *= fPolarity;
-                   b[1] *= fPolarity;
-                   b[2] *= fPolarity;
-                   
-                   xnt[ 0] = xc;
-                   xnt[ 1] = yc;
-                   xnt[ 2] = -x[2] / 100.;
-                   xnt[ 3] = Float_t (jx);
-                   xnt[ 4] = Float_t (jy);
-                   xnt[ 5] = Float_t (jz);
-                   xnt[ 6] = bx;
-                   xnt[ 7] = by;
-                   xnt[ 8] = bz;
-                   xnt[ 9] = b[0]/10.;
-                   xnt[10] = b[1]/10.;
-                   xnt[11] = b[2]/10.;             
-                   xnt[12] = Float_t (ifiles);
-                   xnt[13] = Float_t (ireg);
-                   xnt[14] = Float_t(iboxpos);
-                   xnt[15] = temp;
-                   xnt[16] = Float_t(ires);
-                   
-                   fMap->Fill(xnt);
-                   
-
-//
-// Calculated field            
-
-                   if (jy != -1 && jz == 1 && jy == 0 && izz == 40){
-                       x[1] = x[1] + 10.;
-                       fField->Field(x, b);
-                       yA  [jx]  = yc;
-                       bxyA[jx]  = bx;
-                       byyA[jx]  = by;
-                       bzyA[jx]  = bz;
-                       bxycA[jx] =   b[0] / 10.;
-                       byycA[jx] =   b[1] / 10.;
-                       bzycA[jx] =   b[2] / 10.;
-                       iy++;
-                   } // if
-                   
-                   if (jy != -1 && jz == 1 && jy == 0 && izz == 1){
-                       x[1] = x[1] + 10.;
-                       fField->Field(x, b);
-                       xA  [jx]  = xc;
-                       bxxA[jx]  = bx;
-                       byxA[jx]  = by;
-                       bzxA[jx]  = bz;
-                       bxxcA[jx] =   b[0] / 10.;
-                       byxcA[jx] =   b[1] / 10.;
-                       bzxcA[jx] =   b[2] / 10.;
-                       ix++;
-                   } // if
-
-
-                   if (ireg == 181) {
-                       fField->Field(x, b);
-//                     printf("Field %f %f %f %f %f %f \n", x[0], x[1], x[2], b[0], b[1] , b[2]);
-                       
-                       bdl  +=  stepsz * bx;
-                       bdlc +=  stepsz * b[0];
-                       
-                       zA [iz]  = x[2];
-                       bxzA[iz]  = bx;
-                       byzA[iz]  = by;
-                       bzzA[iz]  = bz;
-                       bxzcA[iz] =   b[0] / 10.;
-                       byzcA[iz] =   b[1] / 10.;
-                       bzzcA[iz] =   b[2] / 10.;
-                       iz++;
-                   }
-               } // if 1st header 
-           } // if C
-       } // next line
-       gStyle->SetOptStat(0);
-       char title[128];
-       sprintf(title, "File#: %5d, X = %13.2f m , Y = %13.2f m, Box Orientation: %2d", ifiles, xpos, ypos, iboxpos);
-       TCanvas* c2 = new TCanvas("c2", title, 1200, 800);
-       c2->Divide(2,2);
-       c2->cd(1);
-       TGraph* bxg =  new TGraph(iz, zA, bxzA);
-       TGraph* bxcg = new TGraph(iz, zA, bxzcA);    
-       bxcg->SetLineColor(2);
-       bxzmg->Add(bxg);
-       bxzmg->Add(bxcg);
-       bxzmg->Draw("lA");
-       bxzmg->GetHistogram()->SetXTitle("z[m]");
-       bxzmg->GetHistogram()->SetYTitle("B_{x} [T]");
-       bxzmg->Draw("lA");
-       
-       c2->cd(2);
-       TGraph* byg =  new TGraph(iz, zA, byzA);
-       TGraph* bycg = new TGraph(iz, zA, byzcA);    
-       bycg->SetLineColor(2);
-       byzmg->Add(byg);
-       byzmg->Add(bycg);
-       byzmg->Draw("lA");
-       byzmg->GetHistogram()->SetXTitle("z[m]");
-       byzmg->GetHistogram()->SetYTitle("B_{y} [T]");
-       byzmg->Draw("lA");
-       
-       c2->cd(3);
-       TGraph* bzg =  new TGraph(iz, zA, bzzA);
-       TGraph* bzcg = new TGraph(iz, zA, bzzcA);    
-       bzcg->SetLineColor(2);
-       bzzmg->Add(bzg);
-       bzzmg->Add(bzcg);
-       bzzmg->Draw("lA");
-       bzzmg->GetHistogram()->SetXTitle("z[m]");
-       bzzmg->GetHistogram()->SetYTitle("B_{z} [T]");
-       bzzmg->Draw("lA");
-       
-       c2->Update();
-       char pictFile[64];
-       sprintf(pictFile, "%s.gif", runName);
-       c2->SaveAs(pictFile);
-       //
-       // Html generation
-       //
-       char htmlFile[64];
-       sprintf(htmlFile, "%s.html", runName);
-       FILE* chtml = fopen(htmlFile, "w");
-       MakeHtmlHeaderPict(chtml);
-       MakeHtmlPict(chtml, pictFile);
-       MakeHtmlTableEntry(fHtmlMain, fileName, htmlFile, xpos, ypos, iboxpos, bdl, ifiles);
-
-       //
-       //
-       printf("Bdl [Tm] %f %f \n", 2. * bdl, 2 * bdlc / 10.);
-    } // files
-    MakeHtmlTrailor(fHtmlMain);
-    TFile* out = new TFile("fmap.root", "recreate");
-    fMap->Write();
-    out->Close();
-}
-
-void AliFieldReader::ReadMapSolenoid(){
-//
-//  Read map for solenoid measurement
-// 
-    Float_t phiA[450], bzPhiA[200], brPhiA[200], btPhiA[200], bbPhiA[200];
-    Float_t bzcPhiA[200], brcPhiA[200], btcPhiA[200], bbcPhiA[200];    
-    Char_t sLine[255];
-    Char_t fLine[255];
-    
-    Float_t zpos, phipos, skewing, temp;
-    Int_t ical;
-    Float_t zmin, zmax;
-    Float_t h[3], x[3], b[3];
-    Int_t iret;
-    Int_t ipos = 0;
-    
-    Init();
-    ReadRegisterMapSolenoid();
-    fMap = new TNtuple("Field Map", "Map", 
-                      "r:phi:z:br:bt:bz:brc:btc:bzc:ifile:ireg:temp:cal:arm", 4000);
-    
-    //
-    // Loop over files
-    // 
-    Int_t ifiles = 0;
-    // File catalogue
-    while ((fgets(fLine, 255, fCatalogue)) != NULL && ifiles <= 2000) {
-
-       if (strncmp(fLine,"#HEADER", 7) == 0) {
-         iret = sscanf(&fLine[7],"%f", &fZStart);
-         continue;
-       }       
-       ifiles++;
-       
-       char fileName[32];
-       iret = sscanf(fLine, "%s", fileName);
-       printf("Reading File %s\n", fileName);
-       
-//  Get run name
-       TString* tsFile          = new TString(fileName);
-       TObjArray * tokens       =  tsFile->Tokenize(".");
-       Int_t n = tokens->GetEntries();
-       char* runName = new  char[256]; 
-       sprintf(runName, "%s", (((TObjString*) tokens->At(0))->GetString()).Data());
-       if (n > 2) {
-           for (Int_t i = 1; i < n-1; i++)
-           {
-               sprintf(runName, "%s.%s", 
-                       runName, (((TObjString*) tokens->At(i))->GetString()).Data());
-           }
-       }
-       FILE* file               =  fopen(fileName, "r");
-       
-       
-       Float_t bdl  = 0.;
-       Float_t bdlc = 0.;
-       Int_t iA   = 0;
-       Int_t izz  = 0;
-       Int_t iphi = 0;
-    // Graphs go here
-       TMultiGraph* bxzmg  = new TMultiGraph("bxzmg", "B_{z}");
-       TMultiGraph* byzmg  = new TMultiGraph("byzmg", "B_{r}");
-       TMultiGraph* bzzmg  = new TMultiGraph("bzzmg", "B_{t}");
-       TMultiGraph* bbmg   = new TMultiGraph("bbmg", "|B|");
-
-       while ((fgets(sLine, 255, file)) != NULL) {
-           if (strncmp(sLine," z", 2) == 0) {
-               Int_t nsteps;
-               iret = sscanf(&sLine[3],"%f %f %d", &zmin, &zmax, &nsteps);
-               printf("zmin zmax %13.3f %13.3f %13.3f\n", 
-                      zmin, zmax, TMath::Abs(zmax - zmin)/Float_t(nsteps));
-           }
-           if (strncmp(sLine," R\tPOSITION NUMBER", 18) == 0)
-           {                 
-               //
-               // Current z-position
-               TString string;
-               TString* tsLine = new TString(sLine);
-               TObjArray * tokens =  tsLine->Tokenize("=");    
-               string = ((TObjString*) tokens->At(1))->GetString();
-               iret = sscanf(string.Data(), "%f", &zpos);
-               printf("POSITION NUMBER Z: %f\n", zpos);
-               izz ++;
-               delete tsLine;
-           }
-
-
-           if (strncmp(sLine," SKEWING ON Z:", 14) == 0)
-           {                 
-               //
-               // Skew in z
-             iret = sscanf(&sLine[14],"%f", &skewing);
-             printf("SKEWING ON Z: %f\n", skewing);
-           }
-
-
-           if (strncmp(sLine,"Phi", 3) == 0)
-           {
-             Float_t phiStart, phiStop;
-             
-             iret = sscanf(&sLine[3],"%f %f", &phiStart, &phiStop);
-
-             printf("phiStart phiStop %f %f\n", phiStart, phiStop);
-
-           }
-           
-
-           if (strncmp(sLine," R\tPhi-Angle",12) == 0)
-           {
-               iret = sscanf(&sLine[12],"%e", &phipos);
-               ipos = 0;
-               iphi++;
-           }
-           
-
-           if (strncmp(sLine,"C",1) == 0) {
-       
-               Int_t ireg;
-               iret = sscanf(&sLine[2],"%d %f %f %f %f %d", &ireg, &h[0], &h[1], &h[2], &temp, &ical);
-               ipos++;
-
-               Int_t ir = fRegMap[ireg][0];
-               Int_t ia = fRegMap[ireg][1];
-               Float_t rpos = 0.;
-
-               
-               if (ia == 0) {
-                   rpos    = 0.2295 + ir * 0.16;
-               } else {
-                   if (ireg ==  81) rpos = 0.2295;
-                   if (ireg ==  59) rpos = 1.0295;
-                   if (ireg == 142) rpos = 2.1495;                 
-                   if (ireg == 180) rpos = 3.1095;                 
-                   if (ireg ==  69) rpos = 4.2295;                 
-
-                   //              if (ireg ==  55) rpos = 0.2295;
-                   //if (ireg == 195) rpos = 1.0295;
-                   //if (ireg == 129) rpos = 2.1495;               
-                   //if (ireg == 167) rpos = 3.1095;               
-                   //if (ireg == 142) rpos = 4.2295;               
-               }
-               
-               Float_t phi = phipos;
-               if (ia == 1) {
-                   phi += 180.;
-                   if (phi > 360.) phi -= 360.;                            
-               }
-               
-               phi = - phi * TMath::Pi() / 180.;
-               Float_t xpos = rpos * TMath::Cos(phi);
-               Float_t ypos = rpos * TMath::Sin(phi);
-               x[0] = - xpos * 100.;
-               x[1] = ypos * 100.;
-               x[2] = -400. + zpos * 100.;
-               
-               fField->Field(x, b);
-               Float_t phi0 = TMath::Pi() - phi;
-               
-               Float_t brc =   b[0] * TMath::Cos(phi0) +  b[1] * TMath::Sin(phi0);
-               Float_t btc = - b[0] * TMath::Sin(phi0) +  b[1] * TMath::Cos(phi0);     
-               Float_t bzc =   b[2];
-               
-               brc /= 10.;
-               btc /= 10.;
-               bzc /= 10.;
-       
-               fMap->Fill(rpos, -phi, -(615.5 - fZStart) / 100. + zpos, h[2], -h[1], h[0], brc, btc, bzc, ifiles, ireg, temp, Float_t(ical), Int_t(ia));
-       
-               if (ireg  == 174) {
-                   printf("Field (Bx, By, Bz) at position %d: %13.3f %13.3f %13.3f %13.3f %13.3f %13.3f %5d\n", 
-                          ipos, zpos, rpos, phipos, h[0], h[1], h[2], ia);     
-                   if (izz == 1) {
-                       phiA[iA]   = phi;
-                       bzPhiA[iA] = -h[0];
-                       brPhiA[iA] =  h[2];
-                       btPhiA[iA] = -h[1];
-                       bbPhiA[iA] = TMath::Sqrt(h[0] * h[0] + h[1] * h[1] + h[2] * h[2]);
-                       bzcPhiA[iA] = bzc;
-                       brcPhiA[iA] = brc;
-                       btcPhiA[iA] = btc;
-                       bbcPhiA[iA] = TMath::Sqrt(brc * brc + bzc * bzc + btc * btc);
-                       iA++;
-                   }
-               }
-           } // if R
-       } // next line
-
-       gStyle->SetOptStat(0);
-       char title[128];
-       sprintf(title, "Z = %13.2f m , Phi = %13.2f m", zpos, phipos);
-
-
-       TCanvas* c2 = new TCanvas("c2", title, 1200, 800);
-               
-       c2->Divide(2,2);
-       c2->cd(1);
-       TGraph* bzg  =  new TGraph(iA, phiA, bzPhiA);
-       TGraph* bzcg =  new TGraph(iA, phiA, bzcPhiA);
-       bzcg->SetLineColor(2);
-       bxzmg->Add(bzg);
-       bxzmg->Add(bzcg);
-       bxzmg->Draw("lA");
-       bxzmg->GetHistogram()->SetXTitle("#phi[rad]");
-       bxzmg->GetHistogram()->SetYTitle("B_{z} [T]");
-       bxzmg->Draw("lA");
-
-       c2->cd(2);
-       TGraph* brg  =  new TGraph(iA, phiA, brPhiA);
-       TGraph* brcg =  new TGraph(iA, phiA, brcPhiA);
-       brcg->SetLineColor(2);
-       byzmg->Add(brcg);
-       byzmg->Add(brg);
-
-       byzmg->SetMaximum(0.03);
-       byzmg->SetMinimum(-0.03);       
-       byzmg->Draw("lA");
-       byzmg->GetHistogram()->SetXTitle("#phi[rad]");
-       byzmg->GetHistogram()->SetYTitle("B_{r} [T]");
-       byzmg->Draw("lA");
-
-       c2->cd(3);
-       TGraph* btg  =  new TGraph(iA, phiA, btPhiA);
-       TGraph* btcg =  new TGraph(iA, phiA, btcPhiA);
-       btcg->SetLineColor(2);
-       bzzmg->Add(btcg);
-       bzzmg->Add(btg);
-       bzzmg->Draw("lA");
-       bzzmg->SetMaximum(0.03);
-       bzzmg->SetMinimum(-0.03);       
-       bzzmg->GetHistogram()->SetXTitle("#phi[rad]");
-       bzzmg->GetHistogram()->SetYTitle("B_{t} [T]");
-       bzzmg->Draw("lA");
-       
-
-       c2->cd(4);
-       TGraph* bg  =  new TGraph(iA, phiA, bbPhiA);
-       TGraph* bcg =  new TGraph(iA, phiA, bbcPhiA);
-       bcg->SetLineColor(2);
-       bbmg->Add(bg);
-       bbmg->Add(bcg);
-       bbmg->Draw("lA");
-       bbmg->GetHistogram()->SetXTitle("#phi[rad]");
-       bbmg->GetHistogram()->SetYTitle("|B| [T]");
-       bbmg->Draw("lA");
-       
-
-
-
-       char pictFile[64];
-       sprintf(pictFile, "%s.gif", runName);
-       c2->SaveAs(pictFile);
-
-       //
-       // Html generation
-       //
-       char htmlFile[64];
-       sprintf(htmlFile, "%s.html", runName);
-       FILE* chtml = fopen(htmlFile, "w");
-       MakeHtmlHeaderPict(chtml);
-       MakeHtmlPict(chtml, pictFile);
-       MakeHtmlTableEntry(fHtmlMain, fileName, htmlFile, zmin, zmax, ifiles, 0., 0);
-
-       //
-       //
-       printf("Bdl [Tm] %f %f \n", 2. * bdl, 2 * bdlc / 10.);
-    } // files
-    MakeHtmlTrailor(fHtmlMain);
-    TFile* out = new TFile("fmap.root", "recreate");
-    fMap->Write();
-    out->Close();
-}
-
-
-
-void AliFieldReader::MakeHtmlHeaderMain(FILE* file)
-{
-//
-//  Write the header of the heml output
-//
-    fprintf(file,"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
-    fprintf(file, "<html>\n");
-    fprintf(file, "<head>\n");
-    fprintf(file, "<meta http-equiv=\"content-type\"\n");
-    fprintf(file, "content=\"text/html; charset=ISO-8859-1\"\n");
-    fprintf(file, "<title>main.html</title>\n");
-    fprintf(file, "<\\head>\n");
-    fprintf(file, "<body>\n");
-    fprintf(file, "<table cellpadding=\"1\" cellspacing=\"1\" border=\"1\"\n");
-    fprintf(file, "style=\"text-align: left; width: 80;\">\n");
-    fprintf(file, "<tbody>\n");
-    fprintf(file, "<td style=\"vertical-align: top;\">File#  <br></td>\n");
-    fprintf(file, "<td style=\"vertical-align: top;\">File Name  <br></td>\n");
-    fprintf(file, "<td style=\"vertical-align: top;\">X-Position <br></td>\n");
-    fprintf(file, "<td style=\"vertical-align: top;\">Y-Position <br></td>\n");
-    fprintf(file, "<td style=\"vertical-align: top;\">Box Orientation <br></td>\n");
-    fprintf(file, "<td style=\"vertical-align: top;\">B.dl <br></td>\n");
-    fprintf(file, "<td style=\"vertical-align: top;\">Link to plots <br></td>\n");
-
-}
-
-void  AliFieldReader::MakeHtmlHeaderPict(FILE* file)
-{
-//
-//  Write header for picture
-//
-    fprintf(file,"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
-    fprintf(file, "<html>\n");
-    fprintf(file, "<head>\n");
-    fprintf(file, "<meta http-equiv=\"content-type\"\n");
-    fprintf(file, "content=\"text/html; charset=ISO-8859-1\"\n");
-    fprintf(file, "<title>main.html</title>\n");
-    fprintf(file, "</head>\n");
-    fprintf(file, "<body>\n");
-}
-
-void AliFieldReader:: MakeHtmlPict(FILE* chtml, char* pictFile)
-{
-//
-//  Write html for including picture
-//
-    fprintf(chtml, "<img src=\"./%s\" alt=\"%s\" style=\"width: 1196px; height: 772px;\">\n", 
-           pictFile, pictFile);
-    
-    fprintf(chtml, "<br> <br> <br>\n");        
-    fprintf(chtml, "<a href=\"./bmap.html\">Back to main page</a><br>\n");
-    
-    fprintf(chtml, "</body>\n");
-    fprintf(chtml, "</header>\n");     
-    fclose(chtml);
-}
-
-void AliFieldReader::MakeHtmlTableEntry(FILE* htmlmain, char* fileName, char* htmlFile, Float_t x, Float_t y, Int_t i, Float_t bdl, Int_t ifile)
-{      
-    fprintf(htmlmain, "<tr>\n");
-//
-    fprintf(htmlmain, "<td style=\"vertical-align: top;\">%5d</td>\n", ifile);
-    fprintf(htmlmain, "<td style=\"vertical-align: top;\">%s</td>\n", fileName);
-
-//
-    fprintf(htmlmain, "<td style=\"vertical-align: top;\">%13.2f</td>\n",x);
-    fprintf(htmlmain, "<td style=\"vertical-align: top;\">%13.2f</td>\n",y);
-    fprintf(htmlmain, "<td style=\"vertical-align: top;\">%3d   </td>\n",i);
-    fprintf(htmlmain, "<td style=\"vertical-align: top;\">%13.3f</td>\n",bdl);
-//
-    fprintf(htmlmain, "<td style=\"vertical-align: top;\">\n");
-    fprintf(htmlmain, "<span style=\"text-decoration: underline;\"><a href=\"./%s\">gif</a></span></td>\n", htmlFile);
-    fprintf(htmlmain, "</tr>\n");
-}
-
-
-void  AliFieldReader::MakeHtmlTrailor(FILE* htmlmain)
-{
-//
-//  Write the html trailor
-//
-    fprintf(htmlmain, "</tbody>\n");
-    fprintf(htmlmain, "</table>\n");   
-    fprintf(htmlmain, "</body>\n");
-    fprintf(htmlmain, "</header>\n");  
-    fclose(htmlmain);
-}
-
-void AliFieldReader::ReadRegisterMap()
-{
-//
-//  Read the register map
-//
-    FILE* regmap = fopen("register.map", "r");
-    Int_t ireg;
-    for (ireg = 0; ireg < 200; ireg++) {
-       fRegMap[ireg][0] = -1;
-       fRegMap[ireg][1] = -1;
-       fRegMap[ireg][2] = -1;
-    }
-    for (Int_t iz = 0; iz < 2; iz++) {
-       for (Int_t iy = 2; iy >= 0; iy--) {
-           for (Int_t ix = 0; ix < 10; ix++) {
-               fscanf(regmap, "%d\n", &ireg);
-               printf("Address %5d %5d %5d %5d \n", iz, iy, ix, ireg);
-                   fRegMap[ireg][1] = iy;
-                   fRegMap[ireg][2] = iz;
-               if (iz == 1) {
-                   fRegMap[ireg][0] = ix;
-               } else {
-                   fRegMap[ireg][0] = 9 - ix;
-               }
-           } // ix
-       } // iy
-    } // iz
-    fclose(regmap);
-    printf("-> ReadRegisterMap()\n\n");
-}
-
-
-void AliFieldReader::ReadRegisterMapSolenoid()
-{
-//
-//  Read the register map
-//
-    FILE* regmap = fopen("register.map", "r");
-    Int_t ireg;
-    
-// Initialize
-    for (ireg = 0; ireg < 200; ireg++) {
-       fRegMap[ireg][0] = -1;
-       fRegMap[ireg][1] = -1;
-       fRegMap[ireg][2] = -1;
-    }
-
-// Main arm 
-    for (Int_t ir = 0; ir < 33; ir++) {
-       fscanf(regmap, "%d\n", &ireg);
-       fRegMap[ireg][0] = ir;
-       fRegMap[ireg][1] = 0;   
-    }
-// Opposite arm 
-    for (Int_t ir = 0; ir < 5; ir++) {
-       fscanf(regmap, "%d\n", &ireg);
-       fRegMap[ireg][0] = ir;
-       fRegMap[ireg][1] = 1;   
-    }
-    
-    fclose(regmap);
-    
-}
-
-
-AliFieldReader& AliFieldReader::operator=(const  AliFieldReader& rhs)
-{
-// Assignment operator
-    rhs.Copy(*this);
-    return *this;
-}
-
-
-void AliFieldReader::Copy( TObject&) const
-{
-    //
-    // Copy 
-    //
-    Fatal("Copy","Not implemented!\n");
-}
diff --git a/STRUCT/AliFieldReader.h b/STRUCT/AliFieldReader.h
deleted file mode 100644 (file)
index fffbea7..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#ifndef ALIFIELDREADER_H
-#define ALIFIELDREADER_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-/* $Id$ */
-
-///////////////////////////////////////////////////////////
-//                                                       //
-//  Class to generate the particles for the MC           //
-//  The base class is empty                              //
-//                                                       //
-///////////////////////////////////////////////////////////
-
-#include <TObject.h>
-class  AliMagFMaps;
-class  TNtuple;
-
-class AliFieldReader : public TObject
-{
-
- public:
-    AliFieldReader();
-    AliFieldReader(const AliFieldReader& reader);
-    virtual ~AliFieldReader();
-    virtual void Init();
-    virtual void ReadMap();
-    virtual void ReadMapSolenoid();
-    virtual void SetCatalogueName(char* name = "goodfiles.list") {fCatalogueName = name;}
-    virtual void SetStepSize(Float_t dz = 0.08) {fStepSize = dz;}
-    virtual void SetZStart(Float_t zstart = 1383.) {fZStart = zstart;}    
-    virtual void SetPolarity(Float_t pol = 1.) {fPolarity = pol;}
- protected:
-    void MakeHtmlHeaderMain(FILE* file);
-    void MakeHtmlHeaderPict(FILE* file);
-    void MakeHtmlPict(FILE* file, char* name);
-    void MakeHtmlTableEntry(FILE* htmlmain, char* fileName, char* htmlFile, Float_t x, Float_t y, Int_t i, Float_t bdl, Int_t ifile);
-    void MakeHtmlTrailor(FILE* file);
-    void ReadRegisterMap();
-    void ReadRegisterMapSolenoid();
-    AliFieldReader & operator=(const AliFieldReader & rhs);
-    virtual void Copy(TObject&) const;
-    
- protected:
-    AliMagFMaps* fField;           // Pointer to calculated map
-    TNtuple*     fMap;             // Pointer to measured map
-    FILE*        fCatalogue;       // Pointer to file catalogue
-    FILE*        fHtmlMain;        // Pointer to the html output file
-    Int_t        fRegMap[200][3];  // Mapping between addresses and physical location 
-    Float_t      fStepSize;        // Step size in z 
-    Float_t      fZStart;          // Starting position in z
-    Float_t      fDd;              // Distance between sensors
-    Float_t      fDz;              // Distance between sensor planes  
-    Float_t      fPolarity;        // Polarity of the field
-    char*        fCatalogueName;   // Name of the catalogue
-    ClassDef(AliFieldReader,1) 
-};
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
index 9fa4aaa..aad0504 100644 (file)
@@ -323,10 +323,10 @@ void AliSHILv3::CreateGeometry()
 
 // Outer 2 deg line
       for (Int_t i  = 1; i < 7; i++) {
-         Double_t z    = shFaSaa1->GetZ(i);
+         Double_t zp   = shFaSaa1->GetZ(i);
          Double_t r1   = shFaSaa1->GetRmin(i);  
-         Double_t r2 = 39.5/2. + z * TMath::Tan(2. * kDegRad) - 0.01;
-         shFaSaa1->DefineSection(i, z, r1, r2);
+         Double_t r2 = 39.5/2. + zp * TMath::Tan(2. * kDegRad) - 0.01;
+         shFaSaa1->DefineSection(i, zp, r1, r2);
       }
       TGeoVolume* voFaSaa1 = new TGeoVolume("YFASAA1", shFaSaa1, kMedNiWsh);
 //
@@ -651,10 +651,10 @@ void AliSHILv3::CreateGeometry()
 //
 //    Inner 1.69deg line
       for (Int_t i  = 2; i < 15; i++) {
-         Double_t z    = shSaa1M->GetZ(i);
+         Double_t zp = shSaa1M->GetZ(i);
          Double_t r2 = shSaa1M->GetRmax(i);     
-         Double_t r1 = rmin + (z - 0.9) * TMath::Tan(1.69 / 2. * kDegRad) - kSec;
-         shSaa1M->DefineSection(i, z, r1, r2);
+         Double_t r1 = rmin + (zp - 0.9) * TMath::Tan(1.69 / 2. * kDegRad) - kSec;
+         shSaa1M->DefineSection(i, zp, r1, r2);
       }
 
       TGeoVolume* voSaa1M  =  new TGeoVolume("YSAA1M", shSaa1M, kMedAir);
@@ -1093,10 +1093,10 @@ void AliSHILv3::CreateGeometry()
 // Inner 1.89/2 deg line
       Double_t zref   = dzSaa2PbCompA1 + dzSaa2PbCompA2 + dzSaa2PbCompA3;
       for (Int_t i  = 4; i < 10; i++) {
-         Double_t z    = shSaa2->GetZ(i);
+         Double_t zp = shSaa2->GetZ(i);
          Double_t r2 = shSaa2->GetRmax(i);      
-         Double_t r1 = rmin + (z -  zref) * TMath::Tan(1.89 / 2. * kDegRad) - kSec;
-         shSaa2->DefineSection(i, z, r1, r2);
+         Double_t r1 = rmin + (zp -  zref) * TMath::Tan(1.89 / 2. * kDegRad) - kSec;
+         shSaa2->DefineSection(i, zp, r1, r2);
       }
 
 //
diff --git a/STRUCT/AliSHILvF.cxx b/STRUCT/AliSHILvF.cxx
deleted file mode 100644 (file)
index 0f99321..0000000
+++ /dev/null
@@ -1,1830 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-
-/* $Id$ */
-
-//-------------------------------------------------------------------------
-// MUON shielding class
-// Version producing Fluka output
-// Author: A.Morsch
-//-------------------------------------------------------------------------
-
-#include <TVirtualMC.h>
-#include <TArrayI.h>
-
-#include "AliSHILvF.h"
-#include "AliConst.h"
-#include "AliALIFE.h"
-#include "AliLog.h"
-
-ClassImp(AliSHILvF)
-
-//_____________________________________________________________________________
-AliSHILvF::AliSHILvF():
-    fPbCone(kTRUE),
-    fWriteGeometry(kTRUE)
-{
-  //
-  // Default constructor for muon shield
-  //
-}
-//_____________________________________________________________________________
-AliSHILvF::AliSHILvF(const char *name, const char *title)
-    : AliSHIL(name,title),
-      fPbCone(kTRUE),
-      fWriteGeometry(kTRUE)
-{
-  //
-  // Standard constructor for muon shield
-  //
-  // Pb  cone not yet compatible with muon chamber inner radii
-  // Switched off by default
-}
-//_____________________________________________________________________________
-void AliSHILvF::CreateGeometry()
-{
-  //
-  // Build muon shield geometry
-  //
-  //
-  //Begin_Html
-  /*
-    <img src="picts/AliSHILvF.gif">
-  */
-  //End_Html
-  //Begin_Html
-  /*
-    <img src="picts/AliSHILvFTree.gif">
-  */
-  //End_Html
-
-    Float_t cpar[5], cpar0[5], tpar[3], par1[100], pars1[100], par2[100], par3[100], 
-       par4[24], par0[100];
-    Float_t dz, dZ;
-  
-    Int_t *idtmed = fIdtmed->GetArray()-1699;
-
-#include "ABSOSHILConst.h"
-#include "SHILConst.h"
-    
-const Float_t kDRSteel1=2.;
-
-enum {kC=1705, kAl=1708, kFe=1709, kCu=1710, kW=1711, kPb=1712,
-               kNiCuW=1720, kVacuum=1715, kAir=1714, kConcrete=1716,
-               kPolyCH2=1717, kSteel=1709, kInsulation=1713};  
-//
-// Material of the rear part of the shield
-  Int_t iHeavy=kNiCuW;
-  if (fPbCone) iHeavy=kPb;
-//
-//
-// begin Fluka
-  Int_t i=0,ifl=0;
-  Float_t posfluka[3]={0., 0., 0.};
-  Float_t zfluka[12], rfluka1[12], rfluka2[12], rfluka3[12] ;  
-  AliALIFE* flukaGeom = 0;
-  
-  if (fWriteGeometry) {
-      flukaGeom = new AliALIFE("beamshield.alife", "beamshield_vol.inp");
-  }
-  
-//
-// end Fluka  
-  
-  
-//
-// Mother volume
-//
-  Float_t dRear1=kDRear;
-  
-  Float_t zstart=kZRear-dRear1;
-  
-  par0[0]  = 0.;
-  par0[1]  = 360.;
-  par0[2]  = 28.;
-
-  Float_t dl=(kZvac12-zstart)/2.;
-  dz=zstart+dl;
-//
-// start
-  par0[3]  = -dl;
-  par0[4]  = 0.;
-  par0[5]  = zstart * TMath::Tan(kAccMin);
-// recess station 1
-  par0[6]  = -dz+kZch11;
-  par0[7]  = 0.;
-  par0[8]  = kZch11 * TMath::Tan(kAccMin);
-
-  par0[9]   = par0[6];
-  par0[10]  = 0.;
-  par0[11]  = 17.9;
-
-  par0[12]  = -dz+kZch12;
-  par0[13]  = 0.;
-  par0[14]  = 17.9;
-
-  par0[15]  = par0[12];
-  par0[16]  = 0.;
-  par0[17]  = kZch12 * TMath::Tan(kAccMin);
-// recess station 2
-  par0[18]  = -dz+kZch21;
-  par0[19]  = 0.;
-  par0[20]  = kZch21 * TMath::Tan(kAccMin);
-
-  par0[21]  = -dz+kZch21;
-  par0[22] = 0.;
-  par0[23] = 23.;
-
-  par0[24]  = -dz+kZch22;
-  par0[25] = 0.;
-  par0[26] = 23.;
-
-  par0[27]  = -dz+kZch22;
-  par0[28]  = 0.;
-  par0[29]  = kZch22 * TMath::Tan(kAccMin);
-//
-  par0[30] = -dz+kZvac6;
-  par0[31] = 0.;
-  par0[32] = kZvac6 * TMath::Tan(kAccMin);
-// end of 2 deg cone
-  par0[33] = -dz+kZConeE;
-  par0[34] = 0.;
-  par0[35] = 30.;
-
-  par0[36] = -dz+kZch31;
-  par0[37] = 0.;
-  par0[38] = 30.;
-
-  par0[39] = -dz+kZch31;
-  par0[40] = 0.;
-  par0[41] = 29.;
-
-  par0[42] = -dz+kZch32;
-  par0[43] = 0.;
-  par0[44] = 29.;
-// start of 1.6 deg cone
-  par0[45] = -dz+kZch32;
-  par0[46] = 0.;
-  par0[47] = 30.+(kZch32-kZConeE)*TMath::Tan(kThetaOpenPbO);
-// recess station 4
-  par0[48] = -dz+kZch41;
-  par0[49] = 0.;
-  par0[50] = 30.+(kZch41-kZConeE)*TMath::Tan(kThetaOpenPbO);
-
-  par0[51] = -dz+kZch41;
-  par0[52] = 0.;
-  par0[53] = 37.5;
-
-  par0[54] = -dz+kZch42;
-  par0[55] = 0.;
-  par0[56] = 37.5;
-
-  par0[57] = -dz+kZch42;
-  par0[58] = 0.;
-  par0[59] = 30.+(kZch42-kZConeE)*TMath::Tan(kThetaOpenPbO);
-
-// recess station 5
-
-  par0[60] = -dz+kZch51;
-  par0[61] = 0.;
-  par0[62] = 30.+(kZch51-kZConeE)*TMath::Tan(kThetaOpenPbO);
-
-  par0[63] = -dz+kZch51;
-  par0[64] = 0.;
-  par0[65] = 37.5;
-
-  par0[66] = -dz+kZch52;
-  par0[67] = 0.;
-  par0[68] = 37.5;
-
-  par0[69] = -dz+kZch52;
-  par0[70] = 0.;
-  par0[71] = 30.+(kZch52-kZConeE)*TMath::Tan(kThetaOpenPbO);
-
-// end of cone
-
-  par0[72] = -dz+kZvac10;
-  par0[73] = 0.;
-  par0[74] = 30.+(kZvac10-kZConeE)*TMath::Tan(kThetaOpenPbO);
-
-  par0[75] = -dz+kZvac10;
-  par0[76] = 0.;
-  par0[77] = kR42;
-
-  par0[78] = -dz+kZvac11;
-  par0[79] = 0.;
-  par0[80] = kR42;
-
-  par0[81] = -dz+kZvac11;
-  par0[82] = 0.;
-  par0[83] = kR43;
-
-  par0[84] = -dz+kZvac12;
-  par0[85] = 0.;
-  par0[86] = kR43;
-
-  gMC->Gsvolu("YMOT", "PCON", idtmed[kVacuum], par0, 87);
-  dz=zstart+dl;
-  gMC->Gspos("YMOT", 1, "ALIC", 0., 0., dz, 0, "ONLY");  
-//
-
-  dZ=-dl;
-
-//
-// First section: bellows below and behind front absorber 
-// 
-//
-  par1[0]  = 0.;
-  par1[1]  = 360.;
-  par1[2]  = 12.;
-  dl=(kZvac4-zstart)/2.;
-  
-  par1[3]  = -dl;
-  par1[4]  = kRAbs+(zstart-kZOpen) * TMath::Tan(kThetaOpen1);
-  par1[5]  = zstart * TMath::Tan(kAccMin);
-
-  par1[6]  = -dl+kZvac1-zstart;
-  par1[7]  = kRAbs+ (kZvac1-kZOpen) * TMath::Tan(kThetaOpen1);
-  par1[8]  = kZvac1 * TMath::Tan(kAccMin);
-
-  par1[9]  = par1[6]+kDr11/2.;
-  par1[10] = par1[7]+kDr11;
-  par1[11] = (kZvac1+kDr11/2.) * TMath::Tan(kAccMin);
-
-  par1[12] = -dl+dRear1;
-  par1[13] = par1[10];
-  par1[14] = kZRear * TMath::Tan(kAccMin);
-
-  par1[15] = -dl+dRear1;
-  par1[16] = par1[10];
-  par1[17] = kR11;
-
-  par1[18] = -dl+(kZvac1+kDr11+kDB1-zstart);
-  par1[19] = par1[16];
-  par1[20] = kR11;
-
-  par1[21] = par1[18]+kDr12;
-  par1[22] = par1[19]+kDr12;
-  par1[23] = kR11;
-
-  par1[24] = par1[21]+kDF1;
-  par1[25] = par1[22];
-  par1[26] = kR11;
-
-  par1[27] = par1[24]+kDr12;
-  par1[28] = par1[25]-kDr12; 
-  par1[29] = kR11;
-
-  par1[30] = par1[27]+kDB1;
-  par1[31] = par1[28];
-  par1[32] = kR11;
-
-  par1[33] = par1[30]+kDr13;
-  par1[34] = par1[31]-kDr13;
-  par1[35] = kR11;
-
-  par1[36] = -dl+kZvac4-zstart;
-  par1[37] = par1[34];
-  par1[38] = kR11;
-
-  Float_t r2  = par1[37];
-  Float_t rBox= par1[31]-0.1;
-  Float_t rc1 = par1[7];
-
-  gMC->Gsvolu("YGO1", "PCON", idtmed[kNiCuW], par1, 39);
-
-//
-// begin Fluka
-  Float_t rfluka0[8]={rBox,rBox,rBox,rBox,rBox,rBox,rBox,rBox};
-  if (fWriteGeometry) {
-      for (ifl=0; ifl<12; ifl++) {
-         zfluka[ifl]=par1[3+3*ifl]+dl+kZRear-kDRear;
-         rfluka1[ifl] = par1[4+3*ifl];
-         rfluka2[ifl] = par1[5+3*ifl]; 
-         if (ifl > 3)  rfluka2[ifl]=rfluka2[ifl]-kDRSteel1;
-      }
-       flukaGeom->Comment("1st part: Shield");
-// Use default for first three cones
-      flukaGeom->SetDefaultVolume("*ACR02");
-      rfluka2[0]=rfluka2[1]=rfluka2[2]=-1;
-//
-      flukaGeom->Comment("Shield");         
-      flukaGeom->PolyCone(rfluka1,    rfluka2,   zfluka,   12, posfluka, "NIW", "MF", "$SHS");
-      flukaGeom->Comment("Vacuum");
-      flukaGeom->PolyCone(rfluka0,  rfluka1+2, zfluka+2,   8, posfluka, "VACUUM", "MF", "$SHS");
-  }
-  
-//
-// end Fluka
-  
-  
-  for (i=0; i<39; i++)  {
-      pars1[i]  = par1[i];
-  }
-  
-  for (i=4; i<38; i+=3) pars1[i]  = 0.;
-
-  gMC->Gsvolu("YMO1", "PCON", idtmed[kVacuum+40], pars1, 39);
-  gMC->Gspos("YGO1", 1, "YMO1", 0., 0., 0., 0, "ONLY");  
-  dZ+=dl;
-  gMC->Gspos("YMO1", 1, "YMOT", 0., 0., dZ, 0, "ONLY");  
-  dZ+=dl;
-
-//
-// Steel envelope
-  tpar[0]=kR11-kDRSteel2;
-  tpar[1]=kR11;
-  tpar[2]=(kZvac4-kZvac3)/2.;
-  gMC->Gsvolu("YSE1", "TUBE", idtmed[kNiCuW], tpar, 3);
-  dz=dl-tpar[2];
-  gMC->Gspos("YSE1", 1, "YGO1", 0., 0., dz, 0, "ONLY");
-
-
-// begin Fluka
-  if (fWriteGeometry) {
-      flukaGeom->Comment("1st part: Steel Envelope");
-      flukaGeom->Cylinder(tpar[0], tpar[1], kZRear, kZvac4, posfluka, "NIW", "MF", "$SHS");
-  }
-  
-//
-// end Fluka
-
-//
-// 1st section: vacuum system
-//
-//
-// Bellow 1
-//
-  tpar[0]=kRB1;
-  tpar[1]=kRB1+kHB1;
-  tpar[2]=kEB1/2.;
-  gMC->Gsvolu("YB11", "TUBE", idtmed[kSteel+40], tpar, 3);
-  Float_t dl1=tpar[2];
-  
-  tpar[0]=kRB1+kHB1-kEB1;
-  tpar[1]=kRB1+kHB1;
-  tpar[2]=(kLB1/2.-2.*kEB1)/2.;
-  gMC->Gsvolu("YB12", "TUBE", idtmed[kSteel+40], tpar, 3);
-  Float_t dl2=tpar[2];
-
-  tpar[0]=kRB1-kEB1;
-  tpar[1]=kRB1;
-  tpar[2]=kLB1/8.;
-  gMC->Gsvolu("YB13", "TUBE", idtmed[kSteel+40], tpar, 3);
-  Float_t dl3=tpar[2];
-
-
-  tpar[0]=0;
-  tpar[1]=kRB1+kHB1;
-  tpar[2]=-kLB1/2.;
-  gMC->Gsvolu("YBU1", "TUBE", idtmed[kVacuum+40], tpar, 3);
-
-  dz=-kLB1/2.+dl3;
-  gMC->Gspos("YB13", 1, "YBU1", 0., 0., dz, 0, "ONLY"); 
-  dz+=dl3;
-  dz+=dl1;  
-  gMC->Gspos("YB11", 1, "YBU1", 0., 0., dz, 0, "ONLY"); 
-  dz+=dl1;  
-  dz+=dl2;  
-  gMC->Gspos("YB12", 1, "YBU1", 0., 0., dz, 0, "ONLY"); 
-  dz+=dl2;  
-  dz+=dl1;
-  gMC->Gspos("YB11", 2, "YBU1", 0., 0., dz, 0, "ONLY"); 
-  dz+=dl1;
-  dz+=dl3;
-  gMC->Gspos("YB13", 2, "YBU1", 0., 0., dz, 0, "ONLY"); 
-  
-
-  tpar[0]=0;
-  tpar[1]=kRB1+kHB1+0.5;
-  tpar[2]=12.*kLB1/2.;
-  gMC->Gsvolu("YBM1", "TUBE", idtmed[kVacuum+40], tpar, 3);
-  gMC->Gsdvn("YB1S", "YBM1", 12 , 3);
-
-  Float_t bsize = tpar[2];
-  tpar[0]=kRB1+kHB1;
-  tpar[2]=-kLB1/2.;
-  gMC->Gsvolu("YBI1", "TUBE", idtmed[kInsulation+40], tpar, 3);
-
-  gMC->Gspos("YBI1", 1, "YB1S", 0., 0., 0., 0, "ONLY"); 
-  gMC->Gspos("YBU1", 1, "YB1S", 0., 0., 0., 0, "ONLY"); 
-
-  dz=-dl+(kZvac1-zstart)+kDr11/2.+bsize;
-  gMC->Gspos("YBM1", 1, "YMO1", 0., 0., dz, 0, "ONLY"); 
-
-//  dz=dl-kDr13-(kZvac4-kZvac3)-bsize;
-//  gMC->Gspos("YBM1", 2, "YMO1", 0., 0., dz, 0, "ONLY"); 
-
-
-//
-// Flange
-
-  tpar[0]=0;
-  tpar[1]=kRF1+0.6;
-  tpar[2]=kDF1/2.;
-  gMC->Gsvolu("YFM1", "TUBE", idtmed[kVacuum+40], tpar, 3);
-// Steel
-  tpar[0]=kRB1;
-  tpar[1]=kRF1+0.6;
-  tpar[2]=kDF1/2.;
-  gMC->Gsvolu("YF11", "TUBE", idtmed[kSteel+40], tpar, 3);
-// Insulation
-  tpar[0]=kRF1;
-  tpar[1]=kRF1+0.5;
-  tpar[2]=kDF1/2.;
-  gMC->Gsvolu("YF12", "TUBE", idtmed[kInsulation+40], tpar, 3);
-
-
-  gMC->Gspos("YF11", 1, "YFM1", 0., 0., 0., 0, "ONLY"); 
-  gMC->Gspos("YF12", 1, "YFM1", 0., 0., 0., 0, "ONLY"); 
-
-  dz=-dl+(kZvac1-zstart)+kDr11/2.+2.*bsize+kDF1/2.+3.;
-  gMC->Gspos("YFM1", 2, "YMO1", 0., 0., dz, 0, "ONLY"); 
-
-//
-// pipe between flange and bellows
-//
-// Steel 
-  tpar[0]=kRB1-dTubeS;
-  tpar[1]=kRB1+0.6;
-  tpar[2]=1.5;
-  gMC->Gsvolu("YPF1", "TUBE", idtmed[kSteel+40], tpar, 3);
-// Insulation
-  tpar[0]=kRB1;
-  tpar[1]=kRB1+0.5;
-  gMC->Gsvolu("YPS1", "TUBE", idtmed[kInsulation+40], tpar, 3);
-  gMC->Gspos("YPS1", 1, "YPF1", 0., 0., 0., 0, "ONLY"); 
-
-  dz=dz-1.5-kDF1/2.;
-  gMC->Gspos("YPF1", 1, "YMO1", 0., 0., dz, 0, "ONLY"); 
-  dz=dz+3.0+kDF1;
-  gMC->Gspos("YPF1", 2, "YMO1", 0., 0., dz, 0, "ONLY"); 
-
-//
-// begin Fluka
-  Float_t z1, z2, zcy1, zcy2, zfl;
-  
-  if (fWriteGeometry) {
-  flukaGeom->Comment("First Bellow");
-  z1=kZvac1+kDr11;
-  for (i=0; i<10; i++) {
-      z2=z1+kEB1;
-      flukaGeom->Cylinder(0., kRB1, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB1, kRB1+kHB1, z1, z2, posfluka, "STEEL", "MF", "$SHH");
-      
-      z1=z2;
-      z2+=kLB1/2.-kEB1;
-      flukaGeom->Cylinder(0., kRB1+kHB1-kEB1, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB1+kHB1-kEB1, kRB1+kHB1, z1, z2, posfluka, "STEEL", "MF", "$SHH");
-      z1=z2;
-      z2=z1+kEB1;
-      flukaGeom->Cylinder(0., kRB1, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB1, kRB1+kHB1, z1, z2, posfluka, "STEEL", "MF", "$SHH");
-      z1=z2;
-      z2+=kLB1/2.-kEB1;
-      flukaGeom->Cylinder(0., kRB1, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB1, kRB1+kEB1, z1, z2, posfluka, "STEEL", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB1+kEB1, kRB1+kHB1, z1, z2, posfluka, "AIR", "MF", "$SHH");
-      z1=z2;
-   }
-  flukaGeom->Cylinder(kRB1+kHB1, kRB1+kHB1+0.5, kZvac1+kDr11, z1, posfluka, "AIR", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB1+kHB1+0.5, rBox, kZvac1+kDr11, z1, posfluka, "AIR", "MF", "$SHH");
-  zcy1=z1;
-  
-
-  flukaGeom->Comment("Second Bellow");
-  z1=kZvac3-kDr13;
-  for (i=0; i<10; i++) {
-      z2=z1-kEB1;
-      flukaGeom->Cylinder(0., kRB1, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB1, kRB1+kHB1, z2, z1, posfluka, "STEEL", "MF", "$SHH");
-      z1=z2;
-      z2-=kLB1/2.-kEB1;
-      flukaGeom->Cylinder(0., kRB1+kHB1-kEB1, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB1+kHB1-kEB1, kRB1+kHB1, z2, z1, posfluka, "STEEL", "MF", "$SHH");
-      z1=z2;
-      z2=z1-kEB1;
-      flukaGeom->Cylinder(0., kRB1, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB1, kRB1+kHB1, z2, z1, posfluka, "STEEL", "MF", "$SHH");
-      z1=z2;
-      z2-=kLB1/2.-kEB1;
-      flukaGeom->Cylinder(0., kRB1, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB1, kRB1+kEB1, z2, z1, posfluka, "STEEL", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB1+kEB1, kRB1+kHB1, z2, z1, posfluka, "AIR", "MF", "$SHH");
-      z1=z2;
-   }
-  flukaGeom->Cylinder(kRB1+kHB1, kRB1+kHB1+0.5, z1, kZvac3-kDr13, posfluka, "AIR", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB1+kHB1+0.5, rBox,    z1, kZvac3-kDr13, posfluka, "AIR", "MF", "$SHH");
-
-  zcy2=z1;
-  flukaGeom->Comment("Flange");
-  zfl=(zcy1+zcy2)/2.;
-
-  z1=zfl-kDF1/2.;
-  z2=zfl+kDF1/2.;  
-  flukaGeom->Cylinder(0.,kRF1-2.        , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-  flukaGeom->Cylinder(kRF1-2., kRF1      , z1, z2, posfluka, "STEEL", "MF", "$SHH");
-  flukaGeom->Cylinder(kRF1, kRF1+0.05     , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  flukaGeom->Cylinder(kRF1+0.05, rBox    , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  z2=z1;
-  z1=z2-kDFlange;
-  flukaGeom->Cylinder(0.,kRB1           , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB1, kRF1         , z1, z2, posfluka, "STEEL", "MF", "$SHH");
-  flukaGeom->Cylinder(kRF1, kRF1+0.5     , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  flukaGeom->Cylinder(kRF1+0.5, rBox    , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  z2=z1;
-  z1=zcy1;
-  flukaGeom->Cylinder(0.,kRB1           , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB1, kRB1+0.1     , z1, z2, posfluka, "STEEL", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB1+0.1, kRB1+0.6 , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB1+0.6, rBox    , z1, z2, posfluka, "AIR", "MF", "$SHH");
-
-  z1=zfl+kDF1/2.;
-  z2=z1+kDFlange;
-  flukaGeom->Cylinder(0.,kRB1           , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB1, kRF1         , z1, z2, posfluka, "STEEL", "MF", "$SHH");
-  flukaGeom->Cylinder(kRF1, kRF1+0.5     , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  flukaGeom->Cylinder(kRF1+0.5, rBox    , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  z1=z2;
-  z2=zcy2;
-  flukaGeom->Cylinder(0.,kRB1           , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB1, kRB1+0.1     , z1, z2, posfluka, "STEEL", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB1+0.1, kRB1+0.6 , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB1+0.6, rBox    , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  }
-// end Fluka
-//
-
-// Pipe+Heating     1.5 mm 
-// Heating Jacket   5.0 mm
-// Protection       1.0 mm
-// ========================
-//                  7.5 mm
-// pipe and heating jackets outside bellows
-//
-// left side
-  cpar0[0]=(kZvac1+kDr11/2.-zstart)/2;
-  cpar0[1]=kRVacu-0.05  +(zstart-kZOpen)*TMath::Tan(kThetaOpen1);
-  cpar0[2]=kRVacu+0.7   +(zstart-kZOpen)*TMath::Tan(kThetaOpen1);
-  cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(kThetaOpen1);
-  cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(kThetaOpen1);
-  gMC->Gsvolu("YV11", "CONE", idtmed[kSteel+40], cpar0, 5);
-//
-// insulation
-  dTubeS=0.15;
-  cpar[0]=cpar0[0];
-  cpar[1]=cpar0[1]+0.15;
-  cpar[2]=cpar0[1]+0.65;
-  cpar[3]=cpar0[3]+0.15;
-  cpar[4]=cpar0[3]+0.65;
-  gMC->Gsvolu("YI11", "CONE", idtmed[kInsulation+40], cpar, 5);
-  gMC->Gspos("YI11", 1, "YV11", 0., 0., 0., 0, "ONLY"); 
-  dz=-dl+cpar0[0];
-  gMC->Gspos("YV11", 1, "YMO1", 0., 0., dz, 0, "ONLY"); 
-
-// begin Fluka
-//
-  Float_t rf1[10], rf2[10];
-  const char* materialsA[7] 
-      = {"VACUUM", "STEEL", "PIPEINSU", "STEEL", "AIR", "AIR"};
-  const char* fieldsA[7] 
-      = {"MF", "MF", "MF", "MF", "MF", "MF"};
-  const char* cutsA[7] 
-      = {"$SHH","$SHH","$SHH","$SHH","$SHH","$SHH","$SHH"};
-  
-  if (fWriteGeometry) {
-  rf1[0]=0.; rf2[0]=0.;
-  rf1[1] = cpar0[1];
-  rf2[1] = cpar0[3];
-
-
-  rf1[2]=rf1[1]+0.15; rf1[3]=rf1[2]+0.5; rf1[4]=rf1[3]+0.1;
-  rf1[5]=par1[4]; 
-  rf2[2]=rf2[1]+0.15; rf2[3]=rf2[2]+0.5; rf2[4]=rf2[3]+0.1; 
-  rf2[5]=par1[7];
-  
-
-  flukaGeom->Comment("1st part: Beam pipe lateral struture (left)");
-  flukaGeom->OnionCone(rf1, rf2,  6 , zstart, kZvac1, posfluka, materialsA, fieldsA, cutsA);
-  for (i=0; i<6; i++) rf1[i]=rf2[i];
-  for (i=1; i<6; i++) rf2[i]=rf1[i]+kDr11*TMath::Tan(kThetaOpen1);
-  flukaGeom->OnionCone(rf1, rf2,  6 , kZvac1, kZvac1+kDr11, posfluka, materialsA, fieldsA, cutsA);
-  flukaGeom->Cone(rc1, rf2[5], rc1, rc1+kDr11, kZvac1 , kZvac1+kDr11, posfluka,"AIR", "MF", "$SHH");
-  }
-  
-//
-// end Fluka
-
-
-// right side
-  dTubeS  = 0.35;
-  dVacuS += 0.25;
-  
-  cpar0[0] = (kZvac4-kZvac3)/2;
-  cpar0[1] = kRB1;
-  cpar0[2] = cpar0[1]+dVacuS;
-  cpar0[3] = cpar0[1]+2.*cpar0[0]*TMath::Tan(kThetaOpenB);
-  cpar0[4] = cpar0[2]+2.*cpar0[0]*TMath::Tan(kThetaOpenB);
-  gMC->Gsvolu("YV12", "CONE", idtmed[kSteel], cpar0, 5);
-  Float_t r2V=cpar0[3];
-//
-// insulation
-  cpar[0] = cpar0[0];
-  cpar[1] = cpar0[1]+dTubeS;
-  cpar[2] = cpar0[1]+dTubeS+kDInsuS;
-  cpar[3] = cpar0[3]+dTubeS;
-  cpar[4] = cpar0[3]+dTubeS+kDInsuS;
-  gMC->Gsvolu("YI12", "CONE", idtmed[kInsulation], cpar, 5);
-  gMC->Gspos("YI12", 1, "YV12", 0., 0., 0., 0, "ONLY"); 
-
-  dz=dl-cpar0[0];
-  gMC->Gspos("YV12", 1, "YMO1", 0., 0., dz, 0, "ONLY"); 
-
-//
-// begin Fluka
-  const char* materialsB[5] 
-      = {"VACUUM", "STEEL", "PIPEINSU", "STEEL", "AIR"};
-  
-  const char* fieldsB[5] 
-      = {"MF", "MF", "MF", "MF", "MF"};
-  const char* cutsB[5] 
-      = {"$SHH","$SHH","$SHH","$SHH","$SHH"};
-     
-  if (fWriteGeometry) {
-  rf1[0]=rf2[0]=0.;
-  rf1[1]=cpar0[1]; 
-  rf2[1]=cpar0[3];
-
-  rf1[2]=rf1[1]+dTubeS; rf1[3]=rf1[2]+kDInsuS; rf1[4]=rf1[3]+kDEnveS;
-  rf1[5]=r2;
-  
-  rf2[2]=rf2[1]+dTubeS; rf2[3]=rf2[2]+kDInsuS; rf2[4]=rf2[3]+kDEnveS; 
-  rf2[5]=r2;
-  flukaGeom->Comment("1st part: Beam pipe lateral structure (right)");
-  flukaGeom->OnionCone(rf1, rf2,  6 , kZvac3, kZvac4, posfluka, materialsB, fieldsB, cutsB);
-  for (i=0; i<6; i++) rf2[i]=rf1[i];
-  for (i=1; i<5; i++) rf1[i]=rf2[i];
-  rf1[5]=rf2[5]+kDr13;
-  flukaGeom->OnionCone(rf1, rf2,  6 , kZvac3-kDr13, kZvac3, posfluka, materialsB, fieldsB, cutsB);
-  }
-  
-//
-// end Fluka
-
-//
-// Second Section
-// Between first and second bellow section
-//
-
-  par2[0]  = 0.;
-  par2[1]  = 360.;
-  par2[2]  = 11.;
-  dl=(kZvac7-kZvac4)/2.;
-// recess station 2
-  par2[3]  = -dl;
-  par2[4]  = r2;
-  par2[5]  = kR21;
-
-  par2[6]  = -dl+.1;
-  par2[7]  = r2;
-  par2[8]  = kR21;
-
-  par2[9]   = -dl+(kZvac6-kZvac4);
-  par2[10]  = r2+(kZvac6-kZvac4-10.) * TMath::Tan(kThetaOpen2);
-  par2[11]  = kR21;
-
-  par2[12] = -dl+(kZvac6-kZvac4);
-  par2[13] = par2[10];
-  par2[14] = kZvac6*TMath::Tan(kAccMin);
-
-// Start of Pb section
-  par2[15] = -dl+(kZPb-kZvac4);
-  par2[16] = r2+(kZPb-kZvac4-10.) * TMath::Tan(kThetaOpen2);
-  par2[17] = kZPb*TMath::Tan(kAccMin);
-//
-// end of cone following 2 deg line
-  par2[18] = -dl+(kZConeE-kZvac4);
-  par2[19] = r2+(kZConeE-kZvac4-10.) * TMath::Tan(kThetaOpen2);
-  par2[20] = 30.;
-// recess station 3
-  par2[21] = -dl+(kZch31-kZvac4);
-  par2[22] = r2+(kZch31-kZvac4-10.) * TMath::Tan(kThetaOpen2);
-  par2[23] = 30.;
-
-  par2[24] = -dl+(kZch31-kZvac4);
-  par2[25] = r2+(kZch31-kZvac4-10.) * TMath::Tan(kThetaOpen2);
-  par2[26] = 29.;
-
-  par2[27] = -dl+(kZch32-kZvac4);
-  par2[28] = r2+(kZch32-kZvac4-10.) * TMath::Tan(kThetaOpen2);
-  par2[29] = 29.;
-
-  par2[30] = -dl+(kZch32-kZvac4);
-  par2[31] = r2+(kZch32-kZvac4-10.) * TMath::Tan(kThetaOpen2);
-  par2[32] = 30.;
-
-  par2[33] = -dl+(kZvac7-kZvac4);
-  par2[34] = r2+(kZvac7-kZvac4-10.) * TMath::Tan(kThetaOpen2);
-  par2[35] = 30.;
-
-  gMC->Gsvolu("YGO2", "PCON", idtmed[kSteel+40], par2, 36);
-
-//
-// begin Fluka
-  Float_t r3V = 0.;
-  
-  if (fWriteGeometry) {
-   const char* materials1[8] 
-      = {"VACUUM", "STEEL", "PIPEINSU", "STEEL", "AIR", "NIW", "NIW", "STEEL"};
-   const char* fields1[8] 
-      = {"MF", "MF", "MF", "MF", "MF", "MF", "MF", "MF"};
-   const char* cuts1[8] 
-      = {"$SHH","$SHH","$SHH","$SHH","$SHH","$SHH","$SHH","$SHH"};
-
-  flukaGeom->Comment("2nd part: Beam shield lateral struture (0)");
-  // until end of recess 1
-  rf1[0] = 0.; rf1[1] = r2V; rf1[2] = rf1[1] + dTubeS; rf1[3] = rf1[2] + kDInsuS;
-  rf1[4] = rf1[3] + kDEnveS;  rf1[5] = r2; rf1[6] = rf1[5]+2.;
-  rf1[7] = kR11-kDRSteel1;  rf1[8] = kR21;
-
-  for (i=1; i<7; i++) rf2[i]=rf1[i]+4.*TMath::Tan(kThetaOpenB);
-  rf2[7] = rf1[7];
-  rf2[8] = rf1[8];
-  flukaGeom->OnionCone(rf1, rf2,  9 , kZvac4, kZvac4+4, posfluka, materials1, fields1, cuts1);
-
-  flukaGeom->Comment("2nd part: Beam shield lateral struture (1)");
-  // until end of recess 2
-  for (i=0; i<9; i++) rf1[i]=rf2[i];
-  rf1[7] = kR21-kDRSteel2;  rf1[8] = kR21;
-  for (i=1; i<9; i++) rf2[i]=rf1[i]+(kZvac6-kZvac4-4.)*TMath::Tan(kThetaOpenB);
-  rf2[7] = rf1[7];
-  rf2[8] = rf1[8];
-  flukaGeom->OnionCone(rf1, rf2,  9 , kZvac4+4, kZvac6, posfluka, materials1, fields1, cuts1);
-
-  flukaGeom->Comment("2nd part: Beam shield lateral struture (2)");
-  // steel recess
-  for (i=0; i<9; i++) rf1[i]=rf2[i];
-  rf1[8] = kZvac6*TMath::Tan(kAccMin);
-  rf1[7] = kR21-kDRSteel2;
-   
-  for (i=1; i<9; i++) rf2[i]=rf1[i]+4.*TMath::Tan(kThetaOpenB);
-  rf2[7] = rf1[7];
-
-  rf2[8] = -(rf1[8]+4.*TMath::Tan(kAccMin));
-  rf1[8] = -rf1[8];
-
-  flukaGeom->OnionCone(rf1, rf2, 9 , kZvac6, kZvac6+4, posfluka, materials1, fields1, cuts1);
-  rf1[8] = -rf1[8];
-  rf2[8] = -rf2[8];
-  
-  flukaGeom->Comment("2nd part: Beam shield lateral struture (3)");
-  // until start of lead section
-  for (i=0; i<9; i++) rf1[i]=rf2[i];
-  for (i=1; i<9; i++) rf2[i]=rf1[i]+(kZPb-kZvac6-4.)*TMath::Tan(kThetaOpenB);
-  rf1[7] = rf1[8] - kDRSteel2;
-  rf2[8] = rf1[8] + (kZPb-kZvac6-4.)*TMath::Tan(kAccMin);
-  rf2[7] = rf2[8] - kDRSteel2;
-
-  rf1[8]=-rf1[8];
-  rf2[8]=-rf2[8];
-  flukaGeom->OnionCone(rf1, rf2,  9 , kZvac6+4, kZPb, posfluka, materials1, fields1, cuts1);
-  rf1[8]=-rf1[8];
-  rf2[8]=-rf2[8];
-
-  flukaGeom->Comment("2nd part: Beam shield lateral struture (4)");
-  // until end of 2deg
-  materials1[5] = "LEAD";
-  materials1[6] = "LEAD";
-  for (i=0; i<9; i++) rf1[i]=rf2[i];
-  for (i=1; i<9; i++) rf2[i]=rf1[i]+(kZConeE-kZPb)*TMath::Tan(kThetaOpenB);
-  rf1[8] = -rf1[8];
-  rf2[8] = -30.;
-  rf2[7] = 26.;
-  flukaGeom->OnionCone(rf1, rf2,  9 , kZPb, kZConeE, posfluka, materials1, fields1, cuts1);
-  rf1[8]=-rf1[8];
-  rf2[8]=-rf2[8];
-
-  flukaGeom->Comment("2nd part: Beam shield lateral struture (4)");
-  // until end of this section
-  for (i=0; i<9; i++) rf1[i]=rf2[i];
-  for (i=1; i<9; i++) rf2[i]=rf1[i]+(kZvac7-kZConeE)*TMath::Tan(kThetaOpenB);
-  rf2[8] = 30;
-  rf2[7] = 26;
-  flukaGeom->OnionCone(rf1, rf2,  9 , kZConeE, kZvac7, posfluka, materials1, fields1, cuts1);
-
-  r3V = rf2[1];
-  }
-  
-// end Fluka
-
-//
-// Lead cone 
-//
-  Float_t parPb[18];
-  parPb[ 0]  = 0.;
-  parPb[ 1]  = 360.;
-  parPb[ 2]  = 5.;
-  Float_t dlPb=(kZvac7-kZPb)/2.;
-  
-  parPb[ 3]  = -dlPb;
-  parPb[ 4]  =  r2+(kZPb-kZvac4-10.) * TMath::Tan(kThetaOpen2);
-  parPb[ 5]  =  kZPb*TMath::Tan(kAccMin)-kDRSteel2;
-  
-  parPb[ 6]  = -dlPb+(kZConeE-kZPb);
-  parPb[ 7]  =  r2+(kZConeE-kZvac4-10.) * TMath::Tan(kThetaOpen2);
-  parPb[ 8]  = 26.;
-
-  parPb[ 9]  = -dlPb+(kZch32+4.-kZPb);
-  parPb[10]  =  r2+(kZch32+4.-kZvac4-10.) * TMath::Tan(kThetaOpen2);
-  parPb[11]  = 26.;
-
-  parPb[12]  = -dlPb+(kZch32+4.-kZPb);
-  parPb[13]  =  r2+(kZch32+4.-kZvac4-10.) * TMath::Tan(kThetaOpen2);
-  parPb[14]  = 30.;
-  
-  parPb[15]  = dlPb;
-  parPb[16]  =  r2+(kZvac7-kZvac4-10.) * TMath::Tan(kThetaOpen2);
-  parPb[17]  = 30.;
-
-  gMC->Gsvolu("YXO2", "PCON", idtmed[kPb], parPb, 18);   
-  gMC->Gspos("YXO2", 1, "YGO2", 0., 0., (kZPb-kZvac4)/2., 0, "ONLY");  
-
-//
-// W cone 
-//
-  Float_t parW[15];
-  parW[0]  = 0.;
-  parW[1]  = 360.;
-  parW[2]  = 4.;
-  Float_t dlW=(kZPb-kZvac4)/2.;
-  
-  parW[3]   = -dlW;
-  parW[4]   =  r2;
-  parW[5]   =  kR21-kDRSteel2;
-  
-  parW[6]   = -dlW+(kZvac6-kZvac4)+kDRSteel2;
-  parW[7]   =  r2+(kZvac6-kZvac4+kDRSteel2) * TMath::Tan(kThetaOpen2);
-  parW[8]   =  kR21-kDRSteel2;
-  parW[9]   = -dlW+(kZvac6-kZvac4)+kDRSteel2;
-  parW[10]  =  r2+(kZvac6-kZvac4+kDRSteel2) * TMath::Tan(kThetaOpen2);
-  parW[11]  =  (kZvac6+kDRSteel2)*TMath::Tan(kAccMin)-kDRSteel2;
-  parW[12]   = dlW;
-  parW[13]  =  r2+(kZPb-kZvac4) * TMath::Tan(kThetaOpen2);
-  parW[14]  = kZPb*TMath::Tan(kAccMin)-kDRSteel2;
-
-  gMC->Gsvolu("YYO2", "PCON", idtmed[kNiCuW], parW, 15);         
-  gMC->Gspos("YYO2", 1, "YGO2", 0., 0., -(kZvac7-kZPb)/2., 0, "ONLY");  
-
-  for (i=4; i<35; i+=3) par2[i]  = 0;
-          
-  gMC->Gsvolu("YMO2", "PCON", idtmed[kVacuum+40], par2, 36);
-  gMC->Gspos("YGO2", 1, "YMO2", 0., 0., 0., 0, "ONLY");  
-  dZ+=dl;
-  gMC->Gspos("YMO2", 1, "YMOT", 0., 0., dZ, 0, "ONLY");  
-  dZ+=dl;
-//
-//
-// 2nd section: vacuum system 
-//
-  cpar0[0]=(kZvac7-kZvac4)/2;
-  cpar0[1]=r2V;
-  cpar0[2]=r2V+dVacuS;
-  cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(kThetaOpenB);
-  cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(kThetaOpenB);
-  gMC->Gsvolu("YV21", "CONE", idtmed[kSteel+40], cpar0, 5);
-//
-// insulation
-  cpar[0]=cpar0[0];
-  cpar[1]=cpar0[1]+dTubeS;
-  cpar[2]=cpar0[1]+dTubeS+kDInsuS;
-  cpar[3]=cpar0[3]+dTubeS;
-  cpar[4]=cpar0[3]+dTubeS+kDInsuS;
-  gMC->Gsvolu("YI21", "CONE", idtmed[kInsulation+40], cpar, 5);
-  gMC->Gspos("YI21", 1, "YV21", 0., 0., 0., 0, "ONLY"); 
-  gMC->Gspos("YV21", 1, "YMO2", 0., 0., 0., 0, "ONLY"); 
-
-//
-// Third Section: Bellows and Flange 
-//
-  par3[0]  = 0.;
-  par3[1]  = 360.;
-  par3[2]  = 8.;
-  dl=(kZvac9-kZvac7)/2.;
-  
-  par3[3]  = -dl;
-  par3[4]  = r2+(kZvac7-kZvac3) * TMath::Tan(kThetaOpen2);
-  par3[5]  = 30.;
-
-  par3[6]  = -dl+kDr21;
-  par3[7]  = par3[4]+kDr21;
-  par3[8]  = 30.;
-
-  par3[9]  = par3[6]+kDB2;
-  par3[10] = par3[7];
-  par3[11] = 30.;
-
-  par3[12] = par3[9]+kDr22;
-  par3[13] = par3[10]+kDr22;
-  par3[14] = 30.;
-
-  par3[15] = par3[12]+kDF2;
-  par3[16] = par3[13];
-  par3[17] = 30.;
-
-  par3[18] = par3[15]+kDr22;
-  par3[19] = par3[16]-kDr22;
-  par3[20] = 30.;
-
-  par3[21] = par3[18]+kDB2;
-  par3[22] = par3[19];
-  par3[23] = 30.;
-
-  par3[24] = par3[21]+kDr23;
-  par3[25] = par3[22];
-  par3[26] = 30.;
-//
-  rBox=par3[22]-0.1;
-  Float_t r3=par3[25];
-  
-  gMC->Gsvolu("YGO3", "PCON", idtmed[iHeavy+40], par3, 27);
-
-// begin Fluka
- if (fWriteGeometry) {
-  Float_t rfvacu0[15];
-  for (ifl=0; ifl<8; ifl++) {
-      zfluka[ifl]=par3[3+3*ifl]+dl+kZvac7;
-      rfluka1[ifl] = par3[4+3*ifl];
-      rfluka2[ifl] = par3[5+3*ifl]-4.; 
-      rfluka3[ifl] = par3[5+3*ifl]; 
-      rfvacu0[ifl] = 0.;
-  }
-  for (i=0; i<8; i++) rfluka0[i]=rBox;
-  rfluka0[0]=0.; rfluka0[7]=0.;
-
-  flukaGeom->Comment("3rd part: Shield");
-  flukaGeom->PolyCone(rfluka1, rfluka2,  zfluka, 8, posfluka, "LEAD", "MF", "$SHS");
-  flukaGeom->Comment("3rd part: Steel envelope");
-  flukaGeom->PolyCone(rfluka2, rfluka3, zfluka, 8, posfluka, "STEEL", "MF", "$SHS");
-  flukaGeom->Comment("3rd part: Vacuum");
-  flukaGeom->PolyCone(rfluka0+1, rfluka1+1, zfluka+1, 6, posfluka, "AIR", "MF", "$SHH");
-
-  flukaGeom->Comment("3rd part: Beam Pipe (left)");
-  
-  rf1[0]=0.; rf2[0]=0.;
-  rf1[1] = r3V;
-  rf2[1] = rf1[1]+kDr21*TMath::Tan(kThetaOpenB);
-  rf1[2] = rf1[1]+dTubeS; rf1[3]=rf1[2]+kDInsuS; rf1[4]=rf1[3]+kDEnveS;
-  rf1[5] = par3[4];
-  rf2[2] = rf2[1]+dTubeS; rf2[3]=rf2[2]+kDInsuS; rf2[4]=rf2[3]+kDEnveS; 
-  rf2[5] = rf1[5]+kDr21;
-  flukaGeom->OnionCone(rf1, rf2,  6 , kZvac7, kZvac7+kDr21, posfluka, materialsB, fieldsB, cutsB);
-  
-  
-  flukaGeom->Comment("3rd part: Beam Pipe (right)");
-  
-  rf1[0] = 0.;
-  rf1[1] = rf2[1];
-  rf1[2] = rf1[1]+dTubeS; rf1[3]=rf1[2]+kDInsuS; rf1[4]=rf1[3]+kDEnveS;
-  rf1[5] = par3[25]; 
-  flukaGeom->OnionCylinder(rf1,  6 , kZvac9-kDr23, kZvac9, posfluka, materialsA, fieldsA, cutsA);
-
-//
-  flukaGeom->Comment("First Bellow");
-  z1=kZvac7+kDr21;
-  
-  for (i=0; i<7; i++) {
-      z2=z1+kEB2;
-      flukaGeom->Cylinder(0., kRB2, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB2, kRB2+kHB2, z1, z2, posfluka, "STEEL", "MF", "$SHH");
-      
-      z1=z2;
-      z2+=kLB2/2.-kEB2;
-      flukaGeom->Cylinder(0., kRB2+kHB2-kEB2, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB2+kHB2-kEB2, kRB2+kHB2, z1, z2, posfluka, "STEEL", "MF", "$SHH");
-      z1=z2;
-      z2=z1+kEB2;
-      flukaGeom->Cylinder(0., kRB2, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB2, kRB2+kHB2, z1, z2, posfluka, "STEEL", "MF", "$SHH");
-      z1=z2;
-      z2+=kLB2/2.-kEB2;
-      flukaGeom->Cylinder(0., kRB2, z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB2, kRB2+kEB2, z1, z2, posfluka, "STEEL", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB2+kEB2, kRB2+kHB2, z1, z2, posfluka, "AIR", "MF", "$SHH");
-      z1=z2;
-   }
-  flukaGeom->Cylinder(kRB2+kHB2, kRB2+kHB2+0.2, kZvac7+kDr21, z1, posfluka, "AIR", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB2+kHB2+0.2, rBox, kZvac7+kDr21, z1, posfluka, "AIR", "MF", "$SHH");
-  zcy1=z1;
-  
-
-  flukaGeom->Comment("Second Bellow");
-  z1=kZvac9-kDr23;
-  for (i=0; i<7; i++) {
-      z2=z1-kEB2;
-      flukaGeom->Cylinder(0., kRB2, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB2, kRB2+kHB2, z2, z1, posfluka, "STEEL", "MF", "$SHH");
-      z1=z2;
-      z2-=kLB2/2.-kEB2;
-      flukaGeom->Cylinder(0., kRB2+kHB2-kEB2, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB2+kHB2-kEB2, kRB2+kHB2, z2, z1, posfluka, "STEEL", "MF", "$SHH");
-      z1=z2;
-      z2=z1-kEB2;
-      flukaGeom->Cylinder(0., kRB2, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB2, kRB2+kHB2, z2, z1, posfluka, "STEEL", "MF", "$SHH");
-      z1=z2;
-      z2-=kLB2/2.-kEB2;
-      flukaGeom->Cylinder(0., kRB2, z2, z1, posfluka, "VACUUM", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB2, kRB2+kEB2, z2, z1, posfluka, "STEEL", "MF", "$SHH");
-      flukaGeom->Cylinder(kRB2+kEB2, kRB2+kHB2, z2, z1, posfluka, "AIR", "MF", "$SHH");
-      z1=z2;
-   }
-  flukaGeom->Cylinder(kRB2+kHB2, kRB2+kHB2+0.2, z1, kZvac9-kDr23, posfluka, "AIR", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB2+kHB2+0.2, rBox,    z1, kZvac9-kDr23, posfluka, "AIR", "MF", "$SHH");
-
-  zcy2=z1;
-  flukaGeom->Comment("Flange");
-  zfl=(zcy1+zcy2)/2.;
-
-  z1=zfl-kDF2/2.;
-  z2=zfl+kDF2/2.;  
-  flukaGeom->Cylinder(0.,kRF2-2.,   z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-  flukaGeom->Cylinder(kRF2-2., kRF2, z1, z2, posfluka, "STEEL", "MF", "$SHH");
-  flukaGeom->Cylinder(kRF2, kRF2+0.02     , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  flukaGeom->Cylinder(kRF2+0.02, rBox    , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  z2=z1;
-  z1=z2-kDFlange;
-  flukaGeom->Cylinder(0.,kRB2           , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB2, kRF2         , z1, z2, posfluka, "STEEL", "MF", "$SHH");
-  flukaGeom->Cylinder(kRF2, kRF2+0.2     , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  flukaGeom->Cylinder(kRF2+0.2, rBox    , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  z2=z1;
-  z1=zcy1;
-  flukaGeom->Cylinder(0.,kRB2           , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB2, kRB2+0.1     , z1, z2, posfluka, "STEEL", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB2+0.1, kRB2+0.2 , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB2+0.2, rBox    , z1, z2, posfluka, "AIR", "MF", "$SHH");
-
-  z1=zfl+kDF2/2.;
-  z2=z1+kDFlange;
-  flukaGeom->Cylinder(0.,kRB2           , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB2, kRF2         , z1, z2, posfluka, "STEEL", "MF", "$SHH");
-  flukaGeom->Cylinder(kRF2, kRF2+0.2     , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  flukaGeom->Cylinder(kRF2+0.2, rBox    , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  z1=z2;
-  z2=zcy2;
-  flukaGeom->Cylinder(0.,kRB2           , z1, z2, posfluka, "VACUUM", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB2, kRB2+0.1     , z1, z2, posfluka, "STEEL", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB2+0.1, kRB2+0.2 , z1, z2, posfluka, "AIR", "MF", "$SHH");
-  flukaGeom->Cylinder(kRB2+0.2, rBox    , z1, z2, posfluka, "AIR", "MF", "$SHH");
- }
-//
-// end Fluka
-  for (i=4; i<26; i+=3) par3[i]  = 0;
-
-  gMC->Gsvolu("YMO3", "PCON", idtmed[kVacuum+40], par3, 27);
-  gMC->Gspos("YGO3", 1, "YMO3", 0., 0., 0., 0, "ONLY");  
-
-//
-// Steel envelope
-//  tpar[0]=26;
-//  tpar[1]=30;
-//  tpar[2]=dl;
-//  gMC->Gsvolu("YS31", "TUBE", idtmed[kSteel], tpar, 3);
-//  gMC->Gspos("YS31", 1, "YGO3", 0., 0., 0., 0, "ONLY");  
-  dZ+=dl;
-  gMC->Gspos("YMO3", 1, "YMOT", 0., 0., dZ, 0, "ONLY");  
-  dZ+=dl;
-
-//
-// 3rd section: vacuum system
-//
-//
-// Bellow2
-//
-  Float_t eps = 0.;
-  Float_t kLB2S = kLB2-eps;
-  
-  tpar[0]=kRB2;
-  tpar[1]=kRB2+kHB2;
-  tpar[2]=kEB2/2.;
-  gMC->Gsvolu("YB21", "TUBE", idtmed[kSteel+40], tpar, 3);
-  dl1=tpar[2];
-  
-  tpar[0]=kRB2+kHB2-kEB2;
-  tpar[1]=kRB2+kHB2;
-  tpar[2]=(kLB2S/2.-2.*kEB2)/2.;
-  gMC->Gsvolu("YB22", "TUBE", idtmed[kSteel+40], tpar, 3);
-  dl2=tpar[2];
-
-  tpar[0]=kRB2-kEB2;
-  tpar[1]=kRB2;
-  tpar[2]=kLB2S/8.;
-  gMC->Gsvolu("YB23", "TUBE", idtmed[kSteel+40], tpar, 3);
-  dl3=tpar[2];
-
-
-  tpar[0]=0;
-  tpar[1]=kRB2+kHB2;
-  tpar[2]= - kLB2S/2.;
-  gMC->Gsvolu("YBU2", "TUBE", idtmed[kVacuum+40], tpar, 3);
-
-  tpar[0]=0;
-  tpar[1]=kRB2+kHB2;
-  tpar[2]=7.*kLB2/2.;
-
-  gMC->Gsvolu("YBM2", "TUBE", idtmed[kVacuum+40], tpar, 3);
-  gMC->Gsdvn("YBMS", "YBM2", 7, 3);
-  gMC->Gspos("YBU2", 1, "YBMS", 0., 0., 0., 0, "ONLY"); 
-
-  dz=-kLB2S/2.+dl3;
-  gMC->Gspos("YB23", 1, "YBU2", 0., 0., dz, 0, "ONLY"); 
-  dz+=dl3;
-  dz+=dl1;  
-  gMC->Gspos("YB21", 1, "YBU2", 0., 0., dz, 0, "ONLY"); 
-  dz+=dl1;  
-  dz+=dl2;  
-  gMC->Gspos("YB22", 1, "YBU2", 0., 0., dz, 0, "ONLY"); 
-  dz+=dl2;  
-  dz+=dl1;
-  gMC->Gspos("YB21", 2, "YBU2", 0., 0., dz, 0, "ONLY"); 
-  dz+=dl1;
-  dz+=dl3;
-  gMC->Gspos("YB23", 2, "YBU2", 0., 0., dz, 0, "ONLY"); 
-
-  dz=-dl+kDr21+tpar[2];
-  gMC->Gspos("YBM2", 1, "YMO3", 0., 0., dz, 0, "ONLY"); 
-
-  dz=dl-kDr23-tpar[2];
-  gMC->Gspos("YBM2", 2, "YMO3", 0., 0., dz, 0, "ONLY"); 
-
-//
-// Flange
-
-  tpar[0]=0;
-  tpar[1]=kRF2;
-  tpar[2]=kDF2/2.;
-  gMC->Gsvolu("YFM2", "TUBE", idtmed[kVacuum+40], tpar, 3);
-
-  tpar[0]=kRF2-2.;
-  tpar[1]=kRF2;
-  tpar[2]=kDF2/2.;
-  gMC->Gsvolu("YF21", "TUBE", idtmed[kSteel+40], tpar, 3);
-  gMC->Gspos("YF21", 1, "YFM2", 0., 0., 0., 0, "ONLY"); 
-
-  tpar[0]=kRB2;
-  tpar[1]=kRF2-2.;
-  tpar[2]=kDFlange/2.;
-  gMC->Gsvolu("YF22", "TUBE", idtmed[kSteel+40], tpar, 3);
-  dz=-kDF2/2.+tpar[2];
-  gMC->Gspos("YF22", 1, "YFM2", 0., 0., dz, 0, "ONLY"); 
-  dz= kDF2/2.-tpar[2];
-  gMC->Gspos("YF22", 2, "YFM2", 0., 0., dz, 0, "ONLY"); 
-
-  dz=kDr21/2.-kDr23/2.;
-  gMC->Gspos("YFM2", 2, "YMO3", 0., 0., dz, 0, "ONLY"); 
-
-
-//
-// pipe between flange and bellows
-  tpar[0]=kRB2-dTubeS;
-  tpar[1]=kRB2;
-  tpar[2]=2.*(kDB2+kDr22-7.*kLB2)/4.;
-  gMC->Gsvolu("YPF2", "TUBE", idtmed[kSteel+40], tpar, 3);
-  dz=kDr21/2.-kDr23/2.-kDF2/2.-tpar[2];
-  gMC->Gspos("YPF2", 1, "YMO3", 0., 0., dz, 0, "ONLY"); 
-  dz=kDr21/2.-kDr23/2.+kDF2/2.+tpar[2];
-  gMC->Gspos("YPF2", 2, "YMO3", 0., 0., dz, 0, "ONLY"); 
-
-  Float_t dHorZ=20.;
-  
-//
-// 4th section: rear shield and closing cone
-//
-  par4[0]  = 0.;
-  par4[1]  = 360.;
-  par4[2]  = 7.;
-  dl=(kZvac12-kZvac9)/2.;
-  
-  par4[3]  = -dl;
-  par4[4]  = r3;
-  par4[5]  = 30.;
-
-  par4[6]  = -dl+dHorZ;
-  par4[7]  = r3;
-  par4[8]  = 30.;
-
-  par4[9]  = -dl+(kZvac10-kZvac9);
-  par4[10]  = r3+(kZvac10-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
-  par4[11]  = 30.;
-
-  par4[12]  = par4[9];
-  par4[13] = par4[10];
-  par4[14] = kR42;
-
-  par4[15] = -dl+(kZvac11-kZvac9);
-  par4[16] = r3+(kZvac11-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
-  par4[17] = kR42;
-
-  par4[18] = par4[15];
-  par4[19] = par4[16];
-  par4[20] = kR43;
-
-  par4[21] = -dl+(kZvac12-kZvac9);
-  par4[22] = kRVacu+dVacuS;
-  par4[23] = kR43;
-
-  gMC->Gsvolu("YGO4", "PCON", idtmed[iHeavy+40], par4, 24);
-
-
-//  parPb[0]  = (kZvac12-kZvac10)/2.;
-//  parPb[1]  = parPb[3];
-//  parPb[2]  = 31.;
-//  parPb[3]  = parPb[1]+2.*parPb[0]*TMath::Tan(kThetaOpenPb);
-//  parPb[4]  = 31.;
-//  gMC->Gsvolu("YXO5", "CONE", idtmed[kPb], parPb, 5);
-//  gMC->Gspos("YXO5", 1, "YGO4", 0., 0., -dl+(kZvac10-kZvac9)+parPb[0], 0, "ONLY");  
-
-  for (i=4; i<23; i+=3) par4[i]  = 0;
-
-  gMC->Gsvolu("YMO4", "PCON", idtmed[kVacuum+40], par4, 24);
-  gMC->Gspos("YGO4", 1, "YMO4", 0., 0., 0., 0, "ONLY");  
-
-
-
-  dZ+=dl;
-  gMC->Gspos("YMO4", 1, "YMOT", 0., 0., dZ, 0, "ONLY");  
-  dZ+=dl;
-//
-// Closing concrete cone 
-//
-  cpar[0]=(kZvac12-kZvac11)/2.;
-  cpar[1] = r3+(kZvac11-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
-  cpar[2] = cpar[1]+0.001;
-  cpar[3] = kRVacu+dVacuS;
-  cpar[4] = cpar[2];
-  gMC->Gsvolu("YCC4", "CONE", idtmed[kConcrete+40], cpar, 5);
-  dz=dl-cpar[0];
-  gMC->Gspos("YCC4", 1, "YGO4", 0., 0., dz, 0, "ONLY");  
-
-//
-// begin Fluka
-  Float_t r10 = .0, r11 = 0.;
-  
-  if (fWriteGeometry) {
-  r10=r3+(kZvac10-kZvac9-dHorZ) * TMath::Tan(kThetaOpen3);
-  r11=cpar[1];
-
-  flukaGeom->Comment("4th part: Shield");
-  
-  flukaGeom->Cone(r3, r3, 26.0, 26.0, kZvac9,  kZvac9+dHorZ, 
-             posfluka, "LEAD", "NF", "$SHH");
-
-  flukaGeom->Cone(r3, r10, 26.0, 26.0, kZvac9+dHorZ,  kZvac10, 
-             posfluka, "LEAD", "NF", "$SHH");
-  flukaGeom->Cone(r10, r11, 30.0, 30.0, kZvac10,  kZvac11, 
-             posfluka, "LEAD", "NF", "$SHH");
-  flukaGeom->Cylinder( cpar[1], 30.0, kZvac11, kZvac12, 
-             posfluka, "LEAD", "NF", "$SHH");
-
-  flukaGeom->Comment("4th part: Steel Envelope");
-  flukaGeom->Cylinder(26.0, 30., kZvac9, kZvac10, posfluka, "STEEL", "NF", "$SHH");
-  flukaGeom->Comment("4th part: Closing Cone");
-  flukaGeom->Cone(cpar[1]-0.1, cpar[3], cpar[1], cpar[1], kZvac11, kZvac12, 
-             posfluka, "PORTLAND", "NF", "$SHH");
-  flukaGeom->Comment("4th part: VACUUM");
-  flukaGeom->Cone(0., 0., cpar[1]-0.1, cpar[3], kZvac11, kZvac12, 
-                 posfluka, "VACUUM", "NF", "$SHH");
- }
-//
-// end Fluka
-//
-// Steel envelope
-//
-  dz=-dl;
-  tpar[0]=26.;
-  tpar[1]=30.;
-  tpar[2]=(kZvac10-kZvac9)/2.;
-  gMC->Gsvolu("YS41", "TUBE", idtmed[kSteel], tpar, 3);
-  dz+=tpar[2];
-//  gMC->Gspos("YS41", 1, "YGO4", 0., 0., dz, 0, "ONLY");  
-  dz+=tpar[2];
-
-  tpar[0]=kR41-kDRSteel2;
-  tpar[1]=kR41;
-  tpar[2]=(kZvac11-kZvac10)/2.;
-  gMC->Gsvolu("YS43", "TUBE", idtmed[kPb], tpar, 3);
-  dz+=tpar[2];
-  gMC->Gspos("YS43", 1, "YGO4", 0., 0., dz, 0, "ONLY");  
-//
-// rear lead shield
-//
-  tpar[0]=kR41;
-  tpar[1]=kR42;
-  tpar[2]=(kZvac11-kZvac10)/2.;
-  gMC->Gsvolu("YPBI", "TUBE", idtmed[kPb+40], tpar, 3);
-  dz-=0;
-  gMC->Gspos("YPBI", 1, "YGO4", 0., 0., dz, 0, "ONLY"); 
-
-  tpar[0]=kR42-5;
-  tpar[1]=kR42;
-  tpar[2]=(kZvac11-kZvac10)/2.;
-  gMC->Gsvolu("YPBO", "TUBE", idtmed[kPb], tpar, 3);
-  gMC->Gspos("YPBO", 1, "YPBI", 0., 0., 0., 0, "ONLY"); 
-  
-//
-// rear Fe shield
-//
-
-  tpar[0]=31.;
-  tpar[1]=kR43;
-  tpar[2]=(kZvac12-kZvac11)/2.;
-  gMC->Gsvolu("YFEI", "TUBE", idtmed[kFe+40], tpar, 3);
-  dz=dl-tpar[2];
-  gMC->Gspos("YFEI", 1, "YGO4", 0., 0., dz, 0, "ONLY"); 
-
-  tpar[0]=31.;
-  tpar[1]=kR43;
-  tpar[2]=2.5;
-  gMC->Gsvolu("YFEO", "TUBE", idtmed[kFe], tpar, 3);
-  dz=-(kZvac12-kZvac11)/2.+tpar[2];
-  gMC->Gspos("YFEO", 1, "YFEI", 0., 0., dz, 0, "ONLY"); 
-//
-// Magnet element 
-//
-  tpar[0]=0.;
-  tpar[1]=40.;
-  tpar[2]=85.;
-  gMC->Gsvolu("YAEM", "TUBE", idtmed[kAir], tpar, 3);
-  tpar[0]=17.6/2.;
-  tpar[1]=40.;
-  tpar[2]=85.;
-  gMC->Gsvolu("YFEM", "TUBE", idtmed[kFe], tpar, 3);
-  gMC->Gspos("YFEM", 1, "YAEM", 0., 0., 0., 0, "ONLY"); 
-
-//
-  dz=1921.6 + tpar[2];
-  gMC->Gspos("YAEM", 1, "ALIC", 0., 0.,  dz, 0, "ONLY"); 
-  
-// 
-//
-// 4th section: vacuum system 
-//
-// up to closing cone
-  
-  r3V=r3-kDr23+dVacuS-1.6;
-
-  cpar0[0]=(kZvac11-kZvac9)/2;
-  cpar0[1]=r3V-dVacuS;
-  cpar0[2]=r3V;
-  cpar0[3]=cpar0[1]+2.*cpar0[0]*TMath::Tan(kThetaOpen3);
-  cpar0[4]=cpar0[2]+2.*cpar0[0]*TMath::Tan(kThetaOpen3);
-  gMC->Gsvolu("YV31", "CONE", idtmed[kSteel+40], cpar0, 5);
-//
-// insulation
-  cpar[0]=cpar0[0];
-  cpar[1]=cpar0[1]+dTubeS;
-  cpar[2]=cpar0[1]+dTubeS+kDInsuS;
-  cpar[3]=cpar0[3]+dTubeS;
-  cpar[4]=cpar0[3]+dTubeS+kDInsuS;
-  gMC->Gsvolu("YI31", "CONE", idtmed[kInsulation+40], cpar, 5);
-  gMC->Gspos("YI31", 1, "YV31", 0., 0., 0., 0, "ONLY"); 
-  dz=-dl+cpar[0];
-  gMC->Gspos("YV31", 1, "YMO4", 0., 0., dz, 0, "ONLY"); 
-
-//
-// begin Fluka
- if (fWriteGeometry) {
-  flukaGeom->Comment("4th part: Beam pipe lateral structure");
-  for (i=0; i<7; i++)  fieldsA[i] = "NF";
-
-  rf1[0]=0.;       rf2[0]=0.;
-  rf1[1]=rf2[1]; rf2[1]=rf1[1]+dHorZ*TMath::Tan(kThetaOpen3);
-  
-  rf1[2]=rf1[1]+dTubeS; rf1[3]=rf1[2]+kDInsuS; rf1[4]=rf1[3]+kDEnveS;
-  rf1[5]=r3; 
-
-  rf2[2]=rf2[1]+dTubeS; rf2[3]=rf2[2]+kDInsuS; rf2[4]=rf2[3]+kDEnveS; 
-  rf2[5]=r3;
-
-  flukaGeom->OnionCone(rf1, rf2,  6 , kZvac9 , kZvac9+dHorZ, posfluka, materialsA, fieldsA, cutsA);
-
-  rf1[0]=0.;       rf2[0]=0.;
-
-  rf1[1]=rf2[1]; rf2[1]=rf1[1]+(kZvac10-kZvac9-dHorZ)*TMath::Tan(kThetaOpen3);
-  
-  rf1[2]=rf1[1]+dTubeS; rf1[3]=rf1[2]+kDInsuS; rf1[4]=rf1[3]+kDEnveS;
-  rf1[5]=r3; 
-
-  rf2[2]=rf2[1]+dTubeS; rf2[3]=rf2[2]+kDInsuS; rf2[4]=rf2[3]+kDEnveS; 
-  rf2[5]=r10;
-
-
-  flukaGeom->OnionCone(rf1, rf2,  6 , kZvac9+dHorZ, kZvac10, posfluka, materialsA, fieldsA, cutsA);
-
-  rf1[0]=0.;       rf2[0]=0.;
-  rf1[1]=rf2[1];   rf2[1]=rf1[1]+(kZvac11-kZvac10)*TMath::Tan(kThetaOpen3);
-
-  rf1[2]=rf1[1]+dTubeS; rf1[3]=rf1[2]+kDInsuS; rf1[4]=rf1[3]+kDEnveS;
-  rf1[5]=r10; 
-  rf2[2]=rf2[1]+dTubeS; rf2[3]=rf2[2]+kDInsuS; rf2[4]=rf2[3]+kDEnveS; 
-  rf2[5]=r11;
-
-  flukaGeom->OnionCone(rf1, rf2,  6 , kZvac10, kZvac11, posfluka, materialsA, fieldsA, cutsA);
- }
-//  
-// end Fluka
-//
-// closing cone
-  cpar0[0]=(kZvac12-kZvac11)/2;
-  cpar0[1]=r3V-dVacuS+(kZvac11-kZvac9)*TMath::Tan(kThetaOpen3);
-  cpar0[2]=r3V       +(kZvac11-kZvac9)*TMath::Tan(kThetaOpen3);
-  cpar0[3]=kRVacu;
-  cpar0[4]=kRVacu+dTubeS+kDInsuS+kDProtS+kDFreeS;
-  gMC->Gsvolu("YV32", "CONE", idtmed[kSteel+40], cpar0, 5);
-//
-// insulation
-  cpar[0]=cpar0[0];
-  cpar[1]=cpar0[1]+dTubeS;
-  cpar[2]=cpar0[1]+dTubeS+kDInsuS;
-  cpar[3]=cpar0[3]+dTubeS;
-  cpar[4]=cpar0[3]+dTubeS+kDInsuS;
-  gMC->Gsvolu("YI32", "CONE", idtmed[kInsulation+40], cpar, 5);
-  gMC->Gspos("YI32", 1, "YV32", 0., 0., 0., 0, "ONLY"); 
-//
-// clearance
-//  cpar[1]=cpar0[2]-kDProtS-kDFreeS;
-//  cpar[2]=cpar0[2]-kDProtS;
-//  cpar[3]=cpar0[4]-kDProtS-kDFreeS;
-//  cpar[4]=cpar0[4]-kDProtS;
-//  gMC->Gsvolu("YP32", "CONE", idtmed[kVacuum+40], cpar, 5);
-//  gMC->Gspos("YP32", 1, "YV32", 0., 0., 0., 0, "ONLY"); 
-  dz=dl-cpar[0];
-  gMC->Gspos("YV32", 1, "YMO4", 0., 0., dz, 0, "ONLY"); 
-//
-//
-// MUON trigger wall
-//  
-  tpar[0] = 50.;
-  tpar[1] = 310.;
-  tpar[2] = (kZFilterOut - kZFilterIn) / 2.;
-  gMC->Gsvolu("YFIM", "TUBE", idtmed[kFe+40], tpar, 3);
-  dz = (kZFilterIn + kZFilterOut) / 2.;
-  tpar[2] -= 10.;
-  gMC->Gsvolu("YFII","TUBE", idtmed[kFe], tpar, 3);
-  gMC->Gspos("YFII", 1, "YFIM", 0., 0., 0., 0, "ONLY");
-  gMC->Gspos("YFIM", 1, "ALIC", 0., 0., dz, 0, "ONLY");
-//
-// Shielding close to chamber
-//
-//
-  cpar[0]=(kZch11-kZRear)/2.;
-  cpar[1]=kR11;
-  cpar[2]=kZRear*TMath::Tan(kAccMin);
-  cpar[3]=kR11;
-  cpar[4]=(kZRear+2.*cpar[0])*TMath::Tan(kAccMin);
-  gMC->Gsvolu("YCS1", "CONE", idtmed[kNiCuW], cpar, 5);
-  dz=-(kZvac12-zstart)/2.+(kZRear-zstart)+cpar[0];
-  gMC->Gspos("YCS1", 1, "YMOT", 0., 0., dz, 0, "ONLY");
-
-  cpar[0]=(kZvac4-kZch12)/2.;
-  cpar[1]=kR11;
-  cpar[2]=kZch12*TMath::Tan(kAccMin);
-  cpar[3]=kR11;
-  cpar[4]=(kZch12+2.*cpar[0])*TMath::Tan(kAccMin);
-  gMC->Gsvolu("YCS3", "CONE", idtmed[kNiCuW], cpar, 5);
-  dz=-(kZvac12-zstart)/2.+(kZch12-zstart)+cpar[0];
-  gMC->Gspos("YCS3", 1, "YMOT", 0., 0., dz, 0, "ONLY");
-
-
-// Recess station 1
-
-  cpar[0]=(kZch12-kZch11)/2.;
-  cpar[1]=kR11;
-  cpar[2]=18.;
-  cpar[3]=kR11;
-  cpar[4]=17.9;
-  gMC->Gsvolu("YCS2", "CONE", idtmed[kAir], cpar, 5);
-  dz=-(kZvac12-zstart)/2.+(kZch11-zstart)+cpar[0];
-  gMC->Gspos("YCS2", 1, "YMOT", 0., 0., dz, 0, "ONLY");
-
-  Float_t ptubs[5];
-  ptubs[0] = kR11;
-  ptubs[1] = 17.9;
-  ptubs[2] =   0.;
-// phi_min, phi_max
-  ptubs[3] =   0.;
-  ptubs[4] =  90.;  
-  gMC->Gsvolu("YCR0", "TUBS", idtmed[kNiCuW], ptubs, 0);
-  Int_t idrotm[1799];
-  
-  AliMatrix(idrotm[1701],90.,   0., 90.,  90., 0., 0.);
-  AliMatrix(idrotm[1702],90.,  90., 90., 180., 0., 0.);
-  AliMatrix(idrotm[1703],90., 180., 90., 270., 0., 0.); 
-  AliMatrix(idrotm[1704],90., 270., 90.,   0., 0., 0.); 
-  //  Int_t ipos;
-  
-  dz=-cpar[0];
-// 1.
-  ptubs[2]=6.5/2.;
-  dz+=ptubs[2];
-  gMC->Gsposp("YCR0", 1, "YCS2", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
-  gMC->Gsposp("YCR0", 2, "YCS2", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
-  dz+=ptubs[2];
-  dz+=1.5;
-// 2.
-  ptubs[2]=5.0/2.;
-  dz+=ptubs[2];
-  gMC->Gsposp("YCR0", 3, "YCS2", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
-  gMC->Gsposp("YCR0", 4, "YCS2", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
-  dz+=ptubs[2];
-  dz+=1.5;
-// 3. 
-  ptubs[2]=5.0/2.;
-  dz+=ptubs[2];
-  gMC->Gsposp("YCR0", 5, "YCS2", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
-  gMC->Gsposp("YCR0", 6, "YCS2", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
-  dz+=ptubs[2];
-  dz+=1.5;
-// 4. 
-  ptubs[2]=6.5/2.;
-  dz+=ptubs[2];
-  gMC->Gsposp("YCR0", 7, "YCS2", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
-  gMC->Gsposp("YCR0", 8, "YCS2", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
-  dz+=ptubs[2];
-  dz+=1.5;
-
-
-  
-  cpar[0]=(kZch21-kZvac4)/2.;
-  cpar[1]=kR21;
-  cpar[2]=kZvac4*TMath::Tan(kAccMin);
-  cpar[3]=kR21;
-  cpar[4]=(kZvac4+2.*cpar[0])*TMath::Tan(kAccMin);
-  gMC->Gsvolu("YCS4", "CONE", idtmed[kNiCuW], cpar, 5);
-  dz=-(kZvac12-zstart)/2.+(kZvac4-zstart)+cpar[0];
-  gMC->Gspos("YCS4", 1, "YMOT", 0., 0., dz, 0, "ONLY");
-
-  cpar[0]=(kZvac6-kZch22)/2.;
-  cpar[1]=kR21;
-  cpar[2]=kZch22*TMath::Tan(kAccMin);
-  cpar[3]=kR21;
-  cpar[4]=(kZch22+2.*cpar[0])*TMath::Tan(kAccMin);
-  gMC->Gsvolu("YCS6", "CONE", idtmed[kNiCuW], cpar, 5);
-  dz=-(kZvac12-zstart)/2.+(kZch22-zstart)+cpar[0];
-  gMC->Gspos("YCS6", 1, "YMOT", 0., 0., dz, 0, "ONLY");
-  
-// Recess station 2
-  cpar[0]=(kZch22-kZch21)/2.;
-  cpar[1]=kR21;
-  cpar[2]=23.;
-  cpar[3]=kR21;
-  cpar[4]=23.;
-  gMC->Gsvolu("YCS5", "CONE", idtmed[kAir], cpar, 5);
-  dz=-(kZvac12-zstart)/2.+(kZch21-zstart)+cpar[0];
-  gMC->Gspos("YCS5", 1, "YMOT", 0., 0., dz, 0, "ONLY");
-
-  ptubs[0] = kR21;
-  ptubs[1] = 23;
-  ptubs[2] =   0.;
-  ptubs[3] =   0.;
-  ptubs[4] =  90.;  
-  gMC->Gsvolu("YCR1", "TUBS", idtmed[kNiCuW], ptubs, 0);
-
-  dz=-cpar[0];
-// 1.
-  ptubs[2]=7.5/2.;
-  dz+=ptubs[2];
-  gMC->Gsposp("YCR1", 1, "YCS5", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
-  gMC->Gsposp("YCR1", 2, "YCS5", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
-  dz+=ptubs[2];
-  dz+=1.5;
-// 2.
-  ptubs[2]=6.0/2.;
-  dz+=ptubs[2];
-  gMC->Gsposp("YCR1", 3, "YCS5", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
-  gMC->Gsposp("YCR1", 4, "YCS5", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
-  dz+=ptubs[2];
-  dz+=1.5;
-// 3. 
-  ptubs[2]=6.0/2.;
-  dz+=ptubs[2];
-  gMC->Gsposp("YCR1", 5, "YCS5", 0., 0., dz, idrotm[1701], "ONLY", ptubs, 5);
-  gMC->Gsposp("YCR1", 6, "YCS5", 0., 0., dz, idrotm[1703], "ONLY", ptubs, 5);
-  dz+=ptubs[2];
-  dz+=1.5;
-// 4. 
-  ptubs[2]=7.5/2.;
-  dz+=ptubs[2];
-  gMC->Gsposp("YCR1", 7, "YCS5", 0., 0., dz, idrotm[1702], "ONLY", ptubs, 5);
-  gMC->Gsposp("YCR1", 8, "YCS5", 0., 0., dz, idrotm[1704], "ONLY", ptubs, 5);
-  dz+=ptubs[2];
-  dz+=1.5;
-
-
-//
-// begin Fluka
-/*
-  flukaGeom->Cone(kR11, kR11, -1.,  -1., 
-                 kZRear, kZch11, posfluka,"NIW", "MF", "$SHS");
-
-  flukaGeom->Cone(kR11, kR11, -1.,  -1., 
-                 kZch11, kZch12, posfluka,"AIR", "MF", "$SHS");
-
-  flukaGeom->Cone(kR11, kR11, -1.,  -1., 
-                 kZch12, kZvac4, posfluka,"NIW", "MF", "$SHS");
-
-  flukaGeom->Cone(kR21, kR21, -1.,  -1., 
-                 kZvac4, kZch21, posfluka,"NIW", "MF", "$SHS");
-  flukaGeom->Cone(kR21, kR21, -1.,  -1., 
-                 kZch21, kZch22, posfluka,"AIR", "MF", "$SHS");
-  flukaGeom->Cone(kR21, kR21, -1.,  -1., 
-                 kZch22, kZvac6, posfluka,"NIW", "MF", "$SHS");
-
-*/
-  if (fWriteGeometry) flukaGeom->Finish();
-
-// 
-// end Fluka
-//
-// Outer Pb Cone
-
-  if (fPbCone) {
-      dl = (kZvac10-kZch32)/2.;
-      dz = dl+kZch32;
-      
-      par0[0]  = 0.;
-      par0[1]  = 360.;
-      par0[2]  = 10.;
-
-      par0[ 3]  = -dl;
-      par0[ 4]  = 30.;
-      par0[ 5]  = 30.+(kZch32-kZConeE)*TMath::Tan(kThetaOpenPbO);
-
-//    4th station
-      par0[ 6]  = -dz + kZch41;
-      par0[ 7]  = 30.;
-      par0[ 8]  = 30.+(kZch41-kZConeE)*TMath::Tan(kThetaOpenPbO);
-
-      par0[ 9]  = -dz + kZch41;
-      par0[10]  = 30.;
-      par0[11]  = 37.5;  
-                                          // recess erice2000
-      par0[12]  = -dz + kZch42;
-      par0[13]  = 30.;
-      par0[14]  = par0[11];
-
-      par0[15]  = -dz + kZch42;
-      par0[16]  = 30.;
-      par0[17]  = 30.+(kZch42-kZConeE)*TMath::Tan(kThetaOpenPbO);
-
-//    5th station
-      par0[18]  = -dz + kZch51;
-      par0[19]  = 30.;
-      par0[20]  = 30.+(kZch51-kZConeE)*TMath::Tan(kThetaOpenPbO);
-
-      par0[21]  = -dz + kZch51;
-      par0[22]  = 30.;
-      par0[23]  = 37.5;  // recess erice2000
-
-      par0[24]  = -dz + kZch52;
-      par0[25]  = 30.;
-      par0[26]  = par0[23];
-
-      par0[27]  = -dz + kZch52;
-      par0[28]  = 30.;
-      par0[29]  = 30.+(kZch52-kZConeE)*TMath::Tan(kThetaOpenPbO);
-// end of cone
-      par0[30]  = +dl;
-      par0[31]  = 30.;
-      par0[32]  = par0[29];
-//
-      gMC->Gsvolu("YOPB", "PCON", idtmed[kPb], par0, 33);
-      Float_t dzs = -(kZvac12-zstart)/2. + (kZch32-zstart) + dl;
-      gMC->Gspos("YOPB", 1, "YMOT", 0., 0., dzs, 0, "ONLY");
-  
-      par0[ 0]  = 0.;
-      par0[ 1]  = 360.;
-      par0[ 2]  = 18.;
-  
-      par0[ 3]  = -dl;
-      par0[ 5]  = 30.+(kZch32-kZConeE)*TMath::Tan(kThetaOpenPbO);
-      par0[ 4]  = par0[ 5] - 4.;
-//    4th station
-      par0[ 6]  = -dz + kZch41 - 4.;
-      par0[ 8]  = 30.+(kZch41-4.-kZConeE)*TMath::Tan(kThetaOpenPbO);
-      par0[ 7]  = par0[ 8] -4.;
-
-      par0[ 9]  = -dz + kZch41 - 4.;
-      par0[11]  = par0[8];  
-      par0[10]  = 33.5;
-
-      par0[12]  = -dz + kZch41;
-      par0[14]  = 30.+(kZch41-kZConeE)*TMath::Tan(kThetaOpenPbO);  
-      par0[13]  = 33.5;
-
-      par0[15]  = -dz + kZch41;
-      par0[17]  = 37.5;  
-      par0[16]  = 33.5;
-                      
-      par0[18]  = -dz + kZch42;
-      par0[20]  = 37.5;
-      par0[19]  = 33.5;
-
-      par0[21]  = -dz + kZch42;
-      par0[23]  = 30.+(kZch42-kZConeE)*TMath::Tan(kThetaOpenPbO);  
-      par0[22]  = 33.5;
-
-      par0[24]  = -dz + kZch42 + 4.;
-      par0[26]  = 30.+(kZch42+4.-kZConeE)*TMath::Tan(kThetaOpenPbO);
-      par0[25]  = 33.5;
-
-      par0[27]  = -dz + kZch42 + 4.;
-      par0[29]  = 30.+(kZch42+4.-kZConeE)*TMath::Tan(kThetaOpenPbO);
-      par0[28]  = par0[29] - 4.;
-
-//    5th station
-      par0[30]  = -dz + kZch51 - 4.;
-      par0[32]  = 30.+(kZch51-4.-kZConeE)*TMath::Tan(kThetaOpenPbO);
-      par0[31]  = par0[32] - 4.;
-      
-      par0[33]  = -dz + kZch51 - 4.;
-      par0[35]  = par0[32];
-      par0[34]  = 33.5;
-
-      par0[36]  = -dz + kZch51;
-      par0[38]  = 30.+(kZch51-kZConeE)*TMath::Tan(kThetaOpenPbO);
-      par0[37]  = 33.5;
-
-      par0[39]  = -dz + kZch51;
-      par0[41]  = 37.5;
-      par0[40]  = 33.5;
-
-      par0[42]  = -dz + kZch52;
-      par0[44]  = 37.5;
-      par0[43]  = 33.5;
-
-      par0[45]  = -dz + kZch52;
-      par0[47]  = 30.+(kZch52-kZConeE)*TMath::Tan(kThetaOpenPbO);
-      par0[46]  = 33.5;
-
-      par0[48]  = -dz + kZch52 + 4.;
-      par0[50]  = 30.+(kZch52+4.-kZConeE)*TMath::Tan(kThetaOpenPbO);
-      par0[49]  = 33.5;
-
-      par0[51]  = -dz + kZch52 + 4.;
-      par0[53]  = 30.+(kZch52+4.-kZConeE)*TMath::Tan(kThetaOpenPbO);
-      par0[52]  = par0[53] - 4.;
-
-      par0[54]  = +dl;
-      par0[56]  = par0[53];
-      par0[55]  = par0[52];
-
-      gMC->Gsvolu("YOSE",    "PCON", idtmed[kSteel], par0, 57);
-      gMC->Gspos ("YOSE", 1, "YOPB", 0., 0., 0., 0, "ONLY");
-  }
-}
-
-void AliSHILvF::Init()
-{
-  //
-  // Initialise the muon shield after it has been built
-  //
-  Int_t i;
-  //
-  if(AliLog::GetGlobalDebugLevel()>0) {
-    printf("\n%s: ",ClassName());
-    for(i=0;i<35;i++) printf("*");
-    printf(" SHILvF_INIT ");
-    for(i=0;i<35;i++) printf("*");
-    printf("\n%s: ",ClassName());
-    //
-    // Here the SHIL initialisation code (if any!)
-    for(i=0;i<80;i++) printf("*");
-    printf("\n");
-  }
-}
diff --git a/STRUCT/AliSHILvF.h b/STRUCT/AliSHILvF.h
deleted file mode 100644 (file)
index 857d8ae..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef ALISHILVF_H
-#define ALISHILVF_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-/* $Id$ */
-
-////////////////////////////////////////////////
-//  Manager class for Module: SHIL          //
-////////////////////////////////////////////////
-#include "AliSHIL.h"
-class AliSHILvF : public AliSHIL {
-  
-public:
-  AliSHILvF();
-  AliSHILvF(const char *name, const char *title);
-  virtual      ~AliSHILvF() {}
-  virtual void  CreateGeometry();
-  virtual void  Init();
-  virtual Int_t IsVersion() const {return 0;}
-  virtual void  SetPbCone(Bool_t flag = kTRUE)         {fPbCone        = flag;}
-  virtual void  SetWriteGeometry(Bool_t flag = kFALSE)  {fWriteGeometry = flag;}         
- protected:
-  Bool_t fPbCone;           // outer Pb cone option flag 
-  Bool_t fWriteGeometry;    // flag to write out the fluka geometry
-  ClassDef(AliSHILvF,2)     // Muon Shield Class (Open Geometry)
-};
-
-#endif
index 3b4e2e8..01e2050 100644 (file)
@@ -29,8 +29,5 @@
 #pragma link C++ class  AliSHILv0+;
 #pragma link C++ class  AliSHILv2+;
 #pragma link C++ class  AliSHILv3+;
-#pragma link C++ class  AliSHILvF+;
-#pragma link C++ class  AliALIFE+;
-#pragma link C++ class  AliFieldReader+;
 
 #endif