26 if (GetParent()) GetParent()->Modified();
107 :
TCutG(), fIon(1, 1)
172 for (
int i = 0; i <
GetN(); i++) {
191 for (
int i = 0; i <
GetN(); i++) {
229 file << name_prefix <<
":";
237 file <<
x <<
" " <<
y << endl;
268 for (
Int_t i = 0; i <
N; i++) {
327 for (
int i = 0; i <
fNpoints; i++) {
359 if (!sx && !sy)
return;
367 if (sx_2d) fXp = sx->
Eval(
fX[ii],
fY[ii]);
368 else fXp = sx->
Eval(
fX[ii]);
369 if (sy_2d) fYp = sy->
Eval(
fX[ii],
fY[ii]);
370 else fYp = sy->
Eval(
fY[ii]);
406 gPad->GetListOfPrimitives()->Remove(
gr);
440 Int_t dist_1 = dpx * dpx + dpy * dpy;
443 Int_t dist_N = dpx * dpx + dpy * dpy;
455 Error(
"ExtendLine",
"Cannot extend line, need at least one segment!");
471 Error(
"ExtendLine",
"Cannot extend line, with x-coordinate wanted smaller than the one of the existing last point!");
477 newY = -(
a * newX +
c) /
b;
488 if (ipoint > 0) ipoint =
fNpoints - 1;
512 Error(
"CloneScaleStore",
"This method should be called using the interactive menu.");
519 for (
Int_t nn = 0; nn < this->
GetN(); nn += 1) {
530 if ((sx > 0.) && (sy > 0.)) idbis->
Scale(sx, sy);
550 Error(
"InsertPoint",
"This method should be called using the interactive menu.");
572 if (
gPad->XtoAbsPixel(
gPad->XtoPad(
fX[ii])) > px) {
617 Error(
"InsertSmoothPoint",
"This method should be called using the interactive menu.");
625 if (
gPad->XtoAbsPixel(
gPad->XtoPad(
fX[ii])) > px) {
655 Error(
"ContinueDrawing",
"This method should be called using the interactive menu.");
660 gr->WaitForPrimitive();
672 Info(
"ContinueDrawing",
"Existing Line %lf %lf, Added line %lf %lf",
xmin,
xmax, last,
first);
677 for (
Int_t ii = 0; ii < np; ii += 1) {
682 else if (last <
xmin) {
696 Info(
"ContinueDrawing",
"Faire une extension a droite ou a gauche\nsans recouvrement avec la ligne existante");
721 Double_t Delta = xx[np - 1] - xx[0];
722 if (Delta > 0)
return;
724 Info(
"ChechHierarchy",
"Invert filling order");
727 for (
Int_t nn = 0; nn < np; nn += 1) {
732 for (
Int_t ii = 1; ii <= np; ii += 1) {
733 gr->
SetPoint(ii - 1, xp[np - ii], yp[np - ii]);
819 for (
int ii = 0; ii < nNpoints; ii++) {
825 nX[ii] = 0.5 * (
fX[(ii - 1) / 2] +
fX[(ii + 1) / 2]);
826 nY[ii] =
Eval(nX[ii], 0,
"S");
831 for (
int ii = 0; ii < nNpoints; ii++)
SetPoint(ii, nX[ii], nY[ii]);
857 for (
int ii = 1; ii < nNpoints - 1; ii++) {
866 for (
int ii = 0; ii < nNpoints; ii++)
SetPoint(ii, nX[ii], nY[ii]);
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
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 Int_t RemovePoint()
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()
virtual 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="")
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.
void Copy(TAttFill &attfill) const
void Copy(TAttLine &attline) const
void Copy(TAttMarker &attmarker) const
const char * GetVarY() const
const char * GetVarX() 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 SetName(const char *name="")
virtual void CopyAndRelease(Double_t **newarrays, Int_t ibegin, Int_t iend, Int_t obegin)
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 void Print(Option_t *chopt="") const
virtual void Draw(Option_t *chopt="")
virtual Double_t Eval(Double_t x, TSpline *spline=nullptr, Option_t *option="") const
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)
virtual const char * GetName() const
virtual void Copy(TObject &named) const
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