Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
centrality
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
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
Oleksii Lubynets
centrality
Commits
8f77d761
Commit
8f77d761
authored
4 years ago
by
Viktor
Browse files
Options
Downloads
Patches
Plain Diff
add flag to exe
parent
28719439
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
macro/rootlogon.C
+1
-1
1 addition, 1 deletion
macro/rootlogon.C
main.cpp
+17
-15
17 additions, 15 deletions
main.cpp
with
18 additions
and
16 deletions
macro/rootlogon.C
+
1
−
1
View file @
8f77d761
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
const
TString
dir
=
"../build/"
;
const
TString
dir
=
"../build/"
;
gSystem
->
gSystem
->
Load
(
dir
Load
(
dir
+
"libCentrality.so"
);
+
"libCentrality.so"
);
}
}
This diff is collapsed.
Click to expand it.
main.cpp
+
17
−
15
View file @
8f77d761
...
@@ -16,33 +16,35 @@
...
@@ -16,33 +16,35 @@
#include
"TH2.h"
#include
"TH2.h"
int
main
(
int
argc
,
char
**
argv
)
{
int
main
(
int
argc
,
char
**
argv
)
{
auto
start
=
std
::
chrono
::
system_clock
::
now
();
auto
start
=
std
::
chrono
::
system_clock
::
now
();
ROOT
::
EnableImplicitMT
(
2
);
ROOT
::
EnableImplicitMT
(
2
);
if
(
argc
<=
3
)
if
(
argc
<=
4
)
{
{
std
::
cout
<<
"Not enough arguments! Please use:"
<<
std
::
endl
;
std
::
cout
<<
"Not enough arguments! Please use:"
<<
std
::
endl
;
std
::
cout
<<
" ./main filename histoname is2d"
<<
std
::
endl
;
std
::
cout
<<
" ./main filename histoname
is_spectator
is2d"
<<
std
::
endl
;
return
-
1
;
return
-
1
;
}
}
std
::
unique_ptr
<
TFile
>
fIn
{
TFile
::
Open
(
argv
[
1
],
"read"
)};
const
char
*
filename
{
argv
[
1
]};
const
char
*
histoname
{
argv
[
2
]};
const
bool
is_spectator
=
strcmp
(
argv
[
3
],
"true"
)
==
0
;
const
bool
is_2d
=
strcmp
(
argv
[
4
],
"true"
)
==
0
;
std
::
unique_ptr
<
TFile
>
fIn
{
TFile
::
Open
(
filename
,
"read"
)};
std
::
string
outfilename
=
"test.root"
;
std
::
string
outfilename
=
"test.root"
;
if
(
strcmp
(
argv
[
3
],
"false"
)
==
0
)
if
(
!
is_2d
)
{
{
std
::
unique_ptr
<
TH1F
>
histo
{(
TH1F
*
)
(
fIn
->
Get
(
histoname
))};
std
::
unique_ptr
<
TH1F
>
histo
{(
TH1F
*
)
(
fIn
->
Get
(
argv
[
2
]))};
Centrality
::
BordersFinder
bf
;
Centrality
::
BordersFinder
bf
;
bf
.
SetHisto
(
*
histo
);
bf
.
SetHisto
(
*
histo
);
bf
.
SetRanges
(
20
,
0
,
100
);
// number of bins, min, max value
bf
.
SetRanges
(
20
,
0
,
100
);
// number of bins, min, max value
// bf.SetRanges( {0,10,30,60,100} ); // centrality bins borders with array
// bf.SetRanges( {0,10,30,60,100} ); // centrality bins borders with array
bf
.
IsSpectator
(
true
);
// true if impact parameter b correlated with estimator (spectators eneggy),
bf
.
IsSpectator
(
is_spectator
);
// true if impact parameter b correlated with estimator (spectators eneggy),
// false - anticorrelated (multiplicity of produced particles)
// false - anticorrelated (multiplicity of produced particles)
bf
.
FindBorders
();
bf
.
FindBorders
();
bf
.
SaveBorders
(
outfilename
,
"centr_getter_1d"
);
bf
.
SaveBorders
(
outfilename
,
"centr_getter_1d"
);
}
}
else
else
if
(
strcmp
(
argv
[
3
],
"true"
)
==
0
)
{
{
std
::
unique_ptr
<
TH2F
>
histo2d
{(
TH2F
*
)
(
fIn
->
Get
(
argv
[
2
]))};
std
::
unique_ptr
<
TH2F
>
histo2d
{(
TH2F
*
)
(
fIn
->
Get
(
argv
[
2
]))};
Centrality
::
BordersFinder2D
bf
;
Centrality
::
BordersFinder2D
bf
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment