diff --git a/src/THcDC.h b/src/THcDC.h index 097a68e138ac36fd18bf7facc5b023f1672711e1..6a46a9cf33128480760cca2c172fa2c8db1df32c 100644 --- a/src/THcDC.h +++ b/src/THcDC.h @@ -132,7 +132,7 @@ protected: // double tan_angle, sin_angle, cos_angle; // Intermediate structure for building - static const char MAXTRACKS = 50; + static const char MAXTRACKS = 10; std::vector<THcDriftChamberPlane*> fPlanes; // List of plane objects std::vector<THcDriftChamber*> fChambers; // List of chamber objects diff --git a/src/THcDriftChamber.cxx b/src/THcDriftChamber.cxx index 4ac8419201926ed35f461822b3dd9bb49b89fc65..33c1b657184733f523def66a4e1ca725b3e11a4d 100644 --- a/src/THcDriftChamber.cxx +++ b/src/THcDriftChamber.cxx @@ -962,6 +962,7 @@ void THcDriftChamber::LeftRight() Int_t plane_list[nhits]; Double_t stub[4]; Double_t tmp_stub[4]; + Int_t nplusminus; if(nhits < 0) { if (fDebugDriftCh) cout << "THcDriftChamber::LeftRight() nhits < 0" << endl; @@ -980,6 +981,7 @@ void THcDriftChamber::LeftRight() if(pindex == YPlaneInd) hasy1 = ihit; if(pindex == YPlanePInd) hasy2 = ihit; } + nplusminus = 1<<nhits; Int_t smallAngOK = (hasy1>=0) && (hasy2>=0); if(fSmallAngleApprox !=0 && smallAngOK) { // to small Angle L/R for Y,Y' planes if(sp->GetHit(hasy2)->GetPos() <= @@ -990,6 +992,7 @@ void THcDriftChamber::LeftRight() plusminusknown[hasy1] = 1; plusminusknown[hasy2] = -1; } + nplusminus = 1<<(nhits-2); if (fDebugDriftCh) cout << " Small angle approx = " << smallAngOK << " " << plusminusknown[hasy1] << endl; if (fDebugDriftCh) cout << "pm = " << plusminusknown[hasy2] << " " << hasy1 << " " << hasy2 << endl; if (fDebugDriftCh) cout << " Plane index " << YPlaneInd << " " << YPlanePInd << endl; @@ -1000,7 +1003,6 @@ void THcDriftChamber::LeftRight() if (fDebugDriftCh) cout << "THcDriftChamber::LeftRight: numhits-2 = 0" << endl; } Int_t nplaneshit = Count1Bits(bitpat); - Int_t nplusminus = 1<<(nhits-2); if (fDebugDriftCh) cout << " num of pm = " << nplusminus << " num of hits =" << nhits << endl; // Use bit value of integer word to set + or - // Loop over all combinations of left right.