6#include "KVIDGridManager.h"
20#include "KVNuclearChart.h"
21#include "KVHistoManipulator.h"
54 fUserParameter = (fZp > 0);
59 fSfx = fHisto->GetNbinsX() * 1. / (fHisto->GetXaxis()->GetXmax());
60 fSfy = fHisto->GetNbinsY() * 1 / (fHisto->GetYaxis()->GetXmax());
65 fMain->Connect(
"CloseWindow()",
"KVSpIdGUI",
this,
"DoClose()");
66 fMain->DontCallClose();
76 fZpLabel =
new TGLabel(fZpFrame,
"Z ");
79 fZpEntry->SetState(
kTRUE);
84 fSpiderFactorLabel =
new TGLabel(fZpFrame,
"Parameter ");
85 fSpiderFactorEntry =
new TGNumberEntry(fZpFrame, fSpFactor, 6, 0,
88 fSpiderFactorRadio->Connect(
"Toggled(Bool_t)",
"KVSpIdGUI",
this,
"SetUserParameter(Bool_t)");
90 SetUserParameter(fUserParameter);
102 fTypeLabel =
new TGLabel(fTypeFrame,
"Grid ");
105 fTypeChoice->AddEntry(
"Si-CsI", 0);
106 fTypeChoice->AddEntry(
"Si-Si", 1);
107 fTypeChoice->AddEntry(
"ChIo-Si", 2);
108 fTypeChoice->AddEntry(
"Other", 3);
109 fTypeChoice->Resize(80, 22);
110 fTypeChoice->Select(fMatrixType);
116 fNPointsLabel =
new TGLabel(fTypeFrame,
"Np : ");
117 fNPointsEntry =
new TGNumberEntry(fTypeFrame, fNPoints, 4, 0,
123 fPiedLabel =
new TGLabel(fTypeFrame,
" Piedestal ");
126 fPiedChoice->AddEntry(
"User", 0);
127 fPiedChoice->AddEntry(
"Auto", 1);
128 fPiedChoice->AddEntry(
"None", 2);
129 fPiedChoice ->Resize(80, 22);
130 fPiedChoice->Select(fPiedType);
140 fDebugBut->Connect(
"Toggled(Bool_t)",
"KVSpIdGUI",
this,
"SetDebug(Bool_t)");
144 fCutBut->Connect(
"Toggled(Bool_t)",
"KVSpIdGUI",
this,
"SetUseCut(Bool_t)");
152 fAdOptFrame =
new TGGroupFrame(fMain,
"Advanced options");
155 fAngleUpLabel =
new TGLabel(fAngleUpFrame,
"Angles : above");
156 fAngleUpEntry =
new TGNumberEntry(fAngleUpFrame, fAnglesUp, 4, 0,
162 fAngleDownLabel =
new TGLabel(fAngleUpFrame,
" below");
163 fAngleDownEntry =
new TGNumberEntry(fAngleUpFrame, fAnglesDown, 4, 0,
169 fApertureLabel =
new TGLabel(fAngleUpFrame,
" alpha");
170 fApertureUpEntry =
new TGNumberEntry(fAngleUpFrame, fAlpha, 4, 0,
180 fProgressBar->ShowPosition();
181 fProgressBar->SetBarColor(
"red");
185 fTestButton =
new TGTextButton(fButtonsFrame,
"&Spider");
186 fTestButton->Connect(
"Clicked()",
"KVSpIdGUI",
this,
187 "SpiderIdentification()");
188 fCloseButton =
new TGTextButton(fButtonsFrame,
"&Close");
189 fCloseButton->Connect(
"Clicked()",
"KVSpIdGUI",
this,
192 fButtonsFrame->AddFrame(fTestButton,
196 fButtonsFrame->AddFrame(fCloseButton,
209 fMain->MapSubwindows();
210 fMain->Resize(fMain->GetDefaultSize());
213 fMain->CenterOnParent();
215 fMain->SetWindowName(
"Spider Identification");
383 if ((spline->
GetN() > 10)) {
406 double stepmax = 5.*step;
410 if (step < stepmax) step *= 1.2;
416 if (spline->
GetZ() >= zmax) zmax = spline->
GetZ();
419 Info(
"SpiderIdentification",
"Z = %d has been rejected (too few points)", spline->
GetZ());
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t g
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
char * Form(const char *fmt,...)
Toolkit for various operations on histograms & graphs not provided by ROOT.
TH1 * ScaleHisto(TH1 *hh, TF1 *fx, TF1 *fy=NULL, Int_t nx=-1, Int_t ny=-1, Double_t xmin=-1., Double_t xmax=-1., Double_t ymin=-1., Double_t ymax=-1., Option_t *norm="")
Base class for particle identification in a 2D map.
void Add(TString, KVIDentifier *)
void Scale(Double_t sx=-1, Double_t sy=-1)
Called by SetX/YScaleFactor methods to rescale every point of every object in the grid.
void Draw(Option_t *opt="")
virtual Bool_t IsIdentifiable(Double_t, Double_t, TString *rejected_by=nullptr) const
TVirtualPad * GetPad() const
const KVList * GetCuts() const
virtual void Clear(Option_t *opt="")
Identification grid with lines corresponding to different nuclear isotopes (KVIDZALine)
Base class for identification ridge lines corresponding to different nuclear species.
virtual void SetZ(Int_t ztnum)
static Double_t fSpFactor
virtual ~KVSpIdGUI()
Delete all widgets.
TGNumberEntry * fSpiderFactorEntry
void SpiderIdentification()
TGNumberEntry * fNPointsEntry
TGTextButton * fCloseButton
TGNumberEntry * fAngleDownEntry
TGNumberEntry * fApertureUpEntry
TGHProgressBar * fProgressBar
Progress Bar and buttons.
void SetUserParameter(Bool_t par)
TGTextButton * fTestButton
TGNumberEntry * fAngleUpEntry
TGCheckButton * fSpiderFactorRadio
KVSpIdGUI(KVIDGraph *g=0, TH2 *data_histo=0, Double_t xm=-1., Double_t ym=-1., Double_t pdx=-1., Double_t pdy=-1., const char *opt="DRLF")
KVSpiderIdentificator * fIdentificator
Semi-automatic identification grid generator.
bool ProcessIdentification()
void SetAlpha(double aa_)
void SetNangles(Int_t up, Int_t down)
void SetParameters(double bining_=1.)
void Draw(Option_t *opt_="")
Part of Spider Identification.
double GetX(int n_) const
virtual TF1 * GetFunction(double min_=-1., double max_=-1.)
virtual Double_t GetBinCenter(Int_t bin) const
virtual void AddAll(const TCollection *col)
TObject * Clone(const char *newname="") const override
virtual void GetRange(Double_t &xmin, Double_t &xmax) const
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
virtual Int_t GetSelected() const
virtual void SetState(Bool_t enable=kTRUE)
virtual Long_t GetIntNumber() const
virtual Double_t GetNumber() const
void SetRange(Float_t min, Float_t max)
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
virtual Int_t GetNbinsY() const
virtual Int_t GetNbinsX() const
TObject * Clone(const char *newname="") const override
virtual Int_t Fill(const char *namex, const char *namey, Double_t w)
void Reset(Option_t *option="") override
virtual Double_t GetBinContent(Int_t bin) const
const char * GetName() const override
const char * Data() const
static void SingleShot(Int_t milliSec, const char *receiver_class, void *receiver, const char *method)
virtual void Modified(Bool_t flag=1)=0
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
double min(double x, double y)
double max(double x, double y)
Double_t Min(Double_t a, Double_t b)
Double_t Sqrt(Double_t x)
Double_t Max(Double_t a, Double_t b)