791{
792
793
794 int numrect[10000];
795 float xg, yg, zg, txg, tyg, pg;
796 int zpos;
803
804
805 int nvg = 0;
807 int ntrg = 0;
809
812
813
816
817 printf("------------------------------------------------------------\n");
818 printf("%d generated vertexes\n", nvg);
819 printf("%d generated tracks\n", ntrg);
820 fprintf(
f,
" %6d generated vertexes\n", nvg);
821 fprintf(
f,
" %6d generated tracks\n", ntrg);
822
823
825 {
828 }
829 else
831
832 int itrg = 0;
833 int nsegmatch = 0;
834 int ntr = 0;
836
837 for (int itr=0; itr<ntr; itr++) {
839 trg = 0;
840 if (ntrg)
841 {
842 itrg =
tr->GetSegmentsFlag(nsegmatch);
843 if (itrg >= 0 && itrg < ntrg)
844 {
848 else tr->SetErrorP(
p*
p*0.2*0.2);
850 {
851 p =
p*(1.+
dpp*gRandom->Gaus());
852 if (
p < 0.050)
p = 0.050;
853 }
854 else
855 {
857 }
859 }
860 }
861 }
862
863 fprintf(
f,
" %6d tracks found after track making\n", ntr);
864
865 float mpar = -1.;
867 mpar = -1.;
868 else
869 mpar = 0.;
870
873
874
876
877 ntr = 0;
879
880
881 int ntrgood = 0;
882 int ntrgood_r = 0;
883 int negflag = 0;
884 int notmatched = 0;
885 int nreject_prob = 0;
886 int nreject_nseg = 0;
887 int ntrgoodb = 0;
888 int ntrgoodb_r = 0;
889 double right_ratio = 0.;
890 float pro = 0.;
891
892
893
894 for(int itr=0; itr<ntr; itr++) {
897 {
898
899 negflag++;
900 continue;
901 }
902 if (
hp[11])
hp[11]->Fill(
tr->N());
904 {
905
906 nreject_nseg++;
907 continue;
908 }
909 trg = 0;
910 if (ntrg)
911 {
912
913 itrg =
tr->GetSegmentsFlag(nsegmatch);
914 if (itrg >= 0 && itrg < ntrg)
915 {
917 }
918 }
919 if (trg && ((pro =
tr->Prob()) < 0.9999))
920 {
921
923 }
925 {
926
927
928
929
930
931
932 nreject_prob++;
933 continue;
934 }
935 if (ntrg)
936 {
937 if (trg)
938 {
939 if (trg->
Flag() == 0)
940 {
941
942 ntrgoodb++;
943 right_ratio = (double)nsegmatch/
tr->N();
945 {
946
947
948 ntrgoodb_r++;
949 }
950 hp[16]->Fill(right_ratio);
951
952 }
953 else if (trg->
Flag() <= nvg)
954 {
955
956 ntrgood++;
957 right_ratio = (double)nsegmatch/
tr->N();
959 {
960
961
962 ntrgood_r++;
963 }
964 hp[15]->Fill(right_ratio);
965 }
966 }
967 else
968 {
969
970 notmatched++;
971 }
972 }
973 else
974 {
975
976 notmatched++;
977 }
978
979
980
981
982
983
984
985 if (
hp[12])
hp[12]->Fill(
tr->GetSegmentFirst()->X()-
tr->GetSegmentFFirst()->X());
986
987 if (trg != 0)
988 {
991
992
994
995
996
997 float pms =
tr->P_MS(
brick.
X0, trg->
M(),
false);
998 if (pms > 0.)
999 {
1000 hp[23]->Fill((1./pms - 1./trg->
P())*trg->
P()*100.);
1001 }
1002 }
1003 }
1004
1005 printf(" %6d tracks found after propagation\n", ntr-negflag);
1006 printf(
" %6d matched tracks found (at vertexes), %6d with right segs >= %.0f%%\n", ntrgood, ntrgood_r,
RightRatioMin*100.);
1007 printf(
" %6d matched tracks found (cosmic ), %6d with right segs >= %.0f%%\n", ntrgoodb, ntrgoodb_r,
RightRatioMin*100.);
1008 printf(" ( %4d tracks not matched with generated ones)\n", notmatched);
1009 printf(
" ( %4d tracks with nseg < %d )\n", nreject_nseg,
nsegMin);
1010 printf(
" ( %4d tracks with prob < %6.3f )\n", nreject_prob,
ProbMinT);
1011 fprintf(
f,
" %6d tracks found after propagation\n", ntr-negflag);
1012 fprintf(
f,
" %6d matched tracks found (at vertexes), %6d with right segs >= %.0f%%\n", ntrgood, ntrgood_r,
RightRatioMin*100.);
1013 fprintf(
f,
" %6d matched tracks found (cosmic ), %6d with right segs >= %.0f%%\n", ntrgoodb, ntrgoodb_r,
RightRatioMin*100.);
1014 fprintf(
f,
" ( %4d tracks not matched with generated ones)\n", notmatched);
1015 fprintf(
f,
" ( %4d tracks with nseg < %d )\n", nreject_nseg,
nsegMin);
1016 fprintf(
f,
" ( %4d tracks with prob < %6.3f )\n", nreject_prob,
ProbMinT);
1017
1023
1024
1025
1026 if (
hp[10])
hp[10]->Fill(ntr-negflag);
1027
1030
1031
1033
1034
1035 int nvgood[100];
1036 int nvgoodm[100];
1037 for (int i=0; i<100; i++) nvgood[i] = 0;
1038 for (int i=0; i<100; i++) nvgoodm[i] = 0;
1039 for (int i=0; i<10000; i++) numrect[i] = 0;
1040
1041 int nadd = 0, npg = 0;
1043
1044
1046
1047
1048
1049 int ivg = 0, nvgoodt = 0, nvgoodmt = 0, np = 0, ntold = 0;
1050 for (int i=0; i<nvtx; i++)
1051 {
1053 if (edbv)
1054 {
1055 if (edbv->
Flag() == -10)
continue;
1057 if (v)
1058 {
1060 {
1062 {
1063
1064 nvgood[np]++;
1065 nvgoodt++;
1068
1069 int ivg0 = -1000000;
1070 if(
tr) ivg0 =
tr->GetSegmentsFlag(nsegmatch);
1071 if (ivg0 >= 0 && ivg0 < ntrg)
1073 else
1074 ivg0 = -1000000;
1075 ivg = -2000000;
1076
1077 for (
int j=1; j<edbv->
N() && ivg0>0; j++)
1078 {
1080 int ivg = -2000000;
1081 if(
tr) ivg =
tr->GetSegmentsFlag(nsegmatch);
1082 if (ivg >= 0 && ivg < ntrg)
1084 else
1085 {
1086 ivg = -2000000;
1087 break;
1088 }
1089 if (ivg != ivg0) break;
1090 }
1091 if (ivg != ivg0) continue;
1092 if (ivg <= 0) continue;
1093 if (ivg > nvg) continue;
1094
1097 npg = edbvg->N();
1098 ntold = numrect[ivg];
1099
1100
1101 if (ntold == 0)
1102 {
1104 numrect[ivg] = npg;
1105 }
1106 nvgoodmt++;
1108 nvgoodm[np]++;
1109
1118 }
1119 }
1120 }
1121 }
1122 }
1123 if (
hp[9])
hp[9]->Fill(nvgoodmt);
1125 {
1126 if (nvgood[i] <= 0) continue;
1127 printf("%6d %d-tracks vertexes found (%d matched to MC)\n", nvgood[i], i, nvgoodm[i]);
1128 fprintf(
f,
"%6d %d-tracks vertexes found (%d matched to MC)\n", nvgood[i], i, nvgoodm[i]);
1131 }
1132 if (nvtx)
1133 {
1134 int nlv =
ali->LinkedVertexes();
1135 printf("------------------------------------------------------------\n");
1136 printf("%d linked vertexes found\n", nlv);
1137 if (nlv)
1138 {
1141 for(int i=0; i<nvtx; i++)
1142 {
1144 if (!vl) continue;
1145 if (vl->
Flag()) > 2)
1146 {
1148 if (!vc) continue;
1149 if (vc->
ID() > vl->
ID())
1150 {
1151
1152
1153 }
1154 }
1155 }
1156 }
1158 {
1159 int nn =
ali->VertexNeighboor(1000., 2, 10000.);
1160 printf("------------------------------------------------------------\n");
1161 printf("%d neighbooring tracks and segments found\n", nn);
1162 }
1163 }
1164}
bool usemom
Definition: RecDispEX.C:20
int maxgaps[6]
Definition: RecDispMC.C:62
bool use_mc_mass
Definition: RecDispMC.C:23
bool mc_make_tracks
Definition: RecDispMC.C:21
bool use_mc_momentum
Definition: RecDispMC.C:22
int rec_primary_vertex_ntracks_min
Definition: RecDispMC.C:25
double DE_FIT
Definition: RecDispMC.C:147
double DE_MC
Definition: RecDispMC.C:147
float AngleAcceptance
Definition: RecDispMC.C:82
void FillHistsV(EdbVertex &edbv, Vertex &v)
Definition: RecDispMC.C:1230
int design
Definition: RecDispMC.C:90
bool select_neighborhood
Definition: RecDispMC.C:29
float ProbMinVN
Definition: RecDispMC.C:85
int MakeTracksMC(int nsegmin, TObjArray *tracks)
Definition: EdbPVGen.cxx:1046
int MakeTracks(int nsegments=2, int flag=0)
Definition: EdbPVRec.cxx:1989
void FillTracksCell()
Definition: EdbPVRec.cxx:1319
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
Float_t P() const
Definition: EdbSegP.h:152
Int_t Flag() const
Definition: EdbSegP.h:149
Float_t M() const
Definition: EdbPattern.h:155
Float_t DE() const
Definition: EdbPattern.h:166
Int_t ID() const
Definition: EdbVertex.h:126
Float_t VX() const
Definition: EdbVertex.h:133
VERTEX::Vertex * V() const
Definition: EdbVertex.h:154
Float_t VY() const
Definition: EdbVertex.h:134
EdbVertex * GetConnectedVertex(int nv)
Definition: EdbVertex.cxx:405
Float_t VZ() const
Definition: EdbVertex.h:135
Definition: VtVertex.hh:88
bool valid() const
is vertex valid?
s
Definition: check_shower.C:55
float X0
Definition: RecDispMC.C:100