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)) {
391 else ff1 =
spline->GetFunction();
405 double step = (max - min) /
fNPoints;
406 double stepmax = 5.*step;
409 for (
x = min + 1;
x < max;
x += step) {
410 if (step < stepmax) step *= 1.2;
419 Info(
"SpiderIdentification",
"Z = %d has been rejected (too few points)",
spline->GetZ());
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
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="")
TVirtualPad * GetPad() const
virtual Bool_t IsIdentifiable(Double_t, Double_t, TString *rejected_by=nullptr) 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.
virtual Double_t GetBinCenter(Int_t bin) const
virtual void AddAll(const TCollection *col)
virtual TObject * Clone(const char *newname="") const
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
TObject * Clone(const char *newname=0) const
virtual Int_t GetNbinsX() const
virtual Int_t Fill(const char *namex, const char *namey, Double_t w)
virtual void Reset(Option_t *option="")
virtual Double_t GetBinContent(Int_t bin) const
virtual const char * GetName() const
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
const long double g
masses
Double_t Min(Double_t a, Double_t b)
Double_t Sqrt(Double_t x)
Double_t Max(Double_t a, Double_t b)
void spline(double x[], double y[], int n, double yp1, double ypn, double *y2)