From cbc917f26cb41158b241526283bd1ee3e0c4a99f Mon Sep 17 00:00:00 2001 From: paraiso Date: Thu, 23 Feb 2006 13:23:18 +0000 Subject: [PATCH] Added To SVN Repository --- geant4/LEMuSR/Readme.txt | 11 ++ geant4/LEMuSR/allmk.sh | 18 ++ geant4/LEMuSR/asym.sh | 13 ++ geant4/LEMuSR/dawn.sh | 4 + geant4/LEMuSR/field.sh | 10 ++ geant4/LEMuSR/fieldmapsdir.sh | 2 + geant4/LEMuSR/focal.sh | 11 ++ .../include/LEMuSRDetectorConstruction.hh | 11 +- geant4/LEMuSR/include/LEMuSRElectricField.hh | 17 +- geant4/LEMuSR/include/LEMuSRParticleGun.hh | 1 - geant4/LEMuSR/include/LEMuSRRunAction.hh | 4 +- geant4/LEMuSR/longit.sh | 6 + geant4/LEMuSR/make.sh | 10 ++ geant4/LEMuSR/mk.sh | 10 ++ geant4/LEMuSR/mkclean.sh | 14 ++ .../LEMuSR/src/LEMuSRDetectorConstruction.cc | 163 ++++++++++-------- geant4/LEMuSR/src/LEMuSRDetectorMessenger.cc | 38 ++-- geant4/LEMuSR/src/LEMuSRElectricField.cc | 8 +- geant4/LEMuSR/src/LEMuSRMaterials.cc | 16 +- geant4/LEMuSR/src/LEMuSRParticleGun.cc | 4 +- geant4/LEMuSR/src/LEMuSRRunAction.cc | 12 +- geant4/LEMuSR/stepping.sh | 11 ++ geant4/LEMuSR/td.sh | 11 ++ geant4/LEMuSR/transverse.sh | 6 + geant4/LEMuSR/update.sh | 47 +++++ 25 files changed, 340 insertions(+), 118 deletions(-) create mode 100644 geant4/LEMuSR/Readme.txt create mode 100644 geant4/LEMuSR/allmk.sh create mode 100644 geant4/LEMuSR/asym.sh create mode 100644 geant4/LEMuSR/dawn.sh create mode 100644 geant4/LEMuSR/field.sh create mode 100644 geant4/LEMuSR/fieldmapsdir.sh create mode 100644 geant4/LEMuSR/focal.sh create mode 100644 geant4/LEMuSR/longit.sh create mode 100644 geant4/LEMuSR/make.sh create mode 100644 geant4/LEMuSR/mk.sh create mode 100644 geant4/LEMuSR/mkclean.sh create mode 100644 geant4/LEMuSR/stepping.sh create mode 100644 geant4/LEMuSR/td.sh create mode 100644 geant4/LEMuSR/transverse.sh create mode 100644 geant4/LEMuSR/update.sh diff --git a/geant4/LEMuSR/Readme.txt b/geant4/LEMuSR/Readme.txt new file mode 100644 index 0000000..d341a20 --- /dev/null +++ b/geant4/LEMuSR/Readme.txt @@ -0,0 +1,11 @@ +Geant4 ElectricField update files: + +Copy files in the following directories: + +G4El_EqRhs -----> $G4Install/source/geometry/magneticfield /src and /include +G4El_UsualEqRhs -----> $G4Install/source/geometry/magneticfield /src and /include +G4ChordFinder -----> $G4Install/source/geometry/magneticfield /src and /include +G4ParticleGun -----> $G4Install/source/event /src and /include + + +track/ is the geant4.6.2 version of $G4Install/source/track directory and should be updated \ No newline at end of file diff --git a/geant4/LEMuSR/allmk.sh b/geant4/LEMuSR/allmk.sh new file mode 100644 index 0000000..8406255 --- /dev/null +++ b/geant4/LEMuSR/allmk.sh @@ -0,0 +1,18 @@ +cd $G4INSTALL/source/particles/management +gmake +cd $G4INSTALL/source/particles/leptons +gmake +cd $G4INSTALL/source/run/ +gmake +cd $G4INSTALL/source/geometry/magneticfield/ +gmake +cd $G4INSTALL/source/track/ +gmake +cd $G4INSTALL/source/tracking/ +gmake +cd $G4INSTALL/source/processes/management/ +gmake +cd $G4INSTALL/source/processes/decay/ +gmake +cd $wlem +gmake diff --git a/geant4/LEMuSR/asym.sh b/geant4/LEMuSR/asym.sh new file mode 100644 index 0000000..862211e --- /dev/null +++ b/geant4/LEMuSR/asym.sh @@ -0,0 +1,13 @@ +export ASYM_USE_LEMU=1 + +unset LEMU_TEST_FIELD +unset LEMU_TEST_CFOIL +unset LEMU_TEST_FOCAL_LENGTH +export LEMU_TEST_ASYM=1 + + +rm ~/geant4/tmp/Linux-g++/LEMuSR/exe/* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRDetectorConstruction.* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRPrimaryGeneratorAction.* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRMuonPhysics.* + diff --git a/geant4/LEMuSR/dawn.sh b/geant4/LEMuSR/dawn.sh new file mode 100644 index 0000000..a5b466f --- /dev/null +++ b/geant4/LEMuSR/dawn.sh @@ -0,0 +1,4 @@ +export G4DAWN_NAMED_PIPE=1 +export G4DAWN_GUI_ALWAYS=1 + + diff --git a/geant4/LEMuSR/field.sh b/geant4/LEMuSR/field.sh new file mode 100644 index 0000000..f15b623 --- /dev/null +++ b/geant4/LEMuSR/field.sh @@ -0,0 +1,10 @@ +export ASYM_USE_LEMU=1 +export LEMU_TEST_FIELD=1 +unset LEMU_TEST_CFOIL +unset LEMU_TEST_FOCAL_LENGTH +unset LEMU_TEST_ASYM + +rm ~/geant4/tmp/Linux-g++/LEMuSR/exe/* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRDetectorConstruction.* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRPrimaryGeneratorAction.* + diff --git a/geant4/LEMuSR/fieldmapsdir.sh b/geant4/LEMuSR/fieldmapsdir.sh new file mode 100644 index 0000000..55fb744 --- /dev/null +++ b/geant4/LEMuSR/fieldmapsdir.sh @@ -0,0 +1,2 @@ +export LEMuSR_FIELDMAPS_DIR=/home/l_paraiso/LEMuSR/FieldMaps + diff --git a/geant4/LEMuSR/focal.sh b/geant4/LEMuSR/focal.sh new file mode 100644 index 0000000..474dd62 --- /dev/null +++ b/geant4/LEMuSR/focal.sh @@ -0,0 +1,11 @@ +export ASYM_USE_LEMU=1 + +export LEMU_TEST_FOCAL_LENGTH=1 +unset LEMU_TEST_ASYM +unset LEMU_TEST_FIELD + + +rm ~/geant4/tmp/Linux-g++/LEMuSR/exe/* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRDetectorConstruction.* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRPrimaryGeneratorAction.* + diff --git a/geant4/LEMuSR/include/LEMuSRDetectorConstruction.hh b/geant4/LEMuSR/include/LEMuSRDetectorConstruction.hh index 58a6d6b..6cde1c2 100644 --- a/geant4/LEMuSR/include/LEMuSRDetectorConstruction.hh +++ b/geant4/LEMuSR/include/LEMuSRDetectorConstruction.hh @@ -135,7 +135,7 @@ public: G4VPhysicalVolume* Construct(); //! Implementation of the detector construction procedure (cf. Construct). - /*! In this method the Wold volume or Labo is defined as a 2x2x2 m³ room. Then the different contruction methods are called and the sensitive detection for the scintillators, the MCP2 and the sample plate are defined (cf. Construct). + /*! In this method the Wold volume or Labo is defined as a 2x2x4 cubic meters room, which center defines the origin point (0 0 0) of the geometry. Then the different contruction methods are called and the sensitive detection for the scintillators, the MCP2 and the sample plate are defined. */ G4VPhysicalVolume* lemuDetector(); @@ -150,7 +150,7 @@ public: private: - + //!#anchor LEMUDETCOMPONENTS //=======LABORATORY::WORLD================= // solid @@ -429,9 +429,9 @@ private: // logical - G4LogicalVolume *lv_Trigger, *lv_TriggerF, *lv_TriggerV, *lv_TriggerB, *lv_TriggerB2, *lv_TriggerB3, *lv_CFOIL; + G4LogicalVolume *lv_Trigger, *lv_TriggerF, *lv_TriggerV, *lv_TriggerE, *lv_TriggerE2, *lv_TriggerE3, *lv_CFOIL; // physica.l - G4VPhysicalVolume *pv_Trigger, *pv_TriggerF1, *pv_TriggerF2,*pv_TriggerV, *pv_TriggerB, *pv_TriggerB2, *pv_TriggerB3, *pv_CFOIL; + G4VPhysicalVolume *pv_Trigger, *pv_TriggerF1, *pv_TriggerF2,*pv_TriggerV, *pv_TriggerE, *pv_TriggerE2, *pv_TriggerE3, *pv_CFOIL; //================ COMPENSATION GATE ==================== @@ -522,6 +522,7 @@ public: //====== MATERIAL DECLARATION ========================= private: + //!\anchor mat_def //! Declaration of materials /*! This method contains the definition of all elements and materials and builds the materials table. It is important to call this method in the contructor because the materials table should be built only once. If this method was called in the Construct method, each modification of the detector would lead to an additional materials table. The consequence is a severe conflict causing a segmentation fault.*/ void MaterialsDefinition(); @@ -587,7 +588,7 @@ public: G4Material* VTBB_material; - + G4String FieldMapsDir; // print STATUS diff --git a/geant4/LEMuSR/include/LEMuSRElectricField.hh b/geant4/LEMuSR/include/LEMuSRElectricField.hh index f358bb7..158dc7a 100644 --- a/geant4/LEMuSR/include/LEMuSRElectricField.hh +++ b/geant4/LEMuSR/include/LEMuSRElectricField.hh @@ -25,7 +25,9 @@ * COMSOL Multiphysics. * \image html field.gif Example of a field map generated using COMSOL. * Those field maps are shared into three ascii files, one per field component, - * in the format (x y z B_i). + * in the format (x y z B_i). The first line in the file contains + * the labels. The second line is (x_min y_min z_min B_i) and the last line + * is (x_max y_max z_max B_i). * LEMuSRElectricField reads those files and store them in an array. * Some important parameters must be specified to read a field map: * -# The number of points along each axis which was defined in COMSOL @@ -37,7 +39,7 @@ * - A different unit has an influence * on the coordinates reading, but also on the actual field value which has to * be scaled consequently. - * -# The voltage to use because field maps are calculated for 1kV potential. + * -# The voltage to use. Indeed,the field maps are generated for 1kV potential. * The user should indicate the actual voltage to multiply the fields values. * -# The offset along z axis, in case the map is not centered on the actual * postition of the field. This is the case for the third lense field for example: @@ -45,7 +47,8 @@ * . * The field maps can be very heavy files and reading them can cost a lot of time. * For this reason, it is possible to write the field map array in a single file - * after the first reading. + * after the first reading. Such maps files have been produced for the third + * lens, the anode and the sample. */ #ifndef LEMUSRELECTRICFIELD_H @@ -71,13 +74,13 @@ class LEMuSRElectricField : public G4ElectricField public: //! Constructor from three field maps - LEMuSRElectricField(G4double fieldval,const char* Xfile, - const char* Yfile, - const char* Zfile,G4String map_length_unit, + LEMuSRElectricField(G4double fieldval,G4String Xfile, + G4String Yfile, + G4String Zfile,G4String map_length_unit, G4double Offset, G4double nx, G4double ny, G4double nz);//offset must be entered in millimeter //! Contructor from a single field map - LEMuSRElectricField(G4double fieldval,const char* file,G4String map_length_unit, + LEMuSRElectricField(G4double fieldval,G4String file,G4String map_length_unit, G4double Offset, G4double nx, G4double ny, G4double nz); diff --git a/geant4/LEMuSR/include/LEMuSRParticleGun.hh b/geant4/LEMuSR/include/LEMuSRParticleGun.hh index 3da5a9e..416d110 100644 --- a/geant4/LEMuSR/include/LEMuSRParticleGun.hh +++ b/geant4/LEMuSR/include/LEMuSRParticleGun.hh @@ -65,7 +65,6 @@ protected: private: //! Messenger LEMuSRParticleGunMessenger* theMessenger; - G4ParticleGunMessenger* Messenger; }; diff --git a/geant4/LEMuSR/include/LEMuSRRunAction.hh b/geant4/LEMuSR/include/LEMuSRRunAction.hh index e6914da..bb3ecfe 100644 --- a/geant4/LEMuSR/include/LEMuSRRunAction.hh +++ b/geant4/LEMuSR/include/LEMuSRRunAction.hh @@ -40,7 +40,9 @@ #include "TTree.h" #include "TBranch.h" - +#include "G4VPhysicalVolume.hh" +// LEMuSR +#include "LEMuSRDetectorConstruction.hh" //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... diff --git a/geant4/LEMuSR/longit.sh b/geant4/LEMuSR/longit.sh new file mode 100644 index 0000000..3a27fa5 --- /dev/null +++ b/geant4/LEMuSR/longit.sh @@ -0,0 +1,6 @@ +unset LEMU_TRANSVERSE_FIELD + + +rm ~/geant4/tmp/Linux-g++/LEMuSR/exe/* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRDetectorConstruction.* + diff --git a/geant4/LEMuSR/make.sh b/geant4/LEMuSR/make.sh new file mode 100644 index 0000000..56a90f8 --- /dev/null +++ b/geant4/LEMuSR/make.sh @@ -0,0 +1,10 @@ +#cd ~/geant4.7.1/source/particles/management +#gmake +#cd ~/geant4.7.1/source/particles/leptons +#gmake +cd ~/geant4.7.1/source/processes/transportation/ +gmake +#cd ~/geant4.7.1/source/geometry/navigation/ +#gmake +cd $wlem +gmake diff --git a/geant4/LEMuSR/mk.sh b/geant4/LEMuSR/mk.sh new file mode 100644 index 0000000..120ecc0 --- /dev/null +++ b/geant4/LEMuSR/mk.sh @@ -0,0 +1,10 @@ +cd ~/geant4.6.1/source/processes/decay/ +make +cd ~/geant4.6.1/source/track +make +cd ~/geant4.6.1/source/particles/management/ +make +cd ~/geant4.6.1/source/particles/leptons/ +make +cd $lem +make \ No newline at end of file diff --git a/geant4/LEMuSR/mkclean.sh b/geant4/LEMuSR/mkclean.sh new file mode 100644 index 0000000..96b5986 --- /dev/null +++ b/geant4/LEMuSR/mkclean.sh @@ -0,0 +1,14 @@ +cd ~/geant4.6.1/source/processes/decay/ +make clean +$make +cd ~/geant4.6.1/source/track +make clean +$make +cd ~/geant4.6.1/source/particles/management/ +make clean +$make +cd ~/geant4.6.1/source/particles/leptons/ +make clean +$make +cd $lem +$make diff --git a/geant4/LEMuSR/src/LEMuSRDetectorConstruction.cc b/geant4/LEMuSR/src/LEMuSRDetectorConstruction.cc index f7fa162..a3dd786 100644 --- a/geant4/LEMuSR/src/LEMuSRDetectorConstruction.cc +++ b/geant4/LEMuSR/src/LEMuSRDetectorConstruction.cc @@ -96,7 +96,14 @@ LEMuSRDetectorConstruction::LEMuSRDetectorConstruction() dSPhi = 0*deg; // starting angle dEPhi = 360*deg; // ending angle - + FieldMapsDir=getenv("LEMuSR_FIELDMAPS_DIR"); + if(FieldMapsDir) + + G4cout<<"Fied Maps Directory is: "<< FieldMapsDir<asymcheck==1 then build a spherical detector around mcp chamber to test the asymmetry. Shall be modified in the future. if(AsymCheck==1) { lemuAsym(); } - +//! If asymcheck==0 then build the trigger detector, the gate valve chamber, the third lens, the anode and the scintillators. if(AsymCheck==0) { @@ -233,11 +240,16 @@ G4VPhysicalVolume* LEMuSRDetectorConstruction::lemuDetector() // !attention au V lemuSCINT(); #ifdef LEMU_TEST_FOCAL_LENGTH - lemuFieldCheck(); + //! If LEMU_TEST_FOCAL_LENGTH is defined then + lemuFieldCheck(); #endif - - if(mcdetector==0) //then use cryostat + //! Sensitive Detection + /*! + * The sensitive detector and the hit collection it builds must be singletons, i.e. they can be instanciated only once. Hence, the variable cryo, mcp and scint are set to 1 as soon as the sensitive detector is built. + */ + + if(mcdetector==0) //! If mcdetector==0 then use cryostat { lemuCRYO(); if(cryo==0) @@ -257,7 +269,7 @@ G4VPhysicalVolume* LEMuSRDetectorConstruction::lemuDetector() // !attention au V } - else if(mcdetector==1) //then use multiple channel detector + else if(mcdetector==1) //! If mcdetector==1then use micro channel detector { lemuMCPdet(); if(mcp==0) @@ -335,6 +347,7 @@ void LEMuSRDetectorConstruction::lemuMCP2() // main volumes MCPV_tube= new G4Tubs( "sMCPV", 0.00*cm, 7.65*cm, 25.45*cm, dSPhi, dEPhi); + G4cout<GetFieldValue(position,Efield); do { - cryoField->GetFieldValue(position,Efield); G4cout<SetGuidance("\n Third Lense Middle Cylinder Voltage Value >> IN KILOVOLT "); + SetThirdLensPotential = new G4UIcmdWithADouble("/Detector/Voltage/ThirdLens",this); + SetThirdLensPotential->SetGuidance("\n Third Lens Middle Cylinder Voltage Value >> IN KILOVOLT "); SetThirdLensPotential->SetParameterName("f",false); SetThirdLensPotential->SetDefaultValue(1); SetThirdLensPotential->AvailableForStates(G4State_PreInit,G4State_Idle); @@ -129,7 +129,7 @@ LEMuSRDetectorMessenger::LEMuSRDetectorMessenger(LEMuSRDetectorConstruction *lem SetDetVisualization->AvailableForStates(G4State_PreInit,G4State_Idle); SetFieldStepLim = new G4UIcmdWithADouble("/Detector/MaxStepInField",this); - SetFieldStepLim->SetGuidance("\n The user step limitation in third lense and conical anode [mm] "); + SetFieldStepLim->SetGuidance("\n The user step limitation in third lens chamber and sample chamber [mm] "); SetFieldStepLim->SetParameterName("usl",false); SetFieldStepLim->SetDefaultValue(10.); SetFieldStepLim->AvailableForStates(G4State_PreInit,G4State_Idle); @@ -306,21 +306,26 @@ void LEMuSRDetectorMessenger::SetNewValue(G4UIcommand* command, G4String newvalu // theDetector->elfield=1; // theDetector->anode_elfield=1; theDetector->trigger_field=1; + + newDetector = theDetector->Construct(); + G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); G4cout<<"THIS COMMAND ONLY ENABLES THE TRIGGER FIELD.\n" - <<" TO SET THE ELECTROSTATIC LENSES USE /Detector/Voltage COMMAND."<elfield=0; theDetector->anode_elfield=0; theDetector->trigger_field=0; + + newDetector = theDetector->Construct(); + G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); + G4cout<<"ALL ELECTRIC FIELDS ARE NOW DISABLED."<Construct(); - G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); } @@ -401,28 +406,37 @@ void LEMuSRDetectorMessenger::SetNewValue(G4UIcommand* command, G4String newvalu theDetector->dSPhi=0*deg; theDetector->dEPhi=360*deg; theDetector->halfview=0; + + newDetector = theDetector->Construct(); + G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); + G4cout << " \n TOTAL GEOMETRY IS LOADED. \n" ; } else if(newvalue=="half") { theDetector->dSPhi=+90*deg; theDetector->dEPhi=180*deg; theDetector->halfview=1; + + newDetector = theDetector->Construct(); + G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); + G4cout << " \n !!! BEFORE '/run/beamOn' :: PLEASE ENSURE TOTAL GEOMETRY IS LOADED !!! \n" ; } else if(newvalue=="quarter") { theDetector->dSPhi=0*deg; theDetector->dEPhi=270*deg; theDetector->halfview=1; + + newDetector = theDetector->Construct(); + G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); + G4cout << " \n !!! BEFORE '/run/beamOn' :: PLEASE ENSURE TOTAL GEOMETRY IS LOADED !!! \n" ; } else { - G4cout << "Unknown command: please check value."<Construct(); - G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); - - G4cout << " \n !!! BEFORE '/run/beamOn' :: PLEASE ENSURE TOTAL GEOMETRY IS LOADED !!! \n" ; + // Update visualization //UI ->ApplyCommand("/vis/viewer/refresh") ; //UI ->ApplyCommand("/vis/viewer/update"); diff --git a/geant4/LEMuSR/src/LEMuSRElectricField.cc b/geant4/LEMuSR/src/LEMuSRElectricField.cc index b49eca0..d645f66 100644 --- a/geant4/LEMuSR/src/LEMuSRElectricField.cc +++ b/geant4/LEMuSR/src/LEMuSRElectricField.cc @@ -23,9 +23,9 @@ #include"G4UnitsTable.hh" -LEMuSRElectricField::LEMuSRElectricField(G4double fieldval,const char* Xfile, - const char* Yfile, - const char* Zfile, +LEMuSRElectricField::LEMuSRElectricField(G4double fieldval,G4String Xfile, + G4String Yfile, + G4String Zfile, G4String map_length_unit, G4double Offset, G4double nbx, G4double nby, G4double nbz) { @@ -148,7 +148,7 @@ LEMuSRElectricField::LEMuSRElectricField(G4double fieldval,const char* Xfile, -LEMuSRElectricField::LEMuSRElectricField(G4double fieldval,const char* file, +LEMuSRElectricField::LEMuSRElectricField(G4double fieldval,G4String file, G4String map_length_unit, G4double Offset, G4double nbx, diff --git a/geant4/LEMuSR/src/LEMuSRMaterials.cc b/geant4/LEMuSR/src/LEMuSRMaterials.cc index 8ca8879..0a56e3a 100644 --- a/geant4/LEMuSR/src/LEMuSRMaterials.cc +++ b/geant4/LEMuSR/src/LEMuSRMaterials.cc @@ -288,7 +288,7 @@ void LEMuSRDetectorConstruction :: MaterialsDefinition () - /***MATERIAUX***/ + /***MATERIALS***/ // definition : composition de Air density=1.290*mg/cm3; @@ -323,22 +323,22 @@ void LEMuSRDetectorConstruction :: MaterialsDefinition () - //definition materiau 'tantale' + //definition material 'tantale' density = 16.650*g/cm3; G4Material* tantale = new G4Material(name="tantale", density, 1); tantale->AddElement (Ta, nbelements=1); - //definition materiau 'or' + //definition material 'or' density = 19.300*g/cm3; G4Material* gold = new G4Material(name="gold", density, 1); gold->AddElement (Au, nbelements=1); - // definition materiau 'iron' + // definition material 'iron' density = 7.874*g/cm3; G4Material* iron = new G4Material("iron",density,1); iron->AddElement (Fe,1); - // definition materiau 'tungsten' + // definition material 'tungsten' density =19.250*g/cm3; G4Material* tungsten = new G4Material("tungsten",density,1); tungsten->AddElement(W,1); @@ -350,7 +350,7 @@ void LEMuSRDetectorConstruction :: MaterialsDefinition () graphite->AddElement (C,1); - /***MATERIAUX***/ + /***MATERIALS***/ // definition composition of NaI density = 3.67*g/cm3; @@ -390,12 +390,12 @@ void LEMuSRDetectorConstruction :: MaterialsDefinition () saphire->AddElement (Al, nbelements=2); saphire->AddElement (O, nbelements=3); - //definition materiau 'copper' + //definition material 'copper' density = 8.920*g/cm3; G4Material* copper = new G4Material(name="copper", density, 1); copper->AddElement (Cu, nbelements=1); - // definition materiau 'aluminium' + // definition material 'aluminium' density = 2.700*g/cm3; G4Material* aluminium = new G4Material("aluminium",density,1); aluminium->AddElement (Al,1); diff --git a/geant4/LEMuSR/src/LEMuSRParticleGun.cc b/geant4/LEMuSR/src/LEMuSRParticleGun.cc index 7fbb2b8..d29a49e 100644 --- a/geant4/LEMuSR/src/LEMuSRParticleGun.cc +++ b/geant4/LEMuSR/src/LEMuSRParticleGun.cc @@ -35,12 +35,12 @@ LEMuSRParticleGun::LEMuSRParticleGun() { SetInitialValues(); - Messenger = new G4ParticleGunMessenger(this); + theMessenger = new LEMuSRParticleGunMessenger(this); } LEMuSRParticleGun::~LEMuSRParticleGun() { - delete Messenger; + delete theMessenger; } void LEMuSRParticleGun::SetInitialValues() diff --git a/geant4/LEMuSR/src/LEMuSRRunAction.cc b/geant4/LEMuSR/src/LEMuSRRunAction.cc index 5c6a7c5..9fd107b 100644 --- a/geant4/LEMuSR/src/LEMuSRRunAction.cc +++ b/geant4/LEMuSR/src/LEMuSRRunAction.cc @@ -38,7 +38,6 @@ #include "TCanvas.h" - //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... LEMuSRRunAction::LEMuSRRunAction() @@ -55,16 +54,25 @@ LEMuSRRunAction::~LEMuSRRunAction() /*! Initializes the user interface manager.*/ void LEMuSRRunAction::BeginOfRunAction(const G4Run* aRun) { + G4UImanager* UI = G4UImanager::GetUIpointer(); G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl; G4RunManager::GetRunManager()->SetRandomNumberStore(true); if (G4VVisManager::GetConcreteInstance()) { - G4UImanager* UI = G4UImanager::GetUIpointer(); UI->ApplyCommand("/vis/scene/notifyHandlers"); } + //! BUILD THE DETECTOR IN TOTAL GEOMETRY +// G4cout<<"WILL REBUILD THE DETECTOR"<ApplyCommand("/Detector/View total"); + +// G4VPhysicalVolume* newDetector = LEMuSRDetectorConstruction::GetInstance()->Construct(); +// G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); +// G4cout<<"DETECTOR BUILT."<