- Setting geometry module volume names and mother names
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Feb 2006 15:11:25 +0000 (15:11 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Feb 2006 15:11:25 +0000 (15:11 +0000)
  moved in SetTramsformations()
- Commented out gMC->Gsvolu(..) calls for virtual volumes

MUON/AliMUONSlatGeometryBuilder.cxx
MUON/AliMUONTriggerGeometryBuilder.cxx

index 12473ec..977ce11 100644 (file)
@@ -192,7 +192,7 @@ void AliMUONSlatGeometryBuilder::CreateGeometry()
   const Float_t kSlatHeight = kPcbHeight; 
   const Float_t kSlatWidth  = kSensWidth + 2.*(kPcbWidth + kInsuWidth + kPanelWidth 
                                               + kNomexBWidth); //replaced rohacell with Nomex Ch. Finck 
-  const Int_t   kSlatMaterial = idAir;
+  // const Int_t   kSlatMaterial = idAir;
   const Float_t kDslatLength  = -1.25; // position of the slat respect to the beam plane (half vertical spacer) Ch. Finck
   Float_t zSlat               = AliMUONConstants::DzSlat();// implemented Ch. Finck
   Float_t dzCh                = AliMUONConstants::DzCh();
@@ -245,12 +245,6 @@ void AliMUONSlatGeometryBuilder::CreateGeometry()
       //GetGeometry(4)->SetDebug(kTRUE);
       //GetGeometry(5)->SetDebug(kTRUE);
  
-      if (gAlice->GetModule("DIPO")) {
-       // if DIPO is preset, the whole station will be placed in DDIP volume
-       GetGeometry(4)->SetMotherVolume("DDIP");
-       GetGeometry(5)->SetMotherVolume("DDIP");
-      }
-
       if (!gAlice->GetModule("DIPO")) {
        // Mother volume for each chamber in st3 are only defined if Dipole volue is there.
        // Outer excess and inner recess for mother volume radius
@@ -265,8 +259,6 @@ void AliMUONSlatGeometryBuilder::CreateGeometry()
        tpar[2] = dstation;
        gMC->Gsvolu("CH05", "TUBE", idAir, tpar, 3);
        gMC->Gsvolu("CH06", "TUBE", idAir, tpar, 3);
-       GetGeometry(4)->SetVolume("CH05");
-       GetGeometry(5)->SetVolume("CH06");
       }
       // volumes for slat geometry (xx=5,..,10 chamber id): 
       // Sxx0 Sxx1 Sxx2 Sxx3  -->   Slat Mother volumes 
@@ -329,51 +321,51 @@ void AliMUONSlatGeometryBuilder::CreateGeometry()
        Float_t zSlat3 = (i%2 ==0)? -zSlat : zSlat; // seems not that zSlat3 = zSlat4 & 5 refering to plan PQ7EN345-6 ?
 
        sprintf(idSlatCh5,"LA%d",i+kNslats3-1);
-       gMC->Gsvolu(idSlatCh5,"BOX",kSlatMaterial,spar2,3);
+       //gMC->Gsvolu(idSlatCh5,"BOX",kSlatMaterial,spar2,3);
        detElemId = 509 - (i + kNslats3-1-4);
        GetEnvelopes(4)->AddEnvelope(idSlatCh5, detElemId, true, TGeoTranslation(xSlat3, ySlat3, -zSlat3 + dzCh3),
                                     TGeoRotation("rot1",90,angle,90,90+angle,0,0) );
 
        sprintf(idSlatCh5,"LA%d",3*kNslats3-2+i);
-       gMC->Gsvolu(idSlatCh5,"BOX",kSlatMaterial,spar2,3);
+       //gMC->Gsvolu(idSlatCh5,"BOX",kSlatMaterial,spar2,3);
        detElemId = 500 + (i + kNslats3-1-4);
        GetEnvelopes(4)->AddEnvelope(idSlatCh5, detElemId, true, TGeoTranslation(-xSlat3, ySlat3, zSlat3 - dzCh3),
                                     TGeoRotation("rot2",90,180+angle,90,90+angle,180,0) );
 
        if (i > 0) { 
          sprintf(idSlatCh5,"LA%d",kNslats3-1-i);
-         gMC->Gsvolu(idSlatCh5,"BOX",kSlatMaterial,spar2,3);
+         // gMC->Gsvolu(idSlatCh5,"BOX",kSlatMaterial,spar2,3);
          detElemId = 509 + (i + kNslats3-1-4);
          GetEnvelopes(4)->AddEnvelope(idSlatCh5, detElemId, true, TGeoTranslation(xSlat3, -ySlat3, -zSlat3 + dzCh3), 
                                       TGeoRotation("rot3",90,angle,90,270+angle,180,0) );
 
          sprintf(idSlatCh5,"LA%d",3*kNslats3-2-i);
-         gMC->Gsvolu(idSlatCh5,"BOX",kSlatMaterial,spar2,3);
+         // gMC->Gsvolu(idSlatCh5,"BOX",kSlatMaterial,spar2,3);
          detElemId = 518 - (i + kNslats3-1-4);
          GetEnvelopes(4)->AddEnvelope(idSlatCh5, detElemId, true, TGeoTranslation(-xSlat3, -ySlat3, zSlat3 - dzCh3),
                                       TGeoRotation("rot4",90,180+angle,90,270+angle,0,0) );
        }
 
        sprintf(idSlatCh6,"LB%d",kNslats3-1+i);  
-       gMC->Gsvolu(idSlatCh6,"BOX",kSlatMaterial,spar,3);
+       // gMC->Gsvolu(idSlatCh6,"BOX",kSlatMaterial,spar,3);
        detElemId = 609 - (i  + kNslats3-1-4);
        GetEnvelopes(5)->AddEnvelope(idSlatCh6, detElemId, true, TGeoTranslation(xSlat3, ySlat3, -zSlat3 + dzCh3),
                                     TGeoRotation("rot5",90,angle,90,90+angle,0,0) );
        sprintf(idSlatCh6,"LB%d",3*kNslats3-2+i);
-       gMC->Gsvolu(idSlatCh6,"BOX",kSlatMaterial,spar,3);
+       // gMC->Gsvolu(idSlatCh6,"BOX",kSlatMaterial,spar,3);
        detElemId = 600 + (i + kNslats3-1-4);
        GetEnvelopes(5)->AddEnvelope(idSlatCh6, detElemId, true, TGeoTranslation(-xSlat3, ySlat3, zSlat3 - dzCh3),
                                     TGeoRotation("rot6",90,180+angle,90,90+angle,180,0) );
 
        if (i > 0) { 
          sprintf(idSlatCh6,"LB%d",kNslats3-1-i);
-         gMC->Gsvolu(idSlatCh6,"BOX",kSlatMaterial,spar,3);
+         //gMC->Gsvolu(idSlatCh6,"BOX",kSlatMaterial,spar,3);
          detElemId = 609 + (i + kNslats3-1-4);
          GetEnvelopes(5)->AddEnvelope(idSlatCh6, detElemId, true, TGeoTranslation(xSlat3, -ySlat3, -zSlat3 + dzCh3),
                                       TGeoRotation("rot7",90,angle,90,270+angle,180,0) );
 
          sprintf(idSlatCh6,"LB%d",3*kNslats3-2-i);
-         gMC->Gsvolu(idSlatCh6,"BOX",kSlatMaterial,spar,3);
+         //gMC->Gsvolu(idSlatCh6,"BOX",kSlatMaterial,spar,3);
          detElemId = 618 - (i + kNslats3-1-4);
          GetEnvelopes(5)->AddEnvelope(idSlatCh6, detElemId, true, TGeoTranslation(-xSlat3, -ySlat3, zSlat3 - dzCh3),
                                       TGeoRotation("rot8",90,180+angle,90,270+angle,0,0) );
@@ -665,8 +657,6 @@ void AliMUONSlatGeometryBuilder::CreateGeometry()
     tpar[2] = dstation;
     gMC->Gsvolu("CH07", "TUBE", idAir, tpar, 3);
     gMC->Gsvolu("CH08", "TUBE", idAir, tpar, 3);
-    GetGeometry(6)->SetVolume("CH07");
-    GetGeometry(7)->SetVolume("CH08");
     
     // create and position the slat (mother) volumes 
 
@@ -691,52 +681,52 @@ void AliMUONSlatGeometryBuilder::CreateGeometry()
       Float_t zSlat4 = (i%2 ==0)? -zSlat : zSlat; 
 
       sprintf(idSlatCh7,"LC%d",kNslats4-1+i);
-      gMC->Gsvolu(idSlatCh7,"BOX",kSlatMaterial,spar,3);
+      //gMC->Gsvolu(idSlatCh7,"BOX",kSlatMaterial,spar,3);
       detElemId = 713 - (i + kNslats4-1-6);
       GetEnvelopes(6)->AddEnvelope(idSlatCh7, detElemId, true, TGeoTranslation(xSlat4, ySlat41, -zSlat4 + dzCh4),
                                   TGeoRotation("rot1",90,angle,90,90+angle,0,0) );
 
       sprintf(idSlatCh7,"LC%d",3*kNslats4-2+i);
-      gMC->Gsvolu(idSlatCh7,"BOX",kSlatMaterial,spar,3);
+      //gMC->Gsvolu(idSlatCh7,"BOX",kSlatMaterial,spar,3);
       detElemId = 700 + (i + kNslats4-1-6);
       GetEnvelopes(6)->AddEnvelope(idSlatCh7, detElemId, true, TGeoTranslation(-xSlat4, ySlat41, zSlat4 - dzCh4),
                                   TGeoRotation("rot2",90,180+angle,90,90+angle,180,0) );
  
       if (i > 0) { 
        sprintf(idSlatCh7,"LC%d",kNslats4-1-i);
-       gMC->Gsvolu(idSlatCh7,"BOX",kSlatMaterial,spar,3);
+       //gMC->Gsvolu(idSlatCh7,"BOX",kSlatMaterial,spar,3);
        detElemId = 713 + (i + kNslats4-1-6);
        GetEnvelopes(6)->AddEnvelope(idSlatCh7, detElemId, true, TGeoTranslation(xSlat4, -ySlat41, -zSlat4 + dzCh4),
                                     TGeoRotation("rot3",90,angle,90,270+angle,180,0) );
 
        sprintf(idSlatCh7,"LC%d",3*kNslats4-2-i);
        detElemId = 726 - (i + kNslats4-1-6);
-       gMC->Gsvolu(idSlatCh7,"BOX",kSlatMaterial,spar,3);
+       //gMC->Gsvolu(idSlatCh7,"BOX",kSlatMaterial,spar,3);
        GetEnvelopes(6)->AddEnvelope(idSlatCh7, detElemId, true, 
                                     TGeoTranslation(-xSlat4, -ySlat41, zSlat4 - dzCh4),
                                     TGeoRotation("rot4",90,180+angle,90,270+angle,0,0) );
       }
 
       sprintf(idSlatCh8,"LD%d",kNslats4-1+i);
-      gMC->Gsvolu(idSlatCh8,"BOX",kSlatMaterial,spar,3);
+      //gMC->Gsvolu(idSlatCh8,"BOX",kSlatMaterial,spar,3);
       detElemId = 813 - (i + kNslats4-1-6);
       GetEnvelopes(7)->AddEnvelope(idSlatCh8, detElemId, true, TGeoTranslation(xSlat4, ySlat42, -zSlat4 + dzCh4),
                                   TGeoRotation("rot5",90,angle,90,90+angle,0,0) );
 
       sprintf(idSlatCh8,"LD%d",3*kNslats4-2+i);
       detElemId = 800 + (i + kNslats4-1-6);
-      gMC->Gsvolu(idSlatCh8,"BOX",kSlatMaterial,spar,3);
+      //gMC->Gsvolu(idSlatCh8,"BOX",kSlatMaterial,spar,3);
       GetEnvelopes(7)->AddEnvelope(idSlatCh8, detElemId, true, TGeoTranslation(-xSlat4, ySlat42, zSlat4 - dzCh4),
                                   TGeoRotation("rot6",90,180+angle,90,90+angle,180,0) );
       if (i > 0) { 
        sprintf(idSlatCh8,"LD%d",kNslats4-1-i);
        detElemId = 813 + (i + kNslats4-1-6);
-       gMC->Gsvolu(idSlatCh8,"BOX",kSlatMaterial,spar,3);
+       //gMC->Gsvolu(idSlatCh8,"BOX",kSlatMaterial,spar,3);
        GetEnvelopes(7)->AddEnvelope(idSlatCh8, detElemId, true, TGeoTranslation(xSlat4, -ySlat42, -zSlat4 + dzCh4),
                                     TGeoRotation("rot7",90,angle,90,270+angle,180,0) );
        sprintf(idSlatCh8,"LD%d",3*kNslats4-2-i);
        detElemId = 826 - (i + kNslats4-1-6);
-       gMC->Gsvolu(idSlatCh8,"BOX",kSlatMaterial,spar,3);
+       //gMC->Gsvolu(idSlatCh8,"BOX",kSlatMaterial,spar,3);
        GetEnvelopes(7)->AddEnvelope(idSlatCh8, detElemId, true, TGeoTranslation(-xSlat4, -ySlat42, zSlat4 - dzCh4),
                                     TGeoRotation("rot8",90,180+angle,90,270+angle,0,0) );
       }
@@ -940,8 +930,6 @@ void AliMUONSlatGeometryBuilder::CreateGeometry()
     tpar[2] = dstation;
     gMC->Gsvolu("CH09", "TUBE", idAir, tpar, 3);
     gMC->Gsvolu("CH10", "TUBE", idAir, tpar, 3);
-    GetGeometry(8)->SetVolume("CH09");
-    GetGeometry(9)->SetVolume("CH10");
 
     // create and position the slat (mother) volumes 
 
@@ -966,51 +954,51 @@ void AliMUONSlatGeometryBuilder::CreateGeometry()
 
       sprintf(idSlatCh9,"LE%d",kNslats5-1+i);
       detElemId = 913 - (i + kNslats5-1-6);
-      gMC->Gsvolu(idSlatCh9,"BOX",kSlatMaterial,spar,3);
+      //gMC->Gsvolu(idSlatCh9,"BOX",kSlatMaterial,spar,3);
       GetEnvelopes(8)->AddEnvelope(idSlatCh9, detElemId, true, TGeoTranslation(xSlat5, ySlat5, -zSlat5 + dzCh5),
                                   TGeoRotation("rot1",90,angle,90,90+angle,0,0) );
 
       sprintf(idSlatCh9,"LE%d",3*kNslats5-2+i);
       detElemId = 900 + (i + kNslats5-1-6);
-      gMC->Gsvolu(idSlatCh9,"BOX",kSlatMaterial,spar,3);
+      //gMC->Gsvolu(idSlatCh9,"BOX",kSlatMaterial,spar,3);
       GetEnvelopes(8)->AddEnvelope(idSlatCh9, detElemId, true, TGeoTranslation(-xSlat5, ySlat5, zSlat5 - dzCh5),
                                   TGeoRotation("rot2",90,180+angle,90,90+angle,180,0) );
  
       if (i > 0) { 
        sprintf(idSlatCh9,"LE%d",kNslats5-1-i);
        detElemId = 913 + (i + kNslats5-1-6);
-       gMC->Gsvolu(idSlatCh9,"BOX",kSlatMaterial,spar,3);
+       //gMC->Gsvolu(idSlatCh9,"BOX",kSlatMaterial,spar,3);
        GetEnvelopes(8)->AddEnvelope(idSlatCh9, detElemId, true, TGeoTranslation(xSlat5, -ySlat5, -zSlat5 + dzCh5),
                                     TGeoRotation("rot3",90,angle,90,270+angle,180,0) );
 
        sprintf(idSlatCh9,"LE%d",3*kNslats5-2-i);
        detElemId = 926 - (i + kNslats5-1-6);
-       gMC->Gsvolu(idSlatCh9,"BOX",kSlatMaterial,spar,3);
+       //gMC->Gsvolu(idSlatCh9,"BOX",kSlatMaterial,spar,3);
        GetEnvelopes(8)->AddEnvelope(idSlatCh9, detElemId, true, TGeoTranslation(-xSlat5, -ySlat5, zSlat5 - dzCh5),
                                     TGeoRotation("rot4",90,180+angle,90,270+angle,0,0)  );
       }
 
       sprintf(idSlatCh10,"LF%d",kNslats5-1+i);
       detElemId = 1013 - (i + kNslats5-1-6);
-      gMC->Gsvolu(idSlatCh10,"BOX",kSlatMaterial,spar,3);
+      //gMC->Gsvolu(idSlatCh10,"BOX",kSlatMaterial,spar,3);
       GetEnvelopes(9)->AddEnvelope(idSlatCh10, detElemId, true, TGeoTranslation(xSlat5, ySlat5, -zSlat5 + dzCh5),
                                   TGeoRotation("rot5",90,angle,90,90+angle,0,0) );
 
       sprintf(idSlatCh10,"LF%d",3*kNslats5-2+i);
       detElemId = 1000 + (i + kNslats5-1-6);
-      gMC->Gsvolu(idSlatCh10,"BOX",kSlatMaterial,spar,3);
+      //gMC->Gsvolu(idSlatCh10,"BOX",kSlatMaterial,spar,3);
       GetEnvelopes(9)->AddEnvelope(idSlatCh10, detElemId, true, TGeoTranslation(-xSlat5, ySlat5, zSlat5 - dzCh5),
                                   TGeoRotation("rot6",90,180+angle,90,90+angle,180,0) );
 
       if (i > 0) { 
        sprintf(idSlatCh10,"LF%d",kNslats5-1-i);
        detElemId = 1013 + (i + kNslats5-1-6);
-       gMC->Gsvolu(idSlatCh10,"BOX",kSlatMaterial,spar,3);
+       //gMC->Gsvolu(idSlatCh10,"BOX",kSlatMaterial,spar,3);
        GetEnvelopes(9)->AddEnvelope(idSlatCh10, detElemId, true, TGeoTranslation(xSlat5, -ySlat5, -zSlat5 + dzCh5),
                                     TGeoRotation("rot7",90,angle,90,270+angle,180,0) );
        sprintf(idSlatCh10,"LF%d",3*kNslats5-2-i);
        detElemId = 1026 - (i + kNslats5-1-6);
-       gMC->Gsvolu(idSlatCh10,"BOX",kSlatMaterial,spar,3);
+       //gMC->Gsvolu(idSlatCh10,"BOX",kSlatMaterial,spar,3);
        GetEnvelopes(9)->AddEnvelope(idSlatCh10, detElemId, true, TGeoTranslation(-xSlat5, -ySlat5, zSlat5 - dzCh5),
                                     TGeoRotation("rot8",90,180+angle,90,270+angle,0,0) );
       }
@@ -1188,6 +1176,23 @@ void AliMUONSlatGeometryBuilder::SetTransformations()
 {
 // Defines the transformations for the station345 chambers.
 // ---
+
+  if (gAlice->GetModule("DIPO")) {
+    // if DIPO is preset, the whole station will be placed in DDIP volume
+    SetMotherVolume(4, "DDIP");
+    SetMotherVolume(5, "DDIP");
+    SetVolume(4, "CH05", true);
+    SetVolume(5, "CH06", true);
+  }    
+  else {
+    SetVolume(4, "CH05");
+    SetVolume(5, "CH06");
+  }  
+  SetVolume(6, "CH07");
+  SetVolume(7, "CH08");
+  SetVolume(8, "CH09");
+  SetVolume(9, "CH10");
+
 // Stations 345 are not perpendicular to the beam axis
 // See AliMUONConstants class
   TGeoRotation st345inclination("rot99");
index e073536..c34b8d6 100644 (file)
@@ -147,7 +147,7 @@ void AliMUONTriggerGeometryBuilder::CreateGeometry()
            Char_t volName[6];
            sprintf(volName,"%s%d", "SC",11+icount);
            gMC->Gsvolu(volName,"TUBE", idAir, par, 3);
-           GetGeometry(10+icount)->SetVolume(volName);
+           //SetVolume(10+icount, volName);
            Float_t zpos =  AliMUONConstants::DefaultChamberZ(10+icount);            
            
 /* removed 03/18/05
@@ -180,7 +180,7 @@ void AliMUONTriggerGeometryBuilder::CreateGeometry()
                        sprintf(volEnv[i],"S%dR%d",icount,iline);
                    else
                        sprintf(volEnv[i],"S%dL%d",icount,iline);
-                   gMC->Gsvolu(volEnv[i],"BOX",idAir,tpar,0); 
+                   // gMC->Gsvolu(volEnv[i],"BOX",idAir,tpar,0); 
                    i++;
                }
            }
@@ -334,6 +334,11 @@ void AliMUONTriggerGeometryBuilder::SetTransformations()
 // Defines the transformations for the trigger chambers.
 // ---
 
+    SetVolume(10, "SC11");
+    SetVolume(11, "SC12");
+    SetVolume(12, "SC13");
+    SetVolume(13, "SC14");
+
     Double_t zpos1= AliMUONConstants::DefaultChamberZ(10); 
     SetTranslation(10, TGeoTranslation(0., 0., zpos1));
     
@@ -345,7 +350,6 @@ void AliMUONTriggerGeometryBuilder::SetTransformations()
 
     zpos1= AliMUONConstants::DefaultChamberZ(13); 
     SetTranslation(13, TGeoTranslation(0., 0., zpos1));
-
 }
 
 //______________________________________________________________________________