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
aaf68bbb
Commit
aaf68bbb
authored
9 months ago
by
HEITZ Louis
Browse files
Options
Downloads
Patches
Plain Diff
Update DSSDScorers.cc
parent
0c2edc93
No related branches found
No related tags found
1 merge request
!27
Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline
#323803
failed
9 months ago
Stage: build-NPLib
Stage: build-NPSimulation
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
NPSimulation/Scorers/DSSDScorers.cc
+6
-23
6 additions, 23 deletions
NPSimulation/Scorers/DSSDScorers.cc
with
6 additions
and
23 deletions
NPSimulation/Scorers/DSSDScorers.cc
+
6
−
23
View file @
aaf68bbb
...
...
@@ -182,8 +182,7 @@ void PS_Images::GetARGBBack(unsigned int& i, unsigned int& a, unsigned int& r, u
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PS_Rectangle
::
PS_Rectangle
(
G4String
name
,
G4int
Level
,
G4double
StripPlaneLength
,
G4double
StripPlaneWidth
,
G4int
NumberOfStripLength
,
G4int
NumberOfStripWidth
,
G4int
depth
,
G4String
axis
,
G4double
TimeThreshold
,
G4double
InterStripLength
,
G4double
InterStripWidth
)
G4int
NumberOfStripLength
,
G4int
NumberOfStripWidth
,
G4int
depth
,
G4String
axis
)
:
G4VPrimitiveScorer
(
name
,
depth
)
{
m_StripPlaneLength
=
StripPlaneLength
;
...
...
@@ -224,14 +223,6 @@ G4bool PS_Rectangle::ProcessHits(G4Step* aStep, G4TouchableHistory*) {
t_StripLengthNumber
=
(
int
)((
t_Position
.
x
()
+
m_StripPlaneLength
/
2.
)
/
m_StripPitchLength
)
+
1
;
t_StripWidthNumber
=
(
int
)((
t_Position
.
y
()
+
m_StripPlaneWidth
/
2.
)
/
m_StripPitchWidth
)
+
1
;
G4double
x0
=
t_Position
.
x
()
+
m_StripPlaneLength
/
2.
;
G4double
middle_x
=
(
2
*
t_StripLengthNumber
-
1
)
*
m_StripPitchLength
/
2
;
checkInterStrip_x
=
std
::
abs
(
x0
-
middle_x
)
<
(
m_StripPitchLength
-
m_InterStripLength
)
/
2
;
G4double
y0
=
t_Position
.
y
()
+
m_StripPlaneWidth
/
2.
;
G4double
middle_y
=
(
2
*
t_StripWidthNumber
-
1
)
*
m_StripPitchWidth
/
2
;
checkInterStrip_y
=
std
::
abs
(
y0
-
middle_y
)
<
(
m_StripPitchWidth
-
m_InterStripWidth
)
/
2
;
}
else
if
(
m_Axis
==
ps_yz
)
{
t_StripLengthNumber
=
(
int
)((
t_Position
.
y
()
+
m_StripPlaneLength
/
2.
)
/
m_StripPitchLength
)
+
1
;
...
...
@@ -251,30 +242,22 @@ G4bool PS_Rectangle::ProcessHits(G4Step* aStep, G4TouchableHistory*) {
// Check if the particle has interact before, if yes, add up the energies.
vector
<
DSSDData
>::
iterator
it
;
// Length
//it = m_HitLength.find(DSSDData::CalculateIndex(t_StripLengthNumber, t_DetectorNumber),t_Time,m_TimeThreshold);
it
=
m_HitLength
.
find
(
DSSDData
::
CalculateIndex
(
t_StripLengthNumber
,
t_DetectorNumber
));
//if(checkInterStrip_x!=0)
//{
/*
if
(
it
!=
m_HitLength
.
end
())
{
it
->
Add
(
t_Energy
);
}
else
*/
m_HitLength
.
Set
(
t_Energy
,
t_Time
,
t_StripLengthNumber
,
t_DetectorNumber
);
{
m_HitLength
.
Set
(
t_Energy
,
t_Time
,
t_StripLengthNumber
,
t_DetectorNumber
);
}
//it = m_HitWidth.find(DSSDData::CalculateIndex(t_StripWidthNumber, t_DetectorNumber),t_Time,m_TimeThreshold);
it
=
m_HitWidth
.
find
(
DSSDData
::
CalculateIndex
(
t_StripWidthNumber
,
t_DetectorNumber
));
//if(checkInterStrip_y!=0)
//{
// Width
//it = m_HitWidth.find(DSSDData::CalculateIndex(t_StripWidthNumber, t_DetectorNumber));
/*
if
(
it
!=
m_HitWidth
.
end
())
{
it
->
Add
(
t_Energy
);
}
else
*/
m_HitWidth
.
Set
(
t_Energy
,
t_Time
,
t_StripWidthNumber
,
t_DetectorNumber
);
//}
return
TRUE
;
...
...
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