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
fb0186b7
Commit
fb0186b7
authored
3 years ago
by
Adrien Matta
Browse files
Options
Downloads
Patches
Plain Diff
* Progress on SamuraiMagnetcField
- Now project particle in FDC2 plan
parent
10022c46
No related branches found
No related tags found
No related merge requests found
Pipeline
#121348
passed
3 years ago
Stage: build-NPLib
Stage: build-NPSimulation
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NPLib/Detectors/Samurai/SamuraiFieldMap.cxx
+21
-1
21 additions, 1 deletion
NPLib/Detectors/Samurai/SamuraiFieldMap.cxx
NPLib/Detectors/Samurai/SamuraiFieldMap.h
+1
-1
1 addition, 1 deletion
NPLib/Detectors/Samurai/SamuraiFieldMap.h
with
22 additions
and
2 deletions
NPLib/Detectors/Samurai/SamuraiFieldMap.cxx
+
21
−
1
View file @
fb0186b7
...
...
@@ -30,10 +30,26 @@ using namespace NPUNITS;
using
namespace
std
;
ClassImp
(
SamuraiFieldMap
);
////////////////////////////////////////////////////////////////////////////////
TVector3
SamuraiFieldMap
::
PropagateToFDC2
(
TVector3
pos
,
TVector3
dir
,
double
angle
,
double
R
){
// go to FDC2 frame reference
pos
.
RotateY
(
-
angle
);
dir
.
RotateY
(
-
angle
);
double
deltaZ
=
R
-
pos
.
Z
();
dir
*=
deltaZ
/
dir
.
Z
();
pos
+=
dir
;
cout
<<
pos
.
Z
()
<<
" "
<<
R
<<
endl
;
pos
.
SetX
(
pos
.
X
());
pos
.
RotateY
(
angle
);
return
pos
;
}
////////////////////////////////////////////////////////////////////////////////
std
::
vector
<
TVector3
>
SamuraiFieldMap
::
Propagate
(
double
rmax
,
double
Brho
,
TVector3
pos
,
TVector3
dir
){
pos
.
RotateY
(
m_angle
);
dir
.
RotateY
(
m_angle
);
dir
=
dir
.
Unit
();
// Property of a particle with the correct Brho:
// We assume a 4He to compute v
// The choice of the particle is of no importance
...
...
@@ -95,7 +111,11 @@ std::vector< TVector3 > SamuraiFieldMap::Propagate(double rmax, double Brho, TVe
r
=
sqrt
(
pos
.
X
()
*
pos
.
X
()
+
pos
.
Z
()
*
pos
.
Z
());
count
++
;
}
imp
=
imp
.
Unit
();
pos
=
PropagateToFDC2
(
pos
,
imp
,
(
59.930
-
90.0
)
*
deg
,
3686.77
+
880.745
/
2.
);
pos
.
RotateY
(
-
m_angle
);
track
.
push_back
(
pos
);
return
track
;
}
...
...
This diff is collapsed.
Click to expand it.
NPLib/Detectors/Samurai/SamuraiFieldMap.h
+
1
−
1
View file @
fb0186b7
...
...
@@ -69,7 +69,7 @@ class SamuraiFieldMap{
// return a 3D track of the particle in the field
std
::
vector
<
TVector3
>
Propagate
(
double
rmax
,
double
Brho
,
TVector3
pos
,
TVector3
dir
);
void
func
(
NPL
::
Particle
&
N
,
TVector3
pos
,
TVector3
dir
,
TVector3
&
new_pos
,
TVector3
&
new_dir
);
//
TVector3 PropagateToFDC2(double angle,double);
TVector3
PropagateToFDC2
(
TVector3
pos
,
TVector3
dir
,
double
angle
,
double
R
);
//
ClassDef
(
SamuraiFieldMap
,
1
);
};
...
...
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