10 const double c = 29.9792548;
16 n_cdc(trackHits->
size()), trkhitVectorPtr(trackHits), trajPtr(trajectory),
17 debug_level(level), errorCDC(0.018)
23 double docaThis, distThis, residThis, errorThis;
24 HepLorentzVector pocaThis;
25 HepVector posWireThis;
32 for (
unsigned int j = 0; j <
n_cdc; j++) {
33 trkhitPtr = (*trkhitVectorPtr)[j];
37 if (docaThis > distThis) {
38 residThis = (distThis - docaThis)/
errorCDC;
42 posWireThis = line.
poca(pocaThis);
43 if (
debug_level > 2) cout <<
"residCDC: j = " << j <<
" dist = " << distThis <<
" doca = " << docaThis <<
" poca xyzt = " << pocaThis.getX() <<
' ' << pocaThis.getY() <<
' ' << pocaThis.getZ() <<
' ' << pocaThis.getT()/
c <<
" resid = " << residThis << endl;
45 doca.push_back(docaThis);
46 dist.push_back(distThis);
47 poca.push_back(pocaThis);
49 resid.push_back(residThis);
50 error.push_back(errorThis);
58 double z = wire->
origin.Z();
59 double theta = acos(wire->
udir.z());
60 double phi = atan2(wire->
udir.y(), wire->
udir.x());
61 if (
debug_level >= 4) cout << setprecision(14) <<
"residCDC::trackhit2line: x = " << x <<
" y = " << y <<
" z = " << z <<
" theta " << theta <<
" phi " << phi << endl;
76 vector<double> &errorsRef,
77 vector<HepLorentzVector> &pocasRef,
78 vector<HepVector> &posWiresRef) {
DLine trackhit2line(const DCDCTrackHit &trackhit)
residCDC(vector< const DCDCTrackHit * > *trackhits, const MyTrajectory *trajectory, int level=1)
double doca(C &spaceObject, HepLorentzVector &poca) const
vector< HepLorentzVector > poca
HepVector poca(HepVector point)
const MyTrajectory * trajPtr
void setInnerResidFrac(double innerResidFracIn)
vector< HepVector > posWire
void getDetails(vector< double > &docasRef, vector< double > &distsRef, vector< double > &errorsRef, vector< HepLorentzVector > &pocasRef, vector< HepVector > &posWiresRef)
void getResids(vector< double > &residsRef)