Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DTrackFitter.cc
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DTrackFitter.cc
4 // Created: Tue Sep 2 09:10:48 EDT 2008
5 // Creator: davidl (on Darwin Amelia.local 8.11.1 i386)
6 //
7 
10 
11 
12 #include "DTrackFitter.h"
13 #include "PID/DParticleID.h"
14 #include "HDGEOMETRY/DRootGeom.h"
15 using namespace jana;
16 
17 // hi-res timers for profiling
18 // The PROFILE_TRK_TIMES compile time option is intended to enable keeping track
19 // of the time needed to do the tracking using three system-level interval timers.
20 #ifdef PROFILE_TRK_TIMES
21 #include <prof_time.h>
22 static map<string, prof_time::time_diffs> prof_times;
23 #endif
24 
25 extern bool FDCSortByZincreasing(const DFDCPseudo* const &hit1, const DFDCPseudo* const &hit2);
26 extern bool CDCSortByRincreasing(const DCDCTrackHit* const &hit1, const DCDCTrackHit* const &hit2);
27 
28 //-------------------
29 // DTrackFitter (Constructor)
30 //-------------------
31 DTrackFitter::DTrackFitter(JEventLoop *loop)
32 {
33  this->loop = loop;
34  bfield=NULL;
35  fit_status = kFitNotDone;
36  unsigned int run_number = (loop->GetJEvent()).GetRunNumber();
37  DEBUG_LEVEL=0;
38 
39  CORRECT_FOR_ELOSS=true;
40  gPARMS->SetDefaultParameter("TRKFIT:CORRECT_FOR_ELOSS",CORRECT_FOR_ELOSS);
41 
42 
43  DApplication* dapp = dynamic_cast<DApplication*>(loop->GetJApplication());
44  if(!dapp){
45  _DBG_<<"Cannot get DApplication from JEventLoop! (are you using a JApplication based program?)"<<endl;
46  return;
47  }
48  bfield = dapp->GetBfield(run_number);
49  geom = dapp->GetDGeometry(run_number);
50 
51  RootGeom=NULL;
52  MATERIAL_MAP_MODEL = "DGeometry";
53  gPARMS->SetDefaultParameter("TRKFIT:MATERIAL_MAP_MODEL",MATERIAL_MAP_MODEL);
54  if(MATERIAL_MAP_MODEL=="DRootGeom"){
55  RootGeom = dapp->GetRootGeom(run_number);
56  }
57  // Create the extrapolation vectors
58  vector<Extrapolation_t>myvector;
59  extrapolations.emplace(SYS_BCAL,myvector);
60  extrapolations.emplace(SYS_TOF,myvector);
61  extrapolations.emplace(SYS_FCAL,myvector);
62  extrapolations.emplace(SYS_FDC,myvector);
63  extrapolations.emplace(SYS_CDC,myvector);
64  extrapolations.emplace(SYS_START,myvector);
65  extrapolations.emplace(SYS_DIRC,myvector);
66 
67  extrapolations[SYS_TOF].reserve(1);
68  extrapolations[SYS_BCAL].reserve(300);
69  extrapolations[SYS_FCAL].reserve(2);
70  extrapolations[SYS_FDC].reserve(24);
71  extrapolations[SYS_CDC].reserve(200);
72  extrapolations[SYS_START].reserve(1);
73  extrapolations[SYS_DIRC].reserve(1);
74 
75  pulls.reserve(30);
76 
77 #ifdef PROFILE_TRK_TIMES
78  // Use a special entry to hold how many tracks we fit
79  prof_time::time_diffs tdiff_zero;
80  prof_times["Ntracks"] = tdiff_zero;
81 #endif
82 }
83 
84 //-------------------
85 // ~DTrackFitter (Destructor)
86 //-------------------
88 {
89 }
90 
91 //-------------------
92 // Reset
93 //-------------------
95 {
96 #ifdef PROFILE_TRK_TIMES
98 #endif
99  IsSmoothed=false;
100  cdchits.clear();
101  fdchits.clear();
102  fit_type = kWireBased;
103  chisq = 1.0E6;
104  Ndof=0;
105  cdchits_used_in_fit.clear();
106  fdchits_used_in_fit.clear();
107  ClearExtrapolations();
108  pulls.clear();
109 
110  fit_status = kFitNotDone;
111 
112 #ifdef PROFILE_TRK_TIMES
113  start_time.TimeDiffNow(prof_times, "Reset");
114 #endif
115 }
116 
117 //-------------------
118 // AddHit
119 //-------------------
121 {
122  cdchits.push_back(cdchit);
123  fit_status = kFitNotDone;
124 }
125 
126 //-------------------
127 // AddHits
128 //-------------------
129 void DTrackFitter::AddHits(vector<const DCDCTrackHit*> cdchits)
130 {
131  for(unsigned int i=0; i<cdchits.size(); i++)this->cdchits.push_back(cdchits[i]);
132  fit_status = kFitNotDone;
133 }
134 
135 //-------------------
136 // AddHit
137 //-------------------
138 void DTrackFitter::AddHit(const DFDCPseudo* fdchit)
139 {
140  fdchits.push_back(fdchit);
141  fit_status = kFitNotDone;
142 }
143 
144 //-------------------
145 // AddHits
146 //-------------------
147 void DTrackFitter::AddHits(vector<const DFDCPseudo*> fdchits)
148 {
149  for(unsigned int i=0; i<fdchits.size(); i++)this->fdchits.push_back(fdchits[i]);
150  fit_status = kFitNotDone;
151 }
152 
153 //-------------------
154 // FitTrack
155 //-------------------
156 DTrackFitter::fit_status_t DTrackFitter::FitTrack(const DVector3 &pos, const DVector3 &mom, double q, double mass,double t0,DetectorSystem_t t0_det)
157 {
158 #ifdef PROFILE_TRK_TIMES
160 #endif
161  input_params.setPosition(pos);
162  input_params.setMomentum(mom);
163  input_params.setPID(IDTrack(q, mass));
164  input_params.setTime(t0);
165  input_params.setT0(t0,0.,t0_det);
166 
167  DTrackFitter::fit_status_t status = FitTrack();
168 
169 #ifdef PROFILE_TRK_TIMES
170  start_time.TimeDiffNow(prof_times, "Fit Track 1");
171 #endif
172 
173  return status;
174 }
175 
176 //-------------------
177 // FitTrack
178 //-------------------
180 {
181 #ifdef PROFILE_TRK_TIMES
183 #endif
184 
185  SetInputParameters(starting_params);
186  DTrackFitter::fit_status_t status = FitTrack();
187 
188 #ifdef PROFILE_TRK_TIMES
189  start_time.TimeDiffNow(prof_times, "Fit Track 2");
190 #endif
191 
192  return status;
193 }
194 //-------------------
195 // FindHitsAndFitTrack
196 //-------------------
199  const map<DetectorSystem_t,vector<DTrackFitter::Extrapolation_t> >&extrapolations,
200  JEventLoop *loop,
201  double mass,int N,double t0,
202  DetectorSystem_t t0_det){
203  // Reset fitter saving the type of fit we're doing
204  fit_type_t save_type = fit_type;
205  Reset();
206  fit_type = save_type;
207 
208  // If a mass<0 is passed in, get it from starting_params instead
209  if(mass<0.0)mass = starting_params.mass();
210  // charge of the track
211  double q=starting_params.charge();
212 
213  // Get pointer to DTrackHitSelector object
214  vector<const DTrackHitSelector *> hitselectors;
215  loop->Get(hitselectors);
216  if(hitselectors.size()<1){
217  _DBG_<<"Unable to get a DTrackHitSelector object! NO Charged track fitting will be done!"<<endl;
218  return fit_status = kFitNotDone;
219  }
220  const DTrackHitSelector * hitselector = hitselectors[0];
221 
222  // Get hits to be used for the fit
223  vector<const DCDCTrackHit*> cdctrackhits;
224  vector<const DFDCPseudo*> fdcpseudos;
225  loop->Get(cdctrackhits);
226  loop->Get(fdcpseudos);
227 
228  // Get Bfield at the position at the middle of the extrapolations, i.e. the
229  // region where we actually have measurements...
230  bool got_hits=false;
231  if (extrapolations.at(SYS_CDC).size()>0){
232  vector<Extrapolation_t>extraps=extrapolations.at(SYS_CDC);
233  DVector3 mypos=extraps[extraps.size()/2].position;
234  double Bz=GetDMagneticFieldMap()->GetBz(mypos.x(),mypos.y(),mypos.z());
235  hitselector->GetCDCHits(Bz,q,extraps,cdctrackhits,this,N);
236  got_hits=true;
237  }
238  if (extrapolations.at(SYS_FDC).size()>0){
239  vector<Extrapolation_t>extraps=extrapolations.at(SYS_FDC);
240  DVector3 mypos=extraps[extraps.size()/2].position;
241  double Bz=GetDMagneticFieldMap()->GetBz(mypos.x(),mypos.y(),mypos.z());
242  hitselector->GetFDCHits(Bz,q,extraps,fdcpseudos,this,N);
243  got_hits=true;
244  }
245  if (got_hits==false){
246  return fit_status = kFitNotDone;
247  }
248 
249  // In case the subclass doesn't actually set the mass ....
250  fit_params.setPID(IDTrack(q, mass));
251 
252 #ifdef PROFILE_TRK_TIMES
253  start_time.TimeDiffNow(prof_times, "Find Hits");
254 #endif
255 
256  // Do the fit
257  DVector3 pos = starting_params.position();
258  DVector3 mom = starting_params.momentum();
259  fit_status = FitTrack(pos, mom,q, mass,t0,t0_det);
260 
261 #ifdef PROFILE_TRK_TIMES
262  start_time.TimeDiffNow(prof_times, "Find Hits and Fit Track");
263 #endif
264 
265  return fit_status;
266 }
267 //-------------------
268 // FindHitsAndFitTrack
269 //-------------------
272  const DReferenceTrajectory *rt, JEventLoop *loop,
273  double mass,int N,double t0,
274  DetectorSystem_t t0_det)
275 {
276  /// Fit a DTrackCandidate using a given mass hypothesis.
277  ///
278  /// This will perform a full wire-based and time-based
279  /// fit using the given mass and starting from the given
280  /// candidate. The given DReferenceTrajectory is used to
281  /// swim the track numerous times during the various stages
282  /// but will be left with the final time-based fit result.
283  /// The JEventLoop given will be used to get the hits (CDC
284  /// and FDC) and default DTrackHitSelector to use for the
285  /// fit.
286 #ifdef PROFILE_TRK_TIMES
287  prof_times["Ntracks"].real += 1.0; // keep count of the number of tracks we fit
288 
290 #endif
291 
292  // Reset fitter saving the type of fit we're doing
293  fit_type_t save_type = fit_type;
294  Reset();
295  fit_type = save_type;
296 
297  // If a mass<0 is passed in, get it from starting_params instead
298  if(mass<0.0)mass = starting_params.mass();
299 
300  // Correct for energy loss in target etc. based on particle mass in starting_params
301  DVector3 pos, mom; // (holds parameters at vertex after correction)
302  /*
303  if(CORRECT_FOR_ELOSS && fit_type==kWireBased){
304  jerror_t err = CorrectForELoss(starting_params, rt, pos, mom, mass);
305  if(err != NOERROR){
306  pos = starting_params.position();
307  mom = starting_params.momentum();
308  }
309  }else{
310  */
311  pos = starting_params.position();
312  mom = starting_params.momentum();
313  //}
314  double q=starting_params.charge();
315 
316  // Swim a reference trajectory with this candidate's parameters
317  //rt->Swim(pos, mom, q);
318  //if(rt->Nswim_steps<1)return fit_status = kFitFailed;
319 
320  // Get pointer to DTrackHitSelector object
321  vector<const DTrackHitSelector *> hitselectors;
322  loop->Get(hitselectors);
323  if(hitselectors.size()<1){
324  _DBG_<<"Unable to get a DTrackHitSelector object! NO Charged track fitting will be done!"<<endl;
325  return fit_status = kFitNotDone;
326  }
327  const DTrackHitSelector * hitselector = hitselectors[0];
328 
329  // Get hits to be used for the fit
330  vector<const DCDCTrackHit*> cdctrackhits;
331  vector<const DFDCPseudo*> fdcpseudos;
332  loop->Get(cdctrackhits);
333  loop->Get(fdcpseudos);
335  hitselector->GetAllHits(input_type, rt, cdctrackhits, fdcpseudos, this,N);
336 
337  // If the condition below is met, it seems that the track parameters
338  // are inconsistent with the hits used to create the track candidate,
339  // in which case we have to bail...
340  if (fdchits.size()+cdchits.size()==0) return fit_status=kFitNotDone;
341 
342  // In case the subclass doesn't actually set the mass ....
343  fit_params.setPID(IDTrack(q, mass));
344 
345 #ifdef PROFILE_TRK_TIMES
346  start_time.TimeDiffNow(prof_times, "Find Hits");
347 #endif
348 
349  // Do the fit
350  fit_status = FitTrack(pos, mom,q, mass,t0,t0_det);
351 
352 #ifdef PROFILE_TRK_TIMES
353  start_time.TimeDiffNow(prof_times, "Find Hits and Fit Track");
354 #endif
355 
356  return fit_status;
357 }
358 
359 //------------------
360 // CorrectForELoss
361 //------------------
362 jerror_t DTrackFitter::CorrectForELoss(const DKinematicData &starting_params, DReferenceTrajectory *rt, DVector3 &pos, DVector3 &mom, double mass)
363 {
364  // Find first wire hit by this track
365  const DCoordinateSystem *first_wire = NULL;
366  vector<const DCDCTrackHit*> cdchits;
367  starting_params.Get(cdchits);
368  if(cdchits.size()>0){
369  sort(cdchits.begin(), cdchits.end(), CDCSortByRincreasing);
370  first_wire = cdchits[cdchits.size()/2]->wire;
371  }else{
372  vector<const DFDCPseudo*> fdchits;
373  starting_params.Get(fdchits);
374  if(fdchits.size()!=0){
375  sort(fdchits.begin(), fdchits.end(), FDCSortByZincreasing);
376  first_wire = fdchits[fdchits.size()/2]->wire;
377  }
378  }
379  if(!first_wire){
380  //_DBG_<<"NO WIRES IN CANDIDATE!! (event "<<eventnumber<<")"<<endl;
381  return RESOURCE_UNAVAILABLE;
382  }
383 
384  // Swim from vertex to first wire hit. Disable momentum loss.
385  rt->SetDGeometry(geom);
386  rt->SetMass(0.0);
387  rt->FastSwim(starting_params.position(),starting_params.momentum(),
388  pos,mom,starting_params.charge(), 1000.0, first_wire);
389 
390  // Define target center
391  DCoordinateSystem target;
392  target.origin.SetXYZ(0.0, 0.0, 65.0);
393  target.sdir.SetXYZ(1.0, 0.0, 0.0);
394  target.tdir.SetXYZ(0.0, 1.0, 0.0);
395  target.udir.SetXYZ(0.0, 0.0, 1.0);
396  target.L = 30.0;
397 
398  // Swim backwards to target, setting momentum to *increase* due to material
399  rt->SetMass(mass);
401  rt->FastSwim(pos,-mom,pos,mom,-starting_params.charge(), 1000.0,
402  &target);
404 
405  // Reverse momentum
406  mom = -mom;
407 
408  return NOERROR;
409 }
410 
411 // Calculate the density effect correction to the energy loss formulae
412 double DTrackFitter::CalcDensityEffect(double p,double mass,double density,
413  double Z_over_A,double I){
414  double rho_Z_over_A=density*Z_over_A;
415  double LnI=log(I);
416  return CalcDensityEffect(p,mass,rho_Z_over_A,LnI);
417 }
418 
419 
420 
421 // Calculate the density effect correction to the energy loss formulae
422 double DTrackFitter::CalcDensityEffect(double p,double mass,
423  double rho_Z_over_A,double LnI){
424 
425  double betagamma=p/mass;
426  return CalcDensityEffect(betagamma,rho_Z_over_A,LnI);
427 }
428 
429 // Calculate the density effect correction to the energy loss formulae
430 double DTrackFitter::CalcDensityEffect(double betagamma,
431  double rho_Z_over_A,double LnI){
432  double X=log10(betagamma);
433  double X0,X1;
434  double Cbar=2.*(LnI-log(28.816e-9*sqrt(rho_Z_over_A)))+1.;
435  if (rho_Z_over_A>0.01){ // not a gas
436  if (LnI<-1.6118){ // I<100
437  if (Cbar<=3.681) X0=0.2;
438  else X0=0.326*Cbar-1.;
439  X1=2.;
440  }
441  else{
442  if (Cbar<=5.215) X0=0.2;
443  else X0=0.326*Cbar-1.5;
444  X1=3.;
445  }
446  }
447  else { // gases
448  X1=4.;
449  if (Cbar<=9.5) X0=1.6;
450  else if (Cbar>9.5 && Cbar<=10.) X0=1.7;
451  else if (Cbar>10 && Cbar<=10.5) X0=1.8;
452  else if (Cbar>10.5 && Cbar<=11.) X0=1.9;
453  else if (Cbar>11.0 && Cbar<=12.25) X0=2.;
454  else if (Cbar>12.25 && Cbar<=13.804){
455  X0=2.;
456  X1=5.;
457  }
458  else {
459  X0=0.326*Cbar-2.5;
460  X1=5.;
461  }
462  }
463  double delta=0;
464  if (X>=X0 && X<X1)
465  delta=4.606*X-Cbar+(Cbar-4.606*X0)*pow((X1-X)/(X1-X0),3.);
466  else if (X>=X1)
467  delta= 4.606*X-Cbar;
468  return delta;
469 }
470 
471 
472 // Extrapolate to a radius R given two extrapolation points before and after
474  const vector<Extrapolation_t>&extraps,
475  DVector3 &pos,DVector3 &mom,double &t,
476  double &s) const{
477  if (extraps.size()<2) return false;
478 
479  for (unsigned int j=1;j<extraps.size();j++){
480  if (extraps[j].position.Perp()>R){
481  // At this point, the location where the track intersects the cyclinder
482  // is somewhere between extrapolated point and the previous one. For
483  // simplicity, we're going to just find the intersection of the cylinder
484  // with the line that joins the 2 positions. We do this by working in
485  // the X/Y plane only and finding the value of "alpha" which is the
486  // fractional distance the intersection point is between our two
487  // extrapolations. We'll then apply the alpha found in the 2D X/Y space
488  // to the 3D x/y/Z space to find the actual intersection point.
489  Extrapolation_t extrap=extraps[j];
490  Extrapolation_t prev=extraps[j-1];
491  pos=extrap.position;
492  mom=extrap.momentum;
493  t=extrap.t;
494  s=extrap.s;
495  // The next part of the code refines the extrapolation
496  DVector3 prevpos=prev.position;
497  DVector2 x1(pos.X(),pos.Y());
498  DVector2 x2(prevpos.X(),prevpos.Y());
499  DVector2 dx = x2-x1;
500  double A = dx.Mod2();
501  double B = 2.0*(x1.X()*dx.X() + x1.Y()*dx.Y());
502  double C = x1.Mod2() - R*R;
503 
504  double sqrt_D=sqrt(B*B-4.0*A*C);
505  double one_over_denom=0.5/A;
506  double alpha1 = (-B + sqrt_D)*one_over_denom;
507  double alpha2 = (-B - sqrt_D)*one_over_denom;
508  double alpha = alpha1;
509  if(alpha1<0.0 || alpha1>1.0)alpha=alpha2;
510  if (isfinite(alpha)){
511  DVector3 delta = prevpos - pos;
512  pos+=alpha*delta;
513  // Flight time and path length (approximate)
514  double ds=(1.-alpha)*delta.Mag();
515  double v=(extrap.s-prev.s)/(extrap.t-prev.t);
516  s-=ds;
517  t-=ds/v;
518 
519  return true;
520  }
521  break;
522  }
523  }
524  return false;
525 }
526 
528  const vector<Extrapolation_t>&extraps,
529  DVector3 &pos) const{
530  double s=0,t=0;
531  DVector3 mom;
532  return ExtrapolateToRadius(R,extraps,pos,mom,s,t);
533 }
534 
535 // Loop through extrapolations to find the distance of closest approach to a
536 // wire.
538  const vector<Extrapolation_t>&extrapolations,
539  DVector3 *pos, DVector3 *mom,
540  DVector3 *position_along_wire) const{
541  if (extrapolations.size()<3) return 1000.;
542 
543  // Wire info
544  double z0w=wire->origin.z();
545  double ux=wire->udir.x();
546  double uy=wire->udir.y();
547  double uz=wire->udir.z();
548 
549  double doca_old=1000.,doca=1000.;
550  for (unsigned int i=1;i<extrapolations.size();i++){
551  DVector3 trackpos=extrapolations[i].position;
552  double z=trackpos.z();
553  double dzw=z-z0w;
554  DVector3 wirepos=wire->origin+(dzw/uz)*wire->udir;
555  doca=(wirepos-trackpos).Perp();
556  if (doca>doca_old){
557  DVector3 trackdir=extrapolations[i-1].momentum;
558  trackdir.SetMag(1.);
559  // Variables relating wire direction and track direction
560  double lambda=M_PI_2-trackdir.Theta();
561  double sinl=sin(lambda);
562  double cosl=cos(lambda);
563  double phi=trackdir.Phi();
564  double sinphi=sin(phi);
565  double cosphi=cos(phi);
566  double my_ux=ux*sinl-cosl*cosphi;
567  double my_uy=uy*sinl-cosl*sinphi;
568  double denom=my_ux*my_ux+my_uy*my_uy;
569  double ds=((trackpos.X()-wire->origin.X()-ux*dzw)*my_ux
570  +(trackpos.Y()-wire->origin.Y()-uy*dzw)*my_uy)/denom;
571  if (fabs(ds)<2.*fabs(extrapolations[i].s-extrapolations[i-1].s)){
572  trackpos+=ds*trackdir;
573  wirepos=wire->origin+((trackpos.z()-z0w)/uz)*wire->udir;
574  double cosstereo=wire->udir.Dot(DVector3(0.,0.,1.));
575  doca=(wirepos-trackpos).Perp()*cosstereo;
576 
577  if (pos!=NULL) *pos=trackpos;
578  if (mom!=NULL) *mom=extrapolations[i-1].momentum;
579  if (position_along_wire!=NULL) *position_along_wire=wirepos;
580  }
581  break;
582  }
583 
584  doca_old=doca;
585  }
586 
587  return doca;
588 }
589 
590 
591 
592 //------------------
593 // GetProfilingTimes
594 //------------------
595 #ifdef PROFILE_TRK_TIMES
596 void DTrackFitter::GetProfilingTimes(map<string, prof_time::time_diffs> &my_prof_times) const
597 {
598  my_prof_times = prof_times;
599 }
600 #endif
jerror_t CorrectForELoss(const DKinematicData &starting_params, DReferenceTrajectory *rt, DVector3 &pos, DVector3 &mom, double mass)
double CalcDensityEffect(double p, double mass, double density, double Z_over_A, double I)
DApplication * dapp
bool ExtrapolateToRadius(double R, const vector< Extrapolation_t > &extraps, DVector3 &pos, DVector3 &mom, double &t, double &s) const
void TimeDiffNow(std::map< std::string, time_diffs > &prof_times, std::string what)
Definition: prof_time.h:76
void FastSwim(const DVector3 &pos, const DVector3 &mom, double q, double smax=2000.0, double zmin=-100., double zmax=1000.0)
#define X0
TVector2 DVector2
Definition: DVector2.h:9
TVector3 DVector3
Definition: DVector3.h:14
void AddHits(vector< const DCDCTrackHit * > cdchits)
DMagneticFieldMap * GetBfield(unsigned int run_number=1)
void SetMass(double mass)
const DVector3 & position(void) const
virtual fit_status_t FitTrack(void)=0
DetectorSystem_t
Definition: GlueX.h:15
class DFDCPseudo: definition for a reconstructed point in the FDC
Definition: DFDCPseudo.h:74
The DTrackHitSelector class is a base class for algorithms that will select hits from the drift chamb...
#define X(str)
Definition: hddm-c.cpp:83
void SetDGeometry(const DGeometry *geom)
Definition: GlueX.h:17
Definition: GlueX.h:19
fit_status_t FindHitsAndFitTrack(const DKinematicData &starting_params, const DReferenceTrajectory *rt, JEventLoop *loop, double mass=-1.0, int N=0, double t0=QuietNaN, DetectorSystem_t t0_det=SYS_NULL)
mass&lt;0 means get it from starting_params
void Reset(void)
Definition: DTrackFitter.cc:94
virtual void GetCDCHits(fit_type_t fit_type, const DReferenceTrajectory *rt, const vector< const DCDCTrackHit * > &cdchits_in, vector< const DCDCTrackHit * > &cdchits_out, int N=20) const =0
DRootGeom * GetRootGeom(unsigned int run_number)
TEllipse * e
const double alpha
Definition: GlueX.h:20
Definition: GlueX.h:18
DGeometry * GetDGeometry(unsigned int run_number)
Definition: GlueX.h:22
#define _DBG_
Definition: HDEVIO.h:12
Definition: GlueX.h:26
bool FDCSortByZincreasing(DTrackCandidate_factory_FDC::DFDCTrkHit *const &hit1, DTrackCandidate_factory_FDC::DFDCTrkHit *const &hit2)
double charge(void) const
static double start_time
Definition: mc2coda.c:26
double sqrt(double)
double sin(double)
void AddHit(const DCDCTrackHit *cdchit)
const DVector3 & momentum(void) const
This utility class is to help in doing detailed profiling of code. It is uses the unix itimer system ...
Definition: prof_time.h:44
void SetPLossDirection(direction_t direction)
virtual void GetFDCHits(fit_type_t fit_type, const DReferenceTrajectory *rt, const vector< const DFDCPseudo * > &fdchits_in, vector< const DFDCPseudo * > &fdchits_out, int N=20) const =0
static Particle_t IDTrack(float locCharge, float locMass)
bool CDCSortByRincreasing(const DCDCTrackHit *const &hit1, const DCDCTrackHit *const &hit2)
virtual ~DTrackFitter()
Definition: DTrackFitter.cc:87
#define I(x, y, z)
double mass(void) const
double DistToWire(const DCoordinateSystem *wire, const vector< Extrapolation_t > &extrapolations, DVector3 *pos=NULL, DVector3 *mom=NULL, DVector3 *position_along_wire=NULL) const
void GetAllHits(fit_type_t fit_type, const DReferenceTrajectory *rt, const vector< const DCDCTrackHit * > &cdchits_in, const vector< const DFDCPseudo * > &fdchits_in, DTrackFitter *fitter, int N=20) const