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
fbc95fbb
Commit
fbc95fbb
authored
1 year ago
by
GIRARD ALCINDOR Valérian
Browse files
Options
Downloads
Patches
Plain Diff
Updating e870
parent
db797193
No related branches found
No related tags found
1 merge request
!27
Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline
#284681
passed
1 year ago
Stage: build-NPLib
Stage: build-NPSimulation
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Projects/e870/Analysis.cxx
+11
-62
11 additions, 62 deletions
Projects/e870/Analysis.cxx
with
11 additions
and
62 deletions
Projects/e870/Analysis.cxx
+
11
−
62
View file @
fbc95fbb
...
@@ -42,6 +42,7 @@ void Analysis::Init() {
...
@@ -42,6 +42,7 @@ void Analysis::Init() {
cout
<<
"Considering input data as real"
<<
endl
;
cout
<<
"Considering input data as real"
<<
endl
;
simulation
=
false
;
simulation
=
false
;
}
}
simulation
=
true
;
simulation
=
true
;
// initialize input and output branches
// initialize input and output branches
...
@@ -122,9 +123,9 @@ void Analysis::TreatEvent() {
...
@@ -122,9 +123,9 @@ void Analysis::TreatEvent() {
XTarget
=
0
;
XTarget
=
0
;
YTarget
=
0
;
YTarget
=
0
;
BeamDirection
=
TVector3
(
0
,
0
,
1
);
BeamDirection
=
TVector3
(
0
,
0
,
1
);
//OriginalELab = ReactionConditions->GetKineticEnergy(0);
//
OriginalELab = ReactionConditions->GetKineticEnergy(0);
//OriginalThetaLab = ReactionConditions->GetTheta(0);
//
OriginalThetaLab = ReactionConditions->GetTheta(0);
//BeamEnergy = ReactionConditions->GetBeamEnergy();
//
BeamEnergy = ReactionConditions->GetBeamEnergy();
}
}
BeamImpact
=
TVector3
(
XTarget
,
YTarget
,
0
);
BeamImpact
=
TVector3
(
XTarget
,
YTarget
,
0
);
// determine beam energy for a randomized interaction point in target
// determine beam energy for a randomized interaction point in target
...
@@ -167,41 +168,29 @@ void Analysis::TreatEvent() {
...
@@ -167,41 +168,29 @@ void Analysis::TreatEvent() {
if
(
CsI_E_M2
>
0
)
{
if
(
CsI_E_M2
>
0
)
{
// The energy in CsI is calculate form dE/dx Table because
// The energy in CsI is calculate form dE/dx Table because
Energy
=
CsI_E_M2
;
Energy
=
CsI_E_M2
;
Energy
=
LightAl
.
EvaluateInitialEnergy
(
Energy
,
0.4
*
micrometer
,
ThetaM2Surface
);
if
(
simulation
)
{
Energy
=
LightAl
.
EvaluateInitialEnergy
(
Energy
,
0.4
*
micrometer
,
ThetaM2Surface
);
}
Energy
+=
Si_E_M2
;
Energy
+=
Si_E_M2
;
}
}
else
else
Energy
=
Si_E_M2
;
Energy
=
Si_E_M2
;
Energy
=
LightAl
.
EvaluateInitialEnergy
(
Energy
,
0.4
*
micrometer
,
ThetaM2Surface
);
// Evaluate energy using the thickness
// Evaluate energy using the thickness
ELab
=
Energy
;
// ELab = LightAl.EvaluateInitialEnergy(Energy, 0.4 * micrometer, ThetaM2Surface);
// Target Correction
// Target Correction
// ELab = LightTarget.EvaluateInitialEnergy(ELab, TargetThickness * 0.5, ThetaNormalTarget);
Energy
=
LightTarget
.
EvaluateInitialEnergy
(
ELab
,
TargetThickness
*
0.5
,
ThetaNormalTarget
);
ELab
=
Energy
;
// if(LightWindow)
// ELab = LightWindow->EvaluateInitialEnergy( ELab ,WindowsThickness, ThetaNormalTarget);
/************************************************/
/************************************************/
/************************************************/
// Part 3 : Excitation Energy Calculation
// Part 3 : Excitation Energy Calculation
Ex
=
reaction
.
ReconstructRelativistic
(
ELab
,
ThetaLab
);
Ex
=
reaction
.
ReconstructRelativistic
(
ELab
,
ThetaLab
);
reaction
.
SetBeamEnergy
(
Initial
->
GetIncidentFinalKineticEnergy
());
// ExNoBeam = reaction.ReconstructRelativistic(, ThetaLab);
// ExNoBeam = reaction.ReconstructRelativistic(ELab, ThetaLab);
// reaction.SetBeamEnergy(FinalBeamEnergy);
// ExNoProton = reaction.ReconstructRelativistic(ReactionConditions->GetKineticEnergy(0),
// ReactionConditions->GetParticleDirection(0).Angle(TVector3(0, 0, 1)));
ThetaLab
=
ThetaLab
/
deg
;
ThetaLab
=
ThetaLab
/
deg
;
/************************************************/
/************************************************/
/************************************************/
// Part 4 : Theta CM Calculation
// ThetaCM = reaction.EnergyLabToThetaCM(ELab, ThetaLab) / deg;
/************************************************/
}
// end loop MUST2
}
// end loop MUST2
}
}
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
...
@@ -209,9 +198,6 @@ void Analysis::End() {}
...
@@ -209,9 +198,6 @@ void Analysis::End() {}
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
void
Analysis
::
InitOutputBranch
()
{
void
Analysis
::
InitOutputBranch
()
{
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"Ex"
,
&
Ex
,
"Ex/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"Ex"
,
&
Ex
,
"Ex/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"ExNoBeam"
,
&
ExNoBeam
,
"ExNoBeam/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"ExNoProton"
,
&
ExNoProton
,
"ExNoProton/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"EDC"
,
&
Ex
,
"Ex/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"ELab"
,
&
ELab
,
"ELab/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"ELab"
,
&
ELab
,
"ELab/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"ThetaLab"
,
&
ThetaLab
,
"ThetaLab/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"ThetaLab"
,
&
ThetaLab
,
"ThetaLab/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"ThetaCM"
,
&
ThetaCM
,
"ThetaCM/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"ThetaCM"
,
&
ThetaCM
,
"ThetaCM/D"
);
...
@@ -221,28 +207,6 @@ void Analysis::InitOutputBranch() {
...
@@ -221,28 +207,6 @@ void Analysis::InitOutputBranch() {
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"Z"
,
&
Z
,
"Z/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"Z"
,
&
Z
,
"Z/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"dE"
,
&
dE
,
"dE/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"dE"
,
&
dE
,
"dE/D"
);
if
(
!
simulation
)
{
if
(
!
simulation
)
{
// Vamos
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"LTS"
,
&
LTS
,
"LTS/l"
);
// Agata
// Time stamp of the agata trigger
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"TStrack"
,
&
TStrack
,
"TStrack/l"
);
// Array of reconstructed tracks
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"nbTrack"
,
&
nbTrack
,
"nbTrack/I"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"trackE"
,
trackE
,
"trackE[nbTrack]/F"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"trackX1"
,
trackX1
,
"trackX1[nbTrack]/F"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"trackY1"
,
trackY1
,
"trackY1[nbTrack]/F"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"trackZ1"
,
trackZ1
,
"trackZ1[nbTrack]/F"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"trackT"
,
trackT
,
"trackT[nbTrack]/F"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"trackCrystalID"
,
trackCrystalID
,
"trackCrystalID[nbTrack]/I"
);
// Array of reconstructed core
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"nbCores"
,
&
nbCores
,
"nbCores/I"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"coreId"
,
coreId
,
"coreId[nbCores]/I"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"coreTS"
,
coreTS
,
"coreTS[nbCores]/l"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"coreE0"
,
coreE0
,
"coreE0[nbCores]/F"
);
//
}
}
else
{
else
{
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"OriginalELab"
,
&
OriginalELab
,
"OriginalELab/D"
);
RootOutput
::
getInstance
()
->
GetTree
()
->
Branch
(
"OriginalELab"
,
&
OriginalELab
,
"OriginalELab/D"
);
...
@@ -255,21 +219,6 @@ void Analysis::InitOutputBranch() {
...
@@ -255,21 +219,6 @@ void Analysis::InitOutputBranch() {
void
Analysis
::
InitInputBranch
()
{
void
Analysis
::
InitInputBranch
()
{
// RootInput:: getInstance()->GetChain()->SetBranchAddress("GATCONF",&vGATCONF);
// RootInput:: getInstance()->GetChain()->SetBranchAddress("GATCONF",&vGATCONF);
if
(
!
simulation
)
{
if
(
!
simulation
)
{
// Vamos
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchAddress
(
"LTS"
,
&
LTS
);
// Agata
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchAddress
(
"TStrack"
,
&
TStrack
);
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchAddress
(
"nbTrack"
,
&
nbTrack
);
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchAddress
(
"trackE"
,
trackE
);
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchAddress
(
"trackX1"
,
trackX1
);
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchAddress
(
"trackY1"
,
trackY1
);
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchAddress
(
"trackZ1"
,
trackZ1
);
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchAddress
(
"trackT"
,
trackT
);
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchAddress
(
"trackCrystalID"
,
trackCrystalID
);
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchAddress
(
"nbCores"
,
&
nbCores
);
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchAddress
(
"coreId"
,
coreId
);
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchAddress
(
"coreTS"
,
coreTS
);
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchAddress
(
"coreE0"
,
coreE0
);
}
}
else
{
else
{
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchStatus
(
"InitialConditions"
,
true
);
RootInput
::
getInstance
()
->
GetChain
()
->
SetBranchStatus
(
"InitialConditions"
,
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