Small overlaps corrected.
[u/mrichter/AliRoot.git] / STRUCT / AliABSOv3.cxx
index b4dd0f0..af3d522 100644 (file)
@@ -72,29 +72,29 @@ void AliABSOv3::CreateGeometry()
     TGeoVolume* top = gGeoManager->GetVolume("ALIC");
     
 //
     TGeoVolume* top = gGeoManager->GetVolume("ALIC");
     
 //
-// Translation
-//
-    TGeoTranslation* vec0 = new TGeoTranslation(0., 0., 0.);
-//
 // Media
 //
     TGeoMedium* kMedNiW     = gGeoManager->GetMedium("ABSO_Ni/W0");
     TGeoMedium* kMedNiWsh   = gGeoManager->GetMedium("ABSO_Ni/W3");
 // Media
 //
     TGeoMedium* kMedNiW     = gGeoManager->GetMedium("ABSO_Ni/W0");
     TGeoMedium* kMedNiWsh   = gGeoManager->GetMedium("ABSO_Ni/W3");
+//
     TGeoMedium* kMedSteel   = gGeoManager->GetMedium("ABSO_ST_C0");
     TGeoMedium* kMedSteelSh = gGeoManager->GetMedium("ABSO_ST_C3");
     TGeoMedium* kMedSteel   = gGeoManager->GetMedium("ABSO_ST_C0");
     TGeoMedium* kMedSteelSh = gGeoManager->GetMedium("ABSO_ST_C3");
+//
     TGeoMedium* kMedAir     = gGeoManager->GetMedium("ABSO_AIR_C0");
     TGeoMedium* kMedAir     = gGeoManager->GetMedium("ABSO_AIR_C0");
-
+//
     TGeoMedium* kMedPb      = gGeoManager->GetMedium("ABSO_PB_C0");
     TGeoMedium* kMedPbSh    = gGeoManager->GetMedium("ABSO_PB_C2");
     TGeoMedium* kMedPb      = gGeoManager->GetMedium("ABSO_PB_C0");
     TGeoMedium* kMedPbSh    = gGeoManager->GetMedium("ABSO_PB_C2");
-
-    TGeoMedium* kMedConc    = gGeoManager->GetMedium("ABSO_CC_C0");
-
-    TGeoMedium* kMedCH2     = gGeoManager->GetMedium("ABSO_CH2_C0");    
-
+//
+    TGeoMedium* kMedConcSh  = gGeoManager->GetMedium("ABSO_CC_C2");
+//
+    TGeoMedium* kMedCH2Sh   = gGeoManager->GetMedium("ABSO_CH2_C2");    
+//
     TGeoMedium* kMedC       = gGeoManager->GetMedium("ABSO_C_C0");    
     TGeoMedium* kMedCsh     = gGeoManager->GetMedium("ABSO_C_C2");    
     TGeoMedium* kMedC       = gGeoManager->GetMedium("ABSO_C_C0");    
     TGeoMedium* kMedCsh     = gGeoManager->GetMedium("ABSO_C_C2");    
-
+//
     TGeoMedium* kMedAlu     = gGeoManager->GetMedium("ABSO_ALU_C0");    
     TGeoMedium* kMedAlu     = gGeoManager->GetMedium("ABSO_ALU_C0");    
+//
+    TGeoMedium* kMedMg      = gGeoManager->GetMedium("ABSO_MG_C0");    
 //
     const Float_t kDegRad = TMath::Pi() / 180.;
     
 //
     const Float_t kDegRad = TMath::Pi() / 180.;
     
@@ -178,7 +178,7 @@ void AliABSOv3::CreateGeometry()
       // Front insert 
       Float_t dzSteelEnvelopeFI    =  1.;
       Float_t rInSteelEnvelopeFI   = 42.0/2.;
       // Front insert 
       Float_t dzSteelEnvelopeFI    =  1.;
       Float_t rInSteelEnvelopeFI   = 42.0/2.;
-      Float_t rOuSteelEnvelopeFI   = 85.0/2.;      
+      Float_t rOuSteelEnvelopeFI   = 85.0/2.+ 0.06;      
       
       TGeoPcon* shFaSteelEnvelopeC = new TGeoPcon(0., 360., 7);
       z = 0.;
       
       TGeoPcon* shFaSteelEnvelopeC = new TGeoPcon(0., 360., 7);
       z = 0.;
@@ -313,17 +313,17 @@ void AliABSOv3::CreateGeometry()
 
       TGeoVolume* voFaWPlateA = new TGeoVolume("AFaWPlateA", shFaWPlateA, kMedNiW);
       // Inner region with higher transport cuts
 
       TGeoVolume* voFaWPlateA = new TGeoVolume("AFaWPlateA", shFaWPlateA, kMedNiW);
       // Inner region with higher transport cuts
-      TGeoPcon* shFaWPlateAI = new TGeoPcon(0., 360., 6);
+      TGeoPcon* shFaWPlateAI = new TGeoPcon(0., 360., 5);
       z = 3.;
       z = 3.;
-      shFaWPlateAI->DefineSection(0, z, rInFaQPlateF + z * angle24, rInFaQPlateC1 + (z - dzFaWPlateF) * angle10);
+      shFaWPlateAI->DefineSection(0, z, rInFaQPlateF + z * angle10, rOuFaQPlateC1 + (z - dzFaWPlateF) * angle24);
       for (Int_t i = 1; i < 5; i++) {
          Float_t rmin = shFaWPlateA->GetRmin(i+2);
          Float_t rmax = shFaWPlateA->GetRmax(i+2) - 3.;        
       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);
       }
       TGeoVolume* voFaWPlateAI = new TGeoVolume("AFaWPlateAI", shFaWPlateAI, kMedNiWsh);
-      voFaWPlateA->AddNode(voFaWPlateAI, 1, vec0);
+      voFaWPlateA->AddNode(voFaWPlateAI, 1, gGeoIdentity);
       
 //
 // Inner Tungsten Shield
       
 //
 // Inner Tungsten Shield
@@ -381,7 +381,7 @@ void AliABSOv3::CreateGeometry()
       Float_t rInFaWTube2C1 =   9.10/2.;
       Float_t rInFaWTube2C2 =  12.58/2.;
       Float_t rOuFaWTube2C1 =  20.70/2.;
       Float_t rInFaWTube2C1 =   9.10/2.;
       Float_t rInFaWTube2C2 =  12.58/2.;
       Float_t rOuFaWTube2C1 =  20.70/2.;
-      Float_t rOuFaWTube2C2 =  30.72/2.;
+      Float_t rOuFaWTube2C2 =  30.72/2.- 0.05;
       // Front Flange 
       Float_t dzFaWTube2F   =  0.6;
       Float_t rInFaWTube2F  = 15.4/2.;
       // Front Flange 
       Float_t dzFaWTube2F   =  0.6;
       Float_t rInFaWTube2F  = 15.4/2.;
@@ -472,7 +472,7 @@ void AliABSOv3::CreateGeometry()
       TGeoVolume* voFaGraphiteCone = new TGeoVolume("AFaGraphiteCone", shFaGraphiteCone, kMedCsh);
       //
       // Outer region with lower transport cuts
       TGeoVolume* voFaGraphiteCone = new TGeoVolume("AFaGraphiteCone", shFaGraphiteCone, kMedCsh);
       //
       // Outer region with lower transport cuts
-      dz = 40.;
+      dz = 50.;
       TGeoCone* shFaGraphiteConeO = new TGeoCone(dz/2.,
                                                 rInFaGraphiteCone1, rOuFaGraphiteCone1, 
                                                 rInFaGraphiteCone1, rOuFaGraphiteCone1 + dz * angle10);
       TGeoCone* shFaGraphiteConeO = new TGeoCone(dz/2.,
                                                 rInFaGraphiteCone1, rOuFaGraphiteCone1, 
                                                 rInFaGraphiteCone1, rOuFaGraphiteCone1 + dz * angle10);
@@ -514,7 +514,7 @@ void AliABSOv3::CreateGeometry()
       // Inner region with higher transport cuts
       TGeoPcon*   shFaPbConeI = MakeShapeFromTemplate(shFaPbCone, 0., -3.);
       TGeoVolume* voFaPbConeI  = new TGeoVolume("AFaPbConeI", shFaPbConeI, kMedPbSh);
       // Inner region with higher transport cuts
       TGeoPcon*   shFaPbConeI = MakeShapeFromTemplate(shFaPbCone, 0., -3.);
       TGeoVolume* voFaPbConeI  = new TGeoVolume("AFaPbConeI", shFaPbConeI, kMedPbSh);
