Skip to content
Snippets Groups Projects
Commit 31d76ab7 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

modified: compact/gps.mac

	modified:   compact/sim_test.py
	modified:   src/GenericRICH_geo.cpp
	modified:   src/HexagonalScintPreShower_geo.cpp
parent b8720fbe
Branches
No related tags found
No related merge requests found
/run/beamOn 1
/control/verbose 2 /control/verbose 2
/run/initialize /run/initialize
...@@ -22,4 +24,4 @@ ...@@ -22,4 +24,4 @@
#/control/execute vis.mac #/control/execute vis.mac
/run/beamOn 1 /run/beamOn 10
...@@ -33,7 +33,7 @@ def run(): ...@@ -33,7 +33,7 @@ def run():
geant4.printDetectors() geant4.printDetectors()
logger.info("# Configure UI") logger.info("# Configure UI")
geant4.setupUI('qt',vis=True,macro='vis.mac') geant4.setupUI('tcsh',vis=False,macro='gps.mac')
logger.info("# Configure G4 magnetic field tracking") logger.info("# Configure G4 magnetic field tracking")
geant4.setupTrackingField() geant4.setupTrackingField()
...@@ -139,20 +139,21 @@ def run(): ...@@ -139,20 +139,21 @@ def run():
logger.info("# Setup global filters fur use in sensitive detectors") logger.info("# Setup global filters fur use in sensitive detectors")
#f1 = DDG4.Filter(kernel, 'GeantinoRejectFilter/GeantinoRejector') #f1 = DDG4.Filter(kernel, 'GeantinoRejectFilter/GeantinoRejector')
#f2 = DDG4.Filter(kernel, 'ParticleRejectFilter/OpticalPhotonRejector') f2 = DDG4.Filter(kernel, 'ParticleRejectFilter/OpticalPhotonRejector')
#f2.particle = 'opticalphoton' f2.particle = 'opticalphoton'
#f3 = DDG4.Filter(kernel, 'ParticleSelectFilter/OpticalPhotonSelector') f3 = DDG4.Filter(kernel, 'ParticleSelectFilter/OpticalPhotonSelector')
#f3.particle = 'opticalphoton' f3.particle = 'opticalphoton'
#f4 = DDG4.Filter(kernel, 'EnergyDepositMinimumCut') #f4 = DDG4.Filter(kernel, 'EnergyDepositMinimumCut')
#f4.Cut = 10 * MeV #f4.Cut = 10 * MeV
#f4.enableUI() #f4.enableUI()
#kernel.registerGlobalFilter(f1) #kernel.registerGlobalFilter(f1)
#kernel.registerGlobalFilter(f2) kernel.registerGlobalFilter(f2)
#kernel.registerGlobalFilter(f3) kernel.registerGlobalFilter(f3)
#kernel.registerGlobalFilter(f4) #kernel.registerGlobalFilter(f4)
logger.info("# First the PID detectors") logger.info("# First the PID detectors")
seq, act = geant4.setupDetector('ForwardRICH','PhotoMultiplierSDAction') seq, act = geant4.setupDetector('ForwardRICH','PhotoMultiplierSDAction')
act.adopt(f2)
#seq, act = geant4.setupTracker('SiVertexBarrel') #seq, act = geant4.setupTracker('SiVertexBarrel')
#seq.adopt(f1) #seq.adopt(f1)
......
...@@ -39,6 +39,8 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec ...@@ -39,6 +39,8 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec
Volume mirrorVol("RICH_mirror_dummy", mirrorShape, PyrexGlass); Volume mirrorVol("RICH_mirror_dummy", mirrorShape, PyrexGlass);
PlacedVolume mirrorPV = envVol.placeVolume(mirrorVol, Position(0, 0, 0.5 * (zMax - zMin) - 1*cm)); PlacedVolume mirrorPV = envVol.placeVolume(mirrorVol, Position(0, 0, 0.5 * (zMax - zMin) - 1*cm));
mirror_DE.setPlacement(mirrorPV); mirror_DE.setPlacement(mirrorPV);
mirrorVol.setSensitiveDetector(sens);
sens.setType("photoncounter");
envVol.setVisAttributes(desc.visAttributes(detElem.visStr())); envVol.setVisAttributes(desc.visAttributes(detElem.visStr()));
......
...@@ -60,20 +60,22 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec ...@@ -60,20 +60,22 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec
PlacedVolume Pb_wall_PV = assembly.placeVolume(Pb_wall_Vol, Position(0.0,0.0, -5.0*cm)); PlacedVolume Pb_wall_PV = assembly.placeVolume(Pb_wall_Vol, Position(0.0,0.0, -5.0*cm));
//ExtrudedPolygon mirrorShape("hex_scint",ptx, pty, sec_z, sec_x, sec_y, z_scale); //ExtrudedPolygon mirrorShape("hex_scint",ptx, pty, sec_z, sec_x, sec_y, z_scale);
Polyhedra mirrorShape("hex_lead", 6, 0.0, 2.0*M_PI, sec_z, sec_r); Polyhedra hexScintShape("hex_lead", 6, 0.0, 2.0*M_PI, sec_z, sec_r);
Volume mirrorVol("RICH_mirror_dummy", mirrorShape, PyrexGlass); Volume scintVol("hex_scint_volume", hexScintShape, PyrexGlass);
scintVol.setSensitiveDetector(sens);
sens.setType("calorimeter");
for(int ix =0; ix<nx; ix++){ for(int ix =0; ix<nx; ix++){
for(int iy =0; iy<ny; iy++){ for(int iy =0; iy<ny; iy++){
double extra_x = -(iy%2)*r_nearest_spacing + r_nearest_spacing; double extra_x = -(iy%2)*r_nearest_spacing + r_nearest_spacing;
PlacedVolume mirrorPV = assembly.placeVolume( PlacedVolume mirrorPV = assembly.placeVolume(
mirrorVol, Translation3D(offset_x + ix * (2.0 * r_nearest_spacing) + extra_x, scintVol, Translation3D(offset_x + ix * (2.0 * r_nearest_spacing) + extra_x,
offset_y + iy * (y_spacing), offset_y + iy * (y_spacing),
0.0)*RotationZ(M_PI*30.0/180.0)); 0.0)*RotationZ(M_PI*30.0/180.0));
} }
} }
mirrorVol.setVisAttributes(desc.visAttributes(detElem.visStr())); scintVol.setVisAttributes(desc.visAttributes(detElem.visStr()));
assembly.setVisAttributes(desc.visAttributes(detElem.visStr())); assembly.setVisAttributes(desc.visAttributes(detElem.visStr()));
DetElement det(detName, detID); DetElement det(detName, detID);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment