KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVTGID.cpp
1/***************************************************************************
2 KVTGID.cpp - description
3 -------------------
4 begin : 5 July 2005
5 copyright : (C) 2005 by J.D. Frankland
6 email : frankland@ganil.fr
7
8$Id: KVTGID.cpp,v 1.17 2009/03/03 14:27:15 franklan Exp $
9***************************************************************************/
10#include "KVTGID.h"
11#include "KVTGIDGrid.h"
12#include "KVTGIDZA.h"
13#include "TMath.h"
14#include "Riostream.h"
15#include "TClass.h"
16#include "TString.h"
17#include "KVTGIDFunctions.h"
18#include "TROOT.h"
19
20using namespace std;
21
22
27
29void KVTGID::init()
30{
31 //Default intitialisations
32 // We remove this object from gROOT->GetListOfFunctions() to stop the TF1
33 // constructors from deleting previous KVTGID's with the same name
34 fID_min = 1.;
35 fID_max = 100.;
36 fStatus = -1;
37 fLambda = -1;
38 fMu = -1;
39 fG = -1;
40 fPdx = -1;
41 fPdy = -1;
42 fAlpha = -1;
43 fBeta = -1;
44 fNu = -1;
45 fXi = -1;
46 fEta = -1;
47 fType = 0;
48 fLight = 0;
49 fZorA = 0;
50 fMassFormula = KVNucleus::kEALMass;
51 fTelescopes = "/";
52 gROOT->GetListOfFunctions()->Remove(this);
53}
54
55
56
57
60
62{
63 // Default ctor
64 init();
65}
66
67
68
69
87
89 const Char_t* function, Double_t xmin,
90 Double_t xmax, Int_t npar, Int_t par_x, Int_t par_y)
91 : TF1(name, KVTGIDFunctions::tassangot_Z, xmin, xmax, npar)
92{
93 //Create TF1 named "name" using "function", range xmin->xmax and number of
94 //parameters npar.
95 //
96 //The given function name must correspond to one of the functions
97 //defined in the KVTGIDFunctions namespace (without the "KVTGIDFunctions::"
98 //scope, i.e. function="tassangot_Z" is a valid argument for this constructor).
99 //The resulting object can be written to and read back from a ROOT file and the
100 //function pointer will be reinitialised automatically when the object is read back
101 //from the file.
102 //
103 //par_x and par_y are the indices of the parameters of the functional which
104 //correspond to the 'X' and 'Y' coordinates of the identification map, respectively.
105 //
106 //NOTE: the function pointer passed to the TF1 constructor is just a dummy to
107 //make sure that the right constructor is called, and that the TF1 is set up correctly.
108 //The actual function used is set using the name given as argument 'function'.
109
110 init();
111
112 //set names of 'X' and 'Y' parameters. these are used by MakeIDGrid.
113 SetParName(par_x, "X");
114 SetParName(par_y, "Y");
115
116 fTGIDFunctionName.Form("KVTGIDFunctions::%s", function);
118 ProcessLineFast(fTGIDFunctionName.Data()));
119}
120
121
122
123
126
127KVTGID::KVTGID(const KVTGID& obj) : TF1()
128{
129 // copy constructor
130 init();
131 ((KVTGID&)obj).Copy(*this);
132}
133
134
135
138
139void KVTGID::Copy(TObject& tgid) const
140{
141 // Copy this KVTGID function into the KVTGID object referenced by tgid
142 TF1::Copy(tgid);
143 ((KVTGID&) tgid).fID_min = fID_min;
144 ((KVTGID&) tgid).fID_max = fID_max;
145 ((KVTGID&) tgid).fTGIDFunctionName = fTGIDFunctionName;
146 ((KVTGID&) tgid).fLambda = fLambda;
147 ((KVTGID&) tgid).fMu = fMu;
148 ((KVTGID&) tgid).fG = fG;
149 ((KVTGID&) tgid).fPdx = fPdx;
150 ((KVTGID&) tgid).fPdy = fPdy;
151 ((KVTGID&) tgid).fAlpha = fAlpha;
152 ((KVTGID&) tgid).fBeta = fBeta;
153 ((KVTGID&) tgid).fNu = fNu;
154 ((KVTGID&) tgid).fXi = fXi;
155 ((KVTGID&) tgid).fEta = fEta;
156 ((KVTGID&) tgid).fType = fType;
157 ((KVTGID&) tgid).fLight = fLight;
158 ((KVTGID&) tgid).fZorA = fZorA;
159 ((KVTGID&) tgid).fMassFormula = fMassFormula;
160 ((KVTGID&) tgid).fRuns = fRuns;
161 ((KVTGID&) tgid).fVarX = fVarX;
162 ((KVTGID&) tgid).fVarY = fVarY;
163 ((KVTGID&) tgid).fTelescopes = fTelescopes;
164}
165
166
167
168
187
189 Double_t& ID_quality, Double_t* par)
190{
191 //Use the functional with the current parameter values in order to perform
192 //an identification.
193 //The value returned is the estimated identification value.
194 //If the identification is not possible, -1 is returned
195 //(ID_quality=-1 also).
196 //
197 //For status code use GetStatus().
198 //
199 //ID_min and ID_max are the lower & upper limits for the identification.
200 //The functional must change sign between these two limits in order for
201 //the identification to be possible.
202 //ID_quality is the (absolute) value of the functional corresponding to
203 //the estimated identification: it is the distance from the identified
204 //point to the nearest identification line. Ideally it should be zero or
205 //as small as possible.
206 //
207 //Optional argument "par" allows to replace the current parameters.
208
209 if (par)
210 SetParameters(par);
211
212 Double_t ID;
213 ID = ID_quality = -1.;
215
216 if (Eval(ID_min) * Eval(ID_max) < 0.) {
217 //if the sign of the identification function changes between ID_min
218 //and ID_max i.e. if the ID_min line is below the point and ID_max above
219 //it this means that the point to identify is in between these two lines
220 ID = GetX(0., ID_min, ID_max);
221 //what is actual value of Tassan-Got formula for this ID ?
222 ID_quality = TMath::Abs(Eval(ID));
224 }
225
226 return ID;
227}
228
229
230
231
240
242 Double_t xmin, Double_t xmax, Bool_t log_scale)
243{
244 // Add a line to the grid 'g' for identification label 'ID' with 'npoints' points calculated between
245 // X-coordinates xmin and xmax. Points are omitted if the resulting value of the functional is
246 // not a number (TMath::IsNan = kTRUE).
247 //
248 // If log_scale=kTRUE (default is kFALSE), more points are used at the beginning
249 // of the line than at the end, with a logarithmic dependence.
250
251 //add new line to grid
252 KVIDLine* new_line = AddLine(g);
253
254 //set identification label for line
255 SetIdent(new_line, ID);
256 //set mass formula for line
257 new_line->SetMassFormula(fMassFormula);
258
259 //loop over points of line
260 Int_t p_index = 0;
261 Double_t X, dX;
262 Double_t Y = 0.;
263 Double_t logXmin = TMath::Log(TMath::Max(xmin, 1.0));
264 if (log_scale)
265 dX = (TMath::Log(xmax) - logXmin) / (npoints - 1.);
266 else
267 dX = (xmax - xmin) / (Double_t)(npoints - 1);
268
269 for (Int_t i = 0; i < npoints; i++) {
270
271 //set x coordinate of this point
272 if (log_scale)
273 X = TMath::Exp(logXmin + i * dX);
274 else
275 X = xmin + dX * ((Double_t) i);
276
277 //leave value Y as it is. The value of GetIDFunc()->Eval(ID)
278 //is the vertical distance delta_Y from point (X,Y) to the line; therefore the
279 //Y coordinate of the point on the line is Y + delta_Y, whatever the value Y.
280
281 //set values of parameters which correspond to X and Y coordinates in grid
282 SetParameter("X", X);
283 SetParameter("Y", Y);
284
285 Y += Eval((Double_t) ID);
286
287 if (!TMath::IsNaN(Y))
288 new_line->SetPoint(p_index++, X, Y);
289 else
290 Y = 0.; //reset Y to 0 if it ever becomes NaN
291 }
292}
293
294
295
296
299
300void KVTGID::Print(Option_t* option) const
301{
302 //Print info on functional and grid
303 cout << Class()->
304 GetName() <<
305 " object for identification using Tassan-Got functional" << endl;
306 cout << "Limits for fit : fID_min = " << GetIDmin() << " fID_max = " <<
307 GetIDmax() << endl;
309}
310
311
312
313
317
319{
320 //Used to sort list of KVTGID in KVTGIDManager
321 //ID obj with smallest IDmax will be first in sorted list
322 Int_t id1 = (Int_t) GetIDmax();
323 if (id1 < 0)
324 return 0;
325 Int_t id2 = (Int_t) static_cast < const KVTGID* >(obj)->GetIDmax();
326 if (id2 < 0)
327 return 0;
328 if (id1 > id2)
329 return 1;
330 if (id1 < id2)
331 return -1;
332 return 0;
333}
334
335
336
337
340
342{
343 //Returns explanatory message for value of GetStatus()
344
345 static TString messages[] = {
346 "ok",
347 "point to identify outside of identification range of function"
348 };
349 Int_t status = GetStatus() + 1;
350 if (status--)
351 return messages[status];
352 return Form("no call to GetIdentification() performed yet");
353}
354
355
356
357
363
365 Double_t* params)
366{
367 //Given a point (x,y) (which could, for example, be a point in a KVIDGrid line which we want to fit)
368 //we give the (vertical) distance to the functional identification line 'id'. If the point is below the line
369 //the distance is positive, if the point is above the line it is negative.
370 //If the parameter array 'params' is not given, we use the current values of the parameters.
371
372 if (params)
373 SetParameters(params);
374 SetParameter("X", x);
375 SetParameter("Y", y);
376 return Eval((Double_t) id);
377}
378
379
380
381
386
387void KVTGID::Streamer(TBuffer& R__b)
388{
389 // Stream an object of class KVTGID.
390 // If the name of the KVTGIDFunction has been set (version > 1) then
391 // we use it to reset the function pointer
392
393 if (R__b.IsReading()) {
394 KVTGID::Class()->ReadBuffer(R__b, this);
395 if (fTGIDFunctionName != "") {
397 ProcessLineFast(fTGIDFunctionName.Data()));
398 }
399 }
400 else {
401 KVTGID::Class()->WriteBuffer(R__b, this);
402 }
403}
404
405
406
407
428
429KVTGID* KVTGID::MakeTGID(const Char_t* name, Int_t type, Int_t light, Int_t ZorA, Int_t mass)
430{
431 // Static function used to create TGID objects
432 //
433 // type -----> type of functional
434 // * type : =0->basic functional <>0->extended functional
435 // * * For the basic formula :
436 // * yy = ((g*E)**(mu+1)+lambda**(mu+1)*Z**2*A**mu)**(1/(mu+1))-g*E + pdy
437 // * * For the extended formula :
438 // * yy = ((g*E)**(mu+nu+1)+(lambda*Z**alpha*A**beta)**(mu+nu+1)+
439 // * xi*A**mu*(g*E)**nu)**(1/(mu+mu+1))-g*E + pdy
440 //
441 // light -----> treatment of CsI total light output
442 // * light : =0->no non-linear light response <>0->non-linear light response included
443 // * * If ih=0 no non-linear light response : E=xx-pdx
444 // * * If ih<>0 non-linear light response included :
445 // * E = sqrt(h**2+2*rho*h*(1+log(1+h/rho)))
446 // * rho=eta*Z**2*A and h=xx-pdx
447 //
448 // ZorA -----> functional used to find Z or A
449 // * ZorA : =0->A <>0->Z
450
451 Int_t npar = 6 + GetNumberOfLTGParameters(type, light);
452 KVTGID* _tgid_ = 0;
453 if (ZorA) {
454 _tgid_ = new KVTGIDZ(name, npar, type, light, mass);
455 }
456 else {
457 _tgid_ = new KVTGIDZA(name, npar, type, light);
458 }
459 npar = 6;
460 _tgid_->fLambda = npar++;
461 if (type) {
462 _tgid_->fAlpha = npar++;
463 _tgid_->fBeta = npar++;
464 _tgid_->fMu = npar++;
465 _tgid_->fNu = npar++;
466 _tgid_->fXi = npar++;
467 }
468 else {
469 _tgid_->fMu = npar++;
470 }
471 _tgid_->fG = npar++;
472 _tgid_->fPdx = npar++;
473 _tgid_->fPdy = npar++;
474 if (light) _tgid_->fEta = npar++;
475 return _tgid_;
476}
477
478
479
480
526
528{
529 // 'par' is an array containing the LTG functional parameters,
530 // whose number and order depends on fType & fLight:
531 //
532 // fType=0, fLight=0: Double_t par[5];
533 // ==================
534 // par[0] = lambda
535 // par[1] = mu
536 // par[2] = g
537 // par[3] = pdx
538 // par[4] = pdy
539 //
540 // fType=0, fLight<>0: Double_t par[6];
541 // ==================
542 // par[0] = lambda
543 // par[1] = mu
544 // par[2] = g
545 // par[3] = pdx
546 // par[4] = pdy
547 // par[5] = eta
548 //
549 // fType<>0, fLight=0: Double_t par[9];
550 // ==================
551 // par[0] = lambda
552 // par[1] = alpha
553 // par[2] = beta
554 // par[3] = mu
555 // par[4] = nu
556 // par[5] = xi
557 // par[6] = g
558 // par[7] = pdx
559 // par[8] = pdy
560 //
561 // fType<>0, fLight<>0: Double_t par[10];
562 // ==================
563 // par[0] = lambda
564 // par[1] = alpha
565 // par[2] = beta
566 // par[3] = mu
567 // par[4] = nu
568 // par[5] = xi
569 // par[6] = g
570 // par[7] = pdx
571 // par[8] = pdy
572 // par[9] = eta
573
575 for (Int_t ipar = 0; ipar < npar; ipar++) {
576 SetParameter(6 + ipar, par[ipar]);
577 }
578}
579
580
581
582
583
629
631{
632 // 'par' is an array containing the LTG functional parameters,
633 // whose number and order depends on fType & fLight:
634 //
635 // fType=0, fLight=0: Double_t par[5];
636 // ==================
637 // par[0] = lambda
638 // par[1] = mu
639 // par[2] = g
640 // par[3] = pdx
641 // par[4] = pdy
642 //
643 // fType=0, fLight<>0: Double_t par[6];
644 // ==================
645 // par[0] = lambda
646 // par[1] = mu
647 // par[2] = g
648 // par[3] = pdx
649 // par[4] = pdy
650 // par[5] = eta
651 //
652 // fType<>0, fLight=0: Double_t par[9];
653 // ==================
654 // par[0] = lambda
655 // par[1] = alpha
656 // par[2] = beta
657 // par[3] = mu
658 // par[4] = nu
659 // par[5] = xi
660 // par[6] = g
661 // par[7] = pdx
662 // par[8] = pdy
663 //
664 // fType<>0, fLight<>0: Double_t par[10];
665 // ==================
666 // par[0] = lambda
667 // par[1] = alpha
668 // par[2] = beta
669 // par[3] = mu
670 // par[4] = nu
671 // par[5] = xi
672 // par[6] = g
673 // par[7] = pdx
674 // par[8] = pdy
675 // par[9] = eta
676
678 for (Int_t ipar = 0; ipar < npar; ipar++) {
679 SetParameter(6 + ipar, (Double_t)par[ipar]);
680 }
681}
682
683
685
686
699
701{
702 // Static function returning number of parameters used by Tassan-Got functional.
703 // Depends on type of functional (type) and whether non-linear light response
704 // is calculated or not (light).
705 // According to the (type, light) combination the numbers and orders
706 // of parameters are :
707 // type=0 light=0 5 parameters: lambda, mu, g, pdx, pdy
708 // type=0 light<>0 6 parameters: lambda, mu, g, pdx, pdy, eta
709 // type<>0 light=0 9 parameters: lambda, alpha, beta, mu, nu,
710 // xi, g, pdx, pdy
711 // type<>0 light<>0 10 parameters: lambda, alpha, beta, mu, nu,
712 // xi, g, pdx, pdy, eta}
713
714 return type ? (light ? 10 : 9) : (light ? 6 : 5);
715}
716
717
719
720
722
724{
725 if (fLambda > -1) SetParName(fLambda, "#lambda");
726 if (fAlpha > -1) SetParName(fAlpha, "#alpha");
727 if (fBeta > -1) SetParName(fBeta, "#beta");
728 if (fMu > -1) SetParName(fMu, "#mu");
729 if (fNu > -1) SetParName(fNu, "#nu");
730 if (fXi > -1) SetParName(fXi, "#xi");
731 if (fG > -1) SetParName(fG, "g");
732 if (fPdx > -1) SetParName(fPdx, "pdx");
733 if (fPdy > -1) SetParName(fPdy, "pdy");
734 if (fEta > -1) SetParName(fEta, "#eta");
735}
736
737
738
742
744{
745 // set list of ID telescopes for which fit is valid.
746 // any previous list is deleted.
748 TIter next(list);
749 KVBase* t;
750 while ((t = (KVBase*)next())) AddIDTelescope(t);
751};
752
753
754
757
758void KVTGID::WriteToAsciiFile(ofstream& gridfile) const
759{
760 // Write parameters of LTG fit in file.
761
762 gridfile << "++KVTGID::" << GetName() << endl;
763 gridfile << "Type=" << GetFunctionalType() << endl;
764 gridfile << "LightEnergyDependence=" << GetLightEnergyDependence() << endl;
765 gridfile << "ZorA=" << GetZorA() << endl;
766 if (GetZorA() == 1) {
767 gridfile << "MassFormula=" << GetMassFormula() << endl;
768 }
769 gridfile << "Functional=" << GetFunctionName() << endl;
770 gridfile << "Runs=" << ((KVNumberList&)GetValidRuns()).AsString() << endl;
771 gridfile << "IDTelescopes=" << fTelescopes.Data() << endl;
772 gridfile << "<VARX> " << GetVarX() << endl;
773 gridfile << "<VARY> " << GetVarY() << endl;
774 gridfile << "ZMIN=" << (Int_t)GetIDmin();
775 gridfile << " ZMAX=" << (Int_t)GetIDmax() << endl;
776 Bool_t type1 = (GetFunctionalType() == 1);
777 gridfile << Form("Lambda=%20.13e", GetLambda()) << endl;
778 if (type1) {
779 gridfile << Form("Alpha=%20.13e", GetAlpha()) << endl;
780 gridfile << Form("Beta=%20.13e", GetBeta()) << endl;
781 }
782 gridfile << Form("Mu=%20.13e", GetMu()) << endl;
783 if (type1) {
784 gridfile << Form("Nu=%20.13e", GetNu()) << endl;
785 gridfile << Form("Xi=%20.13e", GetXi()) << endl;
786 }
787 gridfile << Form("G=%20.13e", GetG()) << endl;
788 gridfile << Form("Pdx=%20.13e", GetPdx()) << endl;
789 gridfile << Form("Pdy=%20.13e", GetPdy()) << endl;
790 if (GetLightEnergyDependence() == 1) {
791 gridfile << Form("Eta=%20.13e", GetEta()) << endl;
792 }
793 gridfile << "!" << endl << endl;
794}
795
796
797
799
800KVString GetValue(KVString& l, char c)
801{
802 l.Begin(c);
803 l.Next();
804 return l.Next(kTRUE);
805}
806
807
808
812
813KVTGID* KVTGID::ReadFromAsciiFile(const Char_t* name, ifstream& gridfile)
814{
815 // Read parameters of LTG fit in file (which must have been written with
816 // current version of KVTGID::WriteToAsciiFile)
817
818 KVTGID* LTGfit = 0;
819 Int_t Ftyp, Flite, FZorA, Fmass;
820 FZorA = Fmass = Ftyp = Flite = 0;
821
823 line.ReadLine(gridfile);
824 TString buff = GetValue(line, '=');
825 Ftyp = buff.Atoi();
826 line.ReadLine(gridfile);
827 buff = GetValue(line, '=');
828 Flite = buff.Atoi();
829 line.ReadLine(gridfile);
830 buff = GetValue(line, '=');
831 FZorA = buff.Atoi();
832 if (FZorA) {
833 line.ReadLine(gridfile);
834 buff = GetValue(line, '=');
835 Fmass = buff.Atoi();
836 }
837
838 LTGfit = MakeTGID(name, Ftyp, Flite, FZorA, Fmass);
839
840 line.ReadLine(gridfile); // skip "Functional=" line : name of functional not used
841 line.ReadLine(gridfile);
842 LTGfit->SetValidRuns(KVNumberList(GetValue(line, '=').Data()));
843 line.ReadLine(gridfile);
844 LTGfit->SetStringTelescopes(GetValue(line, '='));
845 line.ReadLine(gridfile);
846 line.Remove(0, 6);
847 line.Remove(KVString::kBoth, ' ');
848 LTGfit->SetVarX(line.Data());
849 line.ReadLine(gridfile);
850 line.Remove(0, 6);
851 line.Remove(KVString::kBoth, ' ');
852 LTGfit->SetVarY(line.Data());
853 line.ReadLine(gridfile);
854 Int_t zmin, zmax;
855 sscanf(line.Data(), "ZMIN=%d ZMAX=%d", &zmin, &zmax);
856 LTGfit->SetIDmin(zmin);
857 LTGfit->SetIDmax(zmax);
858 Bool_t type1 = (Ftyp == 1);
859 line.ReadLine(gridfile);
860 buff = GetValue(line, '=');
861 LTGfit->SetLambda(buff.Atof());
862 if (type1) {
863 line.ReadLine(gridfile);
864 buff = GetValue(line, '=');
865 LTGfit->SetAlpha(buff.Atof());
866 line.ReadLine(gridfile);
867 buff = GetValue(line, '=');
868 LTGfit->SetBeta(buff.Atof());
869 }
870 line.ReadLine(gridfile);
871 buff = GetValue(line, '=');
872 LTGfit->SetMu(buff.Atof());
873 if (type1) {
874 line.ReadLine(gridfile);
875 buff = GetValue(line, '=');
876 LTGfit->SetNu(buff.Atof());
877 line.ReadLine(gridfile);
878 buff = GetValue(line, '=');
879 LTGfit->SetXi(buff.Atof());
880 }
881 line.ReadLine(gridfile);
882 buff = GetValue(line, '=');
883 LTGfit->SetG(buff.Atof());
884 line.ReadLine(gridfile);
885 buff = GetValue(line, '=');
886 LTGfit->SetPdx(buff.Atof());
887 line.ReadLine(gridfile);
888 buff = GetValue(line, '=');
889 LTGfit->SetPdy(buff.Atof());
890 if (Flite == 1) {
891 line.ReadLine(gridfile);
892 buff = GetValue(line, '=');
893 LTGfit->SetEta(buff.Atof());
894 }
895 line.ReadLine(gridfile);
896 return LTGfit;
897}
898
899
900
901
int Int_t
bool Bool_t
char Char_t
float Float_t
double Double_t
const char Option_t
#define X(type, name)
Option_t Option_t option
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 name[80]
float xmin
float xmax
#define gROOT
char * Form(const char *fmt,...)
Base class for KaliVeda framework.
Definition KVBase.h:142
Abstract base class for 2D identification grids in e.g. (dE,E) maps.
Definition KVIDGrid.h:74
Base class for lines/cuts used for particle identification in 2D data maps.
Definition KVIDLine.h:143
virtual void SetMassFormula(Int_t mf)
Strings used to represent a set of ranges of values.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition KVString.h:73
Base class for charged particle Z & A identfication using functionals developed by L....
Definition KVTGIDZA.h:40
Abstract base class for charged particle Z identfication using functionals developed by L....
Definition KVTGIDZ.h:33
Abstract base class for particle identfication using functionals developed by L. Tassan-Got (IPN Orsa...
Definition KVTGID.h:44
void ClearIDTelescopes()
Definition KVTGID.h:280
void SetXi(Double_t val)
Definition KVTGID.h:220
KVTGID()
Default ctor.
Definition KVTGID.cpp:61
virtual void AddLineToGrid(KVIDGrid *g, Int_t ID, Int_t npoints, Double_t xmin, Double_t xmax, Bool_t log_scale=kFALSE)
Definition KVTGID.cpp:241
Double_t GetPdx() const
Definition KVTGID.h:184
@ kStatus_NotBetween_IDMin_IDMax
Definition KVTGID.h:101
@ kStatus_OK
Definition KVTGID.h:100
void SetIDTelescopes(const TCollection *)
Definition KVTGID.cpp:743
Int_t fLight
with (1) or without (0) CsI light-energy dependence
Definition KVTGID.h:65
Double_t fID_min
minimum ID fitted with functional
Definition KVTGID.h:48
void SetIDmax(Double_t x)
Definition KVTGID.h:117
Int_t fNu
Definition KVTGID.h:61
Int_t fMu
Definition KVTGID.h:55
Double_t GetIDmin() const
Definition KVTGID.h:129
Int_t fXi
Definition KVTGID.h:62
TString fVarX
quantity used for X coordinates
Definition KVTGID.h:70
Int_t fG
Definition KVTGID.h:56
virtual KVIDLine * AddLine(KVIDGrid *)=0
Double_t GetG() const
Definition KVTGID.h:176
Int_t fZorA
used for Z (1) or A (0) identification
Definition KVTGID.h:66
void SetVarX(const Char_t *x)
Definition KVTGID.h:263
static KVTGID * MakeTGID(const Char_t *name, Int_t type, Int_t light, Int_t ZorA, Int_t mass)
Definition KVTGID.cpp:429
Double_t GetXi() const
Definition KVTGID.h:224
void SetLTGParameterNames()
Definition KVTGID.cpp:723
void SetMu(Double_t val)
Definition KVTGID.h:164
KVNumberList fRuns
list of runs for which fit is valid
Definition KVTGID.h:69
const KVNumberList & GetValidRuns() const
Definition KVTGID.h:253
Double_t GetLambda() const
Definition KVTGID.h:160
Double_t fID_max
maximum ID fitted with functional
Definition KVTGID.h:49
void SetEta(Double_t val)
Definition KVTGID.h:228
void SetBeta(Double_t val)
Definition KVTGID.h:204
Int_t GetLightEnergyDependence() const
Definition KVTGID.h:93
Double_t GetIDmax() const
Definition KVTGID.h:121
void SetValidRuns(const KVNumberList &r)
Definition KVTGID.h:249
void SetIDmin(Double_t x)
Definition KVTGID.h:125
void SetPdx(Double_t val)
Definition KVTGID.h:180
const Char_t * GetVarX() const
Definition KVTGID.h:267
TString fVarY
quantity used for Y coordinates
Definition KVTGID.h:71
Int_t fBeta
Definition KVTGID.h:60
virtual Int_t GetStatus() const
Definition KVTGID.h:145
void init()
Definition KVTGID.cpp:29
Int_t Compare(const TObject *obj) const
Definition KVTGID.cpp:318
void WriteToAsciiFile(std::ofstream &) const
Write parameters of LTG fit in file.
Definition KVTGID.cpp:758
Int_t fLambda
indices of parameters
Definition KVTGID.h:54
Int_t fEta
Definition KVTGID.h:63
virtual void Copy(TObject &tgid) const
Copy this KVTGID function into the KVTGID object referenced by tgid.
Definition KVTGID.cpp:139
virtual void SetIdent(KVIDLine *, Double_t ID)=0
Double_t GetPdy() const
Definition KVTGID.h:192
void SetG(Double_t val)
Definition KVTGID.h:172
void SetAlpha(Double_t val)
Definition KVTGID.h:196
Int_t GetZorA() const
Definition KVTGID.h:89
Double_t GetBeta() const
Definition KVTGID.h:208
const Char_t * GetVarY() const
Definition KVTGID.h:275
const Char_t * GetFunctionName() const
Definition KVTGID.h:104
Double_t GetMu() const
Definition KVTGID.h:168
Int_t fMassFormula
mass formula used to calculate A from Z (if Z identification used)
Definition KVTGID.h:67
Int_t fStatus
transient member, holds status code of last call to GetIdentification
Definition KVTGID.h:50
Int_t fPdy
Definition KVTGID.h:58
Double_t GetDistanceToLine(Double_t x, Double_t y, Int_t id, Double_t *params=0)
Definition KVTGID.cpp:364
void AddIDTelescope(KVBase *tel)
Definition KVTGID.h:284
static KVTGID * ReadFromAsciiFile(const Char_t *name, std::ifstream &)
Definition KVTGID.cpp:813
Double_t GetEta() const
Definition KVTGID.h:232
Int_t GetMassFormula() const
Definition KVTGID.h:240
TString fTGIDFunctionName
name of KVTGIDFunctions:: namespace function used for identification
Definition KVTGID.h:52
void SetVarY(const Char_t *x)
Definition KVTGID.h:271
void SetNu(Double_t val)
Definition KVTGID.h:212
virtual Double_t GetIdentification(Double_t ID_min, Double_t ID_max, Double_t &ID_quality, Double_t *par=0)
Definition KVTGID.cpp:188
KVString fTelescopes
list of telescopes for which fit is valid
Definition KVTGID.h:72
virtual const Char_t * GetStatusString() const
Returns explanatory message for value of GetStatus()
Definition KVTGID.cpp:341
Int_t fPdx
Definition KVTGID.h:57
void SetLambda(Double_t val)
Definition KVTGID.h:156
Double_t GetNu() const
Definition KVTGID.h:216
Int_t fType
type of functional (=0 standard, =1 extended)
Definition KVTGID.h:64
void SetLTGParameters(Double_t *par)
Definition KVTGID.cpp:527
static Int_t GetNumberOfLTGParameters(Int_t type, Int_t light)
Definition KVTGID.cpp:700
Double_t GetAlpha() const
Definition KVTGID.h:200
Int_t GetFunctionalType() const
Definition KVTGID.h:85
virtual void Print(Option_t *option="") const
Print info on functional and grid.
Definition KVTGID.cpp:300
void SetStringTelescopes(const Char_t *s)
Definition KVTGID.h:77
void SetPdy(Double_t val)
Definition KVTGID.h:188
Int_t fAlpha
Definition KVTGID.h:59
virtual void Streamer(TBuffer &)
static TClass * Class()
Bool_t IsReading() const
Int_t ReadBuffer(TBuffer &b, void *pointer)
Int_t WriteBuffer(TBuffer &b, void *pointer, const char *info="")
static TClass * Class()
void Print(Option_t *option="") const override
void Copy(TObject &f1) const override
virtual Double_t GetX(Double_t y, Double_t xmin=0, Double_t xmax=0, Double_t epsilon=1.E-10, Int_t maxiter=100, Bool_t logx=false) const
virtual void SetParName(Int_t ipar, const char *name)
void SetFunction(Func f)
virtual void SetParameters(const Double_t *params)
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
virtual void SetParameter(const TString &name, Double_t value)
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
const char * GetName() const override
Int_t Atoi() const
Double_t Atof() const
const char * Data() const
void Form(const char *fmt,...)
TLine * line
Double_t y[n]
Double_t x[n]
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Bool_t IsNaN(Double_t x)
Double_t Exp(Double_t x)
Double_t Log(Double_t x)
Double_t Abs(Double_t d)
Double_t Max(Double_t a, Double_t b)
TLine l
ClassImp(TPyArg)