-      voFaPbCone->AddNode(voFaPbConeI, 1, vec0);
+      voFaPbCone->AddNode(voFaPbConeI, 1, gGeoIdentity);
       
       
 // Pos 13
       
       
 // Pos 13
@@ -532,7 +532,7 @@ void AliABSOv3::CreateGeometry()
                                                    new TGeoCone(dzFaConcreteCone/2., 
                                                                 rInFaConcreteCone1, rOuFaConcreteCone1, 
                                                                 rInFaConcreteCone2, rOuFaConcreteCone2), 
                                                    new TGeoCone(dzFaConcreteCone/2., 
                                                                 rInFaConcreteCone1, rOuFaConcreteCone1, 
                                                                 rInFaConcreteCone2, rOuFaConcreteCone2), 
-                                                   kMedConc);  
+                                                   kMedConcSh);  
 
 // Pos 14
 ///////////////////////////////////
 
 // Pos 14
 ///////////////////////////////////
@@ -548,7 +548,7 @@ void AliABSOv3::CreateGeometry()
                                               new TGeoCone(dzFaCH2Cone/2., 
                                                            rInFaCH2Cone1, rInFaCH2Cone1 + dFaCH2Cone,      
                                                            rInFaCH2Cone2, rInFaCH2Cone2 + dFaCH2Cone),             
                                               new TGeoCone(dzFaCH2Cone/2., 
                                                            rInFaCH2Cone1, rInFaCH2Cone1 + dFaCH2Cone,      
                                                            rInFaCH2Cone2, rInFaCH2Cone2 + dFaCH2Cone),             
-                                                           kMedCH2);
+                                              kMedCH2Sh);
       
       
 // Pos 15
       
       
 // Pos 15
@@ -584,13 +584,13 @@ void AliABSOv3::CreateGeometry()
                                                                rInFaSteelCone31A, rOuFaSteelCone31A,       
                                                                rInFaSteelCone31B, rOuFaSteelCone31B),
                                                   kMedSteelSh);
                                                                rInFaSteelCone31A, rOuFaSteelCone31A,       
                                                                rInFaSteelCone31B, rOuFaSteelCone31B),
                                                   kMedSteelSh);
-      // Inner Region with higher transport cuts
+      // Outer Rregion with higher transport cuts
       dz = 5.;
       TGeoVolume* voFaSteelCone31I = new TGeoVolume("AFaSteelCone31I", 
       dz = 5.;
       TGeoVolume* voFaSteelCone31I = new TGeoVolume("AFaSteelCone31I", 
-                                                  new TGeoCone(dz/2., 
-                                                               rInFaSteelCone31B - dz * angle03, 
-                                                               rOuFaSteelCone31B - dz * angle10, 
-                                                               rInFaSteelCone31B, rOuFaSteelCone31B),
+                                                   new TGeoCone(dz/2., 
+                                                                rInFaSteelCone31B - dz * angle03, 
+                                                                rOuFaSteelCone31B - dz * angle10, 
+                                                                rInFaSteelCone31B, rOuFaSteelCone31B),
                                                    kMedSteel);
       
       voFaSteelCone31->AddNode(voFaSteelCone31I, 1,  new TGeoTranslation(0., 0., dzFaSteelCone31/2. - dz/2.));
                                                    kMedSteel);
       
       voFaSteelCone31->AddNode(voFaSteelCone31I, 1,  new TGeoTranslation(0., 0., dzFaSteelCone31/2. - dz/2.));
@@ -607,7 +607,7 @@ void AliABSOv3::CreateGeometry()
       // 2nd section
       Float_t dzFaCompRing2  =  1.2;
       Float_t rInFaCompRing2 = 14.0/2.;
       // 2nd section
       Float_t dzFaCompRing2  =  1.2;
       Float_t rInFaCompRing2 = 14.0/2.;
-      Float_t rOuFaCompRing2 = 34.3/2.;
+      Float_t rOuFaCompRing2 = 35.3/2.;
 
       TGeoPcon* shFaCompRing = new TGeoPcon(0., 360., 4);
       z = 0.;
 
       TGeoPcon* shFaCompRing = new TGeoPcon(0., 360., 4);
       z = 0.;
@@ -653,8 +653,7 @@ void AliABSOv3::CreateGeometry()
       shFaMgRing->DefineSection(6, z,  rInFaMgRingO, rInFaCompRing2);
       z += dzFaMgRingO;
       shFaMgRing->DefineSection(7, z,  rInFaMgRingO, rInFaCompRing2);
       shFaMgRing->DefineSection(6, z,  rInFaMgRingO, rInFaCompRing2);
       z += dzFaMgRingO;
       shFaMgRing->DefineSection(7, z,  rInFaMgRingO, rInFaCompRing2);
-
-      TGeoVolume* voFaMgRing = new TGeoVolume("AFaMgRing", shFaMgRing, kMedNiW);
+      TGeoVolume* voFaMgRing = new TGeoVolume("AFaMgRing", shFaMgRing, kMedMg);
 
 
 //
 
 
 //
@@ -708,16 +707,17 @@ void AliABSOv3::CreateGeometry()
       shFaM->DefineSection(15, z,  rInFaCH2Cone2,                    rOuSteelEnvelopeR2);
 
       TGeoVolume* voFaM = new TGeoVolume("AFaM", shFaM, kMedAir);
       shFaM->DefineSection(15, z,  rInFaCH2Cone2,                    rOuSteelEnvelopeR2);
 
       TGeoVolume* voFaM = new TGeoVolume("AFaM", shFaM, kMedAir);
-
+      voFaM->SetVisibility(0);
+      
 
 //
 //    Assemble volumes inside acceptance
       TGeoPcon* shFaAccM = new TGeoPcon(0., 360., 7);
       for (Int_t i = 0; i < 4; i++) {
 
 //
 //    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);
          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;
       }
       z  = dzFaGraphiteCone + dzFaConcreteCone + dzFaSteelCone25;
       z0 = z + zFa + dzFaFlange;
@@ -729,7 +729,7 @@ void AliABSOv3::CreateGeometry()
       TGeoVolume* voFaAccM = new TGeoVolume("AFaAcc", shFaAccM, kMedAir);
       
       z = 0;
       TGeoVolume* voFaAccM = new TGeoVolume("AFaAcc", shFaAccM, kMedAir);
       
       z = 0;
-      voFaAccM->AddNode(voFaGraphiteCone, 1, vec0);
+      voFaAccM->AddNode(voFaGraphiteCone, 1, gGeoIdentity);
       z += dzFaGraphiteCone;
       voFaAccM->AddNode(voFaConcreteCone, 1, new TGeoTranslation(0., 0., z + dzFaConcreteCone / 2.));
       z += dzFaConcreteCone;
       z += dzFaGraphiteCone;
       voFaAccM->AddNode(voFaConcreteCone, 1, new TGeoTranslation(0., 0., z + dzFaConcreteCone / 2.));
       z += dzFaConcreteCone;
@@ -740,7 +740,7 @@ void AliABSOv3::CreateGeometry()
 //
 // Inner shield
       TGeoVolumeAssembly* voFaInnerShield = new TGeoVolumeAssembly("AFaInnerShield");
 //
 // Inner shield
       TGeoVolumeAssembly* voFaInnerShield = new TGeoVolumeAssembly("AFaInnerShield");
-      voFaInnerShield->AddNode(voFaWTube1, 1, vec0);
+      voFaInnerShield->AddNode(voFaWTube1, 1, gGeoIdentity);
       z = dzFaWTube1 - 0.6;
       voFaInnerShield->AddNode(voFaWTube2, 1, new TGeoTranslation(0., 0., z) );
       z += dzFaWTube2;
       z = dzFaWTube1 - 0.6;
       voFaInnerShield->AddNode(voFaWTube2, 1, new TGeoTranslation(0., 0., z) );
       z += dzFaWTube2;
