Skip to content

Commit 4543d6a

Browse files
committed
WIP
1 parent 81338a3 commit 4543d6a

98 files changed

Lines changed: 8961 additions & 89 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ _site
44
Gemfile.lock
55
.jekyll-cache
66
node_modules
7-
vendor/
7+
vendor
8+
!_sass/bootstrap/vendor/
89
.project
910
.settings
11+
.bundle

Gemfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ group :jekyll_plugins do
1414
end
1515

1616
# Use a stable sass-embedded version to avoid build issues on GitHub Actions
17-
gem "sass-embedded", "~> 1.68.0"
18-
17+
gem "sass-embedded", "~> 1.99"
18+
gem "google-protobuf", "~> 4.32"
19+
gem 'bootstrap', "~> 5.3"

_config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
# Review documentation to determine if you should use `theme` or `remote_theme`
1111
# https://mmistakes.github.io/minimal-mistakes/docs/quick-start-guide/#installing-the-theme
1212

13-
# theme : "minimal-mistakes-jekyll"
1413
remote_theme : "root-project/minimal-mistakes@root-patches"
1514
minimal_mistakes_skin : "root" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise"
1615

@@ -216,9 +215,10 @@ kramdown:
216215

217216
# Sass/SCSS
218217
sass:
219-
sass_dir: _sass
220218
style: compressed # https://sass-lang.com/documentation/file.SASS_REFERENCE.html#output_style
221-
219+
load_paths:
220+
- _sass
221+
- ./vendor/bundle/ruby/3.4.0/gems/bootstrap-5.3.8
222222

223223
# Outputting
224224
permalink: /:categories/:title/

_includes/figure_jsroot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{% assign fig = {{include.fig}} %}
77
{% assign caption = {{include.caption}} %}
88

9-
{% assign id = f | append: o | replace: ".root","" | replace: "/","" %}
9+
{% assign id = "jsroot_" | append: f | append: o | replace: ".root","" | replace: "/","" %}
1010

1111
{% capture sect_size %}{{ sect | size }}{% endcapture %}
1212

_includes/footer.html

Lines changed: 134 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,139 @@
11
<div class="page__footer-copyright">
2-
<table id="navtable">
3-
<tr>
4-
<td><a href="https://cern.ch"> <img src="{{'/assets/images/cern-logo-large.png' | relative_url}}" width=50> </a></td>
5-
<td><a href="https://www.europa.eu"> <img src="{{'/assets/images/eu.jpg' | relative_url}}" width=80> </a></td>
6-
<td><a href="https://fnal.gov"> <img src="{{'/assets/images/FNAL-logomark.png' | relative_url}}" width=50> </a></td>
7-
<td><a href="https://www.gsi.de"> <img src="{{'/assets/images/GSI_Logo_rgb.png' | relative_url}}" width=80> </a></td>
8-
<td><a href="https://www.uio.no"> <img src="{{'/assets/images/oslo-university.svg' | relative_url}}" width=175> </a></td>
9-
<td><a href="https://www.princeton.edu"> <img src="{{'/assets/images/Princeton.png' | relative_url}}" width=175> </a></td>
10-
<td><a href="https://ucsd.edu"> <img src="{{'/assets/images/UCSanDiegoLogo-Black.png' | relative_url}}" width=175> </a></td>
11-
</tr>
12-
</table>
2+
<table id="navtable">
3+
<tr>
4+
<td>
5+
<a href="https://cern.ch">
6+
<img
7+
src="{{'/assets/images/cern-logo-large.png' | relative_url}}"
8+
width="50"
9+
/>
10+
</a>
11+
</td>
12+
<td>
13+
<a href="https://www.europa.eu">
14+
<img
15+
src="{{'/assets/images/eu.jpg' | relative_url}}"
16+
width="80"
17+
/>
18+
</a>
19+
</td>
20+
<td>
21+
<a href="https://fnal.gov">
22+
<img
23+
src="{{'/assets/images/FNAL-logomark.png' | relative_url}}"
24+
width="50"
25+
/>
26+
</a>
27+
</td>
28+
<td>
29+
<a href="https://www.gsi.de">
30+
<img
31+
src="{{'/assets/images/GSI_Logo_rgb.png' | relative_url}}"
32+
width="80"
33+
/>
34+
</a>
35+
</td>
36+
<td>
37+
<a href="https://www.uio.no">
38+
<img
39+
src="{{'/assets/images/oslo-university.svg' | relative_url}}"
40+
width="175"
41+
/>
42+
</a>
43+
</td>
44+
<td>
45+
<a href="https://www.princeton.edu">
46+
<img
47+
src="{{'/assets/images/Princeton.png' | relative_url}}"
48+
width="175"
49+
/>
50+
</a>
51+
</td>
52+
<td>
53+
<a href="https://ucsd.edu">
54+
<img
55+
src="{{'/assets/images/UCSanDiegoLogo-Black.png' | relative_url}}"
56+
width="175"
57+
/>
58+
</a>
59+
</td>
60+
</tr>
61+
</table>
1362

