Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
np
nptool
Commits
237d14bc
Commit
237d14bc
authored
11 years ago
by
adrien-matta
Browse files
Options
Downloads
Patches
Plain Diff
* Adding Tiara inner Barrel geometry (one unit)
parent
5ef43115
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NPSimulation/Tiara/Tiara.cc
+151
-87
151 additions, 87 deletions
NPSimulation/Tiara/Tiara.cc
NPSimulation/Tiara/Tiara.hh
+31
-0
31 additions, 0 deletions
NPSimulation/Tiara/Tiara.hh
with
182 additions
and
87 deletions
NPSimulation/Tiara/Tiara.cc
+
151
−
87
View file @
237d14bc
...
...
@@ -72,7 +72,7 @@ Tiara::Tiara(){
PADVisAtt
=
new
G4VisAttributes
(
G4Colour
(
0.5
,
0.5
,
0.2
))
;
// Light Grey
FrameVisAtt
=
new
G4VisAttributes
(
G4Colour
(
0.5
,
0.5
,
0.5
))
;
}
Tiara
::~
Tiara
(){
}
...
...
@@ -82,47 +82,47 @@ Tiara::~Tiara(){
// Read stream at Configfile to pick-up parameters of detector (Position,...)
// Called in DetecorConstruction::ReadDetextorConfiguration Method
void
Tiara
::
ReadConfiguration
(
string
Path
){
/* ifstream ConfigFile ;
ConfigFile.open(Path.c_str()) ;
string LineBuffer ;
string DataBuffer ;
/* ifstream ConfigFile ;
ConfigFile.open(Path.c_str()) ;
string LineBuffer ;
string DataBuffer ;
while (!ConfigFile.eof()){
int VerboseLevel = NPOptionManager::getInstance()->GetVerboseLevel();
getline(ConfigFile, LineBuffer);
// cout << LineBuffer << endl;
if (LineBuffer.compare(0, 5, "Tiara") == 0)
ReadingStatus = true;
while (ReadingStatus && !ConfigFile.eof()) {
ConfigFile >> DataBuffer ;
// Comment Line
if (DataBuffer.compare(0, 1, "%") == 0) { ConfigFile.ignore ( std::numeric_limits<std::streamsize>::max(), '\n' );}
while (!ConfigFile.eof()){
int VerboseLevel = NPOptionManager::getInstance()->GetVerboseLevel();
getline(ConfigFile, LineBuffer);
// cout << LineBuffer << endl;
if (LineBuffer.compare(0, 5, "Tiara") == 0)
ReadingStatus = true;
while (ReadingStatus && !ConfigFile.eof()) {
ConfigFile >> DataBuffer ;
// Comment Line
if (DataBuffer.compare(0, 1, "%") == 0) { ConfigFile.ignore ( std::numeric_limits<std::streamsize>::max(), '\n' );}
// Tiara Chamber
if (DataBuffer=="TiaraChambe="){
if(VerboseLevel==1) G4cout << "///" << G4endl ;
if(VerboseLevel==1) G4cout << "Chamber Found:: " << G4endl ;
bool bool_Chamber;
ConfigFile >> bool_Chamber;
}
// Barrel case
else if (DataBuffer=="TiaraBarrel"){
if(VerboseLevel==1) G4cout << "///" << G4endl ;
if(VerboseLevel==1) G4cout << "Barrel found: " << G4endl ;
// ReadingStatusBOX = true ;
}
// Hyball case
else if (DataBuffer=="TiaraHyball")
if(VerboseLevel==1) G4cout << "///" << G4endl ;
if(VerboseLevel==1) G4cout << "Hyball found: " << G4endl ;
}
// Tiara Chamber
if (DataBuffer=="TiaraChambe="){
if(VerboseLevel==1) G4cout << "///" << G4endl ;
if(VerboseLevel==1) G4cout << "Chamber Found:: " << G4endl ;
bool bool_Chamber;
ConfigFile >> bool_Chamber;
}
// Barrel case
else if (DataBuffer=="TiaraBarrel"){
if(VerboseLevel==1) G4cout << "///" << G4endl ;
if(VerboseLevel==1) G4cout << "Barrel found: " << G4endl ;
// ReadingStatusBOX = true ;
}
// Hyball case
else if (DataBuffer=="TiaraHyball")
if(VerboseLevel==1) G4cout << "///" << G4endl ;
if(VerboseLevel==1) G4cout << "Hyball found: " << G4endl ;
}
}
...
...
@@ -133,15 +133,14 @@ void Tiara::ReadConfiguration(string Path){
// Construct detector and inialise sensitive part.
// Called After DetecorConstruction::AddDetector Method
void
Tiara
::
ConstructDetector
(
G4LogicalVolume
*
world
){
ConstructChamber
(
world
);
ConstructChamber
(
world
);
ConstructBarrel
(
world
);
}
// Read sensitive part and fill the Root tree.
// Called at in the EventAction::EndOfEventAvtion
void
Tiara
::
ReadSensitive
(
const
G4Event
*
event
){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
...
...
@@ -161,22 +160,6 @@ void Tiara::ConstructChamber(G4LogicalVolume* world){
// Hyball is hold on a back plate that close the Diabolo Shaped Chamber
// Geometry Information to be moved in Tiara Name Space //
// Central Tube
G4double
CHAMBER_CentralTube_Inner_Radius
=
4.86
*
cm
;
//4.05->Original Value for the Single stage barrel
G4double
CHAMBER_CentralTube_Outer_Radius
=
5.05
*
cm
;
//4.25->Original Value for the Single stage barrel
G4double
CHAMBER_CentralTube_Length
=
4.12
*
cm
;
// Outer Cone
G4double
CHAMBER_OuterCone_Length
=
4.94
*
cm
;
G4double
CHAMBER_OuterCone_Z_Pos
=
9.06
*
cm
;
// Outer Cylinder
G4double
CHAMBER_OuterCylinder_Inner_Radius
=
24.6
*
cm
;
G4double
CHAMBER_OuterCylinder_Outer_Radius
=
25.0
*
cm
;
G4double
CHAMBER_OuterCylinder_Length
=
6.04
*
cm
;
G4double
CHAMBER_OuterCylinder_Z_Pos
=
19.96
*
cm
;
// Material to be moved in a Material Function //
// Al
G4double
density
=
2.702
*
g
/
cm3
;
...
...
@@ -187,62 +170,143 @@ void Tiara::ConstructChamber(G4LogicalVolume* world){
// We make the individual pieces, starting from the inside to the outside
// Then we merge them together using the a G4AdditionSolid
// The whole chamber is then placed
// Central Tube
G4Tubs
*
solidCentralTube
=
new
G4Tubs
(
"TiaraChamberCentralTube"
,
CHAMBER_CentralTube_Inner_Radius
,
CHAMBER_CentralTube_Outer_Radius
,
CHAMBER_CentralTube_Length
,
0
*
deg
,
360
*
deg
);
CHAMBER_CentralTube_Outer_Radius
,
CHAMBER_CentralTube_Length
,
0
*
deg
,
360
*
deg
);
// Forward-Backward Cones
G4Cons
*
solidOuterCone
=
new
G4Cons
(
"TiaraChamberOuterCone"
,
CHAMBER_CentralTube_Inner_Radius
,
CHAMBER_CentralTube_Outer_Radius
,
CHAMBER_OuterCylinder_Inner_Radius
,
CHAMBER_OuterCylinder_Outer_Radius
,
CHAMBER_OuterCone_Length
,
0
*
deg
,
360
*
deg
);
CHAMBER_CentralTube_Outer_Radius
,
CHAMBER_OuterCylinder_Inner_Radius
,
CHAMBER_OuterCylinder_Outer_Radius
,
CHAMBER_OuterCone_Length
,
0
*
deg
,
360
*
deg
);
// Outer Cylinder
G4Tubs
*
solidOuterCylinder
=
new
G4Tubs
(
"TiaraChamberOuterCylinder"
,
CHAMBER_OuterCylinder_Inner_Radius
,
CHAMBER_OuterCylinder_Outer_Radius
,
CHAMBER_OuterCylinder_Length
,
0
*
deg
,
360
*
deg
);
CHAMBER_OuterCylinder_Outer_Radius
,
CHAMBER_OuterCylinder_Length
,
0
*
deg
,
360
*
deg
);
// Add the volume together
G4UnionSolid
*
solidTiaraChamberStep1
=
new
G4UnionSolid
(
"TiaraChamber"
,
solidCentralTube
,
solidOuterCone
,
new
G4RotationMatrix
,
G4ThreeVector
(
0
,
0
,
CHAMBER_OuterCone_Z_Pos
));
new
G4RotationMatrix
,
G4ThreeVector
(
0
,
0
,
CHAMBER_OuterCone_Z_Pos
));
G4UnionSolid
*
solidTiaraChamberStep2
=
new
G4UnionSolid
(
"TiaraChamber"
,
solidTiaraChamberStep1
,
solidOuterCone
,
new
G4RotationMatrix
(
0
,
180
*
deg
,
0
),
G4ThreeVector
(
0
,
0
,
-
CHAMBER_OuterCone_Z_Pos
));
new
G4RotationMatrix
(
0
,
180
*
deg
,
0
),
G4ThreeVector
(
0
,
0
,
-
CHAMBER_OuterCone_Z_Pos
));
G4UnionSolid
*
solidTiaraChamberStep3
=
new
G4UnionSolid
(
"TiaraChamber"
,
solidTiaraChamberStep2
,
solidOuterCylinder
,
new
G4RotationMatrix
,
G4ThreeVector
(
0
,
0
,
CHAMBER_OuterCylinder_Z_Pos
));
new
G4RotationMatrix
,
G4ThreeVector
(
0
,
0
,
CHAMBER_OuterCylinder_Z_Pos
));
G4UnionSolid
*
solidTiaraChamberStep4
=
new
G4UnionSolid
(
"TiaraChamber"
,
solidTiaraChamberStep3
,
solidOuterCylinder
,
new
G4RotationMatrix
,
G4ThreeVector
(
0
,
0
,
-
CHAMBER_OuterCylinder_Z_Pos
));
new
G4RotationMatrix
,
G4ThreeVector
(
0
,
0
,
-
CHAMBER_OuterCylinder_Z_Pos
));
// Create Logic Volume
G4LogicalVolume
*
logicTiaraChamber
=
// Create Logic Volume
G4LogicalVolume
*
logicTiaraChamber
=
new
G4LogicalVolume
(
solidTiaraChamberStep4
,
Aluminium
,
"logicTiaraChamber"
,
0
,
0
,
0
);
// Visual Attribute
G4VisAttributes
*
ChamberVisAtt
// Visual Attribute
G4VisAttributes
*
ChamberVisAtt
=
new
G4VisAttributes
(
G4Colour
(
0.6
,
0.6
,
0.6
));
ChamberVisAtt
->
SetForceWireframe
(
true
);
ChamberVisAtt
->
SetForceAuxEdgeVisible
(
true
);
logicTiaraChamber
->
SetVisAttributes
(
ChamberVisAtt
);
ChamberVisAtt
->
SetForceWireframe
(
true
);
ChamberVisAtt
->
SetForceAuxEdgeVisible
(
true
);
logicTiaraChamber
->
SetVisAttributes
(
ChamberVisAtt
);
// Place the whole chamber
new
G4PVPlacement
(
new
G4RotationMatrix
(
0
,
0
,
0
),
G4ThreeVector
(
0
,
0
,
0
),
logicTiaraChamber
,
"TiaraChamber"
,
world
,
false
,
0
);
logicTiaraChamber
,
"TiaraChamber"
,
world
,
false
,
0
);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void
Tiara
::
ConstructBarrel
(
G4LogicalVolume
*
world
){
// Tiara Barrel
// The Barrel is made of 8 identical resistive strip detector
// The detector are rectangular shape with a pcb and a wafer
// the pcb is a substracted volume
// the wafer goes into the hole
// the whole things is design so the local reference is the one of the wafer
// Material to be moved in a Material Function //
// Al
G4double
density
=
2.702
*
g
/
cm3
;
G4double
a
=
26.98
*
g
/
mole
;
G4Material
*
Aluminium
=
new
G4Material
(
"Aluminium"
,
13.
,
a
,
density
);
PCBVisAtt
=
new
G4VisAttributes
(
G4Colour
(
0.2
,
0.5
,
0.2
))
;
int
DetNbr
=
0
;
// Start by making a full pcb
G4Box
*
PCBFull
=
new
G4Box
(
"PCBFull"
,
INNERBARREL_PCB_Length
/
2.
,
INNERBARREL_PCB_Width
/
2.
,
INNERBARREL_PCB_Thickness
/
2.
);
G4Box
*
WaferShape
=
new
G4Box
(
"WaferShape"
,
INNERBARREL_Wafer_Length
/
2.
,
INNERBARREL_Wafer_Width
/
2.
,
INNERBARREL_PCB_Thickness
/
2.
+
0.1
*
mm
);
G4Box
*
Wafer
=
new
G4Box
(
"Wafer"
,
INNERBARREL_Wafer_Length
/
2.
,
INNERBARREL_Wafer_Width
/
2.
,
INNERBARREL_Wafer_Thickness
/
2.
);
// Calculate the wafer shift within the PCB
G4ThreeVector
WaferShift
=
G4ThreeVector
(
INNERBARREL_PCB_Offset
-
(
INNERBARREL_PCB_Length
/
2
-
INNERBARREL_Wafer_Length
/
2
),
0
,
0
);
G4SubtractionSolid
*
PCB
=
new
G4SubtractionSolid
(
"PCB"
,
PCBFull
,
WaferShape
,
new
G4RotationMatrix
,
WaferShift
);
// Master Volume
G4LogicalVolume
*
logicBarrelDetector
=
new
G4LogicalVolume
(
PCBFull
,
Aluminium
,
"logicBoxDetector"
,
0
,
0
,
0
);
logicBarrelDetector
->
SetVisAttributes
(
G4VisAttributes
::
Invisible
);
// Sub Volume PCB
G4LogicalVolume
*
logicPCB
=
new
G4LogicalVolume
(
PCB
,
Aluminium
,
"logicPCB"
,
0
,
0
,
0
);
logicPCB
->
SetVisAttributes
(
PCBVisAtt
);
// Sub Volume Wafer
G4LogicalVolume
*
logicWafer
=
new
G4LogicalVolume
(
Wafer
,
Aluminium
,
"logicWafer"
,
0
,
0
,
0
);
// Place the sub volume in the master volume
new
G4PVPlacement
(
new
G4RotationMatrix
(
0
,
0
,
0
),
G4ThreeVector
(
0
,
0
,
0
),
logicPCB
,
"Tiara_Barrel_PCB"
,
logicBarrelDetector
,
false
,
DetNbr
);
new
G4PVPlacement
(
new
G4RotationMatrix
(
0
,
0
,
0
),
WaferShift
,
logicWafer
,
"Barrel_Wafer"
,
logicBarrelDetector
,
false
,
DetNbr
);
new
G4PVPlacement
(
new
G4RotationMatrix
(
0
,
0
,
0
),
G4ThreeVector
(
0
,
5
*
mm
,
10
*
cm
),
logicBarrelDetector
,
"Tiara_Barrel_Detector"
,
world
,
false
,
DetNbr
);
// Substract a square to make a hole in it
// create the wafer
// place the wafer in the pcb
}
This diff is collapsed.
Click to expand it.
NPSimulation/Tiara/Tiara.hh
+
31
−
0
View file @
237d14bc
...
...
@@ -50,6 +50,37 @@ namespace TIARA
const
G4double
ResoTime
=
0
;
//const G4double ResoEnergy = 0.035*MeV ;// = zzkeV of Resolution // Unit is MeV/2.35
const
G4double
ResoEnergy
=
0.042
*
MeV
;
// = zzkeV of Resolution // Unit is MeV/2.35
// Geometric Information //
// Chanber //
// Central Tube
const
G4double
CHAMBER_CentralTube_Inner_Radius
=
4.86
*
cm
;
//4.05->Original Value for the Single stage barrel
const
G4double
CHAMBER_CentralTube_Outer_Radius
=
5.05
*
cm
;
//4.25->Original Value for the Single stage barrel
const
G4double
CHAMBER_CentralTube_Length
=
4.12
*
cm
;
// Outer Cone
const
G4double
CHAMBER_OuterCone_Length
=
4.94
*
cm
;
const
G4double
CHAMBER_OuterCone_Z_Pos
=
9.06
*
cm
;
// Outer Cylinder
const
G4double
CHAMBER_OuterCylinder_Inner_Radius
=
24.6
*
cm
;
const
G4double
CHAMBER_OuterCylinder_Outer_Radius
=
25.0
*
cm
;
const
G4double
CHAMBER_OuterCylinder_Length
=
6.04
*
cm
;
const
G4double
CHAMBER_OuterCylinder_Z_Pos
=
19.96
*
cm
;
// Inner Barrel //
const
G4double
INNERBARREL_PCB_Length
=
98.00
*
mm
;
const
G4double
INNERBARREL_PCB_Width
=
27.76
*
mm
;
const
G4double
INNERBARREL_PCB_Thickness
=
1.60
*
mm
;
const
G4double
INNERBARREL_PCB_Offset
=
15
*
mm
;
// offset between the edge of the PCB and the Edge of the Waffer
const
G4double
INNERBARREL_Wafer_Length
=
82.00
*
mm
;
// Different from Marc code, to be checked
const
G4double
INNERBARREL_Wafer_Width
=
24.80
*
mm
;
const
G4double
INNERBARREL_Wafer_Thickness
=
400
*
um
;
}
using
namespace
TIARA
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment