Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DTrackHit.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DTrackHit.h
4 // Created: Tue Aug 23 05:00:03 EDT 2005
5 // Creator: davidl (on Darwin Harriet.local 7.8.0 powerpc)
6 //
7 
8 #ifndef _DTrackHit_
9 #define _DTrackHit_
10 
11 #include <cmath>
12 
13 #include <DMatrix.h>
14 
15 #include <JANA/JObject.h>
16 #include <JANA/JFactory.h>
17 using namespace jana;
18 
19 #include "GlueX.h"
20 
21 class DTrackHit:public JObject{
22  public:
23  JOBJECT_PUBLIC(DTrackHit);
24 
25  void InitCovarianceMatrix(void);
26 
27  float x,y,z,r,phi;
29  DMatrix cov; // covariance matrix rotated into lab x,y,z
30 
31  void toStrings(vector<pair<string,string> > &items)const{
32  AddString(items, "x(cm)", "%3.1f", x);
33  AddString(items, "y(cm)", "%3.1f", y);
34  AddString(items, "z(cm)", "%3.1f", z);
35  AddString(items, "r(cm)", "%3.1f", r);
36  AddString(items, "phi(deg)", "%3.1f", phi*180.0/M_PI);
37  AddString(items, "system", "%s", SystemName(system));
38  }
39 };
40 
41 #endif // _DTrackHit_
42 
TMatrixD DMatrix
Definition: DMatrix.h:14
Double_t x[NCHANNELS]
Definition: st_tw_resols.C:39
#define y
DetectorSystem_t
Definition: GlueX.h:15
float z
Definition: DTrackHit.h:27
const char * SystemName(DetectorSystem_t sys)
Definition: GlueX.h:38
DMatrix cov
Definition: DTrackHit.h:29
DetectorSystem_t system
Definition: DTrackHit.h:28
void toStrings(vector< pair< string, string > > &items) const
Definition: DTrackHit.h:31