KaliVeda
Toolkit for HIC analysis
KVIDZAFromZGrid.cpp
1 //Created by KVClassFactory on Tue Mar 8 10:00:16 2016
2 //Author: Diego Gruyer
3 
4 #include "KVIDZAFromZGrid.h"
5 #include "TMultiGraph.h"
6 #include "KVIDZALine.h"
7 #include "TCanvas.h"
8 
12 
13 
14 
15 
20 {
21  // Default constructor
22  // Grid is declared as a 'ZOnlyGrid' by default (this is internal mechanics)
23 
24  init();
25  fFits.SetOwner();
26  SetOnlyZId();
27  fIgnoreMassID = false;
28 }
29 
30 
31 
32 
40 
42 {
43  // This method copies the current state of 'this' object into 'obj'
44  // You should add here any member variables, for example:
45  // (supposing a member variable KVIDZAFromZGrid::fToto)
46  // CastedObj.fToto = fToto;
47  // or
48  // CastedObj.SetToto( GetToto() );
49 
50  KVIDZAGrid::Copy(obj);
52  i.fZmaxInt = fZmaxInt;
53  i.fPIDRange = fPIDRange;
54  i.fZminInt = fZminInt;
55  fTables.Copy(i.fTables);
57 }
58 
59 
60 
61 
70 
71 void KVIDZAFromZGrid::ReadFromAsciiFile(std::ifstream& gridfile)
72 {
73 // fPIDRange = kFALSE;
74 // KVIDGraph::ReadFromAsciiFile(gridfile);
75 // if (GetParameters()->HasParameter("PIDRANGE")) {
76 // fPIDRange = kTRUE;
77 // fZmaxInt = GetParameters()->GetIntValue("PIDRANGE");
78 // LoadPIDRanges();
79 // }
80 
81  fPIDRange = kFALSE;
82 // fHasMassCut = kFALSE;
84 
85 // if (GetIdentifier("MassID")) fHasMassCut = kTRUE;
86 
87  if (GetParameters()->HasParameter("PIDRANGE")) {
88  fPIDRange = kTRUE;
89  TString pidrange = GetParameters()->GetStringValue("PIDRANGE");
90  if (pidrange.Contains("-")) {
91  TString min = (pidrange(0, pidrange.Index("-")));
92  fZminInt = min.Atoi();
93  min = (pidrange(pidrange.Index("-") + 1, pidrange.Length()));
94  fZmaxInt = min.Atoi();
95  }
96  else {
97  fZminInt = 1;
98  fZmaxInt = pidrange.Atoi();
99  }
100  LoadPIDRanges();
101  }
102  // if <PARAMETER> IgnoreMassID=1 appears in file, we are only using the PID intervals to clean
103  // up a messy de-e plot, not to give mass identification. particles will only be identified in Z.
104  if (GetParameters()->HasParameter("IgnoreMassID") && GetParameters()->GetIntValue("IgnoreMassID") == 1)
105  fIgnoreMassID = true;
106  else
107  fIgnoreMassID = false;
108 }
109 
110 
111 
113 
114 void KVIDZAFromZGrid::WriteToAsciiFile(std::ofstream& gridfile)
115 {
116  ExportToGrid();
117  KVIDGraph::WriteToAsciiFile(gridfile);
118 }
119 
120 
121 
123 
125 {
126  fZminInt = 100000;
127  fZmaxInt = 0;
128 
129  KVIDentifier* id = 0;
130  TIter it(GetIdentifiers());
131  while ((id = (KVIDentifier*)it())) {
132  int zz = id->GetZ();
133  if (!GetParameters()->HasParameter(Form("PIDRANGE%d", zz))) continue;
134  KVString mes = GetParameters()->GetStringValue(Form("PIDRANGE%d", zz));
135  if (mes.IsWhitespace()) continue;
136  int type = (mes.Contains(",") ? 2 : 1);
137  interval_set* itv = new interval_set(zz, type);
138  itv->SetName(GetName());
139  mes.Begin("|");
140  while (!mes.End()) {
141  KVString tmp = mes.Next();
142  tmp.Begin(":");
143  int aa = tmp.Next().Atoi();
144  KVString val = tmp.Next();
145  double pidmin, pidmax, pid;
146  if (type == 1) itv->add(aa, val.Atof());
147  else if (type == 2) {
148  val.Begin(",");
149  pidmin = val.Next().Atof();
150  pid = val.Next().Atof();
151  pidmax = val.Next().Atof();
152  itv->add(aa, pid, pidmin, pidmax);
153 // itv->add(aa, pid, pid-0.02, pid+0.02);
154  }
155  }
156  if (zz < fZminInt) fZminInt = zz;
157  if (zz > fZmaxInt) fZmaxInt = zz;
158  fTables.Add(itv);
159  }
160  fPIDRange = kTRUE;
161  // PrintPIDLimits();
162 }
163 
164 
165 
167 
169 {
170  fTables.Clear("all");
171  fPIDRange = kFALSE;
172 }
173 
174 
175 
177 
179 {
180  fTables.Clear("all");
181  LoadPIDRanges();
182 }
183 
184 
185 
187 
189 {
190  interval_set* itv = 0;
191  TIter it(&fTables);
192  while ((itv = (interval_set*)it())) if (itv->GetZ() == zint) return itv;
193  return 0;
194 }
195 
196 
197 
204 
206 {
207 // ((interval_set*)fTables.At(12))->fIntervals.ls();
208 
209 // for (int zz = fZminInt; zz <= fZmaxInt; zz++) {
210 // Info("PrintPIDLimits", "Z=%2d [%.4lf %.4lf]", zz, ((interval_set*)fTables.At(zz - fZminInt))->fPIDmins.at(0),
211 // ((interval_set*)fTables.At(zz - fZminInt))->fPIDmaxs.at(((interval_set*)fTables.At(zz - fZminInt))->fNPIDs - 1));
212 // }
213 }
214 
215 
216 
218 
220 {
221  if (GetParameters()->HasParameter("PIDRANGE")) GetParameters()->RemoveParameter("PIDRANGE");
222  for (int ii = 1; ii < 30; ii++) {
223  if (GetParameters()->HasParameter(Form("PIDRANGE%d", ii))) GetParameters()->RemoveParameter(Form("PIDRANGE%d", ii));
224  }
225 }
226 
227 
228 
235 
236 int KVIDZAFromZGrid::is_inside(double pid) const
237 {
238  // Look for a set of mass-interval definitions in which the given PID
239  // falls (PID from linearisation of Z identification).
240  // In principle this should be the set corresponding to Z=nint(PID),
241  // but if not Z+/-1 are also tried.
242  // Returns the value of Z for the set found (or 0 if no set found)
243 
244  int zint = TMath::Nint(pid);
245  interval_set* it = GetIntervalSet(zint);
246  if (it) {
247  if (it->is_inside(pid)) return zint;
248  else if (it->is_above(pid)) {
249 
250  it = GetIntervalSet(zint + 1);
251  if (it && it->is_inside(pid)) return zint + 1;
252  else return 0;
253  }
254  else {
255  it = GetIntervalSet(zint - 1);
256  if (it && it->is_inside(pid)) return zint - 1;
257  else return 0;
258  }
259  }
260  else return 0;
261 }
262 
263 
264 
271 
273 {
274  // General initialisation method for identification grid.
275  // This method MUST be called once before using the grid for identifications.
276  // The ID lines are sorted.
277  // The natural line widths of all ID lines are calculated.
278  // The line with the largest Z (Zmax line) is found.
279 
280  SetOnlyZId();
282  // Zmax should be Z of last line in sorted list
283 
284  TIter it(GetIdentifiers());
285  KVIDentifier* id = 0;
286 
287  fZMax = 0;
288  while ((id = (KVIDentifier*)it())) {
289  if (!id->InheritsFrom("KVIDZALine")) continue;
290  int zz = ((KVIDZALine*)id)->GetZ();
291  if (zz > fZMax) fZMax = zz;
292  }
293 
294  // set up mass fits (if any)
295  fFits.Clear();
296  if (GetParameters()->HasStringParameter("MASSFITS")) {
297  KVNumberList zlist(GetParameters()->GetStringValue("MASSFITS"));
298  for (auto z : zlist) {
299  auto massfit = GetParameters()->GetTStringValue(Form("MASSFIT_%d", z));
300  massfit.ReplaceAll(":", "=");
301  KVNameValueList fitparams;
302  fitparams.Set(massfit);
303  fFits.Add(new KVMultiGaussIsotopeFit(z, fitparams));
304  }
305  }
306 }
307 
308 
309 
311 
313 {
314  double P;
315  auto A = fitfunc->GetA(idr->PID, P);
316  if (A) {
317  idr->A = A;
318  idr->PID = fitfunc->GetInterpolatedA(idr->PID);
319  if (P > 0.5) idr->IDquality = KVIDZAGrid::kICODE0; // probability of A is >50%
320  else idr->IDquality = KVIDZAGrid::kICODE3;// OK, slight ambiguity of A
321  }
322  else {
323  // returned A=0 => background noise
325  return false;
326  }
327  return true;
328 }
329 
330 
331 
343 
345 {
346  // Fill the KVIdentificationResult object with the results of identification for point (x,y)
347  // corresponding to some physically measured quantities related to a reconstructed nucleus.
348  //
349  // If identification is successful, idr->IDOK = true.
350  // In this case, idr->Aident and idr->Zident indicate whether isotopic or only Z identification
351  // was acheived.
352  //
353  // In case of unsuccessful identification, idr->IDOK = false,
354  // BUT idr->Zident and/or idr->Aident may be true: this is to indicate which kind of
355  // identification was attempted but failed (this changes the meaning of the quality code)
356 
357  idr->Aident = idr->Zident = kFALSE;
358 
359  KVIDZAGrid::Identify(x, y, idr);
360  idr->Zident = kTRUE; // meaning Z identification was attempted, even if it failed
361  if (!idr->IDOK) return;
362 
363  bool have_pid_range_for_Z = fPIDRange && (idr->Z <= fZmaxInt) && (idr->Z > fZminInt - 1);
364  auto mass_fit_for_Z = GetMultiGaussFit(idr->Z);
365  bool have_mass_fit_for_Z = (mass_fit_for_Z != nullptr);
366  bool mass_id_success = false;
367 
368  if ((have_mass_fit_for_Z || have_pid_range_for_Z)
369  && (!fHasMassIDRegion || idr->HasFlag(GetName(), "MassID"))) { // if a mass ID region is defined, we must be inside it
370  // try mass identification
371  if (have_mass_fit_for_Z)
372  mass_id_success = MassIdentificationFromMultiGaussFit(mass_fit_for_Z, idr);
373  else
374  mass_id_success = (DeduceAfromPID(idr) > 0);
375  if (mass_id_success) {
376  // mass identification was at least attempted
377  // make sure grid's quality code is consistent with KVIdentificationResult
378  const_cast<KVIDZAFromZGrid*>(this)->fICode = idr->IDquality;
379  idr->Aident = kTRUE; // meaning A identification was attempted, even if it failed
380  }
381  else {
382  // the pid falls outside of any mass ranges for a Z which has assigned isotopes
383  // therefore although the Z identification was good, we cannot consider this
384  // particle to be identified
385  const_cast<KVIDZAFromZGrid*>(this)->fICode = kICODE4;
386  idr->IDquality = fICode; // otherwise identfication result quality code is not coherent with comment (see below)
387  }
388  idr->IDOK = (fICode < kICODE4);
389  }
390 
391  // ignore isotopic successful isotopic identification if fIgnoreMassID=true
392  if (fIgnoreMassID && idr->IDOK && idr->Aident) idr->Aident = false;
393 
394  // set comments in identification result
395  switch (fICode) {
396  case kICODE0:
397  idr->SetComment("ok");
398  break;
399  case kICODE1:
400  if (mass_id_success) idr->SetComment("slight ambiguity of A, which could be larger");
401  else idr->SetComment("slight ambiguity of Z, which could be larger");
402  break;
403  case kICODE2:
404  if (mass_id_success) idr->SetComment("slight ambiguity of A, which could be smaller");
405  else idr->SetComment("slight ambiguity of Z, which could be smaller");
406  break;
407  case kICODE3:
408  if (mass_id_success) idr->SetComment("slight ambiguity of A, which could be larger or smaller");
409  else idr->SetComment("slight ambiguity of Z, which could be larger or smaller");
410  break;
411  case kICODE4:
412  if (mass_id_success) idr->SetComment("point is outside of mass identification range");
413  else idr->SetComment("Z identification correct but no mass identification");
414  break;
415  case kICODE5:
416  if (mass_id_success) idr->SetComment("point is in between two isotopes A & A+2 (e.g. 5He, 8Be, 9B)");
417  else idr->SetComment("point is in between two lines of different Z, too far from either to be considered well-identified");
418  break;
419  case kICODE6:
420  idr->SetComment("(x,y) is below first line in grid");
421  break;
422  case kICODE7:
423  idr->SetComment("(x,y) is above last line in grid");
424  break;
425  default:
426  idr->SetComment("no identification: (x,y) out of range covered by grid");
427  }
428 }
429 
430 
431 
432 
438 
440 {
441  // First look for a set of mass intervals in which the PID of the identification result falls,
442  // if there is one (see KVIDZAFromZGrid::is_inside).
443  // If an interval set is found for a Z different to the original identification, idr->Z is changed.
444  // Then call interval_set::eval for the mass interval for this Z.
445 
446  int zint = is_inside(idr->PID);
447  if (!zint) return -1;
448  if (zint != idr->Z) idr->Z = zint;
449 
450  double res = 0.;
451  interval_set* it = GetIntervalSet(zint);
452  if (it) res = it->eval(idr);
453  return res;
454 }
455 
456 
457 
458 
460 
462 {
464  KVNumberList pids;
465  interval_set* itvs = 0;
466  TIter npid(GetIntervalSets());
467  while ((itvs = (interval_set*)npid())) {
468  if (!itvs->GetNPID()) continue;
469  pids.Add(itvs->GetZ());
470  }
471  GetParameters()->SetValue("PIDRANGE", pids.AsString());
472 
473  itvs = 0;
474  TIter next(GetIntervalSets());
475  while ((itvs = (interval_set*)next())) {
476  if (!itvs->GetNPID()) continue;
477  KVString par = Form("PIDRANGE%d", itvs->GetZ());
478  KVString val = "";
479  interval* itv = 0;
480  TIter ni(itvs->GetIntervals());
481  while ((itv = (interval*)ni())) {
482  val += Form("%d:%lf,%lf,%lf|", itv->GetA(), itv->GetPIDmin(), itv->GetPID(), itv->GetPIDmax());
483  }
484  val.Remove(val.Length() - 1);
485  GetParameters()->SetValue(par.Data(), val.Data());
486  }
487 }
488 
489 
490 
491 
492 
494 
496 {
497  double pid = idr->PID;
498  if (pid < 0.5) return 0.;
499  // calculate interpolated mass from PID
500  double res = fPIDs.Eval(pid);
501  int ares = 0;
502 
504 
505  // look for mass interval PID is in
506  // in case it falls between two intervals remember also the interval
507  // immediately to the left & right of the PID
508  interval* left_int(nullptr), *right_int(nullptr);
509  interval* inter;
510  TIter it(&fIntervals);
511  while ((inter = (interval*)it())) {
512  if (inter->is_inside(pid)) {
513  ares = inter->GetA();
514  break;
515  }
516  else if (inter->is_left_of(pid)) {
517  left_int = inter;
518  }
519  else if (!right_int && inter->is_right_of(pid)) {
520  right_int = inter;
521  }
522  }
523  if (ares != 0) {
524  // the PID is inside a defined mass interval
525  idr->A = ares;
526  idr->PID = res;
528  }
529  else {
530  // the PID is not inside a defined mass interval
531  //
532  // * if it is in between two consecutive masses i.e. A and A+1 then it is
533  // Z- and A-identified with a slight ambiguity of A
534  // * if it is in between two non-consecutive masses i.e. A and A+2 then it
535  // is not identified (e.g. 5He, 8Be, 9B)
536  if (!right_int || !left_int) {
537  // case where no left or right interval were found
538  // to prevent from crashes but should not appen
539  idr->A = ares;
540  idr->PID = res;
542  }
543  else {
544  int dA = right_int->GetA() - left_int->GetA();
545  if (dA == 1) {
546  // OK, slight ambiguity of A
547  ares = TMath::Nint(res);
548  idr->A = ares;
549  idr->PID = res;
551  }
552  else {
553  // in a hole where no isotopes should be (e.g. 5He, 8Be, 9B)
554  idr->A = ares;
555  idr->PID = res;
557  }
558  }
559  }
560  }
561  else {
562  ares = TMath::Nint(res);
563  idr->A = ares;
564  idr->PID = res;
565  if (ares > fPIDs.GetX()[0] && ares < fPIDs.GetX()[fNPIDs - 1]) {
567  }
568  else {
570  }
571  }
572  return res;
573 }
574 
575 
576 
578 
579 bool interval_set::is_inside(double pid)
580 {
581  if (fType != KVIDZAFromZGrid::kIntType) return kTRUE;
582 
583 // Info("is_inside","min: %d max:%d npids:%d", ((interval*)fIntervals.At(0))->GetA(), ((interval*)fIntervals.At(fNPIDs-1))->GetA(), fNPIDs);
584 
585  if (pid > ((interval*)fIntervals.At(0))->GetPIDmin() && pid < ((interval*)fIntervals.At(fNPIDs - 1))->GetPIDmax()) return kTRUE;
586  else return kFALSE;
587 }
588 
589 
590 
592 
593 bool interval_set::is_above(double pid)
594 {
595  if (fType != KVIDZAFromZGrid::kIntType) return kTRUE;
596 
597  if (pid > ((interval*)fIntervals.At(fNPIDs - 1))->GetPIDmax()) return kTRUE;
598  else return kFALSE;
599 }
600 
601 
602 
603 
605 
607 {
608  if (!GetNPID()) return "-";
609  KVNumberList alist;
610  for (int ii = 0; ii < GetNPID(); ii++) alist.Add(((interval*)fIntervals.At(ii))->GetA());
611  return alist.AsString();
612 }
613 
614 
615 
617 
618 interval_set::interval_set(int zz, int type)
619 {
620  fType = type;
621  fZ = zz;
622  fNPIDs = 0;
623 }
624 
625 
626 
632 
633 void interval_set::add(int aa, double pid, double pidmin, double pidmax)
634 {
635 // if (fNPIDs && pid < fPIDs.GetX()[fNPIDs - 1]) {
636 // Error("add", "Please give me peaks in the right order for Z=%d and A=%d...", fZ, aa);
637 // return;
638 // }
639  if (fType == KVIDZAFromZGrid::kIntType && !(pid > pidmin && pid < pidmax)) {
640  return;
641  }
642 
643  fPIDs.SetPoint(fNPIDs, pid, aa);
645  if (pid) fIntervals.AddLast(new interval(fZ, aa, pid, pidmin, pidmax));
646  }
647  fNPIDs++;
648 }
649 
650 
651 
652 
653 
constexpr Bool_t kFALSE
double Double_t
constexpr Bool_t kTRUE
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
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,...)
virtual void WriteToAsciiFile(std::ofstream &gridfile)
Definition: KVIDGraph.cpp:442
virtual void ReadFromAsciiFile(std::ifstream &gridfile)
Definition: KVIDGraph.cpp:601
const Char_t * GetName() const override
Definition: KVIDGraph.cpp:1339
const KVNameValueList * GetParameters() const
Definition: KVIDGraph.h:324
const KVList * GetIdentifiers() const
Definition: KVIDGraph.h:334
void Initialize() override
Definition: KVIDGrid.cpp:218
Hybrid charge & mass identification grid.
bool MassIdentificationFromMultiGaussFit(KVMultiGaussIsotopeFit *, KVIdentificationResult *) const
void Initialize() override
KVList fTables
intervals for mass id
interval_set * GetIntervalSet(int zint) const
void WriteToAsciiFile(std::ofstream &gridfile) override
void Identify(Double_t x, Double_t y, KVIdentificationResult *) const override
virtual double DeduceAfromPID(KVIdentificationResult *idr) const
KVUniqueNameList fFits
multi-gaussian fits for mass id
KVMultiGaussIsotopeFit * GetMultiGaussFit(int z) const
void SetOnlyZId(Bool_t=kTRUE) override
KVList * GetIntervalSets()
void ReadFromAsciiFile(std::ifstream &gridfile) override
void Copy(TObject &obj) const override
int is_inside(double pid) const
void Copy(TObject &) const override
Copy this to 'obj'.
Definition: KVIDZAGrid.cpp:66
UShort_t fZMax
largest Z of lines in grid
Definition: KVIDZAGrid.h:70
Bool_t fHasMassIDRegion
set to true if grid has a limited region for mass identification, indicated by an info contour "MassI...
Definition: KVIDZAGrid.h:95
Int_t fICode
code de retour
Definition: KVIDZAGrid.h:85
void Identify(Double_t x, Double_t y, KVIdentificationResult *) const override
Base class for identification ridge lines corresponding to different nuclear species.
Definition: KVIDZALine.h:33
Base class for graphical cuts used in particle identification.
Definition: KVIDentifier.h:28
Full result of one attempted particle identification.
Bool_t IDOK
general quality of identification, =kTRUE if acceptable identification made
void SetComment(const Char_t *c)
Bool_t Aident
= kTRUE if A of particle established
Double_t PID
= "real" Z if Zident==kTRUE and Aident==kFALSE, "real" A if Zident==Aident==kTRUE
Int_t A
A of particle found (if Aident==kTRUE)
Int_t Z
Z of particle found (if Zident==kTRUE)
Int_t IDquality
specific quality code returned by identification procedure
Bool_t HasFlag(std::string grid_name, TString flag)
Bool_t Zident
=kTRUE if Z of particle established
Function for fitting PID mass spectra.
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
void SetValue(const Char_t *name, value_type value)
void RemoveParameter(const Char_t *name)
Bool_t HasStringParameter(const Char_t *name) const
const Char_t * GetStringValue(const Char_t *name) const
bool Set(const KVString &)
TString GetTStringValue(const Char_t *name) const
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:85
const Char_t * AsString(Int_t maxchars=0) const
void Add(Int_t)
Add value 'n' to the list.
void Copy(TObject &obj) const override
void Add(TObject *obj) override
void AddLast(TObject *obj) override
void Clear(Option_t *option="") override
TObject * At(Int_t idx) const override
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
void Begin(TString delim) const
Definition: KVString.cpp:565
Bool_t End() const
Definition: KVString.cpp:634
KVString Next(Bool_t strip_whitespace=kFALSE) const
Definition: KVString.cpp:695
void Add(TObject *obj) override
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Double_t * GetX() const
virtual Double_t Eval(Double_t x, TSpline *spline=nullptr, Option_t *option="") const
virtual void SetName(const char *name)
Ssiz_t Length() const
Int_t Atoi() const
Double_t Atof() const
const char * Data() const
Bool_t IsWhitespace() const
TString & Remove(EStripType s, char c)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TString & ReplaceAll(const char *s1, const char *s2)
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
TString GetListOfMasses()
bool is_inside(double pid)
bool is_above(double pid)
void add(int aa, double pid, double pidmin=-1., double pidmax=-1.)
double eval(KVIdentificationResult *idr)
interval_set(int zz, int type)
KVList * GetIntervals()
bool is_right_of(double pid)
double GetPID()
bool is_left_of(double pid)
double GetPIDmin()
double GetPIDmax()
bool is_inside(double pid)
Double_t y[n]
Double_t x[n]
void init()
double min(double x, double y)
Int_t Nint(T x)
ClassImp(TPyArg)