]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Moving all Gstpar calls in Init: needed by G4 (Andrei)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 May 2007 13:27:51 +0000 (13:27 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 May 2007 13:27:51 +0000 (13:27 +0000)
ZDC/AliZDCv2.cxx

index 1c2b55bedf1f023cf991005448ed99a95142cd7e..d88e8f33e1dc6ccbdbbdbfff1d4467a6c27d267d 100644 (file)
@@ -898,10 +898,7 @@ void AliZDCv2::CreateMaterials()
   // Create Materials for the Zero Degree Calorimeter
   //
   
-  Int_t *idtmed = fIdtmed->GetArray();
-  
   Float_t dens, ubuf[1], wmat[2], a[2], z[2];
-  Int_t i;
   
   // --- Store in UBUF r0 for nuclear radius calculation R=r0*A**1/3 
 
@@ -1015,8 +1012,36 @@ void AliZDCv2::CreateMaterials()
   AliMedium(12,"ZAIR", 12, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
   //
   AliMedium(11,"ZVOIM", 11, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
-  AliMedium(13,"ZIRONE",13, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
-  
+  AliMedium(13,"ZIRONE",13, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin);  
+} 
+
+//_____________________________________________________________________________
+void AliZDCv2::AddAlignableVolumes() const
+{
+ //
+ // Create entries for alignable volumes associating the symbolic volume
+ // name with the corresponding volume path. Needs to be syncronized with
+ // eventual changes in the geometry.
+ //
+ TString volpath1 = "ALIC_1/ZDC_1/ZNEU_1";
+ TString volpath2 = "ALIC_1/ZDC_1/ZPRO_1";
+
+ TString symname1="ZDC/NeutronZDC";
+ TString symname2="ZDC/ProtonZDC";
+
+ if(!gGeoManager->SetAlignableEntry(symname1.Data(),volpath1.Data()))
+     AliFatal(Form("Alignable entry %s not created. Volume path %s not valid",   symname1.Data(),volpath1.Data()));
+
+ if(!gGeoManager->SetAlignableEntry(symname2.Data(),volpath2.Data()))
+     AliFatal(Form("Alignable entry %s not created. Volume path %s not valid",   symname2.Data(),volpath2.Data()));
+}
+
+//_____________________________________________________________________________
+void AliZDCv2::Init()
+{
+  InitTables();
+  Int_t *idtmed = fIdtmed->GetArray();  
+  Int_t i;
   // Thresholds for showering in the ZDCs 
   i = 1; //tantalum
   gMC->Gstpar(idtmed[i], "CUTGAM", .001);
@@ -1113,33 +1138,6 @@ void AliZDCv2::CreateMaterials()
   fMedSensTDI = idtmed[6];  // Sensitive volume: TDI Cu shield
   fMedSensPI  = idtmed[7];  // Sensitive volume: beam pipes
   fMedSensGR  = idtmed[12]; // Sensitive volume: air into the grooves
-} 
-
-//_____________________________________________________________________________
-void AliZDCv2::AddAlignableVolumes() const
-{
- //
- // Create entries for alignable volumes associating the symbolic volume
- // name with the corresponding volume path. Needs to be syncronized with
- // eventual changes in the geometry.
- //
- TString volpath1 = "ALIC_1/ZDC_1/ZNEU_1";
- TString volpath2 = "ALIC_1/ZDC_1/ZPRO_1";
-
- TString symname1="ZDC/NeutronZDC";
- TString symname2="ZDC/ProtonZDC";
-
- if(!gGeoManager->SetAlignableEntry(symname1.Data(),volpath1.Data()))
-     AliFatal(Form("Alignable entry %s not created. Volume path %s not valid",   symname1.Data(),volpath1.Data()));
-
- if(!gGeoManager->SetAlignableEntry(symname2.Data(),volpath2.Data()))
-     AliFatal(Form("Alignable entry %s not created. Volume path %s not valid",   symname2.Data(),volpath2.Data()));
-}
-
-//_____________________________________________________________________________
-void AliZDCv2::Init()
-{
- InitTables();
 }
 
 //_____________________________________________________________________________