Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DDIRCTruthPmtHit.h
Go to the documentation of this file.
1 // -----------------------------------------
2 // DDIRCTruthPmtHit.h
3 // created on: 05.04.2017
4 // initial athor: r.dzhygadlo at gsi.de
5 // -----------------------------------------
6 
7 #ifndef DDIRCTRUTHPMTHIT_H_
8 #define DDIRCTRUTHPMTHIT_H_
9 
10 #include <JANA/JObject.h>
11 #include <JANA/JFactory.h>
12 using namespace jana;
13 
14 class DDIRCTruthPmtHit: public JObject {
15 
16 public:
17  JOBJECT_PUBLIC (DDIRCTruthPmtHit);
18 
19  float x, y, z; // hit position
20  float t; // detection time
21  float t_fixed; // fixed pathlength time
22  float E; // poton energy
23  int ch; // PMT channel of the hit
24  int key_bar; // key of the corresponding bar hit
25  int64_t path; // path id of the photon in the optical box
26  int refl; // number of reflection in the optical box
27  bool bbrefl; // reflected off far end mirror of bar box
28  int track; // index of the MC track
29 
30  void toStrings(vector<pair<string, string> >&items) const {
31  AddString(items, "x", "%1.3f", x);
32  AddString(items, "y", "%1.3f", y);
33  AddString(items, "z", "%1.3f", z);
34  AddString(items, "t", "%1.3f", t);
35  AddString(items, "t_fixed", "%1.3f", t_fixed);
36  AddString(items, "E", "%1.3f", E);
37  AddString(items, "ch", "%d", ch);
38  AddString(items, "key_bar", "%d", key_bar);
39  AddString(items, "path", "%ld", path);
40  AddString(items, "refl", "%d", refl);
41  AddString(items, "bbrefl", "%d", bbrefl ? 1 : 0);
42  }
43 };
44 
45 #endif /* DDIRCTRUTHPMTHIT_H_ */
Double_t x[NCHANNELS]
Definition: st_tw_resols.C:39
#define y
void toStrings(vector< pair< string, string > > &items) const