]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TGeant4/TGeant4.cxx
initialising of pad size added to ctor
[u/mrichter/AliRoot.git] / TGeant4 / TGeant4.cxx
index 55ea2a532a6e34f730a443b5ef338ec89b8b501f..07085df2566b7cede510a5d3d25b80b808379275 100644 (file)
@@ -1,12 +1,17 @@
 // $Id$
 // Category: run
 //
+// Author: I. Hrivnacova
+//
+// Class TGeant4
+// -------------
 // See the class description in the header file.
 
 #include "TGeant4.h"
 #include "TG4Messenger.h"
 #include "TG4VRunConfiguration.h"
 #include "TG4GeometryManager.h" 
+#include "TG4SDManager.h" 
 #include "TG4PhysicsManager.h" 
 #include "TG4StepManager.h" 
 #include "TG4VisManager.h"
@@ -31,6 +36,11 @@ TGeant4::TGeant4(const char* name, const char* title,
   // add verbose level
   //G4cout << "TG4GeometryManager has been created." << endl;
   
+  // create sensitive detectors manager
+  fSDManager = new TG4SDManager(configuration->GetSDConstruction());
+  // add verbose level
+  //G4cout << "TG4SDManager has been created." << endl;
+  
   // create physics manager  
   fPhysicsManager = new TG4PhysicsManager(configuration->GetPhysicsList());
   // add verbose level
@@ -68,6 +78,11 @@ TGeant4::TGeant4(const char* name, const char* title,
   // add verbose level
   //G4cout << "TG4GeometryManager has been created." << endl;
   
+  // create sensitive detectors manager
+  fSDManager = new TG4SDManager(configuration->GetSDConstruction());
+  // add verbose level
+  //G4cout << "TG4SDManager has been created." << endl;
+  
   // create physics manager  
   fPhysicsManager = new TG4PhysicsManager(configuration->GetPhysicsList());
   // add verbose level
@@ -105,6 +120,7 @@ TGeant4::~TGeant4() {
 //
   delete fRunManager;
   delete fGeometryManager;
+  delete fSDManager;
   delete fPhysicsManager;
   delete fStepManager;
   // fVisManager is deleted with G4RunManager destructor
@@ -189,12 +205,6 @@ void TGeant4::Matrix(Int_t& krot, Float_t thetaX, Float_t phiX,
     ->Matrix(krot, thetaX, phiX, thetaY, phiY, thetaZ, phiZ); 
 } 
 
-//_____________________________________________________________________________
-void TGeant4::Gstpar(Int_t itmed, const char *param, Float_t parval) {
-//
-  fGeometryManager->Gstpar(itmed, param, parval); 
-}    
-
 //_____________________________________________________________________________
 Int_t TGeant4::Gsvolu(const char *name, const char *shape, Int_t nmed,  
                          Double_t *upar, Int_t np)  {
@@ -313,25 +323,25 @@ void TGeant4::WriteEuclid(const char* fileName, const char* topVol,
 //_____________________________________________________________________________
 Int_t TGeant4::VolId(const Text_t* volName) const {
 //
-  return fGeometryManager->VolId(volName); 
+  return fSDManager->VolId(volName); 
 } 
 
 //_____________________________________________________________________________
 const char* TGeant4::VolName(Int_t id) const {
 //
-  return fGeometryManager->VolName(id); 
+  return fSDManager->VolName(id); 
 }
  
 //_____________________________________________________________________________
 Int_t TGeant4::NofVolumes() const {
 //
-  return fGeometryManager->NofVolumes(); 
+  return fSDManager->NofVolumes(); 
 } 
 
 //_____________________________________________________________________________
 Int_t TGeant4::VolId2Mate(Int_t id) const {
 //
-  return fGeometryManager->VolId2Mate(id); 
+  return fSDManager->VolId2Mate(id); 
 } 
 
 
@@ -340,10 +350,11 @@ Int_t TGeant4::VolId2Mate(Int_t id) const {
 // ------------------------------------------------
  
 //_____________________________________________________________________________
-void TGeant4::BuildPhysics() {
+void TGeant4::Gstpar(Int_t itmed, const char *param, Float_t parval) {
 //
-  fPhysicsManager->BuildPhysics();
-}  
+  fGeometryManager->Gstpar(itmed, param, parval); 
+  fPhysicsManager->Gstpar(itmed, param, parval); 
+}    
 
 //_____________________________________________________________________________
 void TGeant4::SetCut(const char* cutName, Float_t cutValue) { 
@@ -454,6 +465,12 @@ void TGeant4::Init() {
   fRunManager->Initialize();
 }  
   
+//_____________________________________________________________________________
+void TGeant4::BuildPhysics() {
+//
+  fRunManager->LateInitialize();
+}  
+
 //_____________________________________________________________________________
 void TGeant4::ProcessEvent() { 
 //