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
Merge requests
!25
Add t in dvmp; add a place holder for InvQuant in REC
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add t in dvmp; add a place holder for InvQuant in REC
ziyue_work_branch
into
master
Overview
2
Commits
13
Pipelines
0
Changes
3
Merged
Ziyue Zhang
requested to merge
ziyue_work_branch
into
master
4 years ago
Overview
2
Commits
13
Pipelines
0
Changes
3
Expand
WIP: Add t in dvmp; add a place holder for InvQuant with limited track selection in REC
Edited
4 years ago
by
Ziyue Zhang
0
0
Merge request reports
Compare
master
version 26
7600c952
4 years ago
version 25
814f4c87
4 years ago
version 24
a257485c
4 years ago
version 23
ff399653
4 years ago
version 22
5d6a2621
4 years ago
version 21
ded3c50a
4 years ago
version 20
04357d27
4 years ago
version 19
fcf5f44b
4 years ago
version 18
0b40af37
4 years ago
version 17
7cf86977
4 years ago
version 16
d8f2f607
4 years ago
version 15
8f64ffc0
4 years ago
version 14
eef06120
4 years ago
version 13
aa8ad68b
4 years ago
version 12
8454e12b
4 years ago
version 11
aeb6e7e8
4 years ago
version 10
fc5a58c0
4 years ago
version 9
0047270b
4 years ago
version 8
ae52d189
4 years ago
version 7
4ffce4f1
4 years ago
version 6
42140710
4 years ago
version 5
ceaabad9
4 years ago
version 4
8961b225
4 years ago
version 3
d6b3c104
4 years ago
version 2
9a19fe9d
4 years ago
version 1
48047238
4 years ago
master (base)
and
version 5
latest version
4e7df48b
13 commits,
4 years ago
version 26
7600c952
12 commits,
4 years ago
version 25
814f4c87
11 commits,
4 years ago
version 24
a257485c
10 commits,
4 years ago
version 23
ff399653
9 commits,
4 years ago
version 22
5d6a2621
8 commits,
4 years ago
version 21
ded3c50a
7 commits,
4 years ago
version 20
04357d27
6 commits,
4 years ago
version 19
fcf5f44b
5 commits,
4 years ago
version 18
0b40af37
4 commits,
4 years ago
version 17
7cf86977
3 commits,
4 years ago
version 16
d8f2f607
2 commits,
4 years ago
version 15
8f64ffc0
3 commits,
4 years ago
version 14
eef06120
2 commits,
4 years ago
version 13
aa8ad68b
1 commit,
4 years ago
version 12
8454e12b
2 commits,
4 years ago
version 11
aeb6e7e8
1 commit,
4 years ago
version 10
fc5a58c0
1 commit,
4 years ago
version 9
0047270b
13 commits,
4 years ago
version 8
ae52d189
12 commits,
4 years ago
version 7
4ffce4f1
11 commits,
4 years ago
version 6
42140710
10 commits,
4 years ago
version 5
ceaabad9
9 commits,
4 years ago
version 4
8961b225
8 commits,
4 years ago
version 3
d6b3c104
7 commits,
4 years ago
version 2
9a19fe9d
6 commits,
4 years ago
version 1
48047238
5 commits,
4 years ago
3 files
+
198
−
80
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
benchmarks/dvmp/analysis/dvmp.h
+
68
−
11
Options
@@ -28,26 +28,83 @@ namespace util {
// for structure functions
struct
inv_quant
{
// add more when needed
double
nu
,
Q2
,
x
;
double
nu
,
Q2
,
x
,
t
;
};
// for simu
inline
inv_quant
calc_inv_quant_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
P
(
parts
[
3
]);
double
nu
=
q
.
Dot
(
P
)
/
P
.
mass
();
double
Q2
=
-
q
.
Dot
(
q
);
inv_quant
quantities
=
{
nu
,
Q2
,
Q2
/
2.
/
P
.
mass
()
/
nu
};
ROOT
::
Math
::
PxPyPzMVector
Delta
(
parts
[
6
]
-
parts
[
3
]);
double
nu
=
q
.
Dot
(
P
)
/
P
.
mass
();
double
Q2
=
-
q
.
Dot
(
q
);
double
t
=
Delta
.
Dot
(
Delta
);
inv_quant
quantities
=
{
nu
,
Q2
,
Q2
/
2.
/
P
.
mass
()
/
nu
,
t
};
return
quantities
;
}
// for rec
/*inline inv_quant calc_inv_quant_rec(const std::vector<ROOT::Math::PxPyPzMVector>& parts, const double pdg_mass){
int first = -1;
int second = -1;
double best_mass = -1;
inline
double
get_nu_simu
(
inv_quant
quantities
)
{
return
quantities
.
nu
/
1000.
;
}
inline
double
get_Q2_simu
(
inv_quant
quantities
)
{
return
quantities
.
Q2
;
}
inline
double
get_x_simu
(
inv_quant
quantities
)
{
return
quantities
.
x
;
}
// go through all particle combinatorics, calculate the invariant mass
// for each combination, and remember which combination is the closest
// to the desired pdg_mass
for (int i = 0; i < parts.size(); ++i) {
for (int j = i + 1; j < parts.size(); ++j) {
const double new_mass{(parts[i] + parts[j]).mass()};
if (fabs(new_mass - pdg_mass) < fabs(best_mass - pdg_mass)) {
first = i;
second = j;
best_mass = new_mass;
}
}
}
if (first < 0 || parts.size() < 3 ){
inv_quant quantities = {-999., -999., -999., -999.};
return quantities;
}
ROOT::Math::PxPyPzMVector pair_4p(parts[first] + parts[second]);
ROOT::Math::PxPyPzMVector e1, P;
double e1_Energy = sqrt(10.*10. + get_pdg_mass("electron")*get_pdg_mass("electron"));
double P_Energy = sqrt(100.*100. + get_pdg_mass("proton")*get_pdg_mass("proton"));
e1.SetPxPyPzE(0., 0., -10., e1_Energy);
P.SetPxPyPzE(0., 0., 100., P_Energy);
int scatteredIdx = -1;
float dp = 10.;
for(int i = 0 ; i < parts.size(); i++){
if(i==first || i==second) continue;
ROOT::Math::PxPyPzMVector k_prime(parts[i]);
float ptmp = sqrt(parts[i].px()*parts[i].px() + parts[i].py()*parts[i].py() + parts[i].pz()*parts[i].pz());
if( (k_prime.px()) * (pair_4p.px()) + (k_prime.py()) * (pair_4p.py()) + (k_prime.pz()) * (pair_4p.pz()) > 0. || ptmp >= 10.) continue; //angle between jpsi and scattered electron < pi/2, 3-momentum mag < 10.
if(dp > 10.- ptmp){ //if there are more than one candidate of scattered electron, choose the one with highest 3-momentum mag
scatteredIdx = i;
dp = 10. - ptmp;
}
}
if(scatteredIdx ==-1){
inv_quant quantities = {-999., -999., -999., -999.};
return quantities;
}
ROOT::Math::PxPyPzMVector q(e1 - parts[scatteredIdx]);
ROOT::Math::PxPyPzMVector Delta(q - pair_4p);
double nu = q.Dot(P) / P.mass();
double Q2 = - q.Dot(q);
double t = Delta.Dot(Delta);
inv_quant quantities = {nu, Q2, Q2/2./P.mass()/nu, t};
//inv_quant quantities = {-999., -999., -999., -999.};
return quantities;
}*/
inline
double
get_nu
(
inv_quant
quantities
)
{
return
quantities
.
nu
/
1000.
;
}
inline
double
get_Q2
(
inv_quant
quantities
)
{
return
quantities
.
Q2
;
}
inline
double
get_x
(
inv_quant
quantities
)
{
return
quantities
.
x
;
}
inline
double
get_t
(
inv_quant
quantities
)
{
return
quantities
.
t
;
}
// for tracking, add later
//=========================================================================================================
Loading