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
Admin message
Gitlab has been updated. More info
here
.
Show more breadcrumbs
np
nptool
Commits
5c0acb92
Commit
5c0acb92
authored
7 years ago
by
moukaddam
Browse files
Options
Downloads
Patches
Plain Diff
Adding energy and time resolutions
parent
22a02a42
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NPSimulation/Detectors/GeTAMU/GeTAMU.cc
+12
-3
12 additions, 3 deletions
NPSimulation/Detectors/GeTAMU/GeTAMU.cc
NPSimulation/Detectors/GeTAMU/GeTAMU.hh
+4
-3
4 additions, 3 deletions
NPSimulation/Detectors/GeTAMU/GeTAMU.hh
with
16 additions
and
6 deletions
NPSimulation/Detectors/GeTAMU/GeTAMU.cc
+
12
−
3
View file @
5c0acb92
...
@@ -572,10 +572,9 @@ void GeTAMU::ReadSensitive(const G4Event* event){
...
@@ -572,10 +572,9 @@ void GeTAMU::ReadSensitive(const G4Event* event){
// Loop on the HPGE map
// Loop on the HPGE map
for
(
HPGE_itr
=
HPGEHitMap
->
GetMap
()
->
begin
()
;
HPGE_itr
!=
HPGEHitMap
->
GetMap
()
->
end
()
;
HPGE_itr
++
){
for
(
HPGE_itr
=
HPGEHitMap
->
GetMap
()
->
begin
()
;
HPGE_itr
!=
HPGEHitMap
->
GetMap
()
->
end
()
;
HPGE_itr
++
){
bool
GeScoredHit
=
false
;
// flag true if first stage scores a hit above threshold
G4double
*
Info
=
*
(
HPGE_itr
->
second
);
G4double
*
Info
=
*
(
HPGE_itr
->
second
);
G4double
Energy
=
Info
[
0
];
// RandGauss::shoot(Info[0], ResoEnergy/2.334);
G4double
Energy
=
Info
[
0
];
G4double
Time
=
Info
[
1
];
G4double
Time
=
Info
[
1
];
//
//
G4double
InterPos_X
=
Info
[
2
];
G4double
InterPos_X
=
Info
[
2
];
...
@@ -594,7 +593,6 @@ void GeTAMU::ReadSensitive(const G4Event* event){
...
@@ -594,7 +593,6 @@ void GeTAMU::ReadSensitive(const G4Event* event){
else
{
SegmentNbr
=
3
;
}
// LEFT
else
{
SegmentNbr
=
3
;
}
// LEFT
if
(
Energy
>
0.0
*
keV
){
if
(
Energy
>
0.0
*
keV
){
GeScoredHit
=
true
;
m_GeTAMUData
->
SetCoreE
(
CloverNbr
,
CrystalNbr
,
Energy
/
keV
);
m_GeTAMUData
->
SetCoreE
(
CloverNbr
,
CrystalNbr
,
Energy
/
keV
);
m_GeTAMUData
->
SetCoreT
(
CloverNbr
,
CrystalNbr
,
Time
/
ns
);
m_GeTAMUData
->
SetCoreT
(
CloverNbr
,
CrystalNbr
,
Time
/
ns
);
m_GeTAMUData
->
SetSegmentE
(
CloverNbr
,
SegmentNbr
,
Energy
/
keV
);
m_GeTAMUData
->
SetSegmentE
(
CloverNbr
,
SegmentNbr
,
Energy
/
keV
);
...
@@ -607,6 +605,17 @@ void GeTAMU::ReadSensitive(const G4Event* event){
...
@@ -607,6 +605,17 @@ void GeTAMU::ReadSensitive(const G4Event* event){
ms_InterCoord
->
SetDetectedPositionZ
(
InterPos_Z
)
;
ms_InterCoord
->
SetDetectedPositionZ
(
InterPos_Z
)
;
ms_InterCoord
->
SetDetectedAngleTheta
(
InterPos_Theta
/
deg
)
;
ms_InterCoord
->
SetDetectedAngleTheta
(
InterPos_Theta
/
deg
)
;
ms_InterCoord
->
SetDetectedAnglePhi
(
InterPos_Phi
/
deg
)
;
ms_InterCoord
->
SetDetectedAnglePhi
(
InterPos_Phi
/
deg
)
;
//add resolutions
G4double
energyCry
=
RandGauss
::
shoot
(
Energy
,
ResoCry
);
G4double
energySeg
=
RandGauss
::
shoot
(
Energy
,
ResoSeg
);
G4double
time
=
RandGauss
::
shoot
(
Time
,
ResoTime
);
if
(
Energy
>
EnergyThreshold
){
m_GeTAMUData
->
SetCoreE
(
CloverNbr
,
CrystalNbr
,
energyCry
/
keV
);
m_GeTAMUData
->
SetCoreT
(
CloverNbr
,
CrystalNbr
,
time
/
ns
);
m_GeTAMUData
->
SetSegmentE
(
CloverNbr
,
SegmentNbr
,
energySeg
/
keV
);
m_GeTAMUData
->
SetSegmentT
(
CloverNbr
,
SegmentNbr
,
time
/
ns
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
NPSimulation/Detectors/GeTAMU/GeTAMU.hh
+
4
−
3
View file @
5c0acb92
...
@@ -46,9 +46,10 @@ using namespace CLHEP;
...
@@ -46,9 +46,10 @@ using namespace CLHEP;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
namespace
GETAMU
{
namespace
GETAMU
{
// Energy and time Resolution
// Energy and time Resolution
const
G4double
ResoTime
=
0
;
const
G4double
ResoTime
=
4.25532
;
// = 10 ns FWHM // Unit is ns/2.35
const
G4double
ResoEnergy
=
0.035
*
MeV
;
// = zzkeV of Resolution // Unit is MeV/2.35
const
G4double
ResoCry
=
0.00085
;
// = 2 keV FWHM // Unit is MeV/2.35
const
G4double
EnergyThreshold
=
50.0
*
keV
;
const
G4double
ResoSeg
=
0.0085
;
// = 10 kev FWHM // Unit is MeV/2.35
const
G4double
EnergyThreshold
=
10.0
*
keV
;
}
}
using
namespace
GETAMU
;
using
namespace
GETAMU
;
...
...
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