Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DTrackWireBased.h
Go to the documentation of this file.
1 // $Id: DTrackWireBased.h 4927 2009-03-11 13:20:33Z staylor $
2 //
3 // File: DTrackWireBased.h
4 // Created: Sun Apr 3 12:28:45 EDT 2005
5 // Creator: davidl (on Darwin Harriet.local 7.8.0 powerpc)
6 //
7 
8 #ifndef _DTrackWireBased_
9 #define _DTrackWireBased_
10 
11 #include <JANA/JObject.h>
12 #include <JANA/JFactory.h>
13 #include <TRACKING/DTrackingData.h>
14 #include <TRACKING/DTrackFitter.h>
15 
17  public:
19 
20  oid_t candidateid; ///< which DTrackCandidate this came from
21  float chisq; ///< Chi-squared for the track (not chisq/dof!)
22  int Ndof; ///< Number of degrees of freedom in the fit
23  vector<DTrackFitter::pull_t> pulls; ///< Holds pulls used in chisq calc. (not including off-diagonals)
24  map<DetectorSystem_t,vector<DTrackFitter::Extrapolation_t> >extrapolations;
25 
26  double FOM; //confidence level
27 
28  bool GetProjection(DetectorSystem_t detector,DVector3 &pos,
29  DVector3 *mom=nullptr,double *t=nullptr) const;
30 
31  bool IsSmoothed; // Boolean value to indicate whether the smoother was run succesfully over this track.
32 
33  // Hit CDC Rings & FDC Planes
34  // use the DParticleID Get_CDCRings & Get_FDCPlanes functions to extract the information from these
35  unsigned int dCDCRings; //CDC rings where the track has an associated DCDCTrackHit //rings correspond to bits (1 -> 28)
36  unsigned int dFDCPlanes; //FDC planes where the track has an associated DFDCPseudoHit //planes correspond to bits (1 -> 24)
37 
38  void toStrings(vector<pair<string,string> > &items)const{
40  AddString(items, "candidate", "%d", candidateid);
41  AddString(items, "chisq", "%f", chisq);
42  AddString(items, "Ndof", "%d", Ndof);
43  }
44 };
45 
47  DVector3 &pos,
48  DVector3 *mom,double *t) const{
49 
50  if (detector>SYS_BCAL && extrapolations.at(detector).size()>0){
51  DTrackFitter::Extrapolation_t extrapolation=extrapolations.at(detector)[0];
52  pos=extrapolation.position;
53  if (mom){
54  *mom=extrapolation.momentum;
55  }
56  if (t){
57  *t=extrapolation.t;
58  }
59  return true;
60  }
61  // Set defaults that are clearly unreasonable, since the projection did not work!
62  pos.SetXYZ(0.,0.,-100.);
63  if (mom){
64  mom->SetXYZ(0.,0.,0.);
65  }
66  if (t){
67  *t=-1000.;
68  }
69  return false;
70 }
71 
72 #endif // _DTrackWireBased_
73 
map< DetectorSystem_t, vector< DTrackFitter::Extrapolation_t > > extrapolations
float chisq
Chi-squared for the track (not chisq/dof!)
TVector3 DVector3
Definition: DVector3.h:14
DetectorSystem_t
Definition: GlueX.h:15
unsigned int dFDCPlanes
Definition: GlueX.h:19
vector< DTrackFitter::pull_t > pulls
Holds pulls used in chisq calc. (not including off-diagonals)
JOBJECT_PUBLIC(DTrackWireBased)
int Ndof
Number of degrees of freedom in the fit.
unsigned int dCDCRings
oid_t candidateid
which DTrackCandidate this came from
void toStrings(vector< pair< string, string > > &items) const
void toStrings(vector< pair< string, string > > &items) const
bool GetProjection(DetectorSystem_t detector, DVector3 &pos, DVector3 *mom=nullptr, double *t=nullptr) const