Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
IPNL_GAMMA
gammaware
Commits
effda121
Commit
effda121
authored
Apr 09, 2020
by
Jérémie Dudouet
Browse files
Merge branch 'Cubix' into 'Cubix'
Cubix See merge request
!55
parents
1dea6485
c5adeae7
Pipeline
#65313
passed with stage
in 6 minutes and 7 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
7 deletions
+16
-7
src/root/gui/cubix/src/CXArrow.cpp
src/root/gui/cubix/src/CXArrow.cpp
+6
-2
src/root/gui/cubix/src/CXArrow.h
src/root/gui/cubix/src/CXArrow.h
+1
-1
src/root/gui/cubix/src/CXFit.cpp
src/root/gui/cubix/src/CXFit.cpp
+1
-1
src/root/gui/cubix/src/CXHist1DPlayer.cpp
src/root/gui/cubix/src/CXHist1DPlayer.cpp
+7
-3
src/root/gui/cubix/src/CXHist1DPlayer.h
src/root/gui/cubix/src/CXHist1DPlayer.h
+1
-0
No files found.
src/root/gui/cubix/src/CXArrow.cpp
View file @
effda121
...
...
@@ -4,12 +4,14 @@
#include "TBox.h"
#include "TH1.h"
#include "TVirtualPad.h"
#include "TFrame.h"
#include "CXFit.h"
CXArrow
::
CXArrow
(
CXFit
*
fit
,
Double_t
E
,
Double_t
y1
,
Double_t
y2
,
Float_t
arrowsize
,
Option_t
*
option
)
:
TArrow
(
E
,
y1
,
E
,
y2
,
arrowsize
,
option
)
CXArrow
::
CXArrow
(
CXFit
*
fit
,
Double_t
E
,
Double_t
y1
,
Double_t
y2
,
Float_t
arrowsize
,
Float_t
textsize
,
Option_t
*
option
)
:
TArrow
(
E
,
y1
,
E
,
y2
,
arrowsize
,
option
)
{
fFit
=
fit
;
fTextSize
=
textsize
;
}
void
CXArrow
::
SetEnergy
(
Float_t
E
)
...
...
@@ -69,12 +71,14 @@ void CXArrow::SetText(TH1 *hist, const TString &text, const TString &tooltip)
fBox
->
SetLineColor
(
0
);
fBox
->
SetLineStyle
(
3
);
Double_t
height
=
gPad
->
GetFrame
()
->
GetY2
()
-
gPad
->
GetFrame
()
->
GetY1
();
delete
fLatex
;
fLatex
=
new
TLatex
(
fX1
,
fY2
,
text
);
fLatex
=
new
TLatex
(
fX1
,
fY2
+
fArrowSize
*
height
,
text
);
fLatex
->
SetTextAngle
(
90
);
fLatex
->
SetTextFont
(
132
);
fLatex
->
SetTextSize
(
fTextSize
);
fLatex
->
SetTextColor
(
hist
->
GetLineColor
());
fLatex
->
SetTextAlign
(
12
);
fLatex
->
SetBit
(
TObject
::
kCannotPick
);
fLatex
->
Draw
();
...
...
src/root/gui/cubix/src/CXArrow.h
View file @
effda121
...
...
@@ -27,7 +27,7 @@ private:
public:
CXArrow
(
CXFit
*
fit
,
Double_t
E
,
Double_t
y1
,
Double_t
y2
,
Float_t
arrowsize
=
0.05
,
Option_t
*
option
=
">"
);
CXArrow
(
CXFit
*
fit
,
Double_t
E
,
Double_t
y1
,
Double_t
y2
,
Float_t
arrowsize
=
0.05
,
Float_t
textsize
=
0.03
,
Option_t
*
option
=
">"
);
~
CXArrow
()
=
default
;
CXFit
*
GetFit
(){
return
fFit
;}
...
...
src/root/gui/cubix/src/CXFit.cpp
View file @
effda121
...
...
@@ -62,7 +62,7 @@ void CXFit::AddArrow(Double_t Energy)
Energy
=
fHistogram
->
GetBinCenter
(
Bin
);
Double_t
MaxGlob
=
fHistogram
->
GetMaximum
();
auto
*
arrow
=
new
CXArrow
(
this
,
Energy
,(
Value
+
MaxGlob
/
100.
)
,(
Value
+
MaxGlob
/
15.
),
0.01
,
"<|"
);
auto
*
arrow
=
new
CXArrow
(
this
,
Energy
,(
Value
+
MaxGlob
/
100.
)
,(
Value
+
MaxGlob
/
15.
),
0.01
,
0.03
,
"<|"
);
arrow
->
SetAngle
(
30
);
arrow
->
SetLineWidth
(
2
);
arrow
->
Draw
();
...
...
src/root/gui/cubix/src/CXHist1DPlayer.cpp
View file @
effda121
...
...
@@ -35,14 +35,18 @@ CXHist1DPlayer::CXHist1DPlayer(const TGCompositeFrame *MotherFrame, UInt_t w, UI
TGCompositeFrame
*
fHorizontalFrame
=
new
TGCompositeFrame
(
fGroupFrame
,
60
,
20
,
kHorizontalFrame
);
fHorizontalFrame
->
AddFrame
(
new
TGLabel
(
fHorizontalFrame
,
"Sigma"
),
new
TGLayoutHints
(
kLHintsCenterY
|
kLHintsLeft
,
5
,
2
0
,
0
,
0
));
fHorizontalFrame
->
AddFrame
(
new
TGLabel
(
fHorizontalFrame
,
"Sigma"
),
new
TGLayoutHints
(
kLHintsCenterY
|
kLHintsLeft
,
5
,
1
0
,
0
,
0
));
fSigmaSPEntry
=
new
TGNumberEntry
(
fHorizontalFrame
,
2
,
3
,
0
,
TGNumberFormat
::
kNESReal
,
TGNumberFormat
::
kNEANonNegative
,
TGNumberFormat
::
kNELNoLimits
);
fHorizontalFrame
->
AddFrame
(
fSigmaSPEntry
,
new
TGLayoutHints
(
kLHintsCenterY
|
kLHintsLeft
|
kLHintsExpandX
,
1
,
3
,
0
,
0
));
fHorizontalFrame
->
AddFrame
(
new
TGLabel
(
fHorizontalFrame
,
"Threshold"
),
new
TGLayoutHints
(
kLHintsCenterY
|
kLHintsLeft
,
2
0
,
5
,
0
,
0
));
fHorizontalFrame
->
AddFrame
(
new
TGLabel
(
fHorizontalFrame
,
"Threshold"
),
new
TGLayoutHints
(
kLHintsCenterY
|
kLHintsLeft
,
1
0
,
5
,
0
,
0
));
fThresholdSPEntry
=
new
TGNumberEntry
(
fHorizontalFrame
,
0.05
,
4
,
0
,
TGNumberFormat
::
kNESReal
,
TGNumberFormat
::
kNEANonNegative
,
TGNumberFormat
::
kNELLimitMinMax
,
0.001
,
0.999
);
fHorizontalFrame
->
AddFrame
(
fThresholdSPEntry
,
new
TGLayoutHints
(
kLHintsCenterY
|
kLHintsLeft
|
kLHintsExpandX
,
1
,
3
,
0
,
0
));
fHorizontalFrame
->
AddFrame
(
new
TGLabel
(
fHorizontalFrame
,
"Size"
),
new
TGLayoutHints
(
kLHintsCenterY
|
kLHintsLeft
,
10
,
5
,
0
,
0
));
fTextSize
=
new
TGNumberEntry
(
fHorizontalFrame
,
0.03
,
4
,
0
,
TGNumberFormat
::
kNESRealTwo
,
TGNumberFormat
::
kNEANonNegative
,
TGNumberFormat
::
kNELLimitMinMax
,
0.01
,
0.1
);
fHorizontalFrame
->
AddFrame
(
fTextSize
,
new
TGLayoutHints
(
kLHintsCenterY
|
kLHintsLeft
|
kLHintsExpandX
,
1
,
3
,
0
,
0
));
fGroupFrame
->
AddFrame
(
fHorizontalFrame
,
new
TGLayoutHints
(
kLHintsTop
|
kLHintsLeft
|
kLHintsExpandX
,
-
10
,
-
10
,
5
,
0
));
fHorizontalFrame
=
new
TGCompositeFrame
(
fGroupFrame
,
60
,
20
,
kHorizontalFrame
);
...
...
@@ -316,7 +320,7 @@ void CXHist1DPlayer::PeakSearch()
if
(
found
)
continue
;
CXArrow
*
GammaArrow
=
new
CXArrow
(
nullptr
,
Energy
,(
Value
+
MaxGlob
/
100.
)
,(
Value
+
MaxGlob
/
15.
),
0.01
,
"<|"
);
CXArrow
*
GammaArrow
=
new
CXArrow
(
nullptr
,
Energy
,(
Value
+
MaxGlob
/
100.
)
,(
Value
+
MaxGlob
/
15.
),
0.01
,
fTextSize
->
GetNumber
(),
"<|"
);
GammaArrow
->
SetAngle
(
40
);
GammaArrow
->
SetLineColor
(
fCurrentHist
->
GetLineColor
());
...
...
src/root/gui/cubix/src/CXHist1DPlayer.h
View file @
effda121
...
...
@@ -44,6 +44,7 @@ private:
TGNumberEntry
*
fSigmaSPEntry
=
nullptr
;
TGNumberEntry
*
fThresholdSPEntry
=
nullptr
;
TGNumberEntry
*
fTextSize
=
nullptr
;
TGComboBox
*
fMinimizer
=
nullptr
;
TGComboBox
*
fAlgorithm
=
nullptr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment