43 static bool trkCreateOutput =
true;
44 double xmu, ymu, xsg, ysg, xysg;
47 trkDeltaOri =
new TH2D(
"trkDeltaOri",
"trkDeltaOri;dX (cm);dY (cm)",768,-10,+10,768,-10,+10);
48 trkDeltaRes =
new TH2D(
"trkDeltaRes",
"trkDeltaRes;Normalized dX; Normalized dY",120,-6,+6,120,-6,+6);
49 trkCreateOutput =
false;
55 int cl1[mxcl1], cl2[mxcl2];
57 for(
int i=0;
i< Tree->theBlob.size();
i++)
59 if ( Tree->theBlob.at(
i )->ID() == 0 )
61 if ( Tree->theBlob.at(
i )->ID() == 1 )
65 printf(
"We found more than %d blobs!!\n",mxcl1);
70 printf(
"We found more than %d blobs!!\n",mxcl2);
75 xysg = ReconstructTracks_Ref(xmu,xsg,ymu,ysg);
76 double var[mxcl1][mxcl2];
77 double vc3[mxcl1][mxcl2];
78 for(
int i=0;
i!=ncl1; ++
i)
79 for(
int j=0;
j<ncl2;
j++) {
80 double x1 = Tree->theBlob[cl1[
i]]->BestX();
81 double y1 = Tree->theBlob[cl1[
i]]->BestY();
82 double x2 = Tree->theBlob[cl2[
j]]->BestX();
83 double y2 = Tree->theBlob[cl2[
j]]->BestY();
84 double c1 = Tree->theBlob[cl1[
i]]->GetNSigma();
85 double c2 = Tree->theBlob[cl2[
j]]->GetNSigma();
89 double nSigmaX = (dx-xmu)/xsg;
90 double nSigmaY = (dy-ymu)/ysg;
92 double c3 = nSigmaX*nSigmaX + nSigmaY*nSigmaY;
93 var[
i][
j] = c1*c1+c2*c2+c3;
94 vc3[
i][
j] = TMath::Sqrt(c3);
97 int nMAXtrk=TMath::Min(ncl1,ncl2);
100 for(;ntrk!=nMAXtrk;++ntrk) {
104 for(
int i=0;
i!=ncl1; ++
i) {
106 for(
int n=0;
n!=ntrk; ++
n)
if(trk[
n][0]==cl1[
i]) skip=
true;
109 for(
int j=0;
j!=ncl2; ++
j) {
111 for(
int n=0;
n!=ntrk; ++
n)
if(trk[
n][1]==cl2[
j]) skip=
true;
124 vector<ABlob*> tempvec;
125 tempvec.push_back( Tree->theBlob.at( pi ) );
126 tempvec.push_back( Tree->theBlob.at( pj ) );
128 Tree->theBlob.at(pi)->GetNSigma(),
129 Tree->theBlob.at(pj)->GetNSigma(),