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
0c68d195
Commit
0c68d195
authored
4 years ago
by
gypaos
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug with pdf name; fix LM ordering in fit
parent
71c54ac8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#101819
passed
4 years ago
Stage: build-NPLib
Stage: build-NPSimulation
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Projects/ComptonTelescope/online/Calibration_DSSSD/Analyse207Bi.C
+15
-4
15 additions, 4 deletions
.../ComptonTelescope/online/Calibration_DSSSD/Analyse207Bi.C
with
15 additions
and
4 deletions
Projects/ComptonTelescope/online/Calibration_DSSSD/Analyse207Bi.C
+
15
−
4
View file @
0c68d195
///////////////////////////////////////////////////////////////////////////////
// This macro calibrates DSSSD with a 207Bi source.
//
// This macro calibrates DSSSD
s
with a 207Bi source. //
// //
// It treats either all ASIC channels (channel = -1) or a single one //
// (specify channel number). A boolean (isPside) should indicate whether the //
...
...
@@ -58,7 +58,7 @@ Double_t gaussianPeak(Double_t*, Double_t*);
void
Analyse207Bi
(
const
char
*
name
=
"bb7_3309-7_bi207_20210126_13h09_run5_conv_RawDSSSDHistos.root"
,
Bool_t
isPside
=
1
,
Int_t
channel
=
15
)
Bool_t
isPside
=
1
,
Int_t
channel
=
20
)
{
// no statistical box, no histogram name, no fit info
if
(
gStyle
->
GetOptStat
())
gStyle
->
SetOptStat
(
0
);
...
...
@@ -93,6 +93,7 @@ void Analyse207Bi(const char* name = "bb7_3309-7_bi207_20210126_13h09_run5_conv_
cout
<<
"sname = "
<<
sname
<<
endl
;
label
+=
sname
.
substr
(
16
,
20
);
cout
<<
"label = "
<<
label
<<
endl
;
label
+=
(
isPside
)
?
"_pside"
:
"_nside"
;
TString
pdfname
=
Form
(
"Analyse207Bi_%s.pdf"
,
label
.
c_str
());
can
->
Print
(
Form
(
"%s["
,
pdfname
.
Data
()));
...
...
@@ -239,6 +240,7 @@ void Analyse207Bi(const char* name = "bb7_3309-7_bi207_20210126_13h09_run5_conv_
// loop on "480"- and "975"-keV features
// p = 0 -> 480 keV
// p = 1 -> 975 keV
Double_t
sigma480
=
0
;
for
(
UInt_t
p
=
0
;
p
<
mainLineEnergy
.
size
();
++
p
)
{
can
->
cd
(
3
+
p
);
pad
=
(
TPad
*
)
can
->
FindObject
(
Form
(
"can_%d"
,
3
+
p
));
...
...
@@ -290,11 +292,17 @@ void Analyse207Bi(const char* name = "bb7_3309-7_bi207_20210126_13h09_run5_conv_
// positive amplitudes and position in range
for
(
UInt_t
i
=
0
;
i
<
peakListForFit
.
size
();
++
i
)
{
fit
->
SetParLimits
(
1
+
2
*
i
,
fit
->
GetParameter
(
1
+
2
*
i
)
-
20
,
fit
->
GetParameter
(
1
+
2
*
i
)
+
20
);
// +/- 10 channels prevents L and M inversion
fit
->
SetParLimits
(
1
+
2
*
i
,
fit
->
GetParameter
(
1
+
2
*
i
)
-
10
,
fit
->
GetParameter
(
1
+
2
*
i
)
+
10
);
fit
->
SetParLimits
(
2
+
2
*
i
,
0
,
1e5
);
}
// width of 975 keV line within 20% of 480 keV line
if
(
p
==
1
)
{
fit
->
SetParLimits
(
0
,
sigma480
/
1
.
1
,
sigma480
*
1
.
1
);
}
// fit spectrum
h
->
Fit
(
"fit"
,
"RBQ0"
);
// h->Fit("fit", "RB0");
...
...
@@ -317,6 +325,9 @@ void Analyse207Bi(const char* name = "bb7_3309-7_bi207_20210126_13h09_run5_conv_
signalFcn
->
DrawCopy
(
"same"
);
}
// get resolution for the 480 keV line
sigma480
=
param
[
2
];
///////////////////////////////////////////////////////////////////////////
// fill calibration arrays
// K-transition
...
...
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