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
f9d9fbbc
Commit
f9d9fbbc
authored
7 years ago
by
Freddy Flavigny
Browse files
Options
Downloads
Patches
Plain Diff
* Update Gaspard Annular to use geometry from input file coherently with NPLib
parent
ac736776
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/Detectors/GASPARD/GaspardTrackerAnnular.cc
+31
-28
31 additions, 28 deletions
NPSimulation/Detectors/GASPARD/GaspardTrackerAnnular.cc
NPSimulation/Detectors/GASPARD/GaspardTrackerAnnular.hh
+10
-10
10 additions, 10 deletions
NPSimulation/Detectors/GASPARD/GaspardTrackerAnnular.hh
with
41 additions
and
38 deletions
NPSimulation/Detectors/GASPARD/GaspardTrackerAnnular.cc
+
31
−
28
View file @
f9d9fbbc
...
@@ -86,9 +86,9 @@ void GaspardTrackerAnnular::AddModule(G4double PosZ,
...
@@ -86,9 +86,9 @@ void GaspardTrackerAnnular::AddModule(G4double PosZ,
bool
wSecondStage
,
bool
wSecondStage
,
bool
wThirdStage
)
bool
wThirdStage
)
{
{
m_PosZ
.
push_back
(
PosZ
);
m_
FirstStage
PosZ
.
push_back
(
PosZ
);
m_Rmin
.
push_back
(
Rmin
);
m_
FirstStage
Rmin
.
push_back
(
Rmin
);
m_Rmax
.
push_back
(
Rmax
);
m_
FirstStage
Rmax
.
push_back
(
Rmax
);
m_wFirstStage
.
push_back
(
wFirstStage
)
;
m_wFirstStage
.
push_back
(
wFirstStage
)
;
m_wSecondStage
.
push_back
(
wSecondStage
)
;
m_wSecondStage
.
push_back
(
wSecondStage
)
;
...
@@ -106,12 +106,16 @@ void GaspardTrackerAnnular::VolumeMaker(G4int DetectorNumber,
...
@@ -106,12 +106,16 @@ void GaspardTrackerAnnular::VolumeMaker(G4int DetectorNumber,
bool
wThirdStage
,
bool
wThirdStage
,
G4LogicalVolume
*
world
)
G4LogicalVolume
*
world
)
{
{
G4double
Nbr
Telescopes
=
DetectorNumber
;
G4double
Tel
Nbr
=
DetectorNumber
;
G4String
DetNumber
;
G4String
DetNumber
;
ostringstream
Number
;
ostringstream
Number
;
Number
<<
Nbr
Telescopes
;
Number
<<
Tel
Nbr
;
DetNumber
=
Number
.
str
()
;
DetNumber
=
Number
.
str
()
;
cout
<<
"FF DetectorNumber: "
<<
DetectorNumber
<<
endl
;
cout
<<
"FF m_FSRmin[DetecNbr-1]: "
<<
m_FirstStageRmin
[
DetectorNumber
-
1
]
<<
endl
;
cout
<<
"FF m_FSRmax[DetecNbr-1]: "
<<
m_FirstStageRmax
[
DetectorNumber
-
1
]
<<
endl
;
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////// Starting Volume Definition //////////////////////
////////////// Starting Volume Definition //////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
...
@@ -120,13 +124,12 @@ void GaspardTrackerAnnular::VolumeMaker(G4int DetectorNumber,
...
@@ -120,13 +124,12 @@ void GaspardTrackerAnnular::VolumeMaker(G4int DetectorNumber,
// Definition of the volume containing the sensitive detector
// Definition of the volume containing the sensitive detector
G4Tubs
*
solidMM
=
new
G4Tubs
(
Name
,
G4Tubs
*
solidMM
=
new
G4Tubs
(
Name
,
Rmin
,
Logic
Rmin
,
Rmax
,
Logic
Rmax
,
Length
/
2
,
Logic
Length
/
2
,
0
*
deg
,
0
*
deg
,
360
*
deg
);
360
*
deg
);
// G4LogicalVolume* logicMM = new G4LogicalVolume(solidMM, Iron, Name, 0, 0, 0);
G4LogicalVolume
*
logicMM
=
new
G4LogicalVolume
(
solidMM
,
m_MaterialVacuum
,
Name
,
0
,
0
,
0
);
G4LogicalVolume
*
logicMM
=
new
G4LogicalVolume
(
solidMM
,
m_MaterialVacuum
,
Name
,
0
,
0
,
0
);
new
G4PVPlacement
(
G4Transform3D
(
*
MMrot
,
MMpos
),
logicMM
,
Name
,
world
,
false
,
DetectorNumber
);
new
G4PVPlacement
(
G4Transform3D
(
*
MMrot
,
MMpos
),
logicMM
,
Name
,
world
,
false
,
DetectorNumber
);
...
@@ -141,8 +144,8 @@ void GaspardTrackerAnnular::VolumeMaker(G4int DetectorNumber,
...
@@ -141,8 +144,8 @@ void GaspardTrackerAnnular::VolumeMaker(G4int DetectorNumber,
G4ThreeVector
positionVacBox
=
G4ThreeVector
(
0
,
0
,
VacBox_PosZ
);
G4ThreeVector
positionVacBox
=
G4ThreeVector
(
0
,
0
,
VacBox_PosZ
);
G4Tubs
*
solidVacBox
=
new
G4Tubs
(
"solidVacBox"
,
G4Tubs
*
solidVacBox
=
new
G4Tubs
(
"solidVacBox"
,
FirstStageRmin
,
m_
FirstStageRmin
[
DetectorNumber
-
1
]
,
FirstStageRmax
,
m_
FirstStageRmax
[
DetectorNumber
-
1
]
,
VacBoxThickness
/
2
,
VacBoxThickness
/
2
,
0
*
deg
,
0
*
deg
,
360
*
deg
);
360
*
deg
);
...
@@ -162,8 +165,8 @@ void GaspardTrackerAnnular::VolumeMaker(G4int DetectorNumber,
...
@@ -162,8 +165,8 @@ void GaspardTrackerAnnular::VolumeMaker(G4int DetectorNumber,
G4ThreeVector
positionAluStripBack
=
G4ThreeVector
(
0
,
0
,
AluStripBack_PosZ
);
G4ThreeVector
positionAluStripBack
=
G4ThreeVector
(
0
,
0
,
AluStripBack_PosZ
);
G4Tubs
*
solidAluStrip
=
new
G4Tubs
(
"AluBox"
,
G4Tubs
*
solidAluStrip
=
new
G4Tubs
(
"AluBox"
,
FirstStageRmin
,
m_
FirstStageRmin
[
DetectorNumber
-
1
]
,
FirstStageRmax
,
m_
FirstStageRmax
[
DetectorNumber
-
1
]
,
AluStripThickness
/
2
,
AluStripThickness
/
2
,
0
*
deg
,
0
*
deg
,
360
*
deg
);
360
*
deg
);
...
@@ -180,8 +183,8 @@ void GaspardTrackerAnnular::VolumeMaker(G4int DetectorNumber,
...
@@ -180,8 +183,8 @@ void GaspardTrackerAnnular::VolumeMaker(G4int DetectorNumber,
G4ThreeVector
positionSilicon
=
G4ThreeVector
(
0
,
0
,
Silicon_PosZ
);
G4ThreeVector
positionSilicon
=
G4ThreeVector
(
0
,
0
,
Silicon_PosZ
);
G4Tubs
*
solidSilicon
=
new
G4Tubs
(
"solidSilicon"
,
G4Tubs
*
solidSilicon
=
new
G4Tubs
(
"solidSilicon"
,
FirstStageRmin
,
m_
FirstStageRmin
[
DetectorNumber
-
1
]
,
FirstStageRmax
,
m_
FirstStageRmax
[
DetectorNumber
-
1
]
,
FirstStageThickness
/
2
,
FirstStageThickness
/
2
,
0
*
deg
,
0
*
deg
,
360
*
deg
);
360
*
deg
);
...
@@ -205,8 +208,8 @@ void GaspardTrackerAnnular::VolumeMaker(G4int DetectorNumber,
...
@@ -205,8 +208,8 @@ void GaspardTrackerAnnular::VolumeMaker(G4int DetectorNumber,
G4ThreeVector
positionSecondStage
=
G4ThreeVector
(
0
,
0
,
SecondStage_PosZ
);
G4ThreeVector
positionSecondStage
=
G4ThreeVector
(
0
,
0
,
SecondStage_PosZ
);
G4Tubs
*
solidSecondStage
=
new
G4Tubs
(
"solidSecondStage"
,
G4Tubs
*
solidSecondStage
=
new
G4Tubs
(
"solidSecondStage"
,
FirstStageRmin
,
m_
FirstStageRmin
[
DetectorNumber
-
1
]
,
FirstStageRmax
,
m_
FirstStageRmax
[
DetectorNumber
-
1
]
,
SecondStageThickness
/
2
,
SecondStageThickness
/
2
,
0
*
deg
,
0
*
deg
,
360
*
deg
);
360
*
deg
);
...
@@ -231,8 +234,8 @@ void GaspardTrackerAnnular::VolumeMaker(G4int DetectorNumber,
...
@@ -231,8 +234,8 @@ void GaspardTrackerAnnular::VolumeMaker(G4int DetectorNumber,
G4ThreeVector
positionThirdStage
=
G4ThreeVector
(
0
,
0
,
ThirdStage_PosZ
);
G4ThreeVector
positionThirdStage
=
G4ThreeVector
(
0
,
0
,
ThirdStage_PosZ
);
G4Tubs
*
solidThirdStage
=
new
G4Tubs
(
"solidThirdStage"
,
G4Tubs
*
solidThirdStage
=
new
G4Tubs
(
"solidThirdStage"
,
FirstStageRmin
,
m_
FirstStageRmin
[
DetectorNumber
-
1
]
,
FirstStageRmax
,
m_
FirstStageRmax
[
DetectorNumber
-
1
]
,
ThirdStageThickness
/
2
,
ThirdStageThickness
/
2
,
0
*
deg
,
0
*
deg
,
360
*
deg
);
360
*
deg
);
...
@@ -297,13 +300,13 @@ void GaspardTrackerAnnular::ConstructDetector(G4LogicalVolume* world)
...
@@ -297,13 +300,13 @@ void GaspardTrackerAnnular::ConstructDetector(G4LogicalVolume* world)
bool
SecondStage
=
true
;
bool
SecondStage
=
true
;
bool
ThirdStage
=
true
;
bool
ThirdStage
=
true
;
G4int
NumberOfModule
=
m_PosZ
.
size
()
;
G4int
NumberOfModule
=
m_
FirstStage
PosZ
.
size
()
;
for
(
G4int
i
=
0
;
i
<
NumberOfModule
;
i
++
)
{
for
(
G4int
i
=
0
;
i
<
NumberOfModule
;
i
++
)
{
// translation to position the module
// translation to position the module
// test if module is in the forward or backward hemisphere
// test if module is in the forward or backward hemisphere
(
m_PosZ
[
i
]
<
0
)
?
m_PosZ
[
i
]
-=
0.5
*
Length
:
m_PosZ
[
i
]
+=
0.5
*
Length
;
(
m_
FirstStage
PosZ
[
i
]
<
0
)
?
m_
FirstStage
PosZ
[
i
]
-=
0.5
*
Logic
Length
:
m_
FirstStage
PosZ
[
i
]
+=
0.5
*
Logic
Length
;
MMpos
=
G4ThreeVector
(
0
,
0
,
m_PosZ
[
i
]);
MMpos
=
G4ThreeVector
(
0
,
0
,
m_
FirstStage
PosZ
[
i
]);
// Passage Matrix from Lab Referential to Module Referential
// Passage Matrix from Lab Referential to Module Referential
// Identity matrix by default
// Identity matrix by default
...
@@ -489,8 +492,8 @@ void GaspardTrackerAnnular::InitializeScorers()
...
@@ -489,8 +492,8 @@ void GaspardTrackerAnnular::InitializeScorers()
G4VPrimitiveScorer
*
GPDScorerFirstStage
=
G4VPrimitiveScorer
*
GPDScorerFirstStage
=
new
SILICONSCORERS
::
PS_Silicon_Annular
(
"GPDAnnularFirstStage"
,
new
SILICONSCORERS
::
PS_Silicon_Annular
(
"GPDAnnularFirstStage"
,
0
,
0
,
FirstStageRmin
,
m_
FirstStageRmin
[
0
]
,
FirstStageRmax
,
m_
FirstStageRmax
[
0
]
,
360
*
deg
,
360
*
deg
,
0
*
deg
,
0
*
deg
,
NbThetaStrips
,
NbThetaStrips
,
...
@@ -501,8 +504,8 @@ void GaspardTrackerAnnular::InitializeScorers()
...
@@ -501,8 +504,8 @@ void GaspardTrackerAnnular::InitializeScorers()
G4VPrimitiveScorer
*
GPDScorerSecondStage
=
G4VPrimitiveScorer
*
GPDScorerSecondStage
=
new
SILICONSCORERS
::
PS_Silicon_Annular
(
"GPDAnnularSecondStage"
,
new
SILICONSCORERS
::
PS_Silicon_Annular
(
"GPDAnnularSecondStage"
,
0
,
0
,
FirstStageRmin
,
m_
FirstStageRmin
[
0
]
,
FirstStageRmax
,
m_
FirstStageRmax
[
0
]
,
0
*
deg
,
0
*
deg
,
360
*
deg
,
360
*
deg
,
1
,
1
,
...
@@ -513,8 +516,8 @@ void GaspardTrackerAnnular::InitializeScorers()
...
@@ -513,8 +516,8 @@ void GaspardTrackerAnnular::InitializeScorers()
G4VPrimitiveScorer
*
GPDScorerThirdStage
=
G4VPrimitiveScorer
*
GPDScorerThirdStage
=
new
SILICONSCORERS
::
PS_Silicon_Annular
(
"GPDAnnularThirdStage"
,
new
SILICONSCORERS
::
PS_Silicon_Annular
(
"GPDAnnularThirdStage"
,
0
,
0
,
FirstStageRmin
,
m_
FirstStageRmin
[
0
]
,
FirstStageRmax
,
m_
FirstStageRmax
[
0
]
,
0
*
deg
,
0
*
deg
,
360
*
deg
,
360
*
deg
,
1
,
1
,
...
...
This diff is collapsed.
Click to expand it.
NPSimulation/Detectors/GASPARD/GaspardTrackerAnnular.hh
+
10
−
10
View file @
f9d9fbbc
...
@@ -105,9 +105,9 @@ private:
...
@@ -105,9 +105,9 @@ private:
TInteractionCoordinates
*
ms_InterCoord
;
TInteractionCoordinates
*
ms_InterCoord
;
// Used for "By Point Definition"
// Used for "By Point Definition"
vector
<
G4double
>
m_PosZ
;
vector
<
G4double
>
m_
FirstStage
PosZ
;
vector
<
G4double
>
m_Rmin
;
vector
<
G4double
>
m_
FirstStage
Rmin
;
vector
<
G4double
>
m_Rmax
;
vector
<
G4double
>
m_
FirstStage
Rmax
;
// for debugging purpose
// for debugging purpose
//G4ThreeVector MMpos;
//G4ThreeVector MMpos;
...
@@ -131,18 +131,18 @@ namespace GPDANNULAR
...
@@ -131,18 +131,18 @@ namespace GPDANNULAR
// Threshold
// Threshold
const
G4double
EnergyThreshold
=
0.2
*
MeV
;
const
G4double
EnergyThreshold
=
0.2
*
MeV
;
// Geometry
// Geometry
of Principal Logical Volume
const
G4double
Rmin
=
15
*
mm
;
const
G4double
Logic
Rmin
=
15
*
mm
;
const
G4double
Rmax
=
55
*
mm
;
const
G4double
Logic
Rmax
=
55
*
mm
;
const
G4double
Length
=
10
*
mm
;
const
G4double
Logic
Length
=
10
*
mm
;
// First stage
// First stage
// const G4double AluStripThickness = 0.00000001*micrometer;
// const G4double AluStripThickness = 0.00000001*micrometer;
const
G4double
AluStripThickness
=
0.4
*
micrometer
;
const
G4double
AluStripThickness
=
0.4
*
micrometer
;
const
G4double
FirstStageThickness
=
300
*
micrometer
;
const
G4double
FirstStageThickness
=
300
*
micrometer
;
const
G4double
FirstStageRmin
=
16
*
mm
;
//
const G4double FirstStageRmin = 16*mm;
// MUGAST
// MUGAST
const
G4double
FirstStageRmax
=
45
*
mm
;
//
const G4double FirstStageRmax = 45*mm;
// gaspHyde
// gaspHyde
// const G4double FirstStageRmax = 52*mm;
// const G4double FirstStageRmax = 52*mm;
// const G4double VacBoxThickness = 3*cm ;
// const G4double VacBoxThickness = 3*cm ;
...
@@ -159,7 +159,7 @@ namespace GPDANNULAR
...
@@ -159,7 +159,7 @@ namespace GPDANNULAR
const
G4int
NbThetaStrips
=
16
;
const
G4int
NbThetaStrips
=
16
;
// Starting at the front and going in direction of third stage
// Starting at the front and going in direction of third stage
const
G4double
AluStripFront_PosZ
=
Length
*
-
0.5
+
0.5
*
AluStripThickness
;
const
G4double
AluStripFront_PosZ
=
Logic
Length
*
-
0.5
+
0.5
*
AluStripThickness
;
const
G4double
Silicon_PosZ
=
AluStripFront_PosZ
+
0.5
*
AluStripThickness
+
0.5
*
FirstStageThickness
;
const
G4double
Silicon_PosZ
=
AluStripFront_PosZ
+
0.5
*
AluStripThickness
+
0.5
*
FirstStageThickness
;
const
G4double
AluStripBack_PosZ
=
Silicon_PosZ
+
0.5
*
FirstStageThickness
+
0.5
*
AluStripThickness
;
const
G4double
AluStripBack_PosZ
=
Silicon_PosZ
+
0.5
*
FirstStageThickness
+
0.5
*
AluStripThickness
;
const
G4double
VacBox_PosZ
=
AluStripBack_PosZ
+
0.5
*
AluStripThickness
+
0.5
*
VacBoxThickness
;
const
G4double
VacBox_PosZ
=
AluStripBack_PosZ
+
0.5
*
AluStripThickness
+
0.5
*
VacBoxThickness
;
...
...
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