14-
<hr>
63+
<hr />
1564

16-
<table id="navtable">
17-
<tr>
18-
<td>Copyright &copy; <a href="{{ 'about' | relative_url }}">ROOT Team</a> {{ 'now' | date: "%Y" }}. All rights reserved.</td>
19-
</tr>
20-
</table>
65+
<table id="navtable">
66+
<tr>
67+
<td>
68+
Copyright &copy; <a href="{{ 'about' | relative_url }}">ROOT Team</a> {{
69+
'now' | date: "%Y" }}. All rights reserved.
70+
</td>
71+
</tr>
72+
</table>
2173

22-
{% assign this_github_root = site.github_baseurl | append: '/' %}
23-
{% assign this_github_filename = page.path %}
24-
{% assign this_github_page = this_github_root | append: 'tree/main/' | append: this_github_filename %}
25-
<div id="ghedit" style="padding-top:32px">
26-
<a href="{{ this_github_page }}" class="github-corner" aria-label="View/edit this page on GitHub" width="100%"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#fff; color:#151513; position:absolute; right:0px; bottom:0px; border: 0; transform: scale(-1, 1);" aria-hidden="true"><title>View/edit this page on GitHub</title><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
27-
</div>
74+
{% assign this_github_root = site.github_baseurl | append: '/' %} {% assign
75+
this_github_filename = page.path %} {% assign this_github_page =
76+
this_github_root | append: 'tree/main/' | append: this_github_filename %}
77+
<div id="ghedit" style="padding-top: 32px">
78+
<a
79+
href="{{ this_github_page }}"
80+
class="github-corner"
81+
aria-label="View/edit this page on GitHub"
82+
width="100%"
83+
><svg
84+
width="80"
85+
height="80"
86+
viewBox="0 0 250 250"
87+
style="
88+
fill: #fff;
89+
color: #151513;
90+
position: absolute;
91+
right: 0px;
92+
bottom: 0px;
93+
border: 0;
94+
transform: scale(-1, 1);
95+
"
96+
aria-hidden="true"
97+
>
98+
<title>View/edit this page on GitHub</title>
99+
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
100+
<path
101+
d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
102+
fill="currentColor"
103+
style="transform-origin: 130px 106px"
104+
class="octo-arm"
105+
></path>
106+
<path
107+
d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
108+
fill="currentColor"
109+
class="octo-body"
110+
></path></svg></a
111+
><style>
112+
.github-corner:hover .octo-arm {
113+
animation: octocat-wave 560ms ease-in-out;
114+
}
115+
@keyframes octocat-wave {
116+
0%,
117+
100% {
118+
transform: rotate(0);
119+
}
120+
20%,
121+
60% {
122+
transform: rotate(-25deg);
123+
}
124+
40%,
125+
80% {
126+
transform: rotate(10deg);
127+
}
128+
}
129+
@media (max-width: 500px) {
130+
.github-corner:hover .octo-arm {
131+
animation: none;
132+
}
133+
.github-corner .octo-arm {
134+
animation: octocat-wave 560ms ease-in-out;
135+
}
136+
}
137+
</style>
138+
</div>
28139
</div>

_includes/footer/custom.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@
3333
</center>
3434
<hr>
3535

36+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
37+
3638
<!-- end custom footer snippets -->

_includes/head/custom.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
<link rel="icon" type="image/png" href={{ "/assets/images/icon-32.png" | relative_url }} sizes="32x32">
44
<link rel="icon" type="image/png" href={{ "/assets/images/icon-96.png" | relative_url }} sizes="96x96">
55

