KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVSpiderIdentificator.cpp
1
2#include "KVSpiderIdentificator.h"
3#include <TCanvas.h>
4#include <TSystem.h>
5#include "KVSpiderLineSiCsI.h"
6
7#include <KVCanvas.h>
8
9using namespace std;
10
12
13
14
15
16
18{
19 _is_initialized = false;
20 SetDefault();
21}
22
23
24
26
28{
29 _is_initialized = false;
30 SetDefault();
31 fType = type;
32 Init(h_, Xm, Ym, pdx, pdy);
33}
34
35
36
37
39
44
45
46
47
49
51{
52 _debug = false;
53 _auto = true;
54 _useFit = true;
57 _bfactor = 1.;
58 _nAngleUp = 20;
59 _nAngleDown = 40;
60 _alpha = 1.7;
61}
62
63
64
65
67
74
75
76
77
79
81{
82 if (!strcmp(option, "ON EN A MARRE DES WARNING !!!!")) return;
83
84 _hlist.Clear();
85 _dlist.Clear();
86 _llist.Clear("all");
87 _htot = 0;
88 _is_initialized = false;
89}
90
91
92
93
95
97{
98 _bfactor = bining_;
99}
100
101
102
103
105
107{
108 if (!TestHistogram(h_)) return;
109 else _htot = h_;
110
111 double xm = h_->GetXaxis()->GetXmax();
112 double ym = h_->GetYaxis()->GetXmax();
113
114 _xmax = xm;
115 _ymax = ym;
116
117 bool foundx = false;
118 bool foundy = false;
119
120 TH1D* hx = _htot->ProjectionX();
121 TH1D* hy = _htot->ProjectionY();
122
123 int x0 = pdx;
124 int y0 = pdy;
125 int z0;
126
127 if ((pdx < 0.) || (pdy < 0.)) _htot->GetMaximumBin(x0, y0, z0);
128 _x0 = x0;
129 _y0 = y0;
130
131 int j = hx->GetNbinsX() - 1;
132
133 while ((!foundx) && (j >= 0)) {
134 if (hx->GetBinContent(j) >= 3) {
135 xm = (double)j;
136 foundx = true;
137 }
138 j--;
139 }
140
141 j = hy->GetNbinsX() - 1;
142 while (!foundy && (j >= 0)) {
143 if (hy->GetBinContent(j) >= 3) {
144 ym = (double)j;
145 foundy = true;
146 }
147 j--;
148 }
149
150 delete hx;
151 delete hy;
152
153 if ((!foundx) || (!foundy)) {
154 cout << "ERROR: KVSpiderIdentificator::Init(): Invalid Histogram !" << endl;
155 return;
156 }
157 _xm = xm;
158 _ym = ym;
159
160 if (Xm > 0.) _xm = Xm;
161 if (Ym > 0.) _ym = Ym;
162
163 _invalid = new TGraph();
164
165 _is_initialized = true;
166 return;
167}
168
169
170
172
174{
175 if ((_ym > 0) && (_xm > 0)) _ftheta = TMath::ATan((_ym - _y0) / (_xm - _x0)) * TMath::RadToDeg();
176}
177
178
179
180
181
183
185{
186 if (!gSystem->OpenDirectory(path_)) gSystem->MakeDirectory(path_);
187 return true;
188}
189
190
191
192
193
195
197{
198 if (!TestHistogram(h_)) return 0;
199
200 double a0 = d_->GetA0();
201 double th = d_->GetTheta();
202 double costh = TMath::Cos(TMath::DegToRad() * th);
203 double sinth = TMath::Sin(TMath::DegToRad() * th);
204 double mma = -1;
205
206 double thetam = TMath::ATan(_ymax / _xmax) * TMath::RadToDeg();
207
208 if (th <= thetam) mma = _xmax / costh;
209 else mma = _ymax / sinth;
210
211 int mmb = (int)mma / (rebin_ * _bfactor);
212
213 TH1F* h1 = new TH1F(Form("%s_proj", h_->GetName()), h_->GetTitle(), mmb, 0, mma);
214
215 int xbins = h_->GetNbinsX();
216 int ybins = h_->GetNbinsY();
217 int nbins = xbins * ybins;
218 if (_debug)cout << "DEBUG: GetProjection(): total number of bins : '" << nbins << "'." << endl;
219
220 for (int x = 0; x <= xbins; x++) {
221 Double_t bminx = h_->GetXaxis()->GetBinLowEdge(x);
222 Double_t bmaxx = h_->GetXaxis()->GetBinUpEdge(x);
223 Double_t xx = _alea.Uniform(bminx, bmaxx);
224 if (xx == bmaxx) xx = bminx;
225
226 for (int y = 0; y <= ybins; y++) {
227 Double_t bminy = h_->GetYaxis()->GetBinLowEdge(y);
228 Double_t bmaxy = h_->GetYaxis()->GetBinUpEdge(y);
229 Double_t yy = _alea.Uniform(bminy, bmaxy);
230 if (yy == bmaxy) yy = bminy;
231
232 Double_t content = (Double_t) h_->GetBinContent(x, y);
233
234 yy -= a0;
235 Double_t x1 = xx * costh + yy * sinth;
236
237 if (content > 0.) h1->Fill(x1, content);
238 }
239 }
240 return h1;
241}
242
243
244
245
247
249{
250 Init(h_, Xm, Ym);
251 return;
252}
253
254
255
256
258
260{
261 if (!h_) {
262 cout << "ERROR: KVSpiderIdentificator::TestHistogram(): Invalid pointer on 'TH2F' histogram !" << endl;
263 return false;
264 }
265 else if (h_->Integral() == 0) {
266 cout << "ERROR: KVSpiderIdentificator::SetHistogram(): Invalid histogram for SpIDer identification !" << endl;
267 return false;
268 }
269 return true;
270}
271
272
273
274
276
278{
279 TList* ll = CreateHistograms(th_, th_, 1, true, alpha_);
280 TH2F* h = (TH2F*)ll->At(0);
281 return h;
282}
283
284
285
286
288
289TList* KVSpiderIdentificator::CreateHistograms(double thmin_, double thmax_, int nth_, bool cos_, double alpha_)
290{
291 if (!TestHistogram(_htot)) return 0;
292 else if (!_is_initialized) {
293 cout << "ERROR: KVSpiderIdentificator::CreateHistogram(): Invalid range of theta [" << thmin_ << ";" << thmax_ << "] !" << endl;
294 return 0;
295 }
296 else if ((thmin_ > thmax_) || (thmin_ < 0.) || (thmin_ >= 90.) || (thmax_ <= 0.) || (thmax_ > 90.)) {
297 cout << "ERROR: KVSpiderIdentificator::CreateHistogram(): Invalid range of theta [" << thmin_ << ";" << thmax_ << "] !" << endl;
298 return 0;
299 }
300 else if (nth_ <= 0) {
301 cout << "ERROR: KVSpiderIdentificator::CreateHistogram(): Invalid number of step '" << nth_ << "' !" << endl;
302 return 0;
303 }
304
305 double aa = 0.;
306 if (alpha_ <= 0.) {
307 if (_auto) aa = _alpha;
308 else aa = 1.;
309 }
310 else aa = alpha_;
311
312 double min;
313 double max;
314 double step;
315
316 if (cos_) {
317 min = TMath::Cos(thmax_ * TMath::DegToRad());
318 max = TMath::Cos(thmin_ * TMath::DegToRad());
319 }
320 else {
321 min = thmin_;
322 max = thmax_;
323 }
324 if ((thmin_ == thmax_) || (nth_ == 1)) step = 10;
325 else step = (max - min) / ((nth_ - 1) * 1.);
326
327 int xbins = _htot->GetNbinsX();
328 int ybins = _htot->GetNbinsY();
329
330 for (int x = 0; x <= xbins; x++) {
331 double bminx = _htot->GetXaxis()->GetBinLowEdge(x);
332 double bmaxx = _htot->GetXaxis()->GetBinUpEdge(x);
333 for (int y = 0; y <= ybins; y++) {
334 int content = (int) _htot->GetBinContent(x, y);
335
336 double bminy = _htot->GetXaxis()->GetBinLowEdge(y);
337 double bmaxy = _htot->GetXaxis()->GetBinUpEdge(y);
338 double xx = 0.;
339 double yy = 0.;
340 for (int i = 0; i < content; i++) {
341 xx = _alea.Uniform(bminx, bmaxx);
342 yy = _alea.Uniform(bminy, bmaxy);
343 if (xx == bmaxx) xx = bminx;
344 if (yy == bmaxy) yy = bminy;
345
346 for (double cth = min; cth < max + 0.0001 * step; cth += step) {
347 double theta;
348 if (cos_) {
349 theta = TMath::ACos(cth) * TMath::RadToDeg();
350 }
351 else {
352 theta = cth;
353 }
354 double tmax = TMath::Tan(TMath::DegToRad() * (theta + aa));
355 double tmin = TMath::Tan(TMath::DegToRad() * (theta - aa));
356
357
358 if ((yy <= _y0 + (xx - _x0)*tmax) && (yy >= _y0 + (xx - _x0)*tmin)) {
359 if (!(_htemp = (TH2F*)_hlist.FindObject(Form("CUT_%06.3lf", theta)))) {
360 _htemp = new TH2F(Form("CUT_%06.3lf", theta), Form("CUT_%06.3lf", theta), 1024, 0, _xmax, 1024, 0, _ymax);
362
363 KVDroite* dd = new KVDroite(_x0, _y0, theta);
364 dd->SetName(_htemp->GetName());
365 _dlist.AddLast(dd);
366 }
367 _htemp->Fill(xx, yy);
368 }
369 }
370 }
371 }
372 }
373
374 // TCanvas* cc = new TCanvas("cc1","cc1",800,800);
375 // cc->cd();
376 // ((TH2F*)_hlist.At(0))->DrawClone("col");
377
378 return &_hlist;
379}
380
381
382
383
385
386bool KVSpiderIdentificator::SearchPeack(TH1F* h1_, double theta_, int create_, double sigma_, double peakmin_, int, int smooth_, TString opt_)
387{
388 if (!TestHistogram(h1_)) {
389 Warning("SearchPeack", "Bad histo...");
390 return false;
391 }
392
393 _dtemp = (KVDroite*)_dlist.FindObject(Form("CUT_%06.3lf", theta_));
394 TF1* ff = _dtemp->GetFunction();
395
396 // h1_->Rebin(rebin_*_bfactor);
397 h1_->Smooth(smooth_);
398
399 if (_nAngleUp == 0 && _nAngleDown == 0) {
400 opt_ = "";
401 }
402
403 int nfound = _ss.Search(h1_, sigma_, opt_.Data(), (peakmin_ / h1_->GetMaximum()));
404
405 if (_debug && _nAngleUp == 0 && _nAngleDown == 0) {
406 h1_->SaveAs("/home/dgruyer/e613/thesis/doc/proj.root");
407 }
408
409// return 0;
410// if(_nAngleUp==0&&_nAngleDown==0)
411// {
412// TCanvas* cc = new TCanvas("can","can",800,800);
413// cc->cd();
414// h1_->DrawClone();
415// TGraph* gg = new TGraph(nfound,_ss.GetPositionX(),_ss.GetPositionY());
416// gg->DrawClone("P");
417// return 0;
418// }
419 // return 0;
420
421 double theta = _dtemp->GetTheta();
422 double costh = TMath::Cos(TMath::DegToRad() * theta);
423
424 list<double> lx;
425
426#if ROOT_VERSION_CODE > ROOT_VERSION(5,99,01)
427 Double_t* xpeaks = _ss.GetPositionX();
428#else
429 Float_t* xpeaks = _ss.GetPositionX();
430#endif
431
432 for (int p = 0; p < nfound; p++) {
433 double xp = xpeaks[p];
434 lx.push_back(xp);
435 }
436 lx.sort();
437
438 double ox = 0.;
439 double oy = 0.;
440 double dist = 0.;
441 int TrueZ = 0;
442 int OTZ = 0;
443
444 int p = 1;
445 int ok = 0;
446 int npp = 1;
447
448 list<double>::iterator it;
449 for (it = lx.begin(); it != lx.end(); ++it) {
450 if (p != 1) {
451 Float_t xp = *it;
452
453 double xx = xp * costh;
454 double yy = ff->Eval(xx);
455 // double yyp = _y0 + TMath::Sin(TMath::DegToRad()*(_otheta))*TMath::Cos(TMath::DegToRad()*(theta-_otheta))*TMath::Sqrt((xx-_x0)*(xx-_x0)+(yy-_y0)*(yy-_y0));
456
457 bool valid = true;
458 // bool assoc = false;
459
460 bool TrueAss = false;
461
462
463 _invalid->SetPoint(_invalid->GetN(), xx, yy);
464
465 double d = TMath::Sqrt((xx - ox) * (xx - ox) + (yy - oy) * (yy - oy));
466 if ((!(_spline = (KVSpiderLine*)_llist.FindObject(Form("Z=%d", p))))) {
467 if (create_ == 0) {
468 if (valid) {
469 if (fType == kSiCsI) _spline = new KVSpiderLineSiCsI(p, GetY0());
470 else _spline = new KVSpiderLine(p, GetY0());
472 }
473 }
474 else valid = false;
475 }
476
477 double caca = 0.4;
478 if (create_ == 0) caca = 0.6;
479
480 if ((p >= 4) && (d <= caca * dist) && (valid)) {
481 valid = false;
482
483 _spline = (KVSpiderLine*)_llist.FindObject(Form("Z=%d", TrueZ));
484 _spline->SetStatus(false);
485
486 double xmoy = (_spline->GetX() * npp + xx) / (npp + 1);
487 double ymoy = (_spline->GetY() * npp + yy) / (npp + 1);
488
489 if (_spline->TestPoint(xmoy, ymoy, dist * 0.3, _useFit)) {
490 _spline->ReplaceLastPoint(xmoy, ymoy);
491 _spline->SetStatus(true);
492 TrueZ = _spline->GetZ();
493 TrueAss = true;
494 ok++;
495 }
496 p--;
497 }
498
499 if ((p >= 4) && (valid)) {
500 if ((yy >= 4000.) || (xx >= 4000.)) valid = false;
501 }
502
503 if ((create_ == 0) && (valid)) {
504 if ((p >= 10) && (d >= 1.7 * dist)) {
505 valid = false;
506 return true;
507 }
508 else {
509 _spline->AddPoint(xx, yy);
510 _spline->SetStatus(true);
511 TrueZ = _spline->GetZ();
512 TrueAss = true;
513 ok++;
514 }
515 }
516 else {
517 _invalid->SetPoint(_invalid->GetN(), xx, yy);
518 }
519
520 if ((create_ != 0) && (valid)) {
521 bool assoc = false;
522 // bool empty = false;
523 bool test = false;
524 int ii = -5;
525
526 double d1 = 20000.;
527 double d2 = 0.;
528
529 KVSpiderLine* izp = 0;
530 while ((!assoc) && (valid)) {
531 if ((izp = (KVSpiderLine*)_llist.FindObject(Form("Z=%d", p + ii)))) {
532 if ((izp->GetInterpolateN() != 0)) {
533 d2 = izp->GetDistance(xx, yy);
534
535 if ((d2 > d1) || test) {
536 _spline = (KVSpiderLine*)_llist.FindObject(Form("Z=%d", p + ii - 1));
537 if (_spline->TestPoint(xx, yy, -1., _useFit)) {
538 _spline->AddPoint(xx, yy);
539 _spline->SetStatus(true);
540 TrueZ = _spline->GetZ();
541 assoc = true;
542 valid = false;
543 TrueAss = true;
544 }
545 else {
546 test = true;
547 }
548 }
549 d1 = d2;
550 }
551 // else empty = true;
552 }
553 if (ii >= 10) {
554 valid = true;
555 assoc = true;
556 }
557 ii++;
558 }
559 if (!valid) p += ii - 2;
560 }
561
562 if (TrueZ == OTZ) npp++;
563 else npp = 1;
564
565 if ((_spline = (KVSpiderLine*)_llist.FindObject(Form("Z=%d", TrueZ))) && (TrueZ != OTZ)) {
566 xx = _spline->GetInterpolateX();
567 yy = _spline->GetInterpolateY();
568
569 if ((_spline = (KVSpiderLine*)_llist.FindObject(Form("Z=%d", OTZ)))) {
570 ox = _spline->GetInterpolateX();
571 oy = _spline->GetInterpolateY();
572 }
573 else {
574 ox = 0.;
575 oy = 0.;
576 }
577 dist = TMath::Sqrt((xx - ox) * (xx - ox) + (yy - oy) * (yy - oy)) / (TrueZ - OTZ);
578 ox = xx;
579 oy = yy;
580 }
581 if (TrueAss) OTZ = TrueZ;
582 }
583 p++;
584 _otheta = theta;
585 }
586
587 return true;
588}
589
590
591
592
594
596{
597
599 // double detail_angle = _ftheta*0.3;
600 Int_t angle_proc = 0;
601
602 int cre = 0;
604 TIter nexti(&_hlist);
605 while ((_htemp = (TH2F*)nexti())) {
607 TH1F* hh = GetProjection(_htemp, _dtemp, 12);
608 SearchPeack(hh, _dtemp->GetTheta(), cre, 2., 1., 12, 5);
609 angle_proc += 1;
610 Increment((Float_t) angle_proc); //sends signal to GUI progress bar
612 delete hh;
613 }
614 _hlist.Clear();
615
616 TIter nextl1(&_llist);
617 while ((_spline = (KVSpiderLine*)nextl1())) {
618 if (_spline->GetN() == 0) _llist.Remove(_spline);
619 else {
622 }
623 // else _spline->SetStatus(false);
624 }
625
626 CreateHistograms(_ftheta + 1., 89.2, _nAngleUp, true, _alpha * 0.6 / 1.7);
627 _hlist.Sort();
628 TIter next(&_hlist);
629 while ((_htemp = (TH2F*)next())) {
631 TH1F* hh = GetProjection(_htemp, _dtemp, 17);
632 SearchPeack(hh, _dtemp->GetTheta(), -1, 2., 1., 17, 5);
633 delete hh;
634 TIter nextl2(&_llist);
635 while ((_spline = (KVSpiderLine*)nextl2())) {
636 _spline->SetStatus(false);
638 }
639 angle_proc += 1;
640 Increment((Float_t) angle_proc); //sends signal to GUI progress bar
642 }
643 _hlist.Clear();
644
645
646 TIter nextl(&_llist);
647 while ((_spline = (KVSpiderLine*)nextl())) {
648 _spline->Sort(true);
650 }
651
652
653 cre = 1;
654 // CreateHistograms(detail_angle,_ftheta-1.,25,true,1.);
655 CreateHistograms(1.5, _ftheta - 1., _nAngleDown, true, _alpha * 1. / 1.7);
656
657 _hlist.Sort(false);
658 TIter nextt(&_hlist);
659 while ((_htemp = (TH2F*)nextt())) {
661 TH1F* hh = GetProjection(_htemp, _dtemp, 15);
662 SearchPeack(hh, _dtemp->GetTheta(), cre, 2., 1., 15, 5);
663 cre = 1;
664 delete hh;
665 TIter nextl3(&_llist);
666 while ((_spline = (KVSpiderLine*)nextl3())) {
667 _spline->SetStatus(false);
669 }
670 angle_proc += 1;
671 Increment((Float_t) angle_proc); //sends signal to GUI progress bar
673 }
674 _hlist.Clear();
675
676
677 // cre = 1;
678 // CreateHistograms(0.7,detail_angle-2,17,false,.5);
679 //
680 // _hlist.Sort(false);
681 // TIter nexttt(&_hlist);
682 // while((_htemp=(TH2F*)nexttt()))
683 // {
684 // _dtemp = (KVDroite*)_dlist.FindObject(_htemp->GetName());
685 // TH1F* hh = GetProjection(_htemp,_dtemp,17);
686 // SearchPeack(hh,_dtemp->GetTheta(),cre,2.,1.,17,5);
687 // delete hh;
688 // }
689 // _hlist.Clear();
690
691
692 TIter nextli(&_llist);
693 while ((_spline = (KVSpiderLine*)nextli())) {
694 _spline->Sort(true);
695 }
696
697 return true;
698}
699
700
701
702
704
705bool KVSpiderIdentificator::GetLines(int npoints_, double alpha_)
706{
707
708 CreateHistograms(_ftheta, _ftheta, 1, true, alpha_);
709 TIter nexti(&_hlist);
710 while ((_htemp = (TH2F*)nexti())) {
713 SearchPeack(hh, _dtemp->GetTheta(), 0, 2., 3., 1, 5);
714 delete hh;
715 }
716 _hlist.Clear();
717
718 if (npoints_ == 1) return false;
719 // else npoints_;
720
721 CreateHistograms(_ftheta + 1., _ftheta + 1. + npoints_, npoints_, true, alpha_);
722 _hlist.Sort();
723 TIter next(&_hlist);
724 while ((_htemp = (TH2F*)next())) {
727 SearchPeack(hh, _dtemp->GetTheta(), -1, 2., 3., 1, 5);
728 delete hh;
729 }
730 _hlist.Clear();
731
732
733 return true;
734}
735
736
737
738
740
742{
743 KVCanvas* cc = new KVCanvas(Form("%s_C", _htot->GetName()), Form("%s_C", _htot->GetTitle()), 800, 800);
744 cc->cd()->SetLogz();
745 TString option(opt_);
746
748 _htot->Draw("col");
749
750 if (option.Contains("R")) {
754 _invalid->Draw("Psame");
755 }
756
757 KVDroite* dd = 0;
758 TF1* ff = 0;
759
760 if (option.Contains("D")) {
761 _dlist.Sort();
762 TIter nextd(&_dlist);
763 Int_t id = 0;
764 while ((dd = (KVDroite*)nextd())) {
765 ff = dd->GetFunction();
766 if (dd->GetTheta() == _ftheta) {
767 ff->SetLineWidth(2);
768 ff->SetLineColor(kRed);
769 }
770 else {
771 ff->SetLineWidth(2);
772 ff->SetLineColor(kRed);
773 }
774 if (id % 3 == 0) ff->Draw("same");
775 id++;
776 }
777 }
778
779 if (option.Contains("N") || option.Contains("L") || option.Contains("I") || option.Contains("F")) {
780 TIter sp(&_llist);
781 while ((_spline = (KVSpiderLine*)sp())) {
782 _spline->Draw(option.Data());
783 if (option.Contains("F")) {
784 TF1* ff = _spline->GetFunction();
785 ff->SetLineColor(kBlack);
786 ff->SetLineWidth(2);
787 ff->Draw("same");
788 }
789 }
790 }
791
792 return;
793}
794
795
796
797
799
801{
802 Draw(opt_);
803 TCanvas* cc = (TCanvas*) gROOT->FindObject(_htot->GetName());
804 _htot->RebinX(4);
805 _htot->RebinY(4);
806
807 CheckPath(path_);
808
809 cc->Print(Form("%s/%s.pdf", path_, cc->GetName()), "pdf");
810 cc->Close();
811 delete cc;
812}
813
814
815
816
818
823
824
825
826
828
830{
831 KVSpiderLine* tmpline = 0;
832 if ((tmpline = (KVSpiderLine*)_llist.FindObject(Form("Z=%d", z_)))) return tmpline;
833 else {
834 cout << "WARNING: KVSpiderIdentificator::GetLine(): unknown line 'Z=" << z_ << "' !" << endl;
835 return 0;
836 }
837}
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
int Int_t
#define d(i)
char Char_t
float Float_t
constexpr Bool_t kFALSE
double Double_t
const char Option_t
kRed
kBlack
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t option
Option_t Option_t TPoint TPoint const char x1
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
#define gROOT
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
TCanvas with mouse-controlled dynamic zoom and pan & scan.
Definition KVCanvas.h:54
Apparently, a straight line.
Definition KVDroite.h:17
TF1 * GetFunction()
Definition KVDroite.cpp:68
double GetTheta()
Definition KVDroite.cpp:59
double GetA0()
Definition KVDroite.cpp:50
Semi-automatic identification grid generator.
TList * CreateHistograms(double thmin_, double thmax_, int nth_, bool cos_=true, double alpha_=-1.)
bool CheckPath(const Char_t *path_)
void Init(TH2F *h_=0, Double_t Xm=-1, Double_t Ym=-1, Double_t X0=-1, Double_t Y0=-1)
void SaveAsPdf(Option_t *opt_="", const Char_t *path_=".")
bool SearchPeack(TH1F *h1_, double theta_, int create_, double sigma_=2., double peakmin_=1., int rebin_=10, int smooth_=5, TString opt_="goff")
TH1F * GetProjection(TH2F *h_, KVDroite *d_, int rebin_=10)
void SetHistogram(TH2F *h_=0, Double_t Xm=-1, Double_t Ym=-1)
bool GetLines(int npoints_=1, double alpha_=1.)
TH2F * CreateHistogram(double th_, double alpha_=-1.)
KVSpiderLine * GetLine(int z_)
void Clear(Option_t *option="")
void SetParameters(double bining_=1.)
void Draw(Option_t *opt_="")
KVSpiderLine specialized for PSA matrix.
Part of Spider Identification.
void Sort(bool ascending_=true)
double GetX(int n_) const
bool ReplaceLastPoint(double x_, double y_)
void Draw(Option_t *opt_="")
double GetY(int n_) const
double GetInterpolateY(int n_) const
void ResetCounter()
virtual bool TestPoint(double x_, double y_, double dy_=-1., bool fit=true)
int GetInterpolateN() const
int GetN() const
double GetInterpolateX(int n_) const
double GetDistance(double x_, double y_)
void SetAcceptedPoints(Int_t n)
bool AddPoint(double x_, double y_, bool test_=false, int n_=-1)
virtual TF1 * GetFunction(double min_=-1., double max_=-1.)
void SetStatus(bool filled_=true)
virtual void SetLineWidth(Width_t lwidth)
virtual void SetLineColor(Color_t lcolor)
virtual void SetMarkerColor(Color_t mcolor=1)
virtual void SetMarkerStyle(Style_t mstyle=1)
virtual void SetMarkerSize(Size_t msize=1)
Double_t GetXmax() const
virtual Double_t GetBinLowEdge(Int_t bin) const
virtual Double_t GetBinUpEdge(Int_t bin) const
virtual void SetOwner(Bool_t enable=kTRUE)
void Draw(Option_t *option="") override
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)
Int_t GetN() const
void Draw(Option_t *chopt="") override
virtual void Smooth(Int_t ntimes=1, Option_t *option="")
virtual Int_t GetNbinsY() const
TAxis * GetXaxis()
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
virtual Int_t GetNbinsX() const
TAxis * GetYaxis()
void Draw(Option_t *option="") override
virtual Int_t Fill(const char *name, Double_t w)
virtual Double_t Integral(Int_t binx1, Int_t binx2, Option_t *option="") const
virtual Int_t GetMaximumBin() const
virtual Double_t GetBinContent(Int_t bin) const
virtual void SetStats(Bool_t stats=kTRUE)
TH1D * ProjectionY(const char *name="_py", Int_t firstxbin=0, Int_t lastxbin=-1, Option_t *option="") const
virtual Int_t Fill(const char *namex, const char *namey, Double_t w)
TH2 * RebinX(Int_t ngroup=2, const char *newname="") override
TH1D * ProjectionX(const char *name="_px", Int_t firstybin=0, Int_t lastybin=-1, Option_t *option="") const
virtual Double_t GetBinContent(Int_t bin) const
virtual TH2 * RebinY(Int_t ngroup=2, const char *newname="")
void Clear(Option_t *option="") override
TObject * FindObject(const char *name) const override
void AddLast(TObject *obj) override
TObject * Remove(const TObjLinkPtr_t &lnk)
TObject * At(Int_t idx) const override
virtual void Sort(Bool_t order=kSortAscending)
const char * GetName() const override
const char * GetTitle() const override
virtual void SetName(const char *name)
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual void SaveAs(const char *filename="", Option_t *option="") const
virtual Double_t Uniform(Double_t x1, Double_t x2)
virtual Int_t Search(const TH1 *hist, Double_t sigma=2, Option_t *option="", Double_t threshold=0.05)
Double_t * GetPositionX() const
const char * Data() const
virtual void * OpenDirectory(const char *name)
virtual int MakeDirectory(const char *name)
virtual Bool_t ProcessEvents()
Double_t y[n]
Double_t x[n]
TH1F * h1
TH1 * h
double dist(AxisAngle const &r1, AxisAngle const &r2)
double min(double x, double y)
double max(double x, double y)
Double_t ACos(Double_t)
Double_t ATan(Double_t)
constexpr Double_t DegToRad()
Double_t Sqrt(Double_t x)
Double_t Cos(Double_t)
Double_t Sin(Double_t)
Double_t Tan(Double_t)
constexpr Double_t RadToDeg()
const double xbins[xbins_n]
ClassImp(TPyArg)