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
GitLab 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
Expand sidebar
Merged
B0tracker basics
b0tracker
into
master
Overview
1
Commits
16
Pipelines
0
Changes
5
Merged
B0tracker basics
Whitney Armstrong
requested to merge
b0tracker
into
master
Aug 9, 2021
Overview
1
Commits
16
Pipelines
0
Changes
5
0
0
Merge request reports
Compare
master
version 14
1f0200f8
Aug 9, 2021
version 13
e982006c
Aug 9, 2021
version 12
ecbfc426
Aug 9, 2021
version 11
3ad4f12b
Aug 9, 2021
version 10
c6706d64
Aug 9, 2021
version 9
02a41c06
Aug 9, 2021
version 8
8e3242d8
Aug 9, 2021
version 7
ea6a6896
Aug 9, 2021
version 6
8184e467
Aug 9, 2021
version 5
f91b9c31
Aug 9, 2021
version 4
a16f7da3
Aug 9, 2021
version 3
f0229882
Aug 9, 2021
version 2
4f9d37f3
Aug 9, 2021
version 1
f61e63bb
Aug 9, 2021
master (base)
and
latest version
latest version
950f215b
16 commits,
Aug 9, 2021
version 14
1f0200f8
15 commits,
Aug 9, 2021
version 13
e982006c
14 commits,
Aug 9, 2021
version 12
ecbfc426
13 commits,
Aug 9, 2021
version 11
3ad4f12b
11 commits,
Aug 9, 2021
version 10
c6706d64
10 commits,
Aug 9, 2021
version 9
02a41c06
9 commits,
Aug 9, 2021
version 8
8e3242d8
8 commits,
Aug 9, 2021
version 7
ea6a6896
7 commits,
Aug 9, 2021
version 6
8184e467
6 commits,
Aug 9, 2021
version 5
f91b9c31
5 commits,
Aug 9, 2021
version 4
a16f7da3
4 commits,
Aug 9, 2021
version 3
f0229882
3 commits,
Aug 9, 2021
version 2
4f9d37f3
2 commits,
Aug 9, 2021
version 1
f61e63bb
1 commit,
Aug 9, 2021
5 files
+
226
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
benchmarks/b0_tracker/scripts/b0_tracker_hits.cxx
0 → 100644
+
64
−
0
View file @ 950f215b
Edit in single-file editor
Open in Web IDE
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