6+
<!--<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">-->
7+
8+
<link href={{ "/assets/css/styles.css" | relative_url }} rel="stylesheet">
9+
610
<style>
711
@font-face {
812
font-family: 'OpenSans';
@@ -27,4 +31,4 @@
2731
a.site-title {
2832
font-family: "OpenSans";
2933
}
30-
</style>
34+
</style>

_includes/root_showcase.html

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<div class="row mb-6">
2+
<div class="col-12">
3+
<p>ROOT provides all the components you need to turn data into results. See it in action below, using data from the <a href="https://cms.cern">CMS</a> experiment at <a href="https://home.cern">CERN:</a></p>
4+
</div>
5+
</div>
6+
<div class="row align-items-begin mb-6">
7+
<div class="col-7" >
8+
<div class="card border-0">
9+
<div class="card-header px-2">
10+
<!--<h3>Code</h3>-->
11+
<ul class="nav nav-tabs card-header-tabs">
12+
<li class="nav-item">
13+
<a href="#cpp" class="nav-link active" data-bs-toggle="tab"
14+
>C++</a
15+
>
16+
</li>
17+
<li class="nav-item border-0">
18+
<a href="#python" class="nav-link" data-bs-toggle="tab">Python</a>
19+
</li>
20+
</ul>
21+
</div>
22+
<div class="card-body card-body-code">
23+
<div class="tab-content">
24+
<div class="tab-pane fade show active" id="cpp">
25+
{% highlight c++ %}
26+
{% include showcase/dimuon_jpsi.C %}
27+
{% endhighlight %}
28+
</div>
29+
<div class="tab-pane fade" id="python">
30+
{% highlight python %}
31+
{% include showcase/dimuon_jpsi.py %}
32+
{% endhighlight %}
33+
</div>
34+
</div>
35+
</div>
36+
</div>
37+
</div>
38+
<div class="col-5">
39+
<div class="card border-0">
40+
<div class="card-header px-2">
41+
<!--<h3>Result</h3>-->
42+
</div>
43+
<div class="card-body card-jsroot">
44+
{% capture hist_path %}{{ "/gallery/showcase/jpsi.root" | relative_url }}{% endcapture %}
45+
{% include figure_jsroot
46+
file=hist_path object="Dimuon_mass" width="auto" height="250px"
47+
%}
48+
</div>
49+
</div>
50+
</div>
51+
</div>

_includes/showcase/dimuon_jpsi.C

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
void dimuon_jpsi() {
2+
// Load the data
3+
ROOT::RDataFrame df("Events", "Run2012BC_DoubleMuParked_Muons.root");
4+
5+
// Select only events with two oppositely-charged muons
6+
auto df_2mu = df.Filter("nMuon == 2 && Muon_charge[0] != Muon_charge[1]");
7+
8+
// Compute invariant mass of the dimuon system
9+
auto df_mass =
10+
df_2mu.Define("Dimuon_mass", ROOT::VecOps::InvariantMass<float>,
11+
{"Muon_pt", "Muon_eta", "Muon_phi", "Muon_mass"});
12+
13+
// Select events within the J/psi mass spectrum
14+
auto df_jpsi = df_mass.Filter("Dimuon_mass > 2.95 && Dimuon_mass < 3.25");
15+
16+
// Make histogram of dimuon mass spectrum
17+
auto hist = df_jpsi.Histo1D(
18+
{"Dimuon_mass",
19+
"Subset of CMS Run 2010B: J/#psi window;#mu#mu mass [GeV];Events",
20+
128, 2.95, 3.25},
21+
"Dimuon_mass");
22+
23+
// Draw the histogram
24+
auto canvas = std::make_unique<TCanvas>("c", "", 800, 700);
25+
hist->DrawCopy();
26+
}

_includes/showcase/dimuon_jpsi.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import ROOT
2+
3+
# Load the data set
4+
df = ROOT.RDataFrame("Events", "Run2012BC_DoubleMuParked_Muons.root")
5+
6+
# Select only events with two oppositely-charged muons
7+
df_2mu = df.Filter("nMuon == 2 && Muon_charge[0] != Muon_charge[1]")
8+
9+
# Compute invariant mass of the dimuon system
10+
df_mass = df_2mu.Define(
11+
"Dimuon_mass", "InvariantMass(Muon_pt, Muon_eta, Muon_phi, Muon_mass)"
12+
)
13+
14+
# Select events within the J/psi mass spectrum
15+
df_jpsi = df_mass.Filter("Dimuon_mass > 2.95 && Dimuon_mass < 3.25")
16+
17+
# Make histogram of dimuon mass spectrum
18+
hist = df_jpsi.Histo1D(
19+
(
20+
"Dimuon_mass",
21+
"Subset of CMS Run 2010B: J/#psi window;#mu#mu mass [GeV];Events",
22+
128, 2.95, 3.25,
23+
),
24+
"Dimuon_mass",
25+
)
26+
27+
c = ROOT.TCanvas("c", "", 800, 700)
28+
hist.Draw()

0 commit comments

Comments
 (0)