@@ -755,16 +755,16 @@ void AliABSOv3::CreateGeometry()
 //    Adding volumes to mother volume
 //
       z = 0.;
 //    Adding volumes to mother volume
 //
       z = 0.;
-      voFaM->AddNode(voFaWPlateA,       1, vec0);
+      voFaM->AddNode(voFaWPlateA,       1, gGeoIdentity);
       z += dzFaWPlate;
       voFaM->AddNode(voFaSteelEnvelope, 1, new TGeoTranslation(0., 0., z));
       z += dzSteelEnvelopeFC;
       voFaM->AddNode(voFaPbCone,        1, new TGeoTranslation(0., 0., z));
       z += (dzFaPbCone + dzFaCH2Cone / 2.);
       voFaM->AddNode(voFaCH2Cone,       1, new TGeoTranslation(0., 0., z));
       z += dzFaWPlate;
       voFaM->AddNode(voFaSteelEnvelope, 1, new TGeoTranslation(0., 0., z));
       z += dzSteelEnvelopeFC;
       voFaM->AddNode(voFaPbCone,        1, new TGeoTranslation(0., 0., z));
       z += (dzFaPbCone + dzFaCH2Cone / 2.);
       voFaM->AddNode(voFaCH2Cone,       1, new TGeoTranslation(0., 0., z));
-      voFaM->AddNode(voFaFlange,   1, vec0);
-      voFaM->AddNode(voFaMgRing,   1, vec0);
-      voFaM->AddNode(voFaCompRing, 1, vec0);
+      voFaM->AddNode(voFaFlange,   1, gGeoIdentity);
+      voFaM->AddNode(voFaMgRing,   1, gGeoIdentity);
+      voFaM->AddNode(voFaCompRing, 1, gGeoIdentity);
       voFaM->AddNode(voFaAccM, 1, new TGeoTranslation(0., 0., dzFaFlange));
 
 ////////////////////////////////////////////////////
       voFaM->AddNode(voFaAccM, 1, new TGeoTranslation(0., 0., dzFaFlange));
 
 ////////////////////////////////////////////////////
@@ -860,7 +860,7 @@ void AliABSOv3::CreateGeometry()
          new TGeoCompositeShape("shFassCentral", "FassCone-(FassWindow:tFassWindow+FassApperture)");
       
       TGeoVolume* voFassCentral = new TGeoVolume("AFassCentral", shFassCentral, kMedSteel);
          new TGeoCompositeShape("shFassCentral", "FassCone-(FassWindow:tFassWindow+FassApperture)");
       
       TGeoVolume* voFassCentral = new TGeoVolume("AFassCentral", shFassCentral, kMedSteel);
-      voFass->AddNode(voFassCentral, 1, vec0);
+      voFass->AddNode(voFassCentral, 1, gGeoIdentity);
       
 //
 // Aluminum ring
       
 //
 // Aluminum ring
@@ -887,10 +887,10 @@ void AliABSOv3::CreateGeometry()
 //
 // Absorber and Support
       TGeoVolumeAssembly* voFA = new TGeoVolumeAssembly("AFA");
 //
 // Absorber and Support
       TGeoVolumeAssembly* voFA = new TGeoVolumeAssembly("AFA");
-      voFA->AddNode(voFaM,        1, vec0);
+      voFA->AddNode(voFaM,        1, gGeoIdentity);
       voFA->AddNode(voFaEndPlate, 1, new TGeoTranslation(0., 0., dzFa + dzEndPlate/2.));
       voFA->AddNode(voFass, 1, new TGeoTranslation(0., 0., 388.45));
       voFA->AddNode(voFaEndPlate, 1, new TGeoTranslation(0., 0., dzFa + dzEndPlate/2.));
       voFA->AddNode(voFass, 1, new TGeoTranslation(0., 0., 388.45));
-      voFA->AddNode(voFassAlRing, 1, new TGeoTranslation(0., 0., 382. - 0.55));
+      voFA->AddNode(voFassAlRing, 1, new TGeoTranslation(0., 0., 382. - 3.56));
       top->AddNode(voFA, 1, new TGeoCombiTrans(0., 0., -90., rotxz));
 }
 
       top->AddNode(voFA, 1, new TGeoCombiTrans(0., 0., -90., rotxz));
 }