Added To SVN Repository

This commit is contained in:
paraiso 2006-02-23 13:23:18 +00:00
parent 0bb44a5374
commit cbc917f26c
25 changed files with 340 additions and 118 deletions

11
geant4/LEMuSR/Readme.txt Normal file
View File

@ -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

18
geant4/LEMuSR/allmk.sh Normal file
View File

@ -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

13
geant4/LEMuSR/asym.sh Normal file
View File

@ -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.*

4
geant4/LEMuSR/dawn.sh Normal file
View File

@ -0,0 +1,4 @@
export G4DAWN_NAMED_PIPE=1
export G4DAWN_GUI_ALWAYS=1

10
geant4/LEMuSR/field.sh Normal file
View File

@ -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.*

View File

@ -0,0 +1,2 @@
export LEMuSR_FIELDMAPS_DIR=/home/l_paraiso/LEMuSR/FieldMaps

11
geant4/LEMuSR/focal.sh Normal file
View File

@ -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.*

View File

@ -135,7 +135,7 @@ public:
G4VPhysicalVolume* Construct(); G4VPhysicalVolume* Construct();
//! Implementation of the detector construction procedure (cf. 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(); G4VPhysicalVolume* lemuDetector();
@ -150,7 +150,7 @@ public:
private: private:
//!#anchor LEMUDETCOMPONENTS
//=======LABORATORY::WORLD================= //=======LABORATORY::WORLD=================
// solid // solid
@ -429,9 +429,9 @@ private:
// logical // 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 // 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 ==================== //================ COMPENSATION GATE ====================
@ -522,6 +522,7 @@ public:
//====== MATERIAL DECLARATION ========================= //====== MATERIAL DECLARATION =========================
private: private:
//!\anchor mat_def
//! Declaration of materials //! 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.*/ /*! 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(); void MaterialsDefinition();
@ -587,7 +588,7 @@ public:
G4Material* VTBB_material; G4Material* VTBB_material;
G4String FieldMapsDir;
// print STATUS // print STATUS

View File

@ -25,7 +25,9 @@
* COMSOL Multiphysics. * COMSOL Multiphysics.
* \image html field.gif Example of a field map generated using COMSOL. * \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, * 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. * LEMuSRElectricField reads those files and store them in an array.
* Some important parameters must be specified to read a field map: * Some important parameters must be specified to read a field map:
* -# <b> The number of points</b> along each axis which was defined in COMSOL * -# <b> The number of points</b> along each axis which was defined in COMSOL
@ -37,7 +39,7 @@
* - A different unit has an influence * - A different unit has an influence
* on the coordinates reading, but also on the actual field value which has to * on the coordinates reading, but also on the actual field value which has to
* be scaled consequently. * 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 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 * -# 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: * 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. * 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 * 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 #ifndef LEMUSRELECTRICFIELD_H
@ -71,13 +74,13 @@ class LEMuSRElectricField : public G4ElectricField
public: public:
//! Constructor from three field maps //! Constructor from three field maps
LEMuSRElectricField(G4double fieldval,const char* Xfile, LEMuSRElectricField(G4double fieldval,G4String Xfile,
const char* Yfile, G4String Yfile,
const char* Zfile,G4String map_length_unit, G4String Zfile,G4String map_length_unit,
G4double Offset, G4double nx, G4double ny, G4double nz);//offset must be entered in millimeter G4double Offset, G4double nx, G4double ny, G4double nz);//offset must be entered in millimeter
//! Contructor from a single field map //! 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); G4double Offset, G4double nx, G4double ny, G4double nz);

View File

@ -65,7 +65,6 @@ protected:
private: private:
//! Messenger //! Messenger
LEMuSRParticleGunMessenger* theMessenger; LEMuSRParticleGunMessenger* theMessenger;
G4ParticleGunMessenger* Messenger;
}; };

View File

@ -40,7 +40,9 @@
#include "TTree.h" #include "TTree.h"
#include "TBranch.h" #include "TBranch.h"
#include "G4VPhysicalVolume.hh"
// LEMuSR
#include "LEMuSRDetectorConstruction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

6
geant4/LEMuSR/longit.sh Normal file
View File

