Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DFDCHit.h
Go to the documentation of this file.
1 //************************************************
2 // DFDCHit.h: A class defining a general FDC hit
3 // Author: Craig Bookwalter, David Lawrence
4 // Date: March 2006
5 //************************************************
6 
7 #ifndef DFDCHIT_H
8 #define DFDCHIT_H
9 
10 #include <sstream>
11 using namespace std;
12 
13 #include <JANA/JObject.h>
14 #include <JANA/JFactory.h>
15 using namespace jana;
16 
17 ///
18 /// class DFDCHit: definition for a basic FDC hit data type.
19 ///
20 class DFDCHit : public JObject{
21  public:
22  JOBJECT_PUBLIC(DFDCHit);
23  int layer; // 1(V), 2(X), or 3(U)
24  int module; // 1 through 8, 1 module = 3 detection layers
25  int element; // wire or strip number
26  int plane; // for cathodes only: u(3) or v(1) plane, u@+15,v@-15
27  int gPlane; // 1 through 72
28  int gLayer; // 1 through 24
29  float q; // charge deposited
30  float pulse_height; // amplitude of signal
31  float pulse_height_raw; //amplitude of signal without gain correction
32  float t; // drift time
33  float r; // perpendicular distance from
34  // center of chamber to wire/strip center
35  float d; // DOCA distance of closest approach (only for MC data on wires)
36  // Enum to take into account split cathode strips near center in
37  // addition to wires-versus-cathodes
42  HalfCathodeStripB
43  };
44  int type; // value according to above enum
45 
46 
47  int itrack; // track number causing the hit
48  int ptype; // particle type causing the hit
49 
50  void toStrings(vector<pair<string,string> > &items)const{
51  AddString(items, "layer", "%d", layer);
52  AddString(items, "module", "%d", module);
53  AddString(items, "w/s #", "%d", element);
54  AddString(items, "plane", "%s", plane==1 ? "V":(plane==2 ? "X":"U"));
55  AddString(items, "gPlane", "%d", gPlane);
56  AddString(items, "gLayer", "%d", gLayer);
57  AddString(items, "q", "%10.2f", q);
58  AddString(items, "pulse height","%10.2f", pulse_height);
59  AddString(items, "t", "%10.2f", t);
60  AddString(items, "r", "%10.2f", r);
61  AddString(items, "d", "%f", d);
62  AddString(items, "type", "%d", type);
63  AddString(items, "itrack", "%d", itrack);
64  AddString(items, "ptype", "%d", ptype);
65  }
66 
67 };
68 
69 
70 #endif // DFDCHIT_H
71 
float q
Definition: DFDCHit.h:29
void toStrings(vector< pair< string, string > > &items) const
Definition: DFDCHit.h:50
int type
Definition: DFDCHit.h:44
Int_t layer
int gLayer
Definition: DFDCHit.h:28
float pulse_height
Definition: DFDCHit.h:30
int ptype
Definition: DFDCHit.h:48
int layer
Definition: DFDCHit.h:23
float pulse_height_raw
Definition: DFDCHit.h:31
int plane
Definition: DFDCHit.h:26
float d
Definition: DFDCHit.h:35
int element
Definition: DFDCHit.h:25
int itrack
Definition: DFDCHit.h:47
float t
Definition: DFDCHit.h:32
fdc_hit_type
Definition: DFDCHit.h:38
int module
Definition: DFDCHit.h:24
int gPlane
Definition: DFDCHit.h:27
float r
Definition: DFDCHit.h:33
class DFDCHit: definition for a basic FDC hit data type.
Definition: DFDCHit.h:20