Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reconstruction_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
reconstruction_benchmarks
Merge requests
!4
pi0 data set
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
pi0 data set
jihee.kim/reconstruction_benchmarks:pi0
into
master
Overview
0
Commits
11
Pipelines
0
Changes
5
Merged
Jihee Kim
requested to merge
jihee.kim/reconstruction_benchmarks:pi0
into
master
4 years ago
Overview
0
Commits
11
Pipelines
0
Changes
5
Expand
Created scripts for single pi0 data set
Edited
4 years ago
by
Jihee Kim
0
0
Merge request reports
Compare
master
version 15
8e4d1f54
4 years ago
version 14
b26f0d23
4 years ago
version 13
53bcbf50
4 years ago
version 12
fe25d218
4 years ago
version 11
b6b1a649
4 years ago
version 10
55b888be
4 years ago
version 9
2adf6eb5
4 years ago
version 8
4d1108b3
4 years ago
version 7
04e5f9b8
4 years ago
version 6
23205cac
4 years ago
version 5
3642d2b1
4 years ago
version 4
308b1cde
4 years ago
version 3
c5ce8bfb
4 years ago
version 2
c35c35a8
4 years ago
version 1
eed98b18
4 years ago
master (base)
and
latest version
latest version
ba585643
11 commits,
4 years ago
version 15
8e4d1f54
10 commits,
4 years ago
version 14
b26f0d23
9 commits,
4 years ago
version 13
53bcbf50
8 commits,
4 years ago
version 12
fe25d218
7 commits,
4 years ago
version 11
b6b1a649
6 commits,
4 years ago
version 10
55b888be
5 commits,
4 years ago
version 9
2adf6eb5
4 commits,
4 years ago
version 8
4d1108b3
3 commits,
4 years ago
version 7
04e5f9b8
2 commits,
4 years ago
version 6
23205cac
1 commit,
4 years ago
version 5
3642d2b1
3 commits,
4 years ago
version 4
308b1cde
2 commits,
4 years ago
version 3
c5ce8bfb
1 commit,
4 years ago
version 2
c35c35a8
1 commit,
4 years ago
version 1
eed98b18
1 commit,
4 years ago
5 files
+
592
−
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)
ecal/scripts/emcal_pi0.cxx
0 → 100644
+
76
−
0
Options
//////////////////////////////////////////////////////////////
// Crystal EMCAL detector
// Single Pion dataset
// J.KIM 10/18/2020
//////////////////////////////////////////////////////////////
#include
"HepMC3/GenEvent.h"
#include
"HepMC3/ReaderAscii.h"
#include
"HepMC3/WriterAscii.h"
#include
"HepMC3/Print.h"
#include
<iostream>
#include
<random>
#include
<cmath>
#include
<math.h>
#include
<TMath.h>
using
namespace
HepMC3
;
void
emcal_pi0
(
int
n_events
=
1e6
,
const
char
*
out_fname
=
"./data/emcal_pi0_0GeVto30GeV_100kEvt.hepmc"
)
{
WriterAscii
hepmc_output
(
out_fname
);
int
events_parsed
=
0
;
GenEvent
evt
(
Units
::
GEV
,
Units
::
MM
);
// Random number generator
TRandom
*
r1
=
new
TRandom
();
for
(
events_parsed
=
0
;
events_parsed
<
n_events
;
events_parsed
++
)
{
// FourVector(px,py,pz,e,pdgid,status)
// type 4 is beam
// pdgid 11 - electron
// pdgid 111 - pi0
// pdgid 2212 - proton
GenParticlePtr
p1
=
std
::
make_shared
<
GenParticle
>
(
FourVector
(
0.0
,
0.0
,
10.0
,
10.0
),
11
,
4
);
GenParticlePtr
p2
=
std
::
make_shared
<
GenParticle
>
(
FourVector
(
0.0
,
0.0
,
0.0
,
0.938
),
2212
,
4
);
// Define momentum
Double_t
p
=
r1
->
Uniform
(
0.0
,
30.0
);
Double_t
px
;
Double_t
py
;
Double_t
pz
;
// Generates random vectors, uniformly distributed over the surface of a
// sphere of given radius, in this case momentum.
r1
->
Sphere
(
px
,
py
,
pz
,
p
);
// type 1 is final state
// pdgid 111 - pi0 135 MeV/c^2
GenParticlePtr
p3
=
std
::
make_shared
<
GenParticle
>
(
FourVector
(
px
,
py
,
pz
,
sqrt
(
p
*
p
+
(
0.134976
*
0.134976
))),
111
,
1
);
GenVertexPtr
v1
=
std
::
make_shared
<
GenVertex
>
();
v1
->
add_particle_in
(
p1
);
v1
->
add_particle_in
(
p2
);
v1
->
add_particle_out
(
p3
);
evt
.
add_vertex
(
v1
);
if
(
events_parsed
==
0
)
{
std
::
cout
<<
"First event: "
<<
std
::
endl
;
Print
::
listing
(
evt
);
}
hepmc_output
.
write_event
(
evt
);
if
(
events_parsed
%
10000
==
0
)
{
std
::
cout
<<
"Event: "
<<
events_parsed
<<
std
::
endl
;
}
evt
.
clear
();
}
hepmc_output
.
close
();
std
::
cout
<<
"Events parsed and written: "
<<
events_parsed
<<
std
::
endl
;
}
Loading