/** * \file ExtTrack.cpp * \author Elena Vannuccini */ #include #include #include using namespace std; ExtTrack::ExtTrack(int dim){ //cout << " ExtTrack::ExtTrack("< 1 || ip < 0 || ippp > 5 || il < 0 || il > 2) && true){ cout << " void ExtTrack::FillMiniStruct(TrkTrack&) --- WARNING ---trk sensor not defined, cannot read alignment parameters "<=nplanes){ cout << " ExtTrack::SetZ("< exceed vector dimension = "<=nplanes){ cout << " ExtTrack::ResetXY("< exceed vector dimension = "<=nplanes){ cout << " ExtTrack::SetXY("< exceed vector dimension = "<=nplanes){ cout << " ExtTrack::SetX("< exceed vector dimension = "<=nplanes){ cout << " ExtTrack::SetX("< exceed vector dimension = "<=nplanes){ cout << " ExtTrack::SetXGood("< exceed vector dimension = "<=nplanes){ cout << " ExtTrack::SetYGood("< exceed vector dimension = "<0){ if(xgood) delete [] xgood; if(ygood) delete [] ygood; if(multmaxx) delete [] multmaxx; if(multmaxy) delete [] multmaxy; if(xm) delete [] xm; if(ym) delete [] ym; if(zm) delete [] zm; if(xma) delete [] xma; if(yma) delete [] yma; if(zma) delete [] zma; if(xmb) delete [] xmb; if(ymb) delete [] ymb; if(zmb) delete [] zmb; if(resx) delete [] resx; if(resy) delete [] resy; if(xv) delete [] xv; if(yv) delete [] yv; if(zv) delete [] zv; if(axv) delete [] axv; if(ayv) delete [] ayv; if(dedx_x)delete [] dedx_x; if(dedx_y)delete [] dedx_y; //} xgood = NULL; ygood = NULL; multmaxx = NULL; multmaxy = NULL; xm = NULL; ym = NULL; zm = NULL; xma = NULL; yma = NULL; zma = NULL; xmb = NULL; ymb = NULL; zmb = NULL; resx = NULL; resy = NULL; xv = NULL; yv = NULL; zv = NULL; axv = NULL; ayv = NULL; dedx_x = NULL; dedx_y = NULL; nplanes = 0; // Reset(); }; void ExtTrack::Delete(){ Clear(); // delete [] xGF; // delete [] yGF; } //-------------------------------------- // // //-------------------------------------- // /** // * Set the position measurements // */ // void ExtTrack::SetMeasure(Double_t *xmeas, Double_t *ymeas, Double_t *zmeas){ // for(int i=0; i0. ? 1./sqrt(coval[4][4]) : 0. ) ; cout << endl << "dedx_x : "; for(int i=0; i>>> fit failed "<al[i]); for(int j=0; j<5; j++) coval[i][j] = (float) (track->cov[i][j]); } chi2 = (float) (track->chi2); nstep = (float) (track->nstep); for(int i=0; ixv[i]); yv[i] = (float) (track->yv[i]); zv[i] = (float) (track->zv[i]); xm[i] = (float) (track->xm[i]); ym[i] = (float) (track->ym[i]); zm[i] = (float) (track->zm[i]); xma[i] = (float) (track->xm_a[i]); yma[i] = (float) (track->ym_a[i]); zma[i] = (float) (track->zm_a[i]); xmb[i] = (float) (track->xm_b[i]); ymb[i] = (float) (track->ym_b[i]); zmb[i] = (float) (track->zm_b[i]); axv[i] = (float) (track->axv[i]); ayv[i] = (float) (track->ayv[i]); } zini = (float) (track->zini); } /** * Method to retrieve ID (0,1,...) of x-cluster (if any) associated to this track. * If no cluster is associated, ID=-1. * */ int ExtTrack::GetClusterX_ID(int ip){ return ((int)fabs(xgood[ip]))%10000000-1; }; /** * Method to retrieve ID (0-xxx) of y-cluster (if any) associated to this track. * */ int ExtTrack::GetClusterY_ID(int ip){ return ((int)fabs(ygood[ip]))%10000000-1; }; /** * Method to retrieve the ladder, if assigned */ int ExtTrack::GetLadder(int ip){ if(XGood(ip))return (int)fabs(xgood[ip]/100000000)-1; if(YGood(ip))return (int)fabs(ygood[ip]/100000000)-1; return -1; }; /** * Method to retrieve the sensor, if assigned */ int ExtTrack::GetSensor(int ip){ if(XGood(ip))return (int)((int)fabs(xgood[ip]/10000000)%10)-1; if(YGood(ip))return (int)((int)fabs(ygood[ip]/10000000)%10)-1; return -1; }; /** * */ Int_t ExtTrack::GetClusterX_Multiplicity(int ip){ if(ip<0 || ip>=nplanes){ cout << " ExtTrack::GetClusterX_Multiplicity("< exceed vector dimension = "<=nplanes){ cout << " ExtTrack::GetClusterY_Multiplicity("< exceed vector dimension = "<=nplanes){ cout << " ExtTrack::GetClusterX_MaxStrip("< exceed vector dimension = "<=nplanes){ cout << " ExtTrack::GetClusterY_MaxStrip("< exceed vector dimension = "<0)rig=1./al[4]; if(rig<0) rig=-rig; return rig; }; ClassImp(ExtTrack);