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
05d78282
Commit
05d78282
authored
1 month ago
by
Theodore Efremov
Browse files
Options
Downloads
Patches
Plain Diff
[AlPhaPha] Optimized settings for cutauto
parent
4dfb2146
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#385645
canceled
1 month 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/AlPhaPha/2024/macro/Calibration/IC/Step4/CutAutoDEE.C
+8
-9
8 additions, 9 deletions
...cts/AlPhaPha/2024/macro/Calibration/IC/Step4/CutAutoDEE.C
with
8 additions
and
9 deletions
Projects/AlPhaPha/2024/macro/Calibration/IC/Step4/CutAutoDEE.C
+
8
−
9
View file @
05d78282
...
...
@@ -6,7 +6,7 @@
// Important variable
#define STEP 2; // Step to parse through the histogram in X
#define BINSIZE
2
5; // Size of the bin in X on which to projectY the plot
#define BINSIZE
1
5; // Size of the bin in X on which to projectY the plot
//Main
...
...
@@ -15,7 +15,6 @@ void CutAutoDEE(){
// Retrieve initial histogram
TFile
*
inFile
=
new
TFile
(
"Output/DE_E_merged.root"
,
"open"
);
TH2F
*
hDE_E
=
(
TH2F
*
)
inFile
->
Get
(
"DE_E"
);
// Inverse data to use tspectrum
for
(
int
xBin
=
1
;
xBin
<=
hDE_E
->
GetNbinsX
();
xBin
++
){
for
(
int
yBin
=
1
;
yBin
<=
hDE_E
->
GetNbinsY
();
yBin
++
){
...
...
@@ -33,8 +32,8 @@ void CutAutoDEE(){
// Tspectrum used to find the peak : If you have problem with peak finding
// adjust the setting in this function
// Step and Binsize are used in this function
Double_t
sigma
=
4
;
Double_t
threshold
=
0
.
0
5
;
Double_t
sigma
=
3
;
Double_t
threshold
=
0
.
0
03
;
PeakFinder
(
vPeakFinder
,
vPeaks
,
hDE_E
,
LinePos
,
sigma
,
threshold
);
...
...
@@ -119,9 +118,9 @@ void PeakFinder(vector<TSpectrum*> *sPeak , vector<int> *vPeak, TH2F *h, vector<
//Test
if
(
true
&&
iter
==
41
){
if
(
true
&&
iter
==
50
){
// Draw the histogram
TCanvas
*
c
=
new
TCanvas
(
Form
(
"c%d"
,
i
),
Form
(
"Histogram with
Peaks%d"
,
i
),
800
,
600
);
TCanvas
*
c
=
new
TCanvas
(
Form
(
"c%d"
,
i
),
Form
(
"Histogram with
E = %f"
,(
h
->
GetXaxis
()
->
GetBinCenter
(
i
))
),
800
,
600
);
projY
->
Draw
();
}
...
...
@@ -175,7 +174,7 @@ vector<TCutG*> PeakLinker(vector<vector<Double_t>> *LinePos){
// To do so adjust the bin STEP at the beginning of the code.
//Very important set
Double_t
Threshold
=
ThresholdX
+
3
0
;
Double_t
Threshold
=
ThresholdX
+
3
2
;
cout
<<
"Threshold X : "
<<
ThresholdX
<<
endl
;
cout
<<
"N of X "
<<
SetX
.
size
()
<<
endl
;
cout
<<
"Threshold "
<<
Threshold
<<
endl
;
...
...
@@ -244,8 +243,8 @@ vector<TCutG*> PeakLinker(vector<vector<Double_t>> *LinePos){
//===========================================================================================================
//This is a pretty sensitive variable
int
MinElem
=
SetX
.
size
()
/
4
-
30
;
//
cout << "Min Elem " << MinElem << endl ;
int
MinElem
=
SetX
.
size
()
/
6
;
cout
<<
"Min Elem "
<<
MinElem
<<
endl
;
set
<
int
>
SetIdTemp
(
vID
.
begin
()
,
vID
.
end
());
...
...
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