@ -0,0 +1,6 @@
unset LEMU_TRANSVERSE_FIELD
rm ~/geant4/tmp/Linux-g++/LEMuSR/exe/*
rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRDetectorConstruction.*

10
geant4/LEMuSR/make.sh Normal file
View File

@ -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

10
geant4/LEMuSR/mk.sh Normal file
View File

@ -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

14
geant4/LEMuSR/mkclean.sh Normal file
View File

@ -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

View File

@ -96,7 +96,14 @@ LEMuSRDetectorConstruction::LEMuSRDetectorConstruction()
dSPhi = 0*deg; // starting angle dSPhi = 0*deg; // starting angle
dEPhi = 360*deg; // ending angle dEPhi = 360*deg; // ending angle
FieldMapsDir=getenv("LEMuSR_FIELDMAPS_DIR");
if(FieldMapsDir)
G4cout<<"Fied Maps Directory is: "<< FieldMapsDir<<endl;
else
G4cout<<"Fied Maps Directory is not defined!!!"<<endl;
#ifdef LEMU_GET_NEWMAPS #ifdef LEMU_GET_NEWMAPS
NEWMAPS(); NEWMAPS();
#endif #endif
@ -157,10 +164,10 @@ G4VPhysicalVolume* LEMuSRDetectorConstruction::Construct()
// DEFINE THE DETECTOR // DEFINE THE DETECTOR
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$// //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
G4VPhysicalVolume* LEMuSRDetectorConstruction::lemuDetector() // !attention au V dans G4VP... G4VPhysicalVolume* LEMuSRDetectorConstruction::lemuDetector() // !mind the V in G4VP...
{ {
//! Definition of the top mothe volume: the laboratory. Refered to as Wolrd.
// +++++++++++++++++++++++++++++++DEFINE THE MOTHER VOLUME: THE LABORATOY++++++++++++++++++++++ // +++++++++++++++++++++++++++++++DEFINE THE MOTHER VOLUME: THE LABORATOY++++++++++++++++++++++
// solid // solid
G4double LABO_x = 1*m; G4double LABO_x = 1*m;
@ -199,30 +206,30 @@ G4VPhysicalVolume* LEMuSRDetectorConstruction::lemuDetector() // !attention au V
// &&&&&&&&&&&&&&&& ADD THE OTHER DETECTOR VOLUMES &&&&&&&&&&&&&&&&&&&&&// // &&&&&&&&&&&&&&&& ADD THE OTHER DETECTOR VOLUMES &&&&&&&&&&&&&&&&&&&&&//
//! Definition of the other volumes:
//! * -# Definition the attributes.
// LOAD ATTRIBUTES AND USER LIMIT // LOAD ATTRIBUTES AND USER LIMIT
LoadAttributes(); LoadAttributes();
//------------------------------- //-------------------------------
// main materials // main materials
//! * -# Definition of the materials
Vacuum = G4Material::GetMaterial("vacuum"); Vacuum = G4Material::GetMaterial("vacuum");
SSteel = G4Material::GetMaterial("stainless_steel"); SSteel = G4Material::GetMaterial("stainless_steel");
//------------------------------- //-------------------------------
//! *-# Add the MCP and Gate Valve chamber.
lemuMCP2(); lemuMCP2();
//! If <tt>asymcheck==1</tt> then build a spherical detector around mcp chamber to test the asymmetry. Shall be modified in the future.
if(AsymCheck==1) if(AsymCheck==1)
{ {
lemuAsym(); lemuAsym();
} }
//! If <tt>asymcheck==0</tt> then build the trigger detector, the gate valve chamber, the third lens, the anode and the scintillators.
if(AsymCheck==0) if(AsymCheck==0)
{ {
@ -233,11 +240,16 @@ G4VPhysicalVolume* LEMuSRDetectorConstruction::lemuDetector() // !attention au V
lemuSCINT(); lemuSCINT();
#ifdef LEMU_TEST_FOCAL_LENGTH #ifdef LEMU_TEST_FOCAL_LENGTH
lemuFieldCheck(); //! If <tt>LEMU_TEST_FOCAL_LENGTH</tt> is defined then
lemuFieldCheck();
#endif #endif
//! Sensitive Detection
if(mcdetector==0) //then use cryostat /*!
* The sensitive detector and the hit collection it builds must be singletons, i.e. they can be instanciated only once. Hence, the variable <tt>cryo, mcp</tt> and <tt>scint</tt> are set to 1 as soon as the sensitive detector is built.
*/
if(mcdetector==0) //! If <tt>mcdetector==0</tt> then use cryostat
{ {
lemuCRYO(); lemuCRYO();
if(cryo==0) 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 <tt>mcdetector==1</tt>then use micro channel detector
{ {
lemuMCPdet(); lemuMCPdet();
if(mcp==0) if(mcp==0)
@ -335,6 +347,7 @@ void LEMuSRDetectorConstruction::lemuMCP2()
// main volumes // main volumes
MCPV_tube= new G4Tubs( "sMCPV", 0.00*cm, 7.65*cm, 25.45*cm, dSPhi, dEPhi); MCPV_tube= new G4Tubs( "sMCPV", 0.00*cm, 7.65*cm, 25.45*cm, dSPhi, dEPhi);
G4cout<<dSPhi<<" "<<dEPhi<<G4endl;
MCPS_tube= new G4Tubs( "sMCPS", 7.65*cm, 7.95*cm, 16.2*cm, dSPhi, dEPhi); MCPS_tube= new G4Tubs( "sMCPS", 7.65*cm, 7.95*cm, 16.2*cm, dSPhi, dEPhi);
F160_tube= new G4Tubs( "sF160", 7.95*cm, 10.125*cm,1.1*cm, dSPhi, dEPhi); F160_tube= new G4Tubs( "sF160", 7.95*cm, 10.125*cm,1.1*cm, dSPhi, dEPhi);
F100_tube= new G4Tubs( "sF100", 0.00*cm, 7.65*cm, .5*cm, dSPhi, dEPhi); F100_tube= new G4Tubs( "sF100", 0.00*cm, 7.65*cm, .5*cm, dSPhi, dEPhi);
@ -440,16 +453,13 @@ void LEMuSRDetectorConstruction::lemuANODE()
RA_Ebox = new G4Box("RA_Ebox", 1.*cm,12.5*cm,2.25*cm ); RA_Ebox = new G4Box("RA_Ebox", 1.*cm,12.5*cm,2.25*cm );
RA_Mbox = new G4Box("RA_Mbox", 1.*cm,12.5*cm,2.25*cm ); RA_Mbox = new G4Box("RA_Mbox", 1.*cm,12.5*cm,2.25*cm );
//boolean
// RA_E= new G4SubtractionSolid("RA_E", RA_E_cone, RA_Ebox);
// RA_M= new G4SubtractionSolid("RA_M", RA_M_cone, RA_Mbox);
RA_G_tube= new G4Tubs( "sRA_G", 5.8*cm,6.25*cm,5.55*cm, dSPhi, dEPhi); RA_G_tube= new G4Tubs( "sRA_G", 5.8*cm,6.25*cm,5.55*cm, dSPhi, dEPhi);
// logicals volumes // logical volumes
lv_RA_E = new G4LogicalVolume( RA_E_cone , SSteel ,"lv_RA_E",0,0,0); lv_RA_E = new G4LogicalVolume( RA_E_cone , SSteel ,"lv_RA_E",0,0,0);
lv_RA_M = new G4LogicalVolume( RA_M_cone , SSteel ,"lv_RA_M",0,0,0); lv_RA_M = new G4LogicalVolume( RA_M_cone , SSteel ,"lv_RA_M",0,0,0);
lv_RA_G = new G4LogicalVolume( RA_G_tube , SSteel ,"lv_RA_G",0,0,0); lv_RA_G = new G4LogicalVolume( RA_G_tube , SSteel ,"lv_RA_G",0,0,0);
@ -459,7 +469,7 @@ void LEMuSRDetectorConstruction::lemuANODE()
RA_Mz= -10.35-2.25; RA_Mz= -10.35-2.25;
//#changed mother volumes!!!! // Mother Volume is lv_MCPV!!!!
pv_RA_E = new G4PVPlacement( 0, G4ThreeVector( 0*cm, 0*cm, RA_Ez*cm-mcpv_z),lv_RA_E ,"pv_RA_E",lv_MCPV, false, 0 ); pv_RA_E = new G4PVPlacement( 0, G4ThreeVector( 0*cm, 0*cm, RA_Ez*cm-mcpv_z),lv_RA_E ,"pv_RA_E",lv_MCPV, false, 0 );
pv_RA_M = new G4PVPlacement( 0, G4ThreeVector( 0*cm, 0*cm, RA_Mz*cm-mcpv_z),lv_RA_M ,"pv_RA_M",lv_MCPV, false, 0 ); pv_RA_M = new G4PVPlacement( 0, G4ThreeVector( 0*cm, 0*cm, RA_Mz*cm-mcpv_z),lv_RA_M ,"pv_RA_M",lv_MCPV, false, 0 );
pv_RA_G = new G4PVPlacement( 0, G4ThreeVector( 0*cm, 0*cm, RA_Gz*cm-mcpv_z),lv_RA_G ,"pv_RA_G",lv_MCPV, false, 0 ); pv_RA_G = new G4PVPlacement( 0, G4ThreeVector( 0*cm, 0*cm, RA_Gz*cm-mcpv_z),lv_RA_G ,"pv_RA_G",lv_MCPV, false, 0 );
@ -600,7 +610,7 @@ void LEMuSRDetectorConstruction:: lemuCRYO()
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$// //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
// DEFINE THE MULTIPLE CHANNEL-DETECTOR // DEFINE THE MICRO CHANNEL-DETECTOR
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$// //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
void LEMuSRDetectorConstruction:: lemuMCPdet() void LEMuSRDetectorConstruction:: lemuMCPdet()
@ -638,7 +648,7 @@ void LEMuSRDetectorConstruction:: lemuMCPdet()
pv_MCSR = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 2.63*cm-mcpv_z),lv_MCSR ,"pv_MCSR",lv_MCPV, false, 0 ); pv_MCSR = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 2.63*cm-mcpv_z),lv_MCSR ,"pv_MCSR",lv_MCPV, false, 0 );
pv_MCVR = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 0.0*cm),lv_MCVR ,"pv_MCVR",lv_MCSR, false, 0 );//CF SUBSTRACTION pv_MCVR = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 0.0*cm),lv_MCVR ,"pv_MCVR",lv_MCSR, false, 0 );//CF SUBSTRACTION
pv_MCPA = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 3.73*cm-mcpv_z),lv_MCPA ,"pv_MCPA",lv_MCPV, false, 0 ); pv_MCPA = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 3.73*cm-mcpv_z),lv_MCPA ,"pv_MCPA",lv_MCPV, false, 0 );
pv_ANVA = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, -0.25*cm),lv_ANVA ,"pv_ANVA",lv_MCPA, false, 0 ); // PART OF THE anode pv_ANVA = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, -0.25*cm),lv_ANVA ,"pv_ANVA",lv_MCPA, false, 0 );
pv_ANVA2= new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 0.25*cm),lv_ANVA ,"pv_ANVA2",lv_MCPA, false, 0 ); pv_ANVA2= new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 0.25*cm),lv_ANVA ,"pv_ANVA2",lv_MCPA, false, 0 );
pv_MCSS = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 6.38*cm-mcpv_z),lv_MCSS ,"pv_MCSS",lv_MCPV, false, 0 ); pv_MCSS = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 6.38*cm-mcpv_z),lv_MCSS ,"pv_MCSS",lv_MCPV, false, 0 );
@ -747,7 +757,7 @@ void LEMuSRDetectorConstruction::lemuLinse3()
{ {
G4ElectricField* L3Field = new LEMuSRElectricField(L3FieldVal, G4ElectricField* L3Field = new LEMuSRElectricField(L3FieldVal,
"/home/l_paraiso/LEMuSR/FieldMaps/ThirdLense/L3b.map" FieldMapsDir+"/ThirdLens/L3b.map"
,"dm",-567,60,60,100); ,"dm",-567,60,60,100);
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@ -935,9 +945,9 @@ void LEMuSRDetectorConstruction::lemuTrigger_Detector()
// logical volumes // logical volumes
lv_TriggerB=new G4LogicalVolume(Trigger_box,Vacuum,"lv_TriggerB",T1FieldMgr,0,0); lv_TriggerE=new G4LogicalVolume(Trigger_box,Vacuum,"lv_TriggerE",T1FieldMgr,0,0);
lv_TriggerB2=new G4LogicalVolume(Trigger_box2,Vacuum,"lv_TriggerB2",T2FieldMgr,0,0); lv_TriggerE2=new G4LogicalVolume(Trigger_box2,Vacuum,"lv_TriggerE2",T2FieldMgr,0,0);
lv_TriggerB3=new G4LogicalVolume(Trigger_box,Vacuum,"lv_TriggerB3",T3FieldMgr,0,0); lv_TriggerE3=new G4LogicalVolume(Trigger_box,Vacuum,"lv_TriggerE3",T3FieldMgr,0,0);
G4Transform3D Rotation2, transformation2, trl; G4Transform3D Rotation2, transformation2, trl;
@ -948,11 +958,11 @@ void LEMuSRDetectorConstruction::lemuTrigger_Detector()
if(trigger_field!=0) if(trigger_field!=0)
{ {
pv_TriggerB = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(-3.85)*cm),lv_TriggerB,"pv_TriggerB",lv_TriggerV, false, 0 ); pv_TriggerE = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(-3.85)*cm),lv_TriggerE,"pv_TriggerE",lv_TriggerV, false, 0 );
pv_TriggerB2 = new G4PVPlacement(transformation2,lv_TriggerB2,"pv_TriggerB2",lv_TriggerV, false, 0 ); pv_TriggerE2 = new G4PVPlacement(transformation2,lv_TriggerE2,"pv_TriggerE2",lv_TriggerV, false, 0 );
pv_TriggerB3 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(+4.3)*cm),lv_TriggerB3,"pv_TriggerB3",lv_TriggerV, false, 0 ); pv_TriggerE3 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(+4.3)*cm),lv_TriggerE3,"pv_TriggerE3",lv_TriggerV, false, 0 );
} }
@ -1023,29 +1033,30 @@ void LEMuSRDetectorConstruction::buildAnodeField()
{ {
char dir[256]="\0";
int k=2*Grid+Guards; G4String dir= FieldMapsDir;
std::cout<<"k: "<<k<<std::endl;
switch(k) int k=2*Grid+Guards;
std::cout<<"buildAnodeField::case = "<<k<<std::endl;
switch(k)
{ {
case 0: case 0:
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/No_Grid_NoGuards/\0"); break; dir+="/MCPV-80-80-200/No_Grid_NoGuards/"; break;
case 1: case 1:
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/No_Grid_Guards/\0"); break; dir+="/MCPV-80-80-200/No_Grid_Guards/"; break;
case 2: case 2:
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/\0"); break; dir+="/MCPV-80-80-200/Grid_NoGuards/"; break;
case 3: case 3:
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_Guards/\0"); break; dir+="/MCPV-80-80-200/Grid_Guards/"; break;
default: break; default: break;
} }
// IF THERE IS A FIELD IN THE ANODE // IF THERE IS A FIELD IN THE ANODE
@ -1058,10 +1069,8 @@ void LEMuSRDetectorConstruction::buildAnodeField()
// G4cout<<"offset"<<mcpv_z/mm<<G4endl; // G4cout<<"offset"<<mcpv_z/mm<<G4endl;
// left // left
char leftfile[]="RAL.map"; G4String leftfile="RAL.map";
char leftmap[256]; G4String leftmap = dir+leftfile;
stpcpy(leftmap,dir);
strcat(leftmap,leftfile);
LEMuSRElectricField* GFieldLeft = new LEMuSRElectricField(1,leftmap,"mm",0.0,80,80,200); LEMuSRElectricField* GFieldLeft = new LEMuSRElectricField(1,leftmap,"mm",0.0,80,80,200);
@ -1069,10 +1078,8 @@ void LEMuSRDetectorConstruction::buildAnodeField()
// right // right
char rightfile[]="RAR.map"; G4String rightfile="RAR.map";
char rightmap[256]; G4String rightmap = dir+rightfile;
stpcpy(rightmap,dir);
strcat(rightmap,rightfile);
LEMuSRElectricField* GFieldRight = new LEMuSRElectricField(1,rightmap,"mm",0.0,80,80,200); LEMuSRElectricField* GFieldRight = new LEMuSRElectricField(1,rightmap,"mm",0.0,80,80,200);
@ -1234,11 +1241,11 @@ void LEMuSRDetectorConstruction::buildAnodeField()
#ifdef LEMU_TRANSVERSE_FIELD #ifdef LEMU_TRANSVERSE_FIELD
mcField = new LEMuSRMagneticField(G4ThreeVector(0.,B*gauss,0.)); mcField = new LEMuSRMagneticField(G4ThreeVector(0.,B*gauss,0.));
G4cout<<"Transverse Field Applied: (0 G, " <<B <<"G, 0 G) \n"<<G4endl; G4cout<<"Longitudinal Field Applied: (0 G, " <<B <<"G, 0 G) \n"<<G4endl;
sleep(3); // wait 3 seconds sleep(3); // wait 3 seconds
#else #else
mcField = new LEMuSRMagneticField(G4ThreeVector(0.,0.,B*gauss)); mcField = new LEMuSRMagneticField(G4ThreeVector(0.,0.,B*gauss));
G4cout<<"Longitudinal Field Applied: (0 G, 0 G, " <<B <<"G) \n"<<G4endl; G4cout<<"Transverse Field Applied: (0 G, 0 G, " <<B <<"G) \n"<<G4endl;
sleep(3); // wait 3 seconds sleep(3); // wait 3 seconds
#endif #endif
@ -1279,38 +1286,36 @@ void LEMuSRDetectorConstruction::buildAnodeField()
void LEMuSRDetectorConstruction::buildCryoField() void LEMuSRDetectorConstruction::buildCryoField()
{ {
// sample ELECTRIC field // sample ELECTRIC field
G4double d= cryoFieldLength*cm; // G4double d= cryoFieldLength*cm;
G4double V= cryoVoltage*kilovolt; // G4double V= cryoVoltage*kilovolt;
G4ThreeVector C_field(0.,0.,-V/d); // G4ThreeVector C_field(0.,0.,-V/d);
G4String dir= FieldMapsDir;
// char dir[]="/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/"; int k=2*Grid+Guards;
char dir[256];
int k=2*Grid+Guards;
switch(k) switch(k)
{ {
case 0: case 0:
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/No_Grid_NoGuards/\0"); break; dir+="/MCPV-80-80-200/No_Grid_NoGuards/"; break;
case 1: case 1:
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/No_Grid_Guards/\0"); break; dir+="/MCPV-80-80-200/No_Grid_Guards/"; break;
case 2: case 2:
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/\0"); break; dir+="/MCPV-80-80-200/Grid_NoGuards/"; break;
case 3: case 3:
stpcpy(dir,"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_Guards/\0"); break; dir+="/MCPV-80-80-200/Grid_Guards/"; break;
default: break; default: break;
} }
char filename[]="SAMPLE.map"; G4String filename="SAMPLE.map";
const char* fmap=strcat(dir,filename); G4String fmap=dir+filename;
cryoField = new LEMuSRElectricField(cryoVoltage,fmap,"mm",0.0,80,80,200);//offset in milimeters) cryoField = new LEMuSRElectricField(cryoVoltage,fmap,"mm",0.0,80,80,200);//offset in milimeters)
@ -1326,7 +1331,6 @@ void LEMuSRDetectorConstruction::buildCryoField()
cryoField->GetFieldValue(position,Efield); cryoField->GetFieldValue(position,Efield);
do do
{ {
cryoField->GetFieldValue(position,Efield); cryoField->GetFieldValue(position,Efield);
G4cout<<position[0]<<" "<<position[1]<<" "<<position[2]<<G4endl; G4cout<<position[0]<<" "<<position[1]<<" "<<position[2]<<G4endl;
G4cout<<"Field E Value " << G4BestUnit(Efield[0]*meter,"Electric potential") <<"/m " <<Efield[1]/volt*meter <<" V/m "<< Efield[2]/volt*meter <<" V/m " <<G4endl; G4cout<<"Field E Value " << G4BestUnit(Efield[0]*meter,"Electric potential") <<"/m " <<Efield[1]/volt*meter <<" V/m "<< Efield[2]/volt*meter <<" V/m " <<G4endl;
@ -1348,17 +1352,17 @@ void LEMuSRDetectorConstruction::NEWMAPS()
// left // left
LEMuSRElectricField* LEFTMAP = LEMuSRElectricField* LEFTMAP =
new LEMuSRElectricField(1, new LEMuSRElectricField(1,
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAL_Ex.txt", FieldMapsDir+"/MCPV-80-80-200/Grid_NoGuards/RAL_Ex.txt",
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAL_Ey.txt", FieldMapsDir+"/MCPV-80-80-200/Grid_NoGuards/RAL_Ey.txt",
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAL_Ez.txt", FieldMapsDir+"/MCPV-80-80-200/Grid_NoGuards/RAL_Ez.txt",
"mm",0.0,80,80,200);//offset in milimeters "mm",0.0,80,80,200);//offset in milimeters
// right // right
LEMuSRElectricField* RIGHTMAP = LEMuSRElectricField* RIGHTMAP =
new LEMuSRElectricField(1, new LEMuSRElectricField(1,
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAR_Ex.txt", FieldMapsDir+"/MCPV-80-80-200/Grid_NoGuards/RAR_Ex.txt",
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAR_Ey.txt", FieldMapsDir+"/MCPV-80-80-200/Grid_NoGuards/RAR_Ey.txt",
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/RAR_Ez.txt", FieldMapsDir+"/MCPV-80-80-200/Grid_NoGuards/RAR_Ez.txt",
"mm",0.0,80,80,200);//offset in milimeters "mm",0.0,80,80,200);//offset in milimeters
@ -1367,9 +1371,9 @@ void LEMuSRDetectorConstruction::NEWMAPS()
LEMuSRElectricField* SAMPLEMAP = LEMuSRElectricField* SAMPLEMAP =
new LEMuSRElectricField(1, new LEMuSRElectricField(1,
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/SAMPLE_Ex.txt", FieldMapsDir+"/MCPV-80-80-200/Grid_NoGuards/SAMPLE_Ex.txt",
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/SAMPLE_Ey.txt", FieldMapsDir+"/MCPV-80-80-200/Grid_NoGuards/SAMPLE_Ey.txt",
"/home/l_paraiso/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/SAMPLE_Ez.txt", FieldMapsDir+"/MCPV-80-80-200/Grid_NoGuards/SAMPLE_Ez.txt",
"mm",0.0,80,80,200);//offset in milimeters) "mm",0.0,80,80,200);//offset in milimeters)
@ -1390,7 +1394,7 @@ void LEMuSRDetectorConstruction::PrintStatus()
G4cout<<G4endl G4cout<<G4endl
<<" Detector Status " <<G4endl; <<" Detector Status " <<G4endl;
G4cout<<"magfield " << magfield <<G4endl G4cout<<"magfield " << magfield <<G4endl
<<"elfield " <<elfield <<G4endl <<"elfield " <<elfield <<G4endl
<<"anode_elfield " <<anode_elfield <<G4endl <<"anode_elfield " <<anode_elfield <<G4endl
@ -1400,5 +1404,12 @@ void LEMuSRDetectorConstruction::PrintStatus()
<<"GUARDS " <<Guards <<G4endl <<"GUARDS " <<Guards <<G4endl
<<G4endl; <<G4endl;
if(FieldMapsDir)
{
G4cout<<"Fied Maps Directory is: "<< FieldMapsDir<<endl;
}
else
{
G4cout<<"Fied Maps Directory is not defined!!!"<<endl;sleep(10);
}
} }

View File

@ -93,8 +93,8 @@ LEMuSRDetectorMessenger::LEMuSRDetectorMessenger(LEMuSRDetectorConstruction *lem
// ELECTRIC POTENTIALS // ELECTRIC POTENTIALS
SetThirdLensPotential = new G4UIcmdWithADouble("/Detector/Voltage/ThirdLense",this); SetThirdLensPotential = new G4UIcmdWithADouble("/Detector/Voltage/ThirdLens",this);
SetThirdLensPotential->SetGuidance("\n Third Lense Middle Cylinder Voltage Value >> IN KILOVOLT "); SetThirdLensPotential->SetGuidance("\n Third Lens Middle Cylinder Voltage Value >> IN KILOVOLT ");
SetThirdLensPotential->SetParameterName("f",false); SetThirdLensPotential->SetParameterName("f",false);
SetThirdLensPotential->SetDefaultValue(1); SetThirdLensPotential->SetDefaultValue(1);
SetThirdLensPotential->AvailableForStates(G4State_PreInit,G4State_Idle); SetThirdLensPotential->AvailableForStates(G4State_PreInit,G4State_Idle);
@ -129,7 +129,7 @@ LEMuSRDetectorMessenger::LEMuSRDetectorMessenger(LEMuSRDetectorConstruction *lem
SetDetVisualization->AvailableForStates(G4State_PreInit,G4State_Idle); SetDetVisualization->AvailableForStates(G4State_PreInit,G4State_Idle);
SetFieldStepLim = new G4UIcmdWithADouble("/Detector/MaxStepInField",this); 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->SetParameterName("usl",false);
SetFieldStepLim->SetDefaultValue(10.); SetFieldStepLim->SetDefaultValue(10.);
SetFieldStepLim->AvailableForStates(G4State_PreInit,G4State_Idle); SetFieldStepLim->AvailableForStates(G4State_PreInit,G4State_Idle);
@ -306,21 +306,26 @@ void LEMuSRDetectorMessenger::SetNewValue(G4UIcommand* command, G4String newvalu
// theDetector->elfield=1; // theDetector->elfield=1;
// theDetector->anode_elfield=1; // theDetector->anode_elfield=1;
theDetector->trigger_field=1; theDetector->trigger_field=1;
newDetector = theDetector->Construct();
G4RunManager::GetRunManager()->DefineWorldVolume(newDetector);
G4cout<<"THIS COMMAND ONLY ENABLES THE TRIGGER FIELD.\n" G4cout<<"THIS COMMAND ONLY ENABLES THE TRIGGER FIELD.\n"
<<" TO SET THE ELECTROSTATIC LENSES USE /Detector/Voltage COMMAND."<<G4endl; <<"TO SET THE ELECTROSTATIC LENSES PLEASE USE THE /Detector/Voltage COMMANDS."<<G4endl;
} }
else if(newvalue=="off") else if(newvalue=="off")
{ {
theDetector->elfield=0; theDetector->elfield=0;
theDetector->anode_elfield=0; theDetector->anode_elfield=0;
theDetector->trigger_field=0; theDetector->trigger_field=0;
newDetector = theDetector->Construct();
G4RunManager::GetRunManager()->DefineWorldVolume(newDetector);
G4cout<<"ALL ELECTRIC FIELDS ARE NOW DISABLED."<<G4endl;
} }
else else
{ {
G4cout<<"UNRECOGNIZED COMMAND ENTER on OR off."<<G4endl; G4cout<<"UNRECOGNIZED COMMAND PLEASE ENTER on OR off."<<G4endl;
} }
newDetector = theDetector->Construct();
G4RunManager::GetRunManager()->DefineWorldVolume(newDetector);
} }
@ -401,28 +406,37 @@ void LEMuSRDetectorMessenger::SetNewValue(G4UIcommand* command, G4String newvalu
theDetector->dSPhi=0*deg; theDetector->dSPhi=0*deg;
theDetector->dEPhi=360*deg; theDetector->dEPhi=360*deg;
theDetector->halfview=0; theDetector->halfview=0;
newDetector = theDetector->Construct();
G4RunManager::GetRunManager()->DefineWorldVolume(newDetector);
G4cout << " \n TOTAL GEOMETRY IS LOADED. \n" ;
} }
else if(newvalue=="half") else if(newvalue=="half")
{ {
theDetector->dSPhi=+90*deg; theDetector->dSPhi=+90*deg;
theDetector->dEPhi=180*deg; theDetector->dEPhi=180*deg;
theDetector->halfview=1; 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") else if(newvalue=="quarter")
{ {
theDetector->dSPhi=0*deg; theDetector->dSPhi=0*deg;
theDetector->dEPhi=270*deg; theDetector->dEPhi=270*deg;
theDetector->halfview=1; theDetector->halfview=1;
newDetector = theDetector->Construct();
G4RunManager::GetRunManager()->DefineWorldVolume(newDetector);
G4cout << " \n !!! BEFORE '/run/beamOn' :: PLEASE ENSURE TOTAL GEOMETRY IS LOADED !!! \n" ;
} }
else else
{ {
G4cout << "Unknown command: please check value."<<G4endl; G4cout << "Unknown command: please check value is total/quarter/half ."<<G4endl;
} }
newDetector = theDetector->Construct();
G4RunManager::GetRunManager()->DefineWorldVolume(newDetector);
G4cout << " \n !!! BEFORE '/run/beamOn' :: PLEASE ENSURE TOTAL GEOMETRY IS LOADED !!! \n" ;
// Update visualization // Update visualization
//UI ->ApplyCommand("/vis/viewer/refresh") ; //UI ->ApplyCommand("/vis/viewer/refresh") ;
//UI ->ApplyCommand("/vis/viewer/update"); //UI ->ApplyCommand("/vis/viewer/update");

View File

@ -23,9 +23,9 @@
#include"G4UnitsTable.hh" #include"G4UnitsTable.hh"
LEMuSRElectricField::LEMuSRElectricField(G4double fieldval,const char* Xfile, LEMuSRElectricField::LEMuSRElectricField(G4double fieldval,G4String Xfile,
const char* Yfile, G4String Yfile,
const char* Zfile, G4String Zfile,
G4String map_length_unit, G4String map_length_unit,
G4double Offset, G4double nbx, G4double nby, G4double nbz) 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, G4String map_length_unit,
G4double Offset, G4double Offset,
G4double nbx, G4double nbx,

View File

@ -288,7 +288,7 @@ void LEMuSRDetectorConstruction :: MaterialsDefinition ()
/***MATERIAUX***/ /***MATERIALS***/
// definition : composition de Air // definition : composition de Air
density=1.290*mg/cm3; density=1.290*mg/cm3;
@ -323,22 +323,22 @@ void LEMuSRDetectorConstruction :: MaterialsDefinition ()
//definition materiau 'tantale' //definition material 'tantale'
density = 16.650*g/cm3; density = 16.650*g/cm3;
G4Material* tantale = new G4Material(name="tantale", density, 1); G4Material* tantale = new G4Material(name="tantale", density, 1);
tantale->AddElement (Ta, nbelements=1); tantale->AddElement (Ta, nbelements=1);
//definition materiau 'or' //definition material 'or'
density = 19.300*g/cm3; density = 19.300*g/cm3;
G4Material* gold = new G4Material(name="gold", density, 1); G4Material* gold = new G4Material(name="gold", density, 1);
gold->AddElement (Au, nbelements=1); gold->AddElement (Au, nbelements=1);
// definition materiau 'iron' // definition material 'iron'
density = 7.874*g/cm3; density = 7.874*g/cm3;
G4Material* iron = new G4Material("iron",density,1); G4Material* iron = new G4Material("iron",density,1);
iron->AddElement (Fe,1); iron->AddElement (Fe,1);
// definition materiau 'tungsten' // definition material 'tungsten'
density =19.250*g/cm3; density =19.250*g/cm3;
G4Material* tungsten = new G4Material("tungsten",density,1); G4Material* tungsten = new G4Material("tungsten",density,1);
tungsten->AddElement(W,1); tungsten->AddElement(W,1);
@ -350,7 +350,7 @@ void LEMuSRDetectorConstruction :: MaterialsDefinition ()
graphite->AddElement (C,1); graphite->AddElement (C,1);
/***MATERIAUX***/ /***MATERIALS***/
// definition composition of NaI // definition composition of NaI
density = 3.67*g/cm3; density = 3.67*g/cm3;
@ -390,12 +390,12 @@ void LEMuSRDetectorConstruction :: MaterialsDefinition ()
saphire->AddElement (Al, nbelements=2); saphire->AddElement (Al, nbelements=2);
saphire->AddElement (O, nbelements=3); saphire->AddElement (O, nbelements=3);
//definition materiau 'copper' //definition material 'copper'
density = 8.920*g/cm3; density = 8.920*g/cm3;
G4Material* copper = new G4Material(name="copper", density, 1); G4Material* copper = new G4Material(name="copper", density, 1);
copper->AddElement (Cu, nbelements=1); copper->AddElement (Cu, nbelements=1);
// definition materiau 'aluminium' // definition material 'aluminium'
density = 2.700*g/cm3; density = 2.700*g/cm3;
G4Material* aluminium = new G4Material("aluminium",density,1); G4Material* aluminium = new G4Material("aluminium",density,1);
aluminium->AddElement (Al,1); aluminium->AddElement (Al,1);

View File

@ -35,12 +35,12 @@
LEMuSRParticleGun::LEMuSRParticleGun() LEMuSRParticleGun::LEMuSRParticleGun()
{ {
SetInitialValues(); SetInitialValues();
Messenger = new G4ParticleGunMessenger(this); theMessenger = new LEMuSRParticleGunMessenger(this);
} }
LEMuSRParticleGun::~LEMuSRParticleGun() LEMuSRParticleGun::~LEMuSRParticleGun()
{ {
delete Messenger; delete theMessenger;
} }
void LEMuSRParticleGun::SetInitialValues() void LEMuSRParticleGun::SetInitialValues()

View File

@ -38,7 +38,6 @@
#include "TCanvas.h" #include "TCanvas.h"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
LEMuSRRunAction::LEMuSRRunAction() LEMuSRRunAction::LEMuSRRunAction()
@ -55,16 +54,25 @@ LEMuSRRunAction::~LEMuSRRunAction()
/*! Initializes the user interface manager.*/ /*! Initializes the user interface manager.*/
void LEMuSRRunAction::BeginOfRunAction(const G4Run* aRun) void LEMuSRRunAction::BeginOfRunAction(const G4Run* aRun)
{ {
G4UImanager* UI = G4UImanager::GetUIpointer();
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl; G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
G4RunManager::GetRunManager()->SetRandomNumberStore(true); G4RunManager::GetRunManager()->SetRandomNumberStore(true);
if (G4VVisManager::GetConcreteInstance()) if (G4VVisManager::GetConcreteInstance())
{ {
G4UImanager* UI = G4UImanager::GetUIpointer();
UI->ApplyCommand("/vis/scene/notifyHandlers"); UI->ApplyCommand("/vis/scene/notifyHandlers");
} }
//! BUILD THE DETECTOR IN TOTAL GEOMETRY
// G4cout<<"WILL REBUILD THE DETECTOR"<<G4endl;
// UI->ApplyCommand("/Detector/View total");
// G4VPhysicalVolume* newDetector = LEMuSRDetectorConstruction::GetInstance()->Construct();
// G4RunManager::GetRunManager()->DefineWorldVolume(newDetector);
// G4cout<<"DETECTOR BUILT."<<G4endl;
} }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

11
geant4/LEMuSR/stepping.sh Normal file
View File

@ -0,0 +1,11 @@
export ASYM_USE_LEMU=1
unset LEMU_TEST_CFOIL
unset LEMU_TEST_FIELD
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.*

11
geant4/LEMuSR/td.sh Normal file
View File

@ -0,0 +1,11 @@
export ASYM_USE_LEMU=1
export LEMU_TEST_CFOIL=1
unset LEMU_TEST_FIELD
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.*

View File

@ -0,0 +1,6 @@
export LEMU_TRANSVERSE_FIELD=1
rm ~/geant4/tmp/Linux-g++/LEMuSR/exe/*
rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRDetectorConstruction.*

47
geant4/LEMuSR/update.sh Normal file
View File

@ -0,0 +1,47 @@
cp G4ChordFinder.cc ~/geant4.8.0.p01/source/geometry/magneticfield/src/
cp G4ChordFinder.hh ~/geant4.8.0.p01/source/geometry/magneticfield/include/
cp G4El_EqRhs.cc ~/geant4.8.0.p01/source/geometry/magneticfield/src/
cp G4El_EqRhs.hh ~/geant4.8.0.p01/source/geometry/magneticfield/include/
cp G4El_MagEqRhs.cc ~/geant4.8.0.p01/source/geometry/magneticfield/src/
cp G4El_MagEqRhs.hh ~/geant4.8.0.p01/source/geometry/magneticfield/include/
cp G4El_UsualEqRhs.cc ~/geant4.8.0.p01/source/geometry/magneticfield/src/
cp G4El_UsualEqRhs.hh ~/geant4.8.0.p01/source/geometry/magneticfield/include/
cp G4FieldManager.cc ~/geant4.8.0.p01/source/geometry/magneticfield/src/
cp G4FieldManager.hh ~/geant4.8.0.p01/source/geometry/magneticfield/include/
cp G4MultipleScattering52.cc ~/geant4.8.0.p01/source/processes/electromagnetic/standard/src/
cp G4VDecayChannel.cc ~/geant4.8.0.p01/source/particles/management/src/
cp G4VDecayChannel.hh ~/geant4.8.0.p01/source/particles/management/include/
cp G4MuonDecayChannel.cc ~/geant4.8.0.p01/source/particles/management/src/
cp G4MuonDecayChannel.hh ~/geant4.8.0.p01/source/particles/management/include/
cp G4MuonDecayChannelWithSpin.cc ~/geant4.8.0.p01/source/particles/management/src/
cp G4MuonDecayChannelWithSpin.hh ~/geant4.8.0.p01/source/particles/management/include/
cp G4Muonium.cc ~/geant4.8.0.p01/source/particles/leptons/src/
cp G4Muonium.hh ~/geant4.8.0.p01/source/particles/leptons/include/
cp G4ParticleDefinition.cc ~/geant4.8.0.p01/source/particles/management/src/
cp G4ParticleDefinition.hh ~/geant4.8.0.p01/source/particles/management/include/
cp G4ParticleDefinition.icc ~/geant4.8.0.p01/source/particles/management/include/
cd ~/geant4.8.0.p01/source/geometry/magneticfield/
#gmake clean
gmake
cd ~/geant4.8.0.p01/source/processes/electromagnetic/standard/
#gmake clean
gmake
cd ~/geant4.8.0.p01/source/particles/management/
#gmake clean
gmake
cd ~/geant4.8.0.p01/source/particles/leptons/
#gmake clean
gmake
cd ~/LEMuSR/G4Modified