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
43680dd2
Commit
43680dd2
authored
3 years ago
by
Adrien Matta
Browse files
Options
Downloads
Plain Diff
Merge branch 'NPTool.2.dev' of gitlab.in2p3.fr:np/nptool into NPTool.2.dev
parents
964aaae2
0302e96f
No related branches found
No related tags found
No related merge requests found
Pipeline
#121532
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
Projects/e793s/Analysis.cxx
+16
-34
16 additions, 34 deletions
Projects/e793s/Analysis.cxx
Projects/e793s/Analysis.h
+10
-1
10 additions, 1 deletion
Projects/e793s/Analysis.h
with
26 additions
and
35 deletions
Projects/e793s/Analysis.cxx
+
16
−
34
View file @
43680dd2
...
...
@@ -43,7 +43,6 @@ Analysis::~Analysis(){
////////////////////////////////////////////////////////////////////////////////
void
Analysis
::
Init
()
{
///////////////////////////////////////////////////////////////////////////////
agata_zShift
=
51
*
mm
;
//BrhoRef=0.65;
...
...
@@ -60,6 +59,17 @@ void Analysis::Init() {
// get reaction information
reaction
.
ReadConfigurationFile
(
NPOptionManager
::
getInstance
()
->
GetReactionFile
());
OriginalBeamEnergy
=
reaction
.
GetBeamEnergy
();
reaction
.
Print
();
//TESTING PARSER
// get beam position from .reaction file
Beam
=
(
NPL
::
Beam
*
)
reaction
.
GetParticle1
();
XBeam
=
Beam
->
GetMeanX
();
YBeam
=
Beam
->
GetMeanY
();
cout
<<
" ---------------- Beam Position ---------------- "
<<
endl
;
cout
<<
"
\t
X = "
<<
XBeam
<<
" mm
\t
Y = "
<<
YBeam
<<
" mm"
<<
endl
;
cout
<<
" ----------------------------------------------- "
<<
endl
;
// target thickness
TargetThickness
=
m_DetectorManager
->
GetTargetThickness
();
string
TargetMaterial
=
m_DetectorManager
->
GetTargetMaterial
();
...
...
@@ -128,13 +138,8 @@ void Analysis::TreatEvent(){
}
}
double
xbeam
=
0.0
;
double
ybeam
=
0.0
;
// double XTarget = CATS->GetPositionOnTarget().X();
// double YTarget = CATS->GetPositionOnTarget().Y();
TVector3
BeamDirection
(
xbeam
,
ybeam
,
1
);
BeamImpact
=
TVector3
(
xbeam
,
ybeam
,
m_DetectorManager
->
GetTargetZ
());
TVector3
BeamDirection
(
XBeam
,
YBeam
,
1
);
BeamImpact
=
TVector3
(
XBeam
,
YBeam
,
m_DetectorManager
->
GetTargetZ
());
ParticleMult
=
M2
->
Si_E
.
size
()
+
MG
->
DSSD_E
.
size
();
//ParticleMult=M2->Si_E.size();
...
...
@@ -167,7 +172,7 @@ void Analysis::TreatEvent(){
Z
.
push_back
(
M2
->
GetPositionOfInteraction
(
countMust2
).
Z
());
ThetaM2Surface
=
HitDirection
.
Angle
(
-
M2
->
GetTelescopeNormal
(
countMust2
)
);
ThetaNormalTarget
=
HitDirection
.
Angle
(
TVector3
(
xb
eam
,
yb
eam
,
1
)
)
;
ThetaNormalTarget
=
HitDirection
.
Angle
(
TVector3
(
XB
eam
,
YB
eam
,
1
)
)
;
// cout<<"Must2 Znormal:"<<M2 -> GetTelescopeNormal(countMust2).Z()<<endl;
// cout<<"Must2 telescope:"<<M2->TelescopeNumber[countMust2]<<endl;
...
...
@@ -231,8 +236,6 @@ void Analysis::TreatEvent(){
thetalab_tmp
=
0
;
philab_tmp
=
0
;
TVector3
HitDirection
=
MG
->
GetPositionOfInteraction
(
countMugast
)
-
BeamImpact
;
// cout << HitDirection.X() << "\t" << HitDirection.Y() << "\t" << HitDirection.Z() << "\t\t" << MG->GetPositionOfInteraction(countMugast).X() << "\t" << MG->GetPositionOfInteraction(countMugast).Y() << "\t" << MG->GetPositionOfInteraction(countMugast).Z() << "\t\t" << BeamImpact.X() << "\t" << BeamImpact.Y() << "\t" << BeamImpact.Z() << endl;
//HitDirection = [Xp, Yp, Zp] - [Xb, Yb, Zb] = [Xd, Td, Zd] IN MY CODE!
thetalab_tmp
=
HitDirection
.
Angle
(
BeamDirection
);
philab_tmp
=
HitDirection
.
Phi
();
...
...
@@ -242,7 +245,7 @@ void Analysis::TreatEvent(){
//ThetaMGSurface = HitDirection.Angle( TVector3(0,0,1) ) ;
ThetaMGSurface
=
HitDirection
.
Angle
(
MG
->
GetTelescopeNormal
(
countMugast
)
);
ThetaNormalTarget
=
HitDirection
.
Angle
(
TVector3
(
xb
eam
,
yb
eam
,
-
1
)
)
;
ThetaNormalTarget
=
HitDirection
.
Angle
(
TVector3
(
XB
eam
,
YB
eam
,
-
1
)
)
;
// Part 2 : Impact Energy
Energy
=
elab_tmp
=
0
;
...
...
@@ -265,27 +268,6 @@ void Analysis::TreatEvent(){
PhiLab
.
push_back
(
philab_tmp
/
deg
);
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/*
cout << MG->TelescopeNumber[countMugast] << " "
<< MG->GetPositionOfInteraction(countMugast).X() << " "
<< MG->GetPositionOfInteraction(countMugast).Y() << " "
<< MG->GetPositionOfInteraction(countMugast).Z() << " "
<< Energy << " "
<< endl;
*/
///////////!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if
(
sizeMG
==
1
){
MG_T
=
MG
->
DSSD_T
[
0
];
MG_E
=
MG
->
DSSD_E
[
0
];
...
...
@@ -602,7 +584,7 @@ cout << MG->TelescopeNumber[countMugast] << " "
AddBack_EDC
.
clear
();
EAgata
=
-
1000
;
ELab
.
clear
();
RawEnergy
.
clear
();
//CPx ADDITION
RawEnergy
.
clear
();
ThetaLab
.
clear
();
PhiLab
.
clear
();
ThetaCM
.
clear
();
...
...
This diff is collapsed.
Click to expand it.
Projects/e793s/Analysis.h
+
10
−
1
View file @
43680dd2
...
...
@@ -25,6 +25,7 @@
#include
"NPVAnalysis.h"
#include
"NPEnergyLoss.h"
#include
"NPReaction.h"
#include
"NPBeam.h"
#include
"RootOutput.h"
#include
"RootInput.h"
#include
"TMust2Physics.h"
...
...
@@ -64,7 +65,7 @@ class Analysis: public NPL::VAnalysis{
std
::
vector
<
double
>
ELab
;
std
::
vector
<
double
>
Ex
;
std
::
vector
<
double
>
Ecm
;
std
::
vector
<
double
>
RawEnergy
;
//CPx ADDITION
std
::
vector
<
double
>
RawEnergy
;
std
::
vector
<
double
>
ThetaLab
;
std
::
vector
<
double
>
PhiLab
;
std
::
vector
<
double
>
ThetaCM
;
...
...
@@ -82,6 +83,10 @@ class Analysis: public NPL::VAnalysis{
double
OriginalBeamEnergy
;
// AMEV
double
FinalBeamEnergy
;
// Beam Position
double
XBeam
;
double
YBeam
;
// intermediate variable
TVector3
BeamDirection
;
TVector3
BeamImpact
;
...
...
@@ -211,6 +216,10 @@ class Analysis: public NPL::VAnalysis{
TMugastPhysics
*
MG
;
//TCATSPhysics* CATS;
TModularLeafPhysics
*
ML
;
// Beam object
NPL
::
Beam
*
Beam
;
unsigned
int
GATCONF_MASTER
;
unsigned
long
long
int
count
;
...
...
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