423{
424
428
430
431
433 {
438 TClonesArray *segs = 0;
439 for(
int i=0; i<
npat; i++ )
444 }
446 {
449 }
450
454
461
462
464
466 {
467 if (
hp[25])
hp[25]->Fill(0.);
468 if (
hp[26])
hp[26]->Fill(0.);
469 return;
470 }
471
472
474
475
477
480
482
484
485
487
489 if (!nvg) return;
491 if (!ntrg) return;
492
493 int ntr = 0;
495 if (!ntr)
496 {
497 if (
hp[16])
hp[16]->Fill(0.);
498 if (
hp[19])
hp[19]->Fill(0.);
499 if (
hp[10])
hp[10]->Fill(0.);
500 if (
hp[9])
hp[9]->Fill(0.);
501 if (
hp[8])
hp[8]->Fill(0.);
502 if (
hp[23])
hp[23]->Fill(0.);
503 return;
504 }
505
506 int nsegmatch = 0, itrg = 0;
509
510 for (int itr=0; itr<ntr; itr++) {
512 trg = 0;
513 if (ntrg)
514 {
515 itrg =
tr->GetSegmentsAid(nsegmatch);
517 {
519 if (itrg < 0 || itrg >= ntrg) continue;
524 else
525 tr->SetErrorP(
p*
p*0.2*0.2);
527 {
528 p =
p*(1.+
dpp*gRandom->Gaus());
529 if (
p < 0.05)
p = 0.05;
530 else if (
p > 30.0)
p = 30.;
532 }
533 else
534 {
536 }
540 }
541 }
542 }
543
545
547
549
551 printf("%d tracks was found\n",ntr);
552
553 int ntrgood = 0;
554 int notmatched = 0;
555 int negflag = 0, ntrgood_r = 0, numveg = 0;
556 int negflag1 = 0, ntrgood_r1 = 0;
557 int nreject_nseg = 0, nreject_prob = 0;
558 int nreject_nseg1 = 0, nreject_prob1 = 0;
559 double right_ratio = 0.;
560 float dx = 0.;
561
562
563 for(int itr=0; itr<ntr; itr++) {
565 trg = 0;
566 numveg = 0;
567 right_ratio = 0.;
568 if (ntrg)
569 {
570 itrg =
tr->GetSegmentsAid(nsegmatch);
572 {
574 if (itrg >= 0 && itrg < ntrg)
575 {
577 right_ratio = (double)nsegmatch/
tr->N();
579 {
580 numveg = trg->
Flag() - 1;
581 if (numveg >= 0 && numveg < 500)
582 {
584 }
585 else
586 {
587 numveg = 0;
588 }
589 }
590 }
591 else
592 {
593 notmatched++;
594 }
595 }
596 else
597 {
598 notmatched++;
599 }
600 }
601 else
602 {
603 notmatched++;
604 }
605
607 {
608
609 negflag++;
610 if (numveg == 1) negflag1++;
611 continue;
612 }
613 if (
hp[11])
hp[11]->Fill(
tr->N());
615 {
616
617 nreject_nseg++;
618 if (numveg == 1) nreject_nseg1++;
619 continue;
620 }
621
622 dx = (
tr->GetSegmentFirst())->
X()-(
tr->GetSegmentFFirst())->
X();
623
624 if (trg != 0 && dx != 0.)
625 {
626 hp[17]->Fill(
tr->Prob());
627 }
629 {
630
631 nreject_prob++;
632 if (numveg == 1) nreject_prob1++;
633 continue;
634 }
635 if (trg)
636 {
637 if (trg->
Flag() == 0)
638 {
639
641 {
642
643 }
644
645
646 }
647 else if (trg->
Flag() <= nvg)
648 {
649
650 ntrgood++;
652 {
653 ntrgood_r++;
654 if (numveg == 1) ntrgood_r1++;
655 }
656 hp[15]->Fill(right_ratio);
657 }
658 }
659
661 {
662 if (dx != 0. &&
tr->N() > 2)
hp[12]->
Fill(dx);
663 }
664
665 }
666
667 printf(" %6d tracks found after propagation\n", ntr-negflag);
668
669 if (
hp[16])
hp[16]->Fill((
float)(ntrgood_r)/ntrg);
670 if (
hp[19])
hp[19]->Fill((
float)(ntr-negflag)/ntrg);
671 if (
hp[10])
hp[10]->Fill(ntr-negflag);
676
677
679
681
682 int nvagood[100];
683 int nvagoodm[100];
684 for (int i=0; i<100; i++) nvagood[i] = 0;
685 for (int i=0; i<100; i++) nvagoodm[i] = 0;
686 int nvgoodm = 0, nvgood = 0;
687 int ivg = 0;
688
689 if (!nvtx)
690 {
691 if (
hp[9])
hp[9]->Fill(0.);
692 if (
hp[23])
hp[23]->Fill(0.);
693 if (
hp[8])
hp[8]->Fill(0.);
694 return;
695 }
696
697 int nadd = 0;
698 int np = 0;
699
701
703
704 for (int i=0; i<nvtx; i++)
705 {
707 if (edbv && (edbv->Flag() != -10))
708 {
710 if (v)
711 {
713 {
715 {
716
717 nvgood++;
718 nvagood[np]++;
719 tr = edbv->GetTrack(0);
720
721 int ivg0 = -1000000;
722 if(
tr) ivg0 =
tr->GetSegmentsAid(nsegmatch);
724 {
726 if (ivg0 >= 0 && ivg0 < ntrg)
728 else
729 ivg0 = -1000000;
730 }
731 else
732 {
733 ivg0 = -1000000;
734 }
735
736
737 ivg = -2000000;
738 for (int j=1; j<edbv->N() && ivg0>0; j++)
739 {
740 tr = edbv->GetTrack(j);
741 int ivg = -2000000;
742 if (
tr) ivg =
tr->GetSegmentsAid(nsegmatch);
744 {
746 if (ivg >= 0 && ivg < ntrg)
748 else
749 ivg = -2000000;
750 }
751 else
752 break;
753 if (ivg != ivg0) break;
754 }
755 if (ivg != ivg0) continue;
756 if (ivg <= 0) continue;
757 if (ivg > nvg) continue;
758
760
761 nvagoodm[np]++;
762 nvgoodm++;
771 }
772 }
773 }
774 }
775 }
776 if (
hp[9])
hp[9]->Fill(nvgood);
778 {
781 }
782
783 if (1) return;
784
785 if (nvtx)
786 {
787 int nlv =
gAli->LinkedVertexes();
788 printf("%d linked vertexes found\n", nlv);
789 if (nlv)
790 {
791 for(int i=0; i<nv; i++)
792 {
794 if (v->Flag() > 2)
795 {
796 vc = v->GetConnectedVertex(0);
797 if (vc->ID() > v->ID())
798 {
799
800
801 }
802 }
803 }
804 }
805 }
806
807 int nn =
gAli->VertexNeighboor(1000.,2);
808 printf("%d neighbooring tracks found\n", nn);
811}
int MaxTrack
Definition: RecDispNU.C:90
int maxgaps[6]
Definition: RecDispNU.C:36
bool use_mc_mass
Definition: RecDispNU.C:5
bool use_mc_momentum
Definition: RecDispNU.C:4
int rec_primary_vertex_ntracks_min
Definition: RecDispNU.C:9
bool usemom
Definition: RecDispNU.C:64
EdbPatternsVolume * vol
Definition: RecDispNU.C:116
float ProbMinV
Definition: RecDispNU.C:59
float AngleAcceptance
Definition: RecDispNU.C:57
void FillHistsV(Vertex &v)
Definition: RecDispNU.C:1102
float ProbMinT
Definition: RecDispNU.C:62
void GCodesInit()
Definition: RecDispNU.C:1245
int nsegMin
Definition: RecDispNU.C:63
float dpp
Definition: RecDispNU.C:30
float ProbMinP
Definition: RecDispNU.C:61
void FillPVGen()
Definition: RecDispNU.C:332
EdbScanCond * scan
Definition: RecDispNU.C:117
float ProbMinVN
Definition: RecDispNU.C:60
float RightRatioMin
Definition: RecDispNU.C:33
void FillHistsGen()
Definition: RecDispNU.C:1117
cout<< tr-> GetEntries()<< endl
Int_t npat
Definition: Xi2HatStartScript.C:33
Definition: EdbPVGen.h:18
void SetVolume(EdbPatternsVolume *pv)
Definition: EdbPVGen.h:34
void SetScanCond(EdbScanCond *scan)
Definition: EdbPVGen.h:35
int MakeTracks(int nsegments=2, int flag=0)
Definition: EdbPVRec.cxx:1989
EdbScanCond const * GetScanCond()
Definition: EdbPVRec.h:172
void FillTracksCell()
Definition: EdbPVRec.cxx:1319
void ResetCouples()
Definition: EdbPVRec.cxx:950
void FillCell(float stepx, float stepy, float steptx, float stepty)
Definition: EdbPVRec.cxx:1092
int Link()
Definition: EdbPVRec.cxx:1187
int PropagateTracks(int nplmax, int nplmin, float probMin=0.05, int ngapMax=3, int design=0)
Definition: EdbPVRec.cxx:2487
void FitTracks(float p=10., float mass=0.139, TObjArray *gener=0, int design=0)
Definition: EdbPVRec.cxx:1893
Definition: EdbPattern.h:334
Int_t Npatterns() const
Definition: EdbPattern.h:366
EdbPattern * GetPattern(int id) const
Definition: EdbPattern.cxx:1721
Float_t P() const
Definition: EdbSegP.h:152
Int_t Flag() const
Definition: EdbSegP.h:149
Float_t M() const
Definition: EdbPattern.h:155
const MATRIX::CMatrix & V() const
covariance matrix
Definition: VtTrack.C:205
Definition: VtVertex.hh:88
bool valid() const
is vertex valid?
p
Definition: testBGReduction_AllMethods.C:8