5 #include "VertexData.h"
10 TrackData::TrackData() {
16 anyMatch=anyVeto=
false;
17 mBtof=mCtb=mBemc=mEemc=mTpc=0;
27 TrackData::matchVertex(
VertexData &V,
float dzMax) {
29 float dz=zDca-V.r.z();
30 bool ret= fabs(dz) < dzMax+ezDca;
31 if(ret) LOG_DEBUG<< Form(
"PPV::matchTr2Ver VerID=%d weight=%.2f anyM=%d anyV=%d m: ctb=%d bemc=%d eemc=%d tpc=%d dz=%.2f +/- %.2f\n",V.id,weight,anyMatch,anyVeto,mCtb,mBemc,mEemc,mTpc,dz,ezDca)<<endm;
39 TrackData::scanNodes(vector<int> &
hit,
int jz0){
46 const int minCenter=4 , minMiss=6;
53 bool vetoL=
false, vetoR=
false, matchL=
false, matchR=
false;
56 memset(nPatt,0,
sizeof(nPatt));
57 for(i=0;i<(int)hit.size();i++) {
60 if(nPatt[1]>mxDev)
break;
61 if(nPatt[0]<minMiss)
continue;
69 memset(nPatt,0,
sizeof(nPatt));
70 for(i=hit.size()-1; i>=0;i--) {
73 if(nPatt[1]>mxDev)
break;
74 if(nPatt[0]<minMiss)
continue;
81 if(jz0>minCenter && jz0<(
int)hit.size()-minCenter) {
83 memset(nPatt,0,
sizeof(nPatt));
84 for(i=jz0-1; i>=0;i--) {
87 if(nPatt[0]>mxDev)
break;
88 if(nPatt[1]<minCenter)
continue;
97 memset(nPatt,0,
sizeof(nPatt));
98 for(i=jz0;i<(int)hit.size();i++) {
101 if(nPatt[0]>mxDev)
break;
102 if(nPatt[1]<minCenter)
continue;
111 bool match= matchL && matchR;
112 bool veto=(vetoL || vetoR) && !match;
115 updateAnyMatch(match,veto,mTpc);
116 weight*=getTpcWeight();
122 TrackData::updateAnyMatch(
bool match,
bool veto,
int & mXXX){
128 }
else if(veto && (!match) ) {
139 TrackData:: getTpcWeight(){
140 const float Wdunno=1, Wmatch=5, Wveto=0.2;
141 if(mTpc>0)
return Wmatch;
142 if(mTpc<0)
return Wveto;