Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit effda121 authored by Jérémie Dudouet's avatar 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
...@@ -4,12 +4,14 @@ ...@@ -4,12 +4,14 @@
#include "TBox.h" #include "TBox.h"
#include "TH1.h" #include "TH1.h"
#include "TVirtualPad.h" #include "TVirtualPad.h"
#include "TFrame.h"
#include "CXFit.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; fFit = fit;
fTextSize = textsize;
} }
void CXArrow::SetEnergy(Float_t E) void CXArrow::SetEnergy(Float_t E)
...@@ -69,12 +71,14 @@ void CXArrow::SetText(TH1 *hist, const TString &text, const TString &tooltip) ...@@ -69,12 +71,14 @@ void CXArrow::SetText(TH1 *hist, const TString &text, const TString &tooltip)
fBox->SetLineColor(0); fBox->SetLineColor(0);
fBox->SetLineStyle(3); fBox->SetLineStyle(3);
Double_t height = gPad->GetFrame()->GetY2() - gPad->GetFrame()->GetY1();
delete fLatex; delete fLatex;
fLatex = new TLatex(fX1,fY2,text); fLatex = new TLatex(fX1,fY2+fArrowSize*height,text);
fLatex->SetTextAngle(90); fLatex->SetTextAngle(90);
fLatex->SetTextFont(132); fLatex->SetTextFont(132);
fLatex->SetTextSize(fTextSize); fLatex->SetTextSize(fTextSize);
fLatex->SetTextColor(hist->GetLineColor()); fLatex->SetTextColor(hist->GetLineColor());
fLatex->SetTextAlign(12);
fLatex->SetBit(TObject::kCannotPick); fLatex->SetBit(TObject::kCannotPick);
fLatex->Draw(); fLatex->Draw();
......
...@@ -27,7 +27,7 @@ private: ...@@ -27,7 +27,7 @@ private:
public: 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; ~CXArrow() = default;
CXFit *GetFit(){return fFit;} CXFit *GetFit(){return fFit;}
......
...@@ -62,7 +62,7 @@ void CXFit::AddArrow(Double_t Energy) ...@@ -62,7 +62,7 @@ void CXFit::AddArrow(Double_t Energy)
Energy = fHistogram->GetBinCenter(Bin); Energy = fHistogram->GetBinCenter(Bin);
Double_t MaxGlob = fHistogram->GetMaximum(); 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->SetAngle(30);
arrow->SetLineWidth(2); arrow->SetLineWidth(2);
arrow->Draw(); arrow->Draw();
......
...@@ -35,14 +35,18 @@ CXHist1DPlayer::CXHist1DPlayer(const TGCompositeFrame *MotherFrame, UInt_t w, UI ...@@ -35,14 +35,18 @@ CXHist1DPlayer::CXHist1DPlayer(const TGCompositeFrame *MotherFrame, UInt_t w, UI
TGCompositeFrame *fHorizontalFrame = new TGCompositeFrame(fGroupFrame, 60, 20, kHorizontalFrame); TGCompositeFrame *fHorizontalFrame = new TGCompositeFrame(fGroupFrame, 60, 20, kHorizontalFrame);
fHorizontalFrame->AddFrame(new TGLabel(fHorizontalFrame, "Sigma"), new TGLayoutHints(kLHintsCenterY | kLHintsLeft,5,20,0,0)); fHorizontalFrame->AddFrame(new TGLabel(fHorizontalFrame, "Sigma"), new TGLayoutHints(kLHintsCenterY | kLHintsLeft,5,10,0,0));
fSigmaSPEntry = new TGNumberEntry(fHorizontalFrame, 2, 3, 0, TGNumberFormat::kNESReal, TGNumberFormat::kNEANonNegative ,TGNumberFormat::kNELNoLimits); 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(fSigmaSPEntry,new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX ,1,3,0,0));
fHorizontalFrame->AddFrame(new TGLabel(fHorizontalFrame, "Threshold"), new TGLayoutHints(kLHintsCenterY | kLHintsLeft,20,5,0,0)); fHorizontalFrame->AddFrame(new TGLabel(fHorizontalFrame, "Threshold"), new TGLayoutHints(kLHintsCenterY | kLHintsLeft,10,5,0,0));
fThresholdSPEntry = new TGNumberEntry(fHorizontalFrame, 0.05, 4, 0, TGNumberFormat::kNESReal, TGNumberFormat::kNEANonNegative ,TGNumberFormat::kNELLimitMinMax,0.001,0.999); 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(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)); fGroupFrame->AddFrame(fHorizontalFrame,new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX,-10,-10,5,0));
fHorizontalFrame = new TGCompositeFrame(fGroupFrame, 60, 20, kHorizontalFrame); fHorizontalFrame = new TGCompositeFrame(fGroupFrame, 60, 20, kHorizontalFrame);
...@@ -316,7 +320,7 @@ void CXHist1DPlayer::PeakSearch() ...@@ -316,7 +320,7 @@ void CXHist1DPlayer::PeakSearch()
if(found) continue; 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->SetAngle(40);
GammaArrow->SetLineColor(fCurrentHist->GetLineColor()); GammaArrow->SetLineColor(fCurrentHist->GetLineColor());
......
...@@ -44,6 +44,7 @@ private: ...@@ -44,6 +44,7 @@ private:
TGNumberEntry *fSigmaSPEntry = nullptr; TGNumberEntry *fSigmaSPEntry = nullptr;
TGNumberEntry *fThresholdSPEntry = nullptr; TGNumberEntry *fThresholdSPEntry = nullptr;
TGNumberEntry *fTextSize = nullptr;
TGComboBox *fMinimizer = nullptr; TGComboBox *fMinimizer = nullptr;
TGComboBox *fAlgorithm = nullptr; TGComboBox *fAlgorithm = nullptr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment