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
GitLab 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
Expand sidebar
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
2
Merged
Add t in dvmp; add a place holder for InvQuant in REC
Ziyue Zhang
requested to merge
ziyue_work_branch
into
master
Feb 2, 2021
Overview
2
Commits
13
Pipelines
0
Changes
2
WIP: Add t in dvmp; add a place holder for InvQuant with limited track selection in REC
Edited
Feb 4, 2021
by
Ziyue Zhang
0
0
Merge request reports
Compare
master
version 26
7600c952
Feb 4, 2021
version 25
814f4c87
Feb 4, 2021
version 24
a257485c
Feb 4, 2021
version 23
ff399653
Feb 4, 2021
version 22
5d6a2621
Feb 4, 2021
version 21
ded3c50a
Feb 4, 2021
version 20
04357d27
Feb 4, 2021
version 19
fcf5f44b
Feb 4, 2021
version 18
0b40af37
Feb 4, 2021
version 17
7cf86977
Feb 4, 2021
version 16
d8f2f607
Feb 4, 2021
version 15
8f64ffc0
Feb 4, 2021
version 14
eef06120
Feb 4, 2021
version 13
aa8ad68b
Feb 4, 2021
version 12
8454e12b
Feb 4, 2021
version 11
aeb6e7e8
Feb 4, 2021
version 10
fc5a58c0
Feb 4, 2021
version 9
0047270b
Feb 4, 2021
version 8
ae52d189
Feb 4, 2021
version 7
4ffce4f1
Feb 4, 2021
version 6
42140710
Feb 4, 2021
version 5
ceaabad9
Feb 2, 2021
version 4
8961b225
Feb 2, 2021
version 3
d6b3c104
Feb 2, 2021
version 2
9a19fe9d
Feb 2, 2021
version 1
48047238
Feb 2, 2021
master (base)
and
version 4
latest version
4e7df48b
13 commits,
Feb 4, 2021
version 26
7600c952
12 commits,
Feb 4, 2021
version 25
814f4c87
11 commits,
Feb 4, 2021
version 24
a257485c
10 commits,
Feb 4, 2021
version 23
ff399653
9 commits,
Feb 4, 2021
version 22
5d6a2621
8 commits,
Feb 4, 2021
version 21
ded3c50a
7 commits,
Feb 4, 2021
version 20
04357d27
6 commits,
Feb 4, 2021
version 19
fcf5f44b
5 commits,
Feb 4, 2021
version 18
0b40af37
4 commits,
Feb 4, 2021
version 17
7cf86977
3 commits,
Feb 4, 2021
version 16
d8f2f607
2 commits,
Feb 4, 2021
version 15
8f64ffc0
3 commits,
Feb 4, 2021
version 14
eef06120
2 commits,
Feb 4, 2021
version 13
aa8ad68b
1 commit,
Feb 4, 2021
version 12
8454e12b
2 commits,
Feb 4, 2021
version 11
aeb6e7e8
1 commit,
Feb 4, 2021
version 10
fc5a58c0
1 commit,
Feb 4, 2021
version 9
0047270b
13 commits,
Feb 4, 2021
version 8
ae52d189
12 commits,
Feb 4, 2021
version 7
4ffce4f1
11 commits,
Feb 4, 2021
version 6
42140710
10 commits,
Feb 4, 2021
version 5
ceaabad9
9 commits,
Feb 2, 2021
version 4
8961b225
8 commits,
Feb 2, 2021
version 3
d6b3c104
7 commits,
Feb 2, 2021
version 2
9a19fe9d
6 commits,
Feb 2, 2021
version 1
48047238
5 commits,
Feb 2, 2021
2 files
+
196
−
80
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
benchmarks/dvmp/analysis/dvmp.h
+
68
−
11
View file @ 8961b225
Edit in single-file editor
Open in Web IDE
Show full file
@@ -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