10#include "KVIDentifier.h"
26 if (GetParent()) GetParent()->Modified();
109 :
TCutG(), fIon(1, 1)
174 for (
int i = 0; i <
GetN(); i++) {
193 for (
int i = 0; i <
GetN(); i++) {
231 file << name_prefix <<
":";
239 file <<
x <<
" " <<
y << endl;
270 for (
Int_t i = 0; i <
N; i++) {
329 for (
int i = 0; i <
fNpoints; i++) {
361 if (!sx && !sy)
return;
369 if (sx_2d) fXp = sx->
Eval(
fX[ii],
fY[ii]);
370 else fXp = sx->
Eval(
fX[ii]);
371 if (sy_2d) fYp = sy->
Eval(
fX[ii],
fY[ii]);
372 else fYp = sy->
Eval(
fY[ii]);
408 gPad->GetListOfPrimitives()->Remove(
gr);
442 Int_t dist_1 = dpx * dpx + dpy * dpy;
445 Int_t dist_N = dpx * dpx + dpy * dpy;
449 bool first_point = (ipoint == 0 &&
fX[0] <
fX[
fNpoints - 1]);
480 Error(
"ExtendLine",
"Cannot extend line, need at least one segment!");
494 if ((fromBeginning && Limit > u) || (!fromBeginning && Limit < u)) {
495 Error(
"ExtendLine",
"Cannot extend line, with x-coordinate wanted %s than the one of the existing %s point!",
496 (fromBeginning ?
"greater" :
"smaller"), (fromBeginning ?
"first" :
"last"));
513 if (ipoint > 0) ipoint =
fNpoints - 1;
540 Error(
"CloneScaleStore",
"This method should be called using the interactive menu.");
547 for (
Int_t nn = 0; nn < this->
GetN(); nn += 1) {
558 if ((sx > 0.) && (sy > 0.)) idbis->
Scale(sx, sy);
578 Error(
"InsertPoint",
"This method should be called using the interactive menu.");
600 if (
gPad->XtoAbsPixel(
gPad->XtoPad(
fX[ii])) > px) {
645 Error(
"InsertSmoothPoint",
"This method should be called using the interactive menu.");
653 if (
gPad->XtoAbsPixel(
gPad->XtoPad(
fX[ii])) > px) {
683 Error(
"ContinueDrawing",
"This method should be called using the interactive menu.");
705 for (
Int_t ii = 0; ii <
np; ii += 1) {
710 else if (last <
xmin) {
750 if (Delta > 0)
return;
752 Info(
"ChechHierarchy",
"Invert filling order");
755 for (
Int_t nn = 0; nn <
np; nn += 1) {
760 for (
Int_t ii = 1; ii <=
np; ii += 1) {
777 Error(
"RemovePoint",
"Cannot be used without gPad, requires last mouse position");
786 Int_t mindist = 2147483647;
792 if (
dist < mindist) {
879 for (
int ii = 0; ii < nNpoints; ii++) {
885 nX[ii] = 0.5 * (
fX[(ii - 1) / 2] +
fX[(ii + 1) / 2]);
886 nY[ii] =
Eval(nX[ii], 0,
"S");
891 for (
int ii = 0; ii < nNpoints; ii++)
SetPoint(ii, nX[ii], nY[ii]);
917 for (
int ii = 1; ii < nNpoints - 1; ii++) {
926 for (
int ii = 0; ii < nNpoints; ii++)
SetPoint(ii, nX[ii], nY[ii]);
winID h TVirtualViewer3D TVirtualGLPainter p
winID h TVirtualViewer3D vv
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 b
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 np
Base class for particle identification in a 2D map.
void Draw(Option_t *opt="")
virtual void AddIdentifier(KVIDentifier *id)
Base class for graphical cuts used in particle identification.
virtual void SetOnlyZId(Bool_t onlyz=kTRUE)
virtual void ReadAsciiFile_extras(std::ifstream &)
virtual void SetMassFormula(Int_t mf)
virtual Int_t RemoveFirstPoint()
virtual void Scale(Double_t sx=-1, Double_t sy=-1)
virtual Int_t DecreaseNumberOfPoints()
virtual Double_t GetPID() const
virtual Int_t AddPointAtTheEnd()
KVIDGraph * fParent
parent identification map or grid
virtual Int_t GetA() const
virtual void WriteAsciiFile_extras(std::ofstream &, const Char_t *="")
virtual Int_t RemoveLastPoint()
virtual Int_t InsertSmoothPoint()
Insert a new point at the mouse X position using a smooth evaluation of the Y.
virtual Int_t IncreaseNumberOfPoints()
void ExtendLine(Double_t, Option_t *Direction="")
virtual Int_t InsertPoint()
Insert a new point at the mouse position.
virtual void WaitForPrimitive()
void Copy(TObject &obj) const
Copy attributes of this identifier into 'obj'.
virtual Int_t GetZ() const
void SetParent(KVIDGraph *)
Set pointer to parent ID graph.
virtual void ChechHierarchy(KVIDentifier *gr)
virtual ~KVIDentifier()
Destructor.
void CopyGraph(TGraph *)
Copy coordinates of points from the TGraph.
virtual Bool_t OnlyZId() const
virtual Int_t GetMassFormula() const
virtual void CloneScaleStore(Int_t newzt, Int_t newat, Double_t dy=0., Double_t sx=1., Double_t sy=1.)
virtual void WriteAsciiFile(std::ofstream &, const Char_t *name_prefix="")
Bool_t fGridOnlyZId
=kTRUE if parent grid has OnlyZId set
virtual Int_t SortPoints(Bool_t ascending=kTRUE)
Int_t Compare(const TObject *) const
virtual void SetA(Int_t atnum)
KVIDGraph * GetParent() const
Get pointer to parent ID graph.
KVIDentifier()
Default constructor.
virtual void ReadAsciiFile(std::ifstream &)
virtual void Print(Option_t *opt) const
virtual void SetZ(Int_t ztnum)
virtual Int_t ContinueDrawing()
Continue to draw an existing the line.
virtual Int_t RemovePoint()
void Copy(TAttFill &attfill) const
virtual void SetLineWidth(Width_t lwidth)
void Copy(TAttLine &attline) const
virtual void SetMarkerStyle(Style_t mstyle=1)
void Copy(TAttMarker &attmarker) const
virtual void SetMarkerSize(Size_t msize=1)
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
const char * GetVarX() const
TClass * IsA() const override
const char * GetVarY() const
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
virtual Bool_t IsEditable() const
virtual void CopyAndRelease(Double_t **newarrays, Int_t ibegin, Int_t iend, Int_t obegin)
void Print(Option_t *chopt="") const override
static Bool_t CompareX(const TGraph *gr, Int_t left, Int_t right)
virtual void Sort(Bool_t(*greater)(const TGraph *, Int_t, Int_t)=&TGraph::CompareX, Bool_t ascending=kTRUE, Int_t low=0, Int_t high=-1111)
virtual Double_t Eval(Double_t x, TSpline *spline=nullptr, Option_t *option="") const
virtual Int_t RemovePoint()
void SetName(const char *name="") override
void Draw(Option_t *chopt="") override
Bool_t GetEditable() const
virtual void FillZero(Int_t begin, Int_t end, Bool_t from_ctor=kTRUE)
Double_t ** ExpandAndCopy(Int_t size, Int_t iend)
virtual void Set(Int_t n)
virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y) const
virtual void SetEditable(Bool_t editable=kTRUE)
void Copy(TObject &named) const override
const char * GetName() const override
virtual const char * ClassName() const
virtual Bool_t InheritsFrom(const char *classname) const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
double dist(AxisAngle const &r1, AxisAngle const &r2)