795 float xg, yg, zg, txg, tyg, pg;
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);
837 for (
int itr=0; itr<ntr; itr++) {
842 itrg =
tr->GetSegmentsFlag(nsegmatch);
843 if (itrg >= 0 && itrg < ntrg)
848 else tr->SetErrorP(
p*
p*0.2*0.2);
851 p =
p*(1.+
dpp*gRandom->Gaus());
852 if (
p < 0.050)
p = 0.050;
863 fprintf(
f,
" %6d tracks found after track making\n", ntr);
885 int nreject_prob = 0;
886 int nreject_nseg = 0;
889 double right_ratio = 0.;
894 for(
int itr=0; itr<ntr; itr++) {
902 if (
hp[11])
hp[11]->Fill(
tr->N());
913 itrg =
tr->GetSegmentsFlag(nsegmatch);
914 if (itrg >= 0 && itrg < ntrg)
919 if (trg && ((pro =
tr->Prob()) < 0.9999))
939 if (trg->
Flag() == 0)
943 right_ratio = (double)nsegmatch/
tr->N();
950 hp[16]->Fill(right_ratio);
953 else if (trg->
Flag() <= nvg)
957 right_ratio = (double)nsegmatch/
tr->N();
964 hp[15]->Fill(right_ratio);
985 if (
hp[12])
hp[12]->Fill(
tr->GetSegmentFirst()->X()-
tr->GetSegmentFFirst()->X());
997 float pms =
tr->P_MS(
brick.
X0, trg->
M(),
false);
1000 hp[23]->Fill((1./pms - 1./trg->
P())*trg->
P()*100.);
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);
1026 if (
hp[10])
hp[10]->Fill(ntr-negflag);
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;
1041 int nadd = 0, npg = 0;
1049 int ivg = 0, nvgoodt = 0, nvgoodmt = 0, np = 0, ntold = 0;
1050 for (
int i=0; i<nvtx; i++)
1055 if (edbv->
Flag() == -10)
continue;
1069 int ivg0 = -1000000;
1070 if(
tr) ivg0 =
tr->GetSegmentsFlag(nsegmatch);
1071 if (ivg0 >= 0 && ivg0 < ntrg)
1077 for (
int j=1; j<edbv->
N() && ivg0>0; j++)
1081 if(
tr) ivg =
tr->GetSegmentsFlag(nsegmatch);
1082 if (ivg >= 0 && ivg < ntrg)
1089 if (ivg != ivg0)
break;
1091 if (ivg != ivg0)
continue;
1092 if (ivg <= 0)
continue;
1093 if (ivg > nvg)
continue;
1098 ntold = numrect[ivg];
1123 if (
hp[9])
hp[9]->Fill(nvgoodmt);
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]);
1134 int nlv =
ali->LinkedVertexes();
1135 printf(
"------------------------------------------------------------\n");
1136 printf(
"%d linked vertexes found\n", nlv);
1141 for(
int i=0; i<nvtx; i++)
1145 if (vl->
Flag()) > 2)
1149 if (vc->
ID() > vl->
ID())
1159 int nn =
ali->VertexNeighboor(1000., 2, 10000.);
1160 printf(
"------------------------------------------------------------\n");
1161 printf(
"%d neighbooring tracks and segments found\n", nn);
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:1985
void FillTracksCell()
Definition: EdbPVRec.cxx:1315
void FillCell(float stepx, float stepy, float steptx, float stepty)
Definition: EdbPVRec.cxx:1088
int Link()
Definition: EdbPVRec.cxx:1183
int PropagateTracks(int nplmax, int nplmin, float probMin=0.05, int ngapMax=3, int design=0)
Definition: EdbPVRec.cxx:2483
void FitTracks(float p=10., float mass=0.139, TObjArray *gener=0, int design=0)
Definition: EdbPVRec.cxx:1889
Float_t P() const
Definition: EdbSegP.h:149
Int_t Flag() const
Definition: EdbSegP.h:146
Float_t M() const
Definition: EdbPattern.h:160
Float_t DE() const
Definition: EdbPattern.h:171
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:427
Float_t VZ() const
Definition: EdbVertex.h:135
Definition: VtVertex.hh:88
bool valid() const
is vertex valid?
float X0
Definition: RecDispMC.C:100
EdbSegP * s
Definition: tlg2pattern.C:32