Skip to content
Snippets Groups Projects
Commit 0015a43c authored by Mark Jones's avatar Mark Jones Committed by Mark K Jones
Browse files

Modify THcDC

In THcDC.h change MAXTRACKS from 10 to 50. The maximum
number of tracks is set by parameter ntracks_max_fp

Previously the LinkStubs method would not create
a track if the total number of spacepoints in
the two chambers was larger than 10.

Now LinkStubs will create a vector of THcSpacePoints
of up to 100 spacepoints with no more than
50 spacepoints from chamber 1 and use that
to find possible tracks.

I
parent 47654018
No related branches found
No related tags found
No related merge requests found
......@@ -736,11 +736,11 @@ void THcDC::LinkStubs()
std::vector<THcSpacePoint*> fSp;
fNSp=0;
fSp.clear();
fSp.reserve(10);
fSp.reserve(100);
fNDCTracks=0; // Number of Focal Plane tracks found
fDCTracks->Delete();
// Make a vector of pointers to the SpacePoints
if (fChambers[0]->GetNSpacePoints()+fChambers[1]->GetNSpacePoints()>10) return;
//if (fChambers[0]->GetNSpacePoints()+fChambers[1]->GetNSpacePoints()>10) return;
for(UInt_t ich=0;ich<fNChambers;ich++) {
Int_t nchamber=fChambers[ich]->GetChamberNum();
......@@ -750,7 +750,8 @@ void THcDC::LinkStubs()
fSp[fNSp]->fNChamber = nchamber;
fSp[fNSp]->fNChamber_spnum = isp;
fNSp++;
if (fNSp>10) break;
if (ich==0 && fNSp>50) break;
if (fNSp>100) break;
}
}
Double_t stubminx = 999999;
......@@ -817,7 +818,7 @@ void THcDC::LinkStubs()
fStubTest = 1;
//stubtest=1; Used in h_track_tests.f
// Make a new track if there are not to many
if(fNDCTracks < MAXTRACKS) {
if(fNDCTracks < fNTracksMaxFP) {
sptracks=0; // Number of tracks with this seed
stub_tracks[sptracks++] = fNDCTracks;
THcDCTrack *theDCTrack = new( (*fDCTracks)[fNDCTracks++]) THcDCTrack(fNPlanes);
......
......@@ -189,7 +189,7 @@ protected:
// double tan_angle, sin_angle, cos_angle;
// Intermediate structure for building
static const UInt_t MAXTRACKS = 10;
static const UInt_t MAXTRACKS = 50;
std::vector<THcDriftChamberPlane*> fPlanes; // List of plane objects
std::vector<THcDriftChamber*> fChambers; // List of chamber objects
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment