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
003e8f78
Commit
003e8f78
authored
5 months ago
by
Theodore Efremov
Browse files
Options
Downloads
Patches
Plain Diff
Test for de_e with p2p
parent
b7c9ccec
No related branches found
No related tags found
1 merge request
!27
Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline
#364247
passed
5 months 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/chio/CalibrationChio/ICCorr.C
+8
-11
8 additions, 11 deletions
Projects/AlPhaPha/2024/macro/chio/CalibrationChio/ICCorr.C
Projects/AlPhaPha/2024/macro/chio/CalibrationChio/SplineChioP2P.C
+8
-8
8 additions, 8 deletions
.../AlPhaPha/2024/macro/chio/CalibrationChio/SplineChioP2P.C
with
16 additions
and
19 deletions
Projects/AlPhaPha/2024/macro/chio/CalibrationChio/ICCorr.C
+
8
−
11
View file @
003e8f78
...
@@ -44,7 +44,7 @@ void ICCorr() {
...
@@ -44,7 +44,7 @@ void ICCorr() {
// Filling the input histo
// Filling the input histo
int
NSegment
=
11
;
int
NSegment
=
5
;
vector
<
TH2F
*>
hICseg_ICprev
,
hICX
,
hICY
,
hICseg_ICprevX
,
hICseg_ICprevY
,
hICcorr
;
vector
<
TH2F
*>
hICseg_ICprev
,
hICX
,
hICY
,
hICseg_ICprevX
,
hICseg_ICprevY
,
hICcorr
;
for
(
int
seg
=
0
;
seg
<
NSegment
;
seg
++
){
for
(
int
seg
=
0
;
seg
<
NSegment
;
seg
++
){
...
@@ -84,10 +84,9 @@ void ICCorr() {
...
@@ -84,10 +84,9 @@ void ICCorr() {
for
(
int
i
=
0
;
i
<
SplineCount
;
i
++
)
{
for
(
int
i
=
0
;
i
<
SplineCount
;
i
++
)
{
int
seg
=
int
((
i
-
2
)
/
2
+
1
);
int
seg
=
int
((
i
-
2
)
/
2
+
1
);
cout
<<
" i "
<<
i
<<
" seg "
<<
seg
<<
endl
;
if
(
i
<
2
){
if
(
i
<
2
){
spline_X
.
at
(
0
)
=
(
TSpline3
*
)
fSpline
->
Get
(
"fspline_IC1_IC0_X"
);
spline_X
.
at
(
0
)
=
(
TSpline3
*
)
fSpline
->
Get
(
"fspline_IC1/IC0_X"
);
spline_Y
.
at
(
0
)
=
(
TSpline3
*
)
fSpline
->
Get
(
"fspline_IC1_IC0_Y"
);
spline_Y
.
at
(
0
)
=
(
TSpline3
*
)
fSpline
->
Get
(
"fspline_IC1/IC0_Y"
);
}
}
else
if
(
i
>=
2
&&
i
<
4
){
else
if
(
i
>=
2
&&
i
<
4
){
...
@@ -95,13 +94,12 @@ void ICCorr() {
...
@@ -95,13 +94,12 @@ void ICCorr() {
spline_Y
.
at
(
1
)
=
(
TSpline3
*
)
fSpline
->
Get
(
"fsplineIC1_Y"
);
spline_Y
.
at
(
1
)
=
(
TSpline3
*
)
fSpline
->
Get
(
"fsplineIC1_Y"
);
}
}
else
if
(
seg
>=
2
&&
(
i
%
2
==
0
)
)
{
else
if
(
seg
>=
2
&&
(
i
%
2
==
0
)
)
{
spline_X
.
at
(
seg
)
=
(
TSpline3
*
)
fSpline
->
Get
(
Form
(
"fspline_IC%d
/
IC%d_X"
,
seg
,
seg
-
1
));
spline_X
.
at
(
seg
)
=
(
TSpline3
*
)
fSpline
->
Get
(
Form
(
"fspline_IC%d
_
IC%d_X"
,
seg
,
seg
-
1
));
}
}
else
if
(
seg
>=
2
&&
!
(
i
%
2
==
0
)
)
{
else
if
(
seg
>=
2
&&
!
(
i
%
2
==
0
)
)
{
spline_Y
.
at
(
seg
)
=
(
TSpline3
*
)
fSpline
->
Get
(
Form
(
"fspline_IC%d
/
IC%d_Y"
,
seg
,
seg
-
1
));
spline_Y
.
at
(
seg
)
=
(
TSpline3
*
)
fSpline
->
Get
(
Form
(
"fspline_IC%d
_
IC%d_Y"
,
seg
,
seg
-
1
));
}
}
}
//End loop on histogram
}
//End loop on histogram
cout
<<
spline_Y
[
0
]
->
Eval
(
3
)
<<
endl
;
//===========================================================================================================
//===========================================================================================================
// get fit
// get fit
//===========================================================================================================
//===========================================================================================================
...
@@ -128,7 +126,7 @@ void ICCorr() {
...
@@ -128,7 +126,7 @@ void ICCorr() {
chain
->
GetEntry
(
e
);
chain
->
GetEntry
(
e
);
vector
<
double
>
ICcorr_Y
(
11
),
ICcorr_X
(
11
);
// the [0] element of spline is the
vector
<
double
>
ICcorr_Y
(
5
),
ICcorr_X
(
11
);
// the [0] element of spline is the
// correction on the first
// correction on the first
// segment of ic
// segment of ic
for
(
int
seg
=
0
;
seg
<
ICcorr_Y
.
size
()
;
seg
++
)
{
for
(
int
seg
=
0
;
seg
<
ICcorr_Y
.
size
()
;
seg
++
)
{
...
@@ -142,7 +140,6 @@ void ICCorr() {
...
@@ -142,7 +140,6 @@ void ICCorr() {
//cout << ICcorr_Y.at(0) << " " << IC->fIC_raw[0]<< endl;
//cout << ICcorr_Y.at(0) << " " << IC->fIC_raw[0]<< endl;
}
}
else
if
(
seg
>
1
)
{
else
if
(
seg
>
1
)
{
cout
<<
"bug "
<<
seg
<<
endl
;
double
temp
=
IC
->
fIC_raw
[
seg
]
/
ICcorr_Y
.
at
(
seg
-
1
)
*
spline_Y
.
at
(
seg
)
->
Eval
(
0
)
/
spline_Y
.
at
(
seg
)
->
Eval
(
FF_IC_Y
);
double
temp
=
IC
->
fIC_raw
[
seg
]
/
ICcorr_Y
.
at
(
seg
-
1
)
*
spline_Y
.
at
(
seg
)
->
Eval
(
0
)
/
spline_Y
.
at
(
seg
)
->
Eval
(
FF_IC_Y
);
ICcorr_Y
.
at
(
seg
)
=
ICcorr_Y
.
at
(
seg
-
1
)
*
temp
;
ICcorr_Y
.
at
(
seg
)
=
ICcorr_Y
.
at
(
seg
-
1
)
*
temp
;
}
}
...
@@ -159,7 +156,7 @@ void ICCorr() {
...
@@ -159,7 +156,7 @@ void ICCorr() {
for
(
int
seg
=
0
;
seg
<
sizeof
(
IC
->
fIC_raw
)
/
sizeof
(
IC
->
fIC_raw
[
0
])
;
seg
++
){
for
(
int
seg
=
0
;
seg
<
sizeof
(
IC
->
fIC_raw
)
/
sizeof
(
IC
->
fIC_raw
[
0
])
;
seg
++
){
if
(
seg
>
4
){
if
(
seg
>
4
){
E
+=
IC
->
fIC_raw
[
seg
]
;
E
+=
IC
->
fIC_raw
[
seg
]
;
Ecorr
+=
ICcorr_Y
.
at
(
seg
)
;
//
Ecorr += ICcorr_Y.at(seg) ;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Projects/AlPhaPha/2024/macro/chio/CalibrationChio/SplineChioP2P.C
+
8
−
8
View file @
003e8f78
...
@@ -70,14 +70,14 @@ void SplineChioP2P() {
...
@@ -70,14 +70,14 @@ void SplineChioP2P() {
// X Spline
// X Spline
SplineICurrent
.
push_back
(
MakeSpline
(
hIC
[
seg
][
0
]
,
NCallSpline
,
XMin
[
2
]
,
XMax
[
2
],
YMin
[
2
],
YMax
[
2
]));
SplineICurrent
.
push_back
(
MakeSpline
(
hIC
[
seg
][
0
]
,
NCallSpline
,
XMin
[
2
]
,
XMax
[
2
],
YMin
[
2
],
YMax
[
2
]));
if
(
seg
==
0
)
SplineICurrent
.
at
(
0
)
->
SetName
(
Form
(
"fspline_IC%d
/
IC%d_X"
,
seg
+
1
,
seg
));
if
(
seg
==
0
)
SplineICurrent
.
at
(
0
)
->
SetName
(
Form
(
"fspline_IC%d
_
IC%d_X"
,
seg
+
1
,
seg
));
else
if
(
seg
!=
0
)
SplineICurrent
.
at
(
0
)
->
SetName
(
Form
(
"fspline_IC%d
/
IC%d_X"
,
seg
,
seg
-
1
));
else
if
(
seg
!=
0
)
SplineICurrent
.
at
(
0
)
->
SetName
(
Form
(
"fspline_IC%d
_
IC%d_X"
,
seg
,
seg
-
1
));
NCallSpline
+=
1
;
NCallSpline
+=
1
;
// Y Spline
// Y Spline
SplineICurrent
.
push_back
(
MakeSpline
(
hIC
[
seg
][
1
]
,
NCallSpline
,
XMin
[
3
]
,
XMax
[
3
],
YMin
[
3
],
YMax
[
3
]));
SplineICurrent
.
push_back
(
MakeSpline
(
hIC
[
seg
][
1
]
,
NCallSpline
,
XMin
[
3
]
,
XMax
[
3
],
YMin
[
3
],
YMax
[
3
]));
if
(
seg
==
0
)
SplineICurrent
.
at
(
1
)
->
SetName
(
Form
(
"fspline_IC%d
/
IC%d_Y"
,
seg
+
1
,
seg
));
if
(
seg
==
0
)
SplineICurrent
.
at
(
1
)
->
SetName
(
Form
(
"fspline_IC%d
_
IC%d_Y"
,
seg
+
1
,
seg
));
else
if
(
seg
!=
0
)
SplineICurrent
.
at
(
1
)
->
SetName
(
Form
(
"fspline_IC%d
/
IC%d_Y"
,
seg
,
seg
-
1
));
else
if
(
seg
!=
0
)
SplineICurrent
.
at
(
1
)
->
SetName
(
Form
(
"fspline_IC%d
_
IC%d_Y"
,
seg
,
seg
-
1
));
NCallSpline
+=
1
;
NCallSpline
+=
1
;
//push vector into memory
//push vector into memory
...
@@ -177,8 +177,8 @@ vector<TH2F*> HistoFillerIC(int segment, vector<vector<TSpline3*>> Spline_All_IC
...
@@ -177,8 +177,8 @@ vector<TH2F*> HistoFillerIC(int segment, vector<vector<TSpline3*>> Spline_All_IC
// Beginning loop on entries
// Beginning loop on entries
//===========================================================================================================
//===========================================================================================================
//
int Nentries = chain->GetEntries();
int
Nentries
=
chain
->
GetEntries
();
int
Nentries
=
100000
;
//
int Nentries = 100000;
auto
start
=
std
::
chrono
::
high_resolution_clock
::
now
();
auto
start
=
std
::
chrono
::
high_resolution_clock
::
now
();
for
(
int
e
=
0
;
e
<
Nentries
;
e
++
)
{
for
(
int
e
=
0
;
e
<
Nentries
;
e
++
)
{
...
@@ -318,8 +318,8 @@ vector<vector<TH2F*>>HistoFillerICcorr(int segment, vector<vector<TSpline3*>> Sp
...
@@ -318,8 +318,8 @@ vector<vector<TH2F*>>HistoFillerICcorr(int segment, vector<vector<TSpline3*>> Sp
// Beginning loop on entries
// Beginning loop on entries
//===========================================================================================================
//===========================================================================================================
//
int Nentries = chain->GetEntries();
int
Nentries
=
chain
->
GetEntries
();
int
Nentries
=
100000
;
//
int Nentries = 100000;
auto
start
=
std
::
chrono
::
high_resolution_clock
::
now
();
auto
start
=
std
::
chrono
::
high_resolution_clock
::
now
();
for
(
int
e
=
0
;
e
<
Nentries
;
e
++
)
{
for
(
int
e
=
0
;
e
<
Nentries
;
e
++
)
{
...
...
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