Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
detector_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
detector_benchmarks
Merge requests
!72
B0tracker basics
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
B0tracker basics
b0tracker
into
master
Overview
1
Commits
16
Pipelines
0
Changes
5
Merged
Whitney Armstrong
requested to merge
b0tracker
into
master
3 years ago
Overview
1
Commits
16
Pipelines
0
Changes
5
Expand
0
0
Merge request reports
Compare
master
version 14
1f0200f8
3 years ago
version 13
e982006c
3 years ago
version 12
ecbfc426
3 years ago
version 11
3ad4f12b
3 years ago
version 10
c6706d64
3 years ago
version 9
02a41c06
3 years ago
version 8
8e3242d8
3 years ago
version 7
ea6a6896
3 years ago
version 6
8184e467
3 years ago
version 5
f91b9c31
3 years ago
version 4
a16f7da3
3 years ago
version 3
f0229882
3 years ago
version 2
4f9d37f3
3 years ago
version 1
f61e63bb
3 years ago
master (base)
and
latest version
latest version
950f215b
16 commits,
3 years ago
version 14
1f0200f8
15 commits,
3 years ago
version 13
e982006c
14 commits,
3 years ago
version 12
ecbfc426
13 commits,
3 years ago
version 11
3ad4f12b
11 commits,
3 years ago
version 10
c6706d64
10 commits,
3 years ago
version 9
02a41c06
9 commits,
3 years ago
version 8
8e3242d8
8 commits,
3 years ago
version 7
ea6a6896
7 commits,
3 years ago
version 6
8184e467
6 commits,
3 years ago
version 5
f91b9c31
5 commits,
3 years ago
version 4
a16f7da3
4 commits,
3 years ago
version 3
f0229882
3 commits,
3 years ago
version 2
4f9d37f3
2 commits,
3 years ago
version 1
f61e63bb
1 commit,
3 years ago
5 files
+
226
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
benchmarks/b0_tracker/scripts/b0_tracker_hits.cxx
0 → 100644
+
64
−
0
Options
R__LOAD_LIBRARY
(
libfmt
.
so
)
#include
"fmt/core.h"
#include
"ROOT/RDataFrame.hxx"
#include
"Math/Vector3D.h"
//#include "Math/Vector4D.h"
//#include "Math/VectorUtil.h"
#include
"TCanvas.h"
//#include "TLegend.h"
//#include "TMath.h"
//#include "TRandom3.h"
//#include "TFile.h"
//#include "TH1F.h"
//#include "TH1D.h"
//#include "TTree.h"
#include
"TChain.h"
//#include "TF1.h"
#include
"dd4pod/TrackerHitCollection.h"
#include
"common_bench/particles.h"
#include
"common_bench/benchmark.h"
#include
"common_bench/mt.h"
#include
"common_bench/util.h"
#include
"dd4pod/TrackerHitCollection.h"
void
b0_tracker_hits
(
const
char
*
fname
=
"./sim_output/sim_forward_protons.root"
){
ROOT
::
EnableImplicitMT
();
// Tell ROOT you want to go parallel
double
degree
=
TMath
::
Pi
()
/
180.0
;
TChain
*
t
=
new
TChain
(
"events"
);
t
->
Add
(
fname
);
ROOT
::
RDataFrame
d0
(
*
t
);
auto
hits_eta
=
[
&
](
const
std
::
vector
<
dd4pod
::
TrackerHitData
>&
hits
)
{
std
::
vector
<
double
>
result
;
for
(
const
auto
&
h
:
hits
)
{
ROOT
::
Math
::
XYZVector
vec
(
h
.
position
.
x
,
h
.
position
.
y
,
h
.
position
.
z
);
result
.
push_back
(
vec
.
eta
());
std
::
cout
<<
vec
.
eta
()
<<
"
\n
"
;
}
return
result
;
};
auto
d1
=
d0
.
Define
(
"hits_eta"
,
hits_eta
,
{
"B0TrackerHits"
});
auto
h1
=
d1
.
Histo1D
({
"h1"
,
"hits_eta"
,
100
,
0
,
20
},
"hits_eta"
);
TCanvas
*
c
=
new
TCanvas
();
h1
->
DrawCopy
();
c
->
SaveAs
(
"results/b0_tracker_hits_eta.png"
);
c
->
SaveAs
(
"results/b0_tracker_hits_eta.pdf"
);
auto
n1
=
h1
->
GetMean
();
std
::
cout
<<
"Pseudorapidity of hits: "
<<
n1
<<
std
::
endl
;
//if (n1 < 5) {
// std::quick_exit(1);
//}
}
Loading