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
GitLab 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
Expand sidebar
Merged
pi0 data set
jihee.kim/reconstruction_benchmarks:pi0
into
master
Overview
0
Commits
11
Pipelines
0
Changes
5
Merged
pi0 data set
Jihee Kim
requested to merge
jihee.kim/reconstruction_benchmarks:pi0
into
master
Oct 19, 2020
Overview
0
Commits
11
Pipelines
0
Changes
5
Created scripts for single pi0 data set
Edited
Oct 20, 2020
by
Jihee Kim
0
0
Merge request reports
Compare
master
version 15
8e4d1f54
Oct 20, 2020
version 14
b26f0d23
Oct 20, 2020
version 13
53bcbf50
Oct 20, 2020
version 12
fe25d218
Oct 20, 2020
version 11
b6b1a649
Oct 20, 2020
version 10
55b888be
Oct 20, 2020
version 9
2adf6eb5
Oct 20, 2020
version 8
4d1108b3
Oct 20, 2020
version 7
04e5f9b8
Oct 20, 2020
version 6
23205cac
Oct 20, 2020
version 5
3642d2b1
Oct 20, 2020
version 4
308b1cde
Oct 20, 2020
version 3
c5ce8bfb
Oct 19, 2020
version 2
c35c35a8
Oct 19, 2020
version 1
eed98b18
Oct 19, 2020
master (base)
and
latest version
latest version
ba585643
11 commits,
Oct 20, 2020
version 15
8e4d1f54
10 commits,
Oct 20, 2020
version 14
b26f0d23
9 commits,
Oct 20, 2020
version 13
53bcbf50
8 commits,
Oct 20, 2020
version 12
fe25d218
7 commits,
Oct 20, 2020
version 11
b6b1a649
6 commits,
Oct 20, 2020
version 10
55b888be
5 commits,
Oct 20, 2020
version 9
2adf6eb5
4 commits,
Oct 20, 2020
version 8
4d1108b3
3 commits,
Oct 20, 2020
version 7
04e5f9b8
2 commits,
Oct 20, 2020
version 6
23205cac
1 commit,
Oct 20, 2020
version 5
3642d2b1
3 commits,
Oct 20, 2020
version 4
308b1cde
2 commits,
Oct 20, 2020
version 3
c5ce8bfb
1 commit,
Oct 19, 2020
version 2
c35c35a8
1 commit,
Oct 19, 2020
version 1
eed98b18
1 commit,
Oct 19, 2020
5 files
+
592
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
ecal/scripts/emcal_pi0.cxx
0 → 100644
+
76
−
0
View file @ ba585643
Edit in single-file editor
Open in Web IDE
//////////////////////////////////////////////////////////////
// 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