Skip to content
Snippets Groups Projects
Commit 8ef7c2d1 authored by adrien-matta's avatar adrien-matta
Browse files

* adding dead layer to tiara

* editing the NPSimulation UI for nicer interface
 - adding menue and icon for common command
 - adding free icons for nice interface
parent cb47e347
No related branches found
No related tags found
No related merge requests found
Showing
with 94 additions and 72 deletions
......@@ -14,9 +14,9 @@ Target
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Tiara
TiaraInnerBarrel= 0
TiaraOuterBarrel= 0
TiaraChamber= 0
TiaraInnerBarrel= 1
TiaraOuterBarrel= 1
TiaraChamber= 1
TiaraHyballWedge
Z= -147
R= 0
......
......@@ -92,44 +92,23 @@ int main(int argc, char** argv){
event_action->SetDetector(detector) ;
runManager->SetUserAction(event_action) ;
///////////////////////////////////////////////////////////////
/////// Get the pointer to the User Interface manager ////////
///////////////////////////////////////////////////////////////
// G4UImanager* UI = G4UImanager::GetUIpointer();
///////////////////////////////////////////////////////////////
/////////// Define UI terminal for interactive mode ///////////
///////////////////////////////////////////////////////////////
#ifdef G4VIS_USE
//G4VisManager* visManager = new G4VisExecutive("Quiet");
G4VisManager* visManager = new G4VisExecutive();
visManager->Initialize();
#endif
/* G4UIsession* session = 0;
#ifdef G4UI_USE_TCSH
session = new G4UIterminal(new G4UItcsh);
#else
session = new G4UIterminal();
#endif
UI->ApplyCommand("/control/execute vis.mac");
session->SessionStart();
delete session;
*/
// interactive mode : define UI session
// Get the pointer to the User Interface manager
G4UImanager* UImanager = G4UImanager::GetUIpointer();
cout << UImanager->GetVerboseLevel() << endl ;
#ifdef G4UI_USE
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
#ifdef G4VIS_USE
G4VisManager* visManager = new G4VisExecutive("Quiet");
visManager->Initialize();
UImanager->ApplyCommand("/control/execute vis.mac");
#endif
if (ui->IsGUI())
UImanager->ApplyCommand("/control/execute gui.mac");
ui->SessionStart();
ui->SessionStart();
delete ui;
#endif
......
......@@ -281,9 +281,6 @@ void Tiara::ReadSensitive(const G4Event* event){
}
// Clear Map for next event
HyballHitMap->clear();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -384,7 +381,7 @@ void Tiara::ConstructInnerBarrel(G4LogicalVolume* world){
// The Silicon Wafer itself
G4Box* InertWaferFull = new G4Box("InertWaferFull",
INNERBARREL_InertWafer_Width/2.,
INNERBARREL_ActiveWafer_Thickness/2.,
INNERBARREL_InertWafer_Thickness/2.,
INNERBARREL_InertWafer_Length/2.);
G4Box* ActiveWafer = new G4Box("ActiveWafer",
......@@ -392,6 +389,11 @@ void Tiara::ConstructInnerBarrel(G4LogicalVolume* world){
INNERBARREL_ActiveWafer_Thickness/2.,
INNERBARREL_ActiveWafer_Length/2.);
G4Box* DeadLayer = new G4Box("DeadLayer",
INNERBARREL_ActiveWafer_Width/2.,
INNERBARREL_ActiveWafer_DeadLayerThickness/2.,
INNERBARREL_ActiveWafer_Length/2.);
G4Box* ActiveWaferShape = new G4Box("ActiveWaferShape",
INNERBARREL_ActiveWafer_Width/2.,
INNERBARREL_PCB_Thickness/2.,
......@@ -431,37 +433,57 @@ void Tiara::ConstructInnerBarrel(G4LogicalVolume* world){
new G4LogicalVolume(ActiveWafer,m_MaterialSilicon,"logicActiveWafer", 0, 0, 0);
logicActiveWafer->SetVisAttributes(SiliconVisAtt);
G4LogicalVolume* logicDeadLayer =
new G4LogicalVolume(DeadLayer,m_MaterialSilicon,"logicActiveWaferDeadLayer", 0, 0, 0);
logicDeadLayer->SetVisAttributes(SiliconVisAtt);
// Set the sensitive volume
logicActiveWafer->SetSensitiveDetector(m_InnerBarrelScorer);
// The Distance from target is given by half the lenght of a detector
// plus the length of a detector inclined by 45 deg.
G4double DistanceFromTarget = INNERBARREL_PCB_Width*(0.5+sin(45*deg)) ;
for( unsigned int i = 0; i < 8; i ++){
// Place the sub volumes in the master volume
// Last argument is the detector number, used in the scorer to get the
// revelant information
new G4PVPlacement(new G4RotationMatrix(0,0,0),
// Place the sub volumes in the master volume
// Last argument is the detector number, used in the scorer to get the
// revelant information
new G4PVPlacement(new G4RotationMatrix(0,0,0),
G4ThreeVector(0,0,0),
logicPCB,"Tiara_Barrel_PCB",logicBarrelDetector,
false,i+1);
false,0);
G4ThreeVector WaferPosition(0,
0.5*(INNERBARREL_PCB_Thickness-INNERBARREL_PCB_WaferDepth+INNERBARREL_ActiveWafer_Thickness)
,0);
G4ThreeVector WaferPosition(0,0.5*(INNERBARREL_PCB_Thickness-INNERBARREL_PCB_WaferDepth+INNERBARREL_ActiveWafer_Thickness),0);
G4ThreeVector DeadLayerPositionF = WaferPosition + G4ThreeVector(0,-INNERBARREL_ActiveWafer_Thickness*0.5-INNERBARREL_ActiveWafer_DeadLayerThickness*0.5,0);
new G4PVPlacement(new G4RotationMatrix(0,0,0),
G4ThreeVector DeadLayerPositionB = WaferPosition + G4ThreeVector(0,INNERBARREL_ActiveWafer_Thickness*0.5+INNERBARREL_ActiveWafer_DeadLayerThickness*0.5,0);
new G4PVPlacement(new G4RotationMatrix(0,0,0),
WaferPosition,
logicActiveWafer,"Barrel_Wafer",
logicBarrelDetector,false,i+1);
logicBarrelDetector,false,0);
new G4PVPlacement(new G4RotationMatrix(0,0,0),
new G4PVPlacement(new G4RotationMatrix(0,0,0),
DeadLayerPositionF,
logicDeadLayer,"Barrel_WaferDeadLayer",
logicBarrelDetector,false,0);
new G4PVPlacement(new G4RotationMatrix(0,0,0),
DeadLayerPositionB,
logicDeadLayer,"Barrel_WaferDeadLayer",
logicBarrelDetector,false,0);
new G4PVPlacement(new G4RotationMatrix(0,0,0),
WaferPosition,
logicInertWafer,"Barrel_Wafer_GuardRing",
logicBarrelDetector,false,i+1);
logicBarrelDetector,false,0);
// The following build the barrel, with detector one at the top
// The Distance from target is given by half the lenght of a detector
// plus the length of a detector inclined by 45 deg.
G4double DistanceFromTarget = INNERBARREL_PCB_Width*(0.5+sin(45*deg)) ;
for( unsigned int i = 0; i < 8; i ++){
// The following build the barrel, with detector one at the top
// and going clowise looking upstrea
// Detector are rotate by 45deg with each other
......
......@@ -84,8 +84,11 @@ namespace TIARA
const G4double INNERBARREL_ActiveWafer_Thickness =400*um;
const G4double INNERBARREL_InertWafer_Length = 97.00*mm;
const G4double INNERBARREL_InertWafer_Width = 24.80*mm;
const G4double INNERBARREL_ActiveWafer_DeadLayerThickness = 1*um;
const G4double INNERBARREL_InertWafer_Thickness =
INNERBARREL_ActiveWafer_Thickness+ 2*INNERBARREL_ActiveWafer_DeadLayerThickness;
const G4int INNERBARREL_NumberOfStrip = 4;
// Outer Barrel //
const G4double OUTERBARREL_PCB_Length = 98.00*mm;
const G4double OUTERBARREL_PCB_Width = 33.16*mm;
......
......@@ -6,20 +6,38 @@
# File
#
#
# Vis menu :
/gui/addMenu vis Vis
/gui/addButton vis DAWNFILE "/control/execute visTutor/exN03Vis0.mac"
/gui/addButton vis OpenInventor "/control/execute visTutor/exN03Vis5.mac"
/gui/addButton vis TimeSlicing "/control/execute visTutor/exN03Vis12.mac"
/gui/addButton vis EmShower "/control/execute visTutor/exN03Vis13.mac"
#
# Viewer menu :
/gui/addMenu viewer Viewer
/gui/addButton viewer "New viewer" "/control/execute vis.mac"
/gui/addButton viewer "Set style surface" "/vis/viewer/set/style surface"
/gui/addButton viewer "Set style wireframe" "/vis/viewer/set/style wire"
/gui/addButton viewer "Refresh viewer" "/vis/viewer/refresh"
/gui/addButton viewer "Update viewer (interaction or end-of-file)" "/vis/viewer/update"
/gui/addButton viewer "Flush viewer (= refresh + update)" "/vis/viewer/flush"
/gui/addButton viewer "Update scene" "/vis/scene/notifyHandlers"
#
# To limit the output flow in the "dump" widget :
/gui/addButton viewer "Set style wireframe" "/vis/viewer/set/style wireframe"
/gui/addMenu tracking Tracking
/gui/addButton tracking "Set Tracking verbose" "/tracking/verbose"
/gui/addMenu run Run
/gui/addButton run "Run beam on" "/run/beamOn"
/gui/addMenu custom "Custom View"
/gui/addButton custom "Add Axis" "/vis/scene/add/axes"
/gui/addButton custom "Add Beam axis" "/vis/scene/add/arrow 0 0 -1 0 0 1 m"
/gui/addButton custom "Add Scorer Hits" "/vis/scene/add/psHits"
/gui/addButton custom "Add Hits" "/vis/scene/add/hits"
/gui/addButton custom "Add Event ID" "/vis/scene/add/eventID"
/gui/addIcon "Exit" user_icon "exit" icons/power.png
/gui/addIcon "There is nothing here" user_icon "/" icons/empty.png
/gui/addIcon "Run beam on" user_icon "/run/beamOn" icons/rocket.png
/gui/addIcon "One event" user_icon "/run/beamOn 1" icons/play.png
/gui/addIcon "Seriously?" user_icon "/" icons/empty.png
/gui/addIcon "Activate tracking verbose" user_icon "/tracking/verbose 1" icons/shoeprints.png
/gui/addIcon "Only borring emptyness" user_icon "/" icons/empty.png
/gui/addIcon "Home" user_icon "/vis/viewer/set/viewpointThetaPhi 45. 45." icons/videocameraclassic.png
/gui/addIcon "Front" user_icon "/vis/viewer/set/viewpointThetaPhi 0. 0." icons/arrow-up.png
/gui/addIcon "Back" user_icon "/vis/viewer/set/viewpointThetaPhi 180. 0." icons/arrow-down.png
/gui/addIcon "Left" user_icon "/vis/viewer/set/viewpointThetaPhi 90. 0." icons/arrow-left.png
/gui/addIcon "Right" user_icon "/vis/viewer/set/viewpointThetaPhi -90. 0." icons/arrow-right.png
/gui/addIcon "Zoom in" user_icon "/vis/viewer/zoom 2" icons/zoomin.png
/gui/addIcon "Zoom out" user_icon "/vis/viewer/zoom 0.5" icons/zoomout.png
NPSimulation/icons/arrow-down.png

2.48 KiB

NPSimulation/icons/arrow-left.png

4.13 KiB

NPSimulation/icons/arrow-right.png

3.91 KiB

NPSimulation/icons/arrow-up.png

2.39 KiB

NPSimulation/icons/empty.png

851 B

NPSimulation/icons/play.png

4.57 KiB

NPSimulation/icons/power.png

3.66 KiB

NPSimulation/icons/rocket.png

5.21 KiB

NPSimulation/icons/shoeprints.png

2.97 KiB

NPSimulation/icons/videocameraclassic.png

3.17 KiB

NPSimulation/icons/zoomin.png

4.04 KiB

NPSimulation/icons/zoomout.png

3.95 KiB

......@@ -53,7 +53,7 @@ void EventAction::BeginOfEventAction(const G4Event* event){
if ((event->GetEventID() + 1) % m_printModulo == 0)
// G4cout << "Event: " << event->GetEventID() + 1 << G4endl;
cout << "\rEvent: " << event->GetEventID() + 1 << flush;
G4cout << "\rEvent: " << event->GetEventID() + 1 << flush;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......
......@@ -3,12 +3,12 @@
#
# Sets some default verbose
#
/control/verbose 2
/control/verbose 0
/control/saveHistory
/run/verbose 2
/run/verbose 0
#
# Use this open statement to create an OpenGL view:
/vis/open OGLI 600x600-0+0
/vis/open OGLI 1200x600-0+0
#
# Use this open statement to create a .prim file suitable for
# viewing in DAWN:
......@@ -31,16 +31,16 @@
/vis/drawVolume
#
# Specify view angle:
/vis/viewer/set/viewpointThetaPhi 0. 90.
/vis/viewer/set/viewpointThetaPhi 45. 45.
#
# Specify zoom value:
/vis/viewer/zoom 2.
/vis/viewer/zoom 1.
#
# Specify style (surface or wireframe):
/vis/viewer/set/style surface
#
# Draw coordinate axes:
/vis/scene/add/axes 0 0 0 20 cm
#/vis/scene/add/axes 0 0 0 20 cm
#
# Draw smooth trajectories at end of event, showing trajectory points
# as markers 2 pixels wide:
......@@ -71,7 +71,7 @@
#
# Re-establish auto refreshing and verbosity:
/vis/viewer/set/autoRefresh true
#/vis/verbose 0
/vis/verbose 0
#
# For file-based drivers, use this to create an empty detector view:
#/vis/viewer/flush
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment