From acdb3c23fd43d27691cf8df78007eeff928e9ee5 Mon Sep 17 00:00:00 2001 From: Simon Taylor Date: Tue, 31 Oct 2017 11:27:48 -0400 Subject: [PATCH 1/4] add code in Method2 to try to prevent false matches --- src/libraries/TRACKING/DTrackCandidate_factory.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libraries/TRACKING/DTrackCandidate_factory.cc b/src/libraries/TRACKING/DTrackCandidate_factory.cc index 0797df68c..be127a2a6 100644 --- a/src/libraries/TRACKING/DTrackCandidate_factory.cc +++ b/src/libraries/TRACKING/DTrackCandidate_factory.cc @@ -1405,6 +1405,16 @@ bool DTrackCandidate_factory::MatchMethod1(const DTrackCandidate *fdccan, DVector3 mom=fdccan->momentum(); double q=fdccan->charge(); + // Check to see if the outer hit in the CDC does not exceed the radius of + // the FDC position to try to avoid false matches... + unsigned int outer_index=cdchits.size()-1; + DVector3 origin=cdchits[outer_index]->wire->origin; + DVector3 dir=(1./cdchits[outer_index]->wire->udir.z())*cdchits[outer_index]->wire->udir; + DVector3 cdc_outer_wire_pos=origin+(167.-origin.z())*dir; + if (cdc_outer_wire_pos.Perp()>pos.Perp()) { + continue; + } + // loop over the cdc hits and count hits that agree with a projection of // the helix into the cdc for (unsigned int m=0;m Date: Tue, 7 Nov 2017 07:50:31 -0500 Subject: [PATCH 2/4] tweak some parameters --- .../TRACKING/DTrackCandidate_factory.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libraries/TRACKING/DTrackCandidate_factory.cc b/src/libraries/TRACKING/DTrackCandidate_factory.cc index be127a2a6..c9be9d9ff 100644 --- a/src/libraries/TRACKING/DTrackCandidate_factory.cc +++ b/src/libraries/TRACKING/DTrackCandidate_factory.cc @@ -193,8 +193,8 @@ jerror_t DTrackCandidate_factory::brun(JEventLoop* eventLoop,int32_t runnumber){ gPARMS->SetDefaultParameter("TRKFIND:MAX_NUM_TRACK_CANDIDATES", MAX_NUM_TRACK_CANDIDATES); - MIN_NUM_HITS=6; - gPARMS->SetDefaultParameter("TRKFIND:MIN_NUM_HITS", MIN_NUM_HITS); + // MIN_NUM_HITS=6; + //gPARMS->SetDefaultParameter("TRKFIND:MIN_NUM_HITS", MIN_NUM_HITS); DEBUG_LEVEL=0; gPARMS->SetDefaultParameter("TRKFIND:DEBUG_LEVEL", DEBUG_LEVEL); @@ -670,7 +670,7 @@ jerror_t DTrackCandidate_factory::evnt(JEventLoop *loop, uint64_t eventnumber) vectorcdc_hits_to_add; for (unsigned int k=0;k2){ + if (cdc_hits_to_add.size()>1){ // variables needed for average Bz unsigned int num_hits=0; double Bz=0; @@ -708,7 +708,7 @@ jerror_t DTrackCandidate_factory::evnt(JEventLoop *loop, uint64_t eventnumber) min_ring=mycdchits[ind]->wire->ring; } } - if (num_hits>2){ + if (num_hits>=2){ for (unsigned int n=0;nmycdchits; candidate->GetT(mycdchits); - if (int(mycdchits.size()+myfdchits.size())>=MIN_NUM_HITS){ + if (mycdchits.size()>=6 || myfdchits.size()>=3){ _data.push_back(candidate); } else delete candidate; @@ -1418,7 +1418,7 @@ bool DTrackCandidate_factory::MatchMethod1(const DTrackCandidate *fdccan, // loop over the cdc hits and count hits that agree with a projection of // the helix into the cdc for (unsigned int m=0;m Date: Wed, 22 Nov 2017 16:49:29 -0500 Subject: [PATCH 3/4] tweak some matching parameters --- src/libraries/TRACKING/DTrackCandidate_factory.cc | 4 ++-- src/libraries/TRACKING/DTrackCandidate_factory_FDCCathodes.cc | 2 +- src/libraries/TRACKING/DTrackCandidate_factory_FDCCathodes.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libraries/TRACKING/DTrackCandidate_factory.cc b/src/libraries/TRACKING/DTrackCandidate_factory.cc index c9be9d9ff..f0d865603 100644 --- a/src/libraries/TRACKING/DTrackCandidate_factory.cc +++ b/src/libraries/TRACKING/DTrackCandidate_factory.cc @@ -55,7 +55,7 @@ inline bool cdc_fdc_match(double p_fdc,double p_cdc,double dist){ //double frac2=fabs(1.-p_fdc/p_cdc); double p=p_fdc; if (p_cdc

{ inline double DTrackCandidate_factory_FDCCathodes::Match(double p){ double cut=5.5/p; if (cut>9.0) cut=9.0; - if (cut<1.) cut=1.0; + if (cut<5.) cut=5.0; return cut; } From 8eec2e0dbfb613661e3369aa2449594413c504d1 Mon Sep 17 00:00:00 2001 From: Simon Taylor Date: Mon, 27 Nov 2017 10:46:46 -0500 Subject: [PATCH 4/4] remove call to get obsolete lorentz deflection table and remove references to this obsolete table. --- src/libraries/TRACKING/DTrackFitter.cc | 1 - src/libraries/TRACKING/DTrackFitter.h | 1 - src/libraries/TRACKING/DTrackFitterALT1.cc | 9 +++++---- src/libraries/TRACKING/DTrackFitterRiemann.cc | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/libraries/TRACKING/DTrackFitter.cc b/src/libraries/TRACKING/DTrackFitter.cc index f002e04c5..f95966608 100644 --- a/src/libraries/TRACKING/DTrackFitter.cc +++ b/src/libraries/TRACKING/DTrackFitter.cc @@ -48,7 +48,6 @@ DTrackFitter::DTrackFitter(JEventLoop *loop) return; } bfield = dapp->GetBfield(run_number); - lorentz_def=dapp->GetLorentzDeflections(run_number); geom = dapp->GetDGeometry(run_number); RootGeom=NULL; diff --git a/src/libraries/TRACKING/DTrackFitter.h b/src/libraries/TRACKING/DTrackFitter.h index b94d6af82..906fec0bd 100644 --- a/src/libraries/TRACKING/DTrackFitter.h +++ b/src/libraries/TRACKING/DTrackFitter.h @@ -179,7 +179,6 @@ class DTrackFitter:public jana::JObject{ DTrackingData input_params; //< Starting parameters for the fit fit_type_t fit_type; //< kWireBased or kTimeBased const DMagneticFieldMap *bfield; //< Magnetic field map for current event (acquired through loop) - const DLorentzDeflections *lorentz_def;//< Correction to FDC cathodes due to Lorentz force const DGeometry *geom; //< DGeometry pointer used to access materials through calibDB maps for eloss const DRootGeom *RootGeom; //< ROOT geometry used for accessing material for MULS, energy loss JEventLoop *loop; //< Pointer to JEventLoop object handling the current event diff --git a/src/libraries/TRACKING/DTrackFitterALT1.cc b/src/libraries/TRACKING/DTrackFitterALT1.cc index d9fad5949..8681419ed 100644 --- a/src/libraries/TRACKING/DTrackFitterALT1.cc +++ b/src/libraries/TRACKING/DTrackFitterALT1.cc @@ -732,7 +732,7 @@ void DTrackFitterALT1::GetHits(fit_type_t fit_type, DReferenceTrajectory *rt, hi double tof = s/beta/1.0E-9; // in ns hi.dist = 55E-4*(hit->time-tof); hi.err = SIGMA_FDC_ANODE; - + /* if(USE_FDC_CATHODE){ // Find whether the track is on the "left" or "right" of the wire DVector3 shift = wire->udir.Cross(mom_doca); @@ -754,9 +754,10 @@ void DTrackFitterALT1::GetHits(fit_type_t fit_type, DReferenceTrajectory *rt, hi hi.u_err = SIGMA_FDC_CATHODE; }else{ // User specified not to use FDC cathode information in the fit. - hi.u_dist = 0.0; - hi.u_err = 0.0; // setting u_err to zero means it's excluded from chi-sq - } + */ + hi.u_dist = 0.0; + hi.u_err = 0.0; // setting u_err to zero means it's excluded from chi-sq + // } } hinfo.push_back(hi); } diff --git a/src/libraries/TRACKING/DTrackFitterRiemann.cc b/src/libraries/TRACKING/DTrackFitterRiemann.cc index 2c3655b85..a6a58fd82 100644 --- a/src/libraries/TRACKING/DTrackFitterRiemann.cc +++ b/src/libraries/TRACKING/DTrackFitterRiemann.cc @@ -597,7 +597,7 @@ jerror_t DTrackFitterRiemann::GetFDCPosition(DRiemannHit_t *hit){ double delta_x=sign*(hit->fdc->time-sperp*one_over_vcosl)*55E-4; // Next find correction to y from table of deflections - double delta_y=lorentz_def->GetLorentzCorrection(XYp.X(),XYp.Y(),hit->z,theta,delta_x); + double delta_y=0.; double u=hit->fdc->w+delta_x; double v=hit->fdc->s-delta_y;