Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
np
nptool
Commits
93228dc6
Commit
93228dc6
authored
3 days ago
by
Theodore Efremov
Browse files
Options
Downloads
Patches
Plain Diff
[AlPhaPha] added checking gamma macro
parent
ac45fb5c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#395694
passed
3 days ago
Stage: build-NPLib
Stage: build-NPSimulation
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Projects/AlPhaPha/2024/macro/AoQ/VerifExo/ExogamGamma.C
+107
-0
107 additions, 0 deletions
Projects/AlPhaPha/2024/macro/AoQ/VerifExo/ExogamGamma.C
Projects/AlPhaPha/2024/macro/AoQ/VerifExo/Output/ReadMe.md
+2
-0
2 additions, 0 deletions
Projects/AlPhaPha/2024/macro/AoQ/VerifExo/Output/ReadMe.md
with
109 additions
and
0 deletions
Projects/AlPhaPha/2024/macro/AoQ/VerifExo/ExogamGamma.C
0 → 100644
+
107
−
0
View file @
93228dc6
#include
<TCanvas.h>
#include
<TChain.h>
#include
<TFile.h>
#include
<TH2.h>
#include
<TStyle.h>
#include
<chrono>
#include
<iostream>
using
namespace
std
;
void
ExogamGamma
(){
//===========================================================================================================
// Load Run & var
//===========================================================================================================
TChain
*
chain
=
new
TChain
(
"PhysicsTree"
);
chain
->
Add
(
"../../../root/analysis/Run245.root"
);
chain
->
Add
(
"../../../root/analysis/Run246.root"
);
chain
->
Add
(
"../../../root/analysis/Run247.root"
);
chain
->
Add
(
"../../../root/analysis/Run248.root"
);
chain
->
Add
(
"../../../root/analysis/Run249.root"
);
chain
->
Add
(
"../../../root/analysis/Run250.root"
);
chain
->
Add
(
"../../../root/analysis/Run251.root"
);
chain
->
Add
(
"../../../root/analysis/Run252.root"
);
double
FF_Mass13
,
FF_Z
,
Exo_EDC_vamos
;
int
FPMW_Section
;
chain
->
SetBranchStatus
(
"Exo_EDC_vamos"
,
"true"
);
chain
->
SetBranchAddress
(
"Exo_EDC_vamos"
,
&
Exo_EDC_vamos
);
chain
->
SetBranchStatus
(
"FPMW_Section"
,
"true"
);
chain
->
SetBranchAddress
(
"FPMW_Section"
,
&
FPMW_Section
);
chain
->
SetBranchStatus
(
"FF_Z"
,
"true"
);
chain
->
SetBranchAddress
(
"FF_Z"
,
&
FF_Z
);
chain
->
SetBranchStatus
(
"FF_Mass13"
,
"true"
);
chain
->
SetBranchAddress
(
"FF_Mass13"
,
&
FF_Mass13
);
TH2F
*
hGammaZr100
=
new
TH2F
(
"hGammaZr100"
,
"hGammaZr100"
,
20
,
0
,
20
,
1000
,
0
,
1000
);
TH2F
*
hGammaZr98
=
new
TH2F
(
"hGammaZr98"
,
"hGammaZr98"
,
20
,
0
,
20
,
1000
,
0
,
1000
);
TH2F
*
hGammaRu106
=
new
TH2F
(
"hGammaRu106"
,
"hGammaRu106"
,
20
,
0
,
20
,
1000
,
0
,
1000
);
TH2F
*
hGammaRu108
=
new
TH2F
(
"hGammaRu108"
,
"hGammaRu108"
,
20
,
0
,
20
,
1000
,
0
,
1000
);
//===========================================================================================================
// Event Loop
//===========================================================================================================
int
Nentries
=
chain
->
GetEntries
();
//int Nentries = 2000000;
auto
start
=
chrono
::
high_resolution_clock
::
now
();
for
(
int
e
=
0
;
e
<
Nentries
;
e
++
)
{
if
(
e
%
100000
==
0
&&
e
>
0
)
{
auto
now
=
chrono
::
high_resolution_clock
::
now
();
chrono
::
duration
<
double
>
elapsed
=
now
-
start
;
double
avgTimePerIteration
=
elapsed
.
count
()
/
e
;
double
timeLeft
=
avgTimePerIteration
*
(
Nentries
-
e
);
cout
<<
"********** Estimated time left: "
<<
int
(
timeLeft
)
<<
" seconds **********"
<<
"
\r
"
<<
flush
;
}
chain
->
GetEntry
(
e
);
auto
Zr100
=
(
abs
(
FF_Z
-
40
)
<
0
.
5
&&
abs
(
FF_Mass13
-
100
)
<
0
.
5
);
auto
Zr98
=
(
abs
(
FF_Z
-
40
)
<
0
.
5
&&
abs
(
FF_Mass13
-
98
)
<
0
.
5
);
auto
Ru106
=
(
abs
(
FF_Z
-
44
)
<
0
.
5
&&
abs
(
FF_Mass13
-
106
)
<
0
.
5
);
auto
Ru108
=
(
abs
(
FF_Z
-
44
)
<
0
.
5
&&
abs
(
FF_Mass13
-
108
)
<
0
.
5
);
if
(
Zr100
){
hGammaZr100
->
Fill
(
FPMW_Section
,
Exo_EDC_vamos
);
}
if
(
Zr98
)
{
hGammaZr98
->
Fill
(
FPMW_Section
,
Exo_EDC_vamos
);
}
if
(
Ru106
){
hGammaRu106
->
Fill
(
FPMW_Section
,
Exo_EDC_vamos
);
}
if
(
Ru108
){
hGammaRu108
->
Fill
(
FPMW_Section
,
Exo_EDC_vamos
);
}
}
//===========================================================================================================
// PLOT
//===========================================================================================================
gStyle
->
SetPalette
(
kRainBow
);
TCanvas
*
c
=
new
TCanvas
(
"c"
,
"c"
,
1000
,
1000
);
c
->
Divide
(
2
,
2
);
c
->
cd
(
1
);
hGammaZr100
->
GetXaxis
()
->
SetTitle
(
"MW section"
);
hGammaZr100
->
GetYaxis
()
->
SetTitle
(
"E gamma"
);
hGammaZr100
->
Draw
(
"colz"
);
c
->
cd
(
2
);
hGammaZr98
->
GetXaxis
()
->
SetTitle
(
"MW section"
);
hGammaZr98
->
GetYaxis
()
->
SetTitle
(
"E gamma"
);
hGammaZr98
->
Draw
(
"colz"
);
c
->
cd
(
3
);
hGammaRu108
->
GetXaxis
()
->
SetTitle
(
"MW section"
);
hGammaRu108
->
GetYaxis
()
->
SetTitle
(
"E gamma"
);
hGammaRu108
->
Draw
(
"colz"
);
c
->
cd
(
4
);
hGammaRu106
->
GetXaxis
()
->
SetTitle
(
"MW section"
);
hGammaRu106
->
GetYaxis
()
->
SetTitle
(
"E gamma"
);
hGammaRu106
->
Draw
(
"colz"
);
TFile
*
f
=
new
TFile
(
"Output/HistoGamma.root"
,
"recreate"
);
hGammaZr98
->
Write
();
hGammaRu106
->
Write
();
hGammaRu108
->
Write
();
hGammaZr100
->
Write
();
}
This diff is collapsed.
Click to expand it.
Projects/AlPhaPha/2024/macro/AoQ/VerifExo/Output/ReadMe.md
0 → 100644
+
2
−
0
View file @
93228dc6
# Output
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