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
1a252280
Commit
1a252280
authored
3 years ago
by
Ziyue Zhang
Committed by
Sylvester Joosten
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Dvmp jpsi mass resolution
parent
10ec8e79
No related branches found
Branches containing commit
No related tags found
1 merge request
!41
Dvmp jpsi mass resolution
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
benchmarks/dvmp/analysis/vm_mass.cxx
+30
-18
30 additions, 18 deletions
benchmarks/dvmp/analysis/vm_mass.cxx
include/util.h
+2
-0
2 additions, 0 deletions
include/util.h
options/tracker_reconstruction.py
+1
-1
1 addition, 1 deletion
options/tracker_reconstruction.py
with
33 additions
and
19 deletions
benchmarks/dvmp/analysis/vm_mass.cxx
+
30
−
18
View file @
1a252280
...
...
@@ -68,8 +68,8 @@ int vm_mass(const std::string& config_name)
{
"description"
,
"Invariant Mass Resolution calculated from raw "
"tracking data using a Gaussian fit."
},
{
"quantity"
,
"resolution"
},
{
"target"
,
".
1
"
}}};
{
"target"
,
".
2
"
}}};
//these 2 need to be consistent
double
width_target
=
0.2
;
//going to find a way to use the same variable
// Run this in multi-threaded mode if desired
ROOT
::
EnableImplicitMT
(
kNumThreads
);
...
...
@@ -112,8 +112,8 @@ int vm_mass(const std::string& config_name)
// Define output histograms
//auto h_im_rec = d_im.Histo1D({"h_im_rec", ";m_{ll'} (GeV/c^{2});#", (int)(vm_mass+0.5)*2*100, 0., 2.*(int)(vm_mass+0.5)}, "mass_rec"); //real rec
auto
h_im_rec
=
d_im
.
Histo1D
({
"h_im_rec"
,
";m_{ll'} (GeV/c^{2});#"
,
5
0
,
1.
,
5
.
},
"mass_rec"
);
//for dummy_rec
auto
h_im_sim
=
d_im
.
Histo1D
({
"h_im_sim"
,
";m_{ll'} (GeV/c^{2});#"
,
5
0
,
1.
,
5
.
},
"mass_sim"
);
auto
h_im_rec
=
d_im
.
Histo1D
({
"h_im_rec"
,
";m_{ll'} (GeV/c^{2});#"
,
3
0
,
1.
5
,
4.
5
},
"mass_rec"
);
//for dummy_rec
auto
h_im_sim
=
d_im
.
Histo1D
({
"h_im_sim"
,
";m_{ll'} (GeV/c^{2});#"
,
3
0
,
1.
5
,
4.
5
},
"mass_sim"
);
auto
h_pt_rec
=
d_im
.
Histo1D
({
"h_pt_rec"
,
";p_{T} (GeV/c);#"
,
50
,
0.
,
10.
},
"pt_rec"
);
auto
h_pt_sim
=
d_im
.
Histo1D
({
"h_pt_sim"
,
";p_{T} (GeV/c);#"
,
50
,
0.
,
10.
},
"pt_sim"
);
...
...
@@ -127,7 +127,7 @@ int vm_mass(const std::string& config_name)
// Plot our histograms.
// TODO: to start I'm explicitly plotting the histograms, but want to
// factorize out the plotting code moving forward.
{
//
{
TCanvas
c
{
"canvas"
,
"canvas"
,
1200
,
1200
};
c
.
Divide
(
2
,
2
,
0.0001
,
0.0001
);
// pad 1 mass
...
...
@@ -147,8 +147,22 @@ int vm_mass(const std::string& config_name)
// draw everything
h11
.
DrawClone
(
"hist"
);
h12
.
DrawClone
(
"hist same"
);
//Fit
TF1
*
mfMass
=
new
TF1
(
"mfMass"
,
"[2]*TMath::Gaus(x, [0], [1], kFALSE)"
,
1.5
,
4.5
);
mfMass
->
SetParameters
(
3.096
,
0.1
,
100.
);
mfMass
->
SetParLimits
(
0
,
3.0
,
3.2
);
mfMass
->
SetParLimits
(
1
,
0.
,
10.
);
mfMass
->
SetParLimits
(
2
,
0.
,
1000.
);
mfMass
->
SetNpx
(
1000
);
mfMass
->
SetLineColor
(
2
);
mfMass
->
SetLineStyle
(
7
);
TFitResultPtr
myFitPtr
=
h12
.
Fit
(
mfMass
,
"S 0"
,
""
,
1.5
,
4.5
);
mfMass
->
Draw
(
"same"
);
// FIXME hardcoded beam configuration
plot
::
draw_label
(
10
,
100
,
detector
);
plot
::
draw_label
(
10
,
100
,
detector
);
TText
*
tptr1
;
auto
t1
=
new
TPaveText
(
.6
,
.8417
,
.9
,
.925
,
"NB NDC"
);
t1
->
SetFillColorAlpha
(
kWhite
,
0
);
...
...
@@ -175,18 +189,8 @@ int vm_mass(const std::string& config_name)
h21
.
GetXaxis
()
->
CenterTitle
();
h21
.
GetYaxis
()
->
CenterTitle
();
// draw everything
//TF1* mfPt = new TF1("mfPt", "[0]*exp(-[1]*x)", 1.2, 10.);
//mfPt->SetParameters(5., 1.);
//mfPt->SetParLimits(0, 0., 1000000.);
//mfPt->SetParLimits(1, 0., 1000000.);
//mfPt->SetNpx(1000);
//mfPt->SetLineColor(2);
//mfPt->SetLineStyle(7);
//h21.Fit(mfPt, "", "", 1.2, 10.);
h21
.
DrawClone
(
"hist"
);
h22
.
DrawClone
(
"hist same"
);
//mfPt->Draw("same");
// FIXME hardcoded beam configuration
plot
::
draw_label
(
10
,
100
,
detector
);
...
...
@@ -262,11 +266,19 @@ int vm_mass(const std::string& config_name)
t4
->
Draw
();
c
.
Print
(
fmt
::
format
(
"{}vm_mass_pt_phi_rapidity.png"
,
output_prefix
).
c_str
());
}
//
}
// TODO we're not actually doing an IM fit yet, so for now just return an
// error for the test result
mass_resolution_test
.
error
(
-
1
);
double
width
=
mfMass
->
GetParameter
(
1
);
if
(
myFitPtr
->
Status
()
!=
0
){
mass_resolution_test
.
error
(
-
1
);
}
else
if
(
width
>
width_target
){
mass_resolution_test
.
fail
(
width
);
}
else
{
mass_resolution_test
.
pass
(
width
);
}
// write out our test data
eic
::
util
::
write_test
(
mass_resolution_test
,
fmt
::
format
(
"{}mass.json"
,
output_prefix
));
...
...
This diff is collapsed.
Click to expand it.
include/util.h
+
2
−
0
View file @
1a252280
...
...
@@ -11,6 +11,8 @@
#include
<string>
#include
<vector>
#include
"TF1.h"
#include
"TFitResult.h"
#include
"TFitResultPtr.h"
#include
<Math/Vector4D.h>
...
...
This diff is collapsed.
Click to expand it.
options/tracker_reconstruction.py
+
1
−
1
View file @
1a252280
...
...
@@ -57,7 +57,7 @@ podioinput = PodioInput("PodioReader",
dummy
=
MC2DummyParticle
(
"
MC2Dummy
"
,
inputCollection
=
"
mcparticles
"
,
outputCollection
=
"
DummyReconstructedParticles
"
,
smearing
=
0.
0
)
smearing
=
0.
1
)
## copiers to get around input --> output copy bug. Note the "2" appended to the output collection.
copier
=
MCCopier
(
"
MCCopier
"
,
...
...
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