Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DFDCSegment.h
Go to the documentation of this file.
1 //***********************************************************************
2 // DFDCSegment.h : definition for a track segment built from pseudopoints
3 //***********************************************************************
4 
5 #ifndef DFDCSEGMENT_H
6 #define DFDCSEGMENT_H
7 
8 #include <JANA/JObject.h>
9 using namespace jana;
10 
11 #include "DFDCHit.h"
12 #include "DFDCWire.h"
13 #include "DFDCPseudo.h"
14 
15 #include <DMatrix.h>
16 #include <sstream>
17 
18 // Residuals and arc length
19 struct fdc_track_t{
20  unsigned int hit_id;
21  double sign; // Sign of left-right ambiguity resolution for this hit
22  double dx,dy; //residuals
23  double chi2; // chi2 contribution of this point
24  double s; // path length
25 };
26 
27 
28 ///
29 /// class DFDCSegment: definition for a track segment in the FDC
30 ///
31 class DFDCSegment : public JObject {
32  public :
33  JOBJECT_PUBLIC(DFDCSegment); /// DANA identifier
34 
35  ///
36  /// DFDCSegment::DFDCSegment():
37  /// Default constructor
38  ///
40  DFDCSegment(const DFDCSegment &segment){
41  this->xc=segment.xc;
42  this->yc=segment.yc;
43  this->rc=segment.rc;
44  this->tanl=segment.tanl;
45  this->q=segment.q;
46  this->D=segment.D;
47  this->z_vertex=segment.z_vertex;
48  this->phi0=segment.phi0;
49  this->Phi1=segment.Phi1;
50  this->package=segment.package;
51  this->chisq=segment.chisq;
52  this->Ndof=segment.Ndof;
53  }
54 
55  double chisq;
56  int Ndof;
57 
58  // circle parameters
59  double xc,yc,rc;
60  // azimuthal angle of the intersection of the helical path to
61  // the most downstream plane in a given package containing a
62  // hit
63  double Phi1;
64  // "vertex" z position and the phi angle there
65  double z_vertex,phi0;
66  // tangent of the dip angle
67  double tanl;
68  // charge (+/-1)
69  double q;
70  // Distance of closest approach to the beam line
71  double D;
72  // Package number
73  unsigned int package;
74 
75  // List of pseudopoints belonging to this track segment
76  vector<const DFDCPseudo *>hits;
77 
78  void toStrings(vector<pair<string,string> > &items)const{
79  AddString(items, "xc", "%3.2f", xc);
80  AddString(items, "yc", "%3.2f", yc);
81  AddString(items, "rc", "%3.2f", rc);
82  AddString(items, "phi0(deg)","%3.2f",57.296*phi0);
83  AddString(items, "Phi1(rad)", "%3.2f", Phi1);
84  AddString(items, "D","%3.2f",D);
85  AddString(items, "q","%3.1f",q);
86  AddString(items, "Nhits", "%d", hits.size());
87  }
88 };
89 
90 #endif //DFDCSEGMENT_H
double chisq
Definition: DFDCSegment.h:55
double rc
Definition: DFDCSegment.h:59
double s
Definition: DFDCSegment.h:24
double z_vertex
Definition: DFDCSegment.h:65
void toStrings(vector< pair< string, string > > &items) const
Definition: DFDCSegment.h:78
double phi0
Definition: DFDCSegment.h:65
double chi2
Definition: DFDCSegment.h:23
double xc
Definition: DFDCSegment.h:59
unsigned int package
Definition: DFDCSegment.h:73
vector< const DFDCPseudo * > hits
Definition: DFDCSegment.h:76
double Phi1
Definition: DFDCSegment.h:63
unsigned int hit_id
Definition: DFDCSegment.h:20
double dy
Definition: DFDCSegment.h:22
double tanl
Definition: DFDCSegment.h:67
double D
Definition: DFDCSegment.h:71
double q
Definition: DFDCSegment.h:69
DFDCSegment(const DFDCSegment &segment)
Definition: DFDCSegment.h:40
class DFDCSegment: definition for a track segment in the FDC
Definition: DFDCSegment.h:31
double sign
Definition: DFDCSegment.h:21
DFDCSegment()
DANA identifier.
Definition: DFDCSegment.h:39
double yc
Definition: DFDCSegment.h:59