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
702460c4
Commit
702460c4
authored
2 years ago
by
Miguel Lozano-González
Browse files
Options
Downloads
Patches
Plain Diff
debugging again new version
parent
de398379
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#231330
failed
2 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/e748/Analysis.cxx
+24
-18
24 additions, 18 deletions
Projects/e748/Analysis.cxx
Projects/e748/Analysis.h
+4
-4
4 additions, 4 deletions
Projects/e748/Analysis.h
with
28 additions
and
22 deletions
Projects/e748/Analysis.cxx
+
24
−
18
View file @
702460c4
...
@@ -145,6 +145,7 @@ void Analysis::TreatEvent(){
...
@@ -145,6 +145,7 @@ void Analysis::TreatEvent(){
// TreatBeam();
// TreatBeam();
// computeBeam = true;
// computeBeam = true;
// }
// }
///////////// BEAM
mThetaBeam
=
ComputeXYZVectorAngle
(
beamDirection
,
XYZVector
(
0
,
0
,
1
));
mThetaBeam
=
ComputeXYZVectorAngle
(
beamDirection
,
XYZVector
(
0
,
0
,
1
));
//--> Beam energy CALIBRATION
//--> Beam energy CALIBRATION
mCATS1Calibrated
=
fModularLeaf
->
GetCalibratedValue
(
"T_CATS1_CAV"
);
mCATS1Calibrated
=
fModularLeaf
->
GetCalibratedValue
(
"T_CATS1_CAV"
);
...
@@ -182,7 +183,8 @@ void Analysis::TreatEvent(){
...
@@ -182,7 +183,8 @@ void Analysis::TreatEvent(){
XYZVector
trackDirection
{
must2Point
-
vertex
};
XYZVector
trackDirection
{
must2Point
-
vertex
};
// Angles computation
// Angles computation
mThetaLab
.
push_back
(
ComputeXYZVectorAngle
(
trackDirection
,
beamDirection
)
);
//mThetaLab.push_back( ComputeXYZVectorAngle(trackDirection, beamDirection) );
mThetaLab
=
ComputeXYZVectorAngle
(
trackDirection
,
beamDirection
);
double
mNormalThetaTarget
=
ComputeXYZVectorAngle
(
trackDirection
,
XYZVector
(
0
,
0
,
1
));
double
mNormalThetaTarget
=
ComputeXYZVectorAngle
(
trackDirection
,
XYZVector
(
0
,
0
,
1
));
double
mNormalThetaM2
=
ComputeXYZVectorAngle
(
trackDirection
,
double
mNormalThetaM2
=
ComputeXYZVectorAngle
(
trackDirection
,
-
1
*
XYZVector
(
fM2
->
GetTelescopeNormal
(
hit
)));
-
1
*
XYZVector
(
fM2
->
GetTelescopeNormal
(
hit
)));
...
@@ -201,25 +203,25 @@ void Analysis::TreatEvent(){
...
@@ -201,25 +203,25 @@ void Analysis::TreatEvent(){
mMust2SiT
.
push_back
(
fM2
->
Si_T
.
at
(
hit
)
);
mMust2SiT
.
push_back
(
fM2
->
Si_T
.
at
(
hit
)
);
//Backpropagate to vertex
//Backpropagate to vertex
double
ELabIni
{
fHe3Al
.
EvaluateInitialEnergy
(
EAtDetector
,
0.4
*
micrometer
,
mNormalThetaM2
)
}
;
mELab
=
fHe3Al
.
EvaluateInitialEnergy
(
EAtDetector
,
0.4
*
micrometer
,
mNormalThetaM2
);
//Assume reaction at the middle of target and correct energy
//Assume reaction at the middle of target and correct energy
mELab
.
push_back
(
fHe3CD2
.
EvaluateInitialEnergy
(
ELab
Ini
,
fTargetThickness
/
2.
,
mNormalThetaTarget
)
)
;
mELab
=
fHe3CD2
.
EvaluateInitialEnergy
(
m
ELab
,
fTargetThickness
/
2.
,
mNormalThetaTarget
);
//Compute Excitation Energy
//Compute Excitation Energy
mEx
.
push_back
(
fReaction
->
ReconstructRelativistic
(
mELab
.
back
()
,
mThetaLab
.
back
())
);
mEx
=
fReaction
->
ReconstructRelativistic
(
mELab
,
mThetaLab
);
//std::cout<<" Ex = "<<mEx.back()<< "MeV"<<'\n';
//std::cout<<" Ex = "<<mEx.back()<< "MeV"<<'\n';
// Back to CM
// Back to CM
mThetaCM
.
push_back
(
fReaction
->
EnergyLabToThetaCM
(
mELab
.
back
()
,
mThetaLab
.
back
()
)
/
deg
)
;
//in degrees
mThetaCM
=
fReaction
->
EnergyLabToThetaCM
(
mELab
,
mThetaLab
)
/
deg
;
//in degrees
mThetaLab
.
back
()
=
mThetaLab
.
back
()
/
deg
;
//store in degrees!
mThetaLab
=
mThetaLab
/
deg
;
//store in degrees!
//debug
//debug
std
::
cout
<<
" EAtSil = "
<<
EAtDetector
<<
'\n'
;
//
std::cout<<" EAtSil = "<<EAtDetector<<'\n';
std
::
cout
<<
" E1 = "
<<
ELabIni
<<
'\n'
;
//
std::cout<<" E1 = "<<ELabIni<<'\n';
std
::
cout
<<
" EVert = "
<<
mELab
.
back
()
<<
'\n'
;
//
std::cout<<" EVert = "<<mELab.back()<<'\n';
std
::
cout
<<
" Theta = "
<<
mThetaLab
.
back
()
*
TMath
::
RadToDeg
()
<<
'\n'
;
//
std::cout<<" Theta = "<<mThetaLab.back() * TMath::RadToDeg()<<'\n';
std
::
cout
<<
" Ex = "
<<
mEx
.
back
()
<<
'\n'
;
//
std::cout<<" Ex = "<<mEx.back()<<'\n';
}
}
//ensure
//
//ensure
if
(
!
(
mEx
.
size
()
==
mThetaLab
.
size
()))
//
if(!(mEx.size() == mThetaLab.size()))
throw
std
::
runtime_error
(
"Mismatching sizes for Eex && thetaLab vectors!"
);
//
throw std::runtime_error("Mismatching sizes for Eex && thetaLab vectors!");
}
}
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
...
@@ -344,10 +346,14 @@ void Analysis::ResetMVariables()
...
@@ -344,10 +346,14 @@ void Analysis::ResetMVariables()
{
{
int
initVal
{
-
1000
};
int
initVal
{
-
1000
};
////////////
////////////
mEx
.
clear
();
mEx
=
initVal
;
mELab
.
clear
();
mELab
=
initVal
;
mThetaLab
.
clear
();
mThetaLab
=
initVal
;
mThetaCM
.
clear
();
mThetaCM
=
initVal
;
// mEx.clear();
// mELab.clear();
// mThetaLab.clear();
// mThetaCM.clear();
mEBeam
=
initVal
;
mEBeam
=
initVal
;
mThetaBeam
=
initVal
;
mThetaBeam
=
initVal
;
////////////////////////
////////////////////////
...
...
This diff is collapsed.
Click to expand it.
Projects/e748/Analysis.h
+
4
−
4
View file @
702460c4
...
@@ -67,10 +67,10 @@ private:
...
@@ -67,10 +67,10 @@ private:
//-- f members just used in the class
//-- f members just used in the class
//////////////////////////////////////
//////////////////////////////////////
// Kinematic variables for each track
// Kinematic variables for each track
std
::
vector
<
double
>
mEx
;
double
mEx
;
std
::
vector
<
double
>
mELab
;
double
mELab
;
std
::
vector
<
double
>
mThetaLab
;
double
mThetaLab
;
std
::
vector
<
double
>
mThetaCM
;
double
mThetaCM
;
//std::vector<double> mNormalThetaM2;
//std::vector<double> mNormalThetaM2;
// Kinematics and variables for beam
// Kinematics and variables for beam
double
mEBeam
;
double
mEBeam
;
...
...
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