Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
physics_benchmarks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
EIC
benchmarks
physics_benchmarks
Commits
389c417b
Commit
389c417b
authored
4 years ago
by
Ziyue Zhang
Browse files
Options
Downloads
Patches
Plain Diff
Update dvmp/analysis/util.h, dvmp/analysis/vm_invar.cxx files
parent
10f34695
No related branches found
No related tags found
1 merge request
!22
Add nu Q2 x plots for simulation
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dvmp/analysis/util.h
+6
-6
6 additions, 6 deletions
dvmp/analysis/util.h
dvmp/analysis/vm_invar.cxx
+4
-4
4 additions, 4 deletions
dvmp/analysis/vm_invar.cxx
with
10 additions
and
10 deletions
dvmp/analysis/util.h
+
6
−
6
View file @
389c417b
...
@@ -159,28 +159,28 @@ get_y(const std::pair<ROOT::Math::PxPyPzMVector, ROOT::Math::PxPyPzMVector>&
...
@@ -159,28 +159,28 @@ get_y(const std::pair<ROOT::Math::PxPyPzMVector, ROOT::Math::PxPyPzMVector>&
//========================================================================================================
//========================================================================================================
//for structure functions
//for structure functions
struct
structure_func
{
//add more when needed
struct
inv_quant
{
//add more when needed
double
nu
,
Q2
,
x
;
double
nu
,
Q2
,
x
;
};
};
//for simu
//for simu
inline
structure_func
calc_structure_func
_simu
(
const
std
::
vector
<
ROOT
::
Math
::
PxPyPzMVector
>&
parts
){
inline
inv_quant
calc_inv_quant
_simu
(
const
std
::
vector
<
ROOT
::
Math
::
PxPyPzMVector
>&
parts
){
ROOT
::
Math
::
PxPyPzMVector
q
(
parts
[
0
]
-
parts
[
2
]);
ROOT
::
Math
::
PxPyPzMVector
q
(
parts
[
0
]
-
parts
[
2
]);
ROOT
::
Math
::
PxPyPzMVector
P
(
parts
[
3
]);
ROOT
::
Math
::
PxPyPzMVector
P
(
parts
[
3
]);
double
nu
=
q
.
Dot
(
P
)
/
P
.
mass
();
double
nu
=
q
.
Dot
(
P
)
/
P
.
mass
();
double
Q2
=
-
q
.
Dot
(
q
);
double
Q2
=
-
q
.
Dot
(
q
);
structure_func
quantities
=
{
nu
,
Q2
,
Q2
/
2.
/
P
.
mass
()
/
nu
};
inv_quant
quantities
=
{
nu
,
Q2
,
Q2
/
2.
/
P
.
mass
()
/
nu
};
return
quantities
;
return
quantities
;
}
}
inline
double
get_nu_simu
(
structure_func
quantities
)
{
inline
double
get_nu_simu
(
inv_quant
quantities
)
{
return
quantities
.
nu
/
1000.
;
return
quantities
.
nu
/
1000.
;
}
}
inline
double
get_Q2_simu
(
structure_func
quantities
)
{
inline
double
get_Q2_simu
(
inv_quant
quantities
)
{
return
quantities
.
Q2
;
return
quantities
.
Q2
;
}
}
inline
double
get_x_simu
(
structure_func
quantities
)
{
inline
double
get_x_simu
(
inv_quant
quantities
)
{
return
quantities
.
x
;
return
quantities
.
x
;
}
}
...
...
This diff is collapsed.
Click to expand it.
dvmp/analysis/vm_invar.cxx
+
4
−
4
View file @
389c417b
...
@@ -83,10 +83,10 @@ int vm_invar(const std::string& config_name) {
...
@@ -83,10 +83,10 @@ int vm_invar(const std::string& config_name) {
.
Define
(
"N"
,
"p_rec.size()"
)
.
Define
(
"N"
,
"p_rec.size()"
)
.
Define
(
"p_sim"
,
util
::
momenta_from_simulation
,
{
"mcparticles2"
})
.
Define
(
"p_sim"
,
util
::
momenta_from_simulation
,
{
"mcparticles2"
})
//================================================================
//================================================================
.
Define
(
"
structure_function
s"
,
util
::
calc_
structure_func
_simu
,
{
"p_sim"
})
.
Define
(
"
invariant_quantitie
s"
,
util
::
calc_
inv_quant
_simu
,
{
"p_sim"
})
.
Define
(
"nu_sim"
,
util
::
get_nu_simu
,
{
"
structure_function
s"
})
.
Define
(
"nu_sim"
,
util
::
get_nu_simu
,
{
"
invariant_quantitie
s"
})
.
Define
(
"Q2_sim"
,
util
::
get_Q2_simu
,
{
"
structure_function
s"
})
.
Define
(
"Q2_sim"
,
util
::
get_Q2_simu
,
{
"
invariant_quantitie
s"
})
.
Define
(
"x_sim"
,
util
::
get_x_simu
,
{
"
structure_function
s"
});
.
Define
(
"x_sim"
,
util
::
get_x_simu
,
{
"
invariant_quantitie
s"
});
//================================================================
//================================================================
// Define output histograms
// Define output histograms
...
...
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