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
69e6f4cc
Commit
69e6f4cc
authored
5 years ago
by
Adrien Matta
Browse files
Options
Downloads
Patches
Plain Diff
* The transversal component of DE transport in now correctly constructed
using the field direction as reference.
parent
99b2895a
No related branches found
No related tags found
No related merge requests found
Pipeline
#45684
passed
5 years 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/Process/G4DETransport.cc
+17
-6
17 additions, 6 deletions
NPSimulation/Process/G4DETransport.cc
with
17 additions
and
6 deletions
NPSimulation/Process/G4DETransport.cc
+
17
−
6
View file @
69e6f4cc
...
@@ -97,8 +97,7 @@ G4DETransport::~G4DETransport(){}
...
@@ -97,8 +97,7 @@ G4DETransport::~G4DETransport(){}
// -------------
// -------------
//
//
G4VParticleChange
*
G4VParticleChange
*
G4DETransport
::
PostStepDoIt
(
const
G4Track
&
aTrack
,
const
G4Step
&
aStep
)
G4DETransport
::
PostStepDoIt
(
const
G4Track
&
aTrack
,
const
G4Step
&
aStep
){
{
aParticleChange
.
Initialize
(
aTrack
);
aParticleChange
.
Initialize
(
aTrack
);
G4StepPoint
*
pPreStepPoint
=
aStep
.
GetPreStepPoint
();
G4StepPoint
*
pPreStepPoint
=
aStep
.
GetPreStepPoint
();
...
@@ -160,10 +159,22 @@ G4DETransport::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
...
@@ -160,10 +159,22 @@ G4DETransport::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
d_drift
=
step_length
+
d_long
;
d_drift
=
step_length
+
d_long
;
}
}
G4ThreeVector
trans
(
d_trans
,
0
,
0
);
// The transverse component is perpendicular to the drift direction,
/* G4ThreeVector trans(G4RandGauss::shoot(0,d_trans),0,0); */
// to build an arbritary trans vector, we have to make a cross product with
trans
.
rotateY
(
twopi
*
G4UniformRand
());
// an arbritary, non parallel vector, and driftDir
/* trans.rotateZ(twopi*G4UniformRand()); // Change for Minos */
G4ThreeVector
arbritary
(
1
,
0
,
0
);
G4ThreeVector
trans
;
if
(
driftDir
.
dot
(
arbritary
)
!=
1
)
// not orthogonal (both are unitary)
trans
=
d_trans
*
(
driftDir
.
cross
(
arbritary
)).
unit
();
else
{
arbritary
=
G4ThreeVector
(
0
,
1
,
0
);
trans
=
d_trans
*
(
driftDir
.
cross
(
arbritary
)).
unit
();
}
// Rotate randomly around driftDir for the Phi component
trans
.
rotate
(
driftDir
,
twopi
*
G4UniformRand
());
// new position is drift length*driftDir + the transversal movement
G4ThreeVector
d_Pos
=
(
d_drift
)
*
driftDir
+
trans
;
G4ThreeVector
d_Pos
=
(
d_drift
)
*
driftDir
+
trans
;
// Should be equal to delta length
// Should be equal to delta length
...
...
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