hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
VTPData.h
Go to the documentation of this file.
1
8#ifndef _VTP_DATA_H_
9#define _VTP_DATA_H_
10
11#include <vector>
12#include <iostream>
13
14//----------//
15// ROOT //
16//----------//
17#include <TObject.h>
18
19class VTPData : public TObject {
20
21 public:
22 struct bHeader {
23 unsigned int blocklevel; // 8 bits 0-7
24 unsigned int blocknum; // 10 bits 8-17
25 unsigned int nothing; // 4 bits 18-21
26 unsigned int slotid; // 5 bits 22-26
27 unsigned int type; // 4 bits 27-30
28 bool istype; // 1 bit 31
29 };
31
32 struct bTail {
33 unsigned int nwords; // 22 bits 0-21
34 unsigned int slotid; // 5 bits 22-26
35 unsigned int type; // 4 bits 27-30
36 bool istype; // 1 bit 31
37 };
39
40 struct eHeader {
41 unsigned int eventnum; // 27 bits 0-26
42 unsigned int type; // 4 bits 27-30
43 bool istype; // 1 bit 31
44 };
46
47 unsigned long trigTime;
48
49 struct hpsCluster {
50 int X; // 6 bits 0-5
51 int Y; // 4 bits 6-9
52 unsigned int E; // 13 bits 10-22
53 unsigned int subtype; // 4 bits 23-26
54 unsigned int type; // 4 bits 27-30
55 bool istype; // 1 bit 31
56 unsigned int T; // 10 bits 0-9 Second word
57 unsigned int N; // 4 bits 10-13 Second word
58 unsigned int nothing; // 18 bits 14-31 Second word not used.
59 };
60
61 std::vector<hpsCluster> clusters;
62
64 unsigned int T; // 10 bits 0-9 Trigger time in 4ns units from the beginning of the readout window.
65 bool emin; // 1 bit 10
66 bool emax; // 1 bit 11
67 bool nmin; // 1 bit 12
68 bool xmin; // 1 bit 13
69 bool pose; // 1 bit 14 position dependent energy thresh.
70 bool hodo1c; // 1 bit 15 hodoscope layer 1 coincidence.
71 bool hodo2c; // 1 bit 16 hodoscope layer 2 coincidence.
72 bool hodogeo; // 1 bit 17 hodoscope layer 1 geometry matched to layer 2 geometry
73 bool hodoecal; // 1 bit 18 hodoscope layer 1 and 2 geometry mached to ecal cluster x.
74 bool topnbot; // 1 bit 19
75 unsigned int inst; // 3 bits 20-22 = single cluster trigger bit instance.
76 unsigned int subtype; // 4 bits 23-26
77 unsigned int type; // 4 bits 27-30
78 bool istype; // 1 bit 31
79 };
80
81 std::vector<hpsSingleTrig> singletrigs;
82
83 struct hpsPairTrig {
84 unsigned int T; // bit 0-9 Trigger time in 4ns units from the beginning of the readout window.
85 bool clusesum; // 1 bit 10
86 bool clusedif; // 1 bit 11
87 bool eslope; // 1 bit 12
88 bool coplane; // 1 bit 13
89 unsigned int dummy; // 5 bits 14-18
90 bool topnbot; // 1 bit 19 - dummy!
91 unsigned int inst; // 3 bits 20-22 = single cluster trigger bit instance.
92 unsigned int subtype; // 4 bits 23-26
93 unsigned int type; // 4 bits 27-30
94 bool istype; // 1 bit 31
95 };
96
97 std::vector<hpsPairTrig> pairtrigs;
98
99 struct hpsCalibTrig {
100 unsigned int T; // 10 bits 0-9 Time in 4ns units from the beginning of the readout window.
101 unsigned int reserved; // 9 bits 10-18
102 bool cosmicTrig; // 1 bit 19
103 bool LEDTrig; // 1 bit 20
104 bool hodoTrig; // 1 bit 21
105 bool pulserTrig; // 1 bit 22
106 unsigned int subtype; // 4 bits 23-26
107 unsigned int type; // 4 bits 27-30
108 bool istype; // 1 bit 31
109 };
110
111 std::vector<hpsCalibTrig> calibtrigs;
112
114 unsigned int T; // 10 bits 0-9 Time in 4ns units from the beginning of the readout window.
115 unsigned int multtop; // 4 bits 10-13
116 unsigned int multbot; // 4 bits 14-17
117 unsigned int multtot; // 4 bits 18-21
118 bool bitinst; // 1 bit 22
119 unsigned int subtype; // 4 bits 23-26
120 unsigned int type; // 4 bits 27-30
121 bool istype; // 1 bit 31
122 };
123
124 std::vector<hpsClusterMult> clustermult; // Cluster multiplicity.
125
126 struct hpsFEETrig {
127 unsigned int T; // 10 bits 0-9 Time in 4ns units from the beginning of the readout window.
128 unsigned int region; // 7 bits 10-16
129 unsigned int reserved; // 6 bits 17-22
130 unsigned int subtype; // 4 bits 23-26
131 unsigned int type; // 4 bits 27-30
132 bool istype; // 1 bit 31
133 };
134
135 std::vector<hpsFEETrig> feetrigger; // Cluster multiplicity.
136
137 public:
139 ~VTPData();
140
141 void print();
142
143 void Clear(){
144 TObject::Clear();
145 clusters.clear();
146 singletrigs.clear();
147 pairtrigs.clear();
148 calibtrigs.clear();
149 clustermult.clear();
150 feetrigger.clear();
151 };
152
154
155};
156
157#endif // __VTP_DATA_H__
~VTPData()
Definition VTPData.cxx:19
std::vector< hpsCalibTrig > calibtrigs
Definition VTPData.h:111
std::vector< hpsCluster > clusters
Definition VTPData.h:61
std::vector< hpsPairTrig > pairtrigs
Definition VTPData.h:97
void print()
Definition VTPData.cxx:23
std::vector< hpsFEETrig > feetrigger
Definition VTPData.h:135
unsigned long trigTime
Definition VTPData.h:47
std::vector< hpsClusterMult > clustermult
Definition VTPData.h:124
void Clear()
Definition VTPData.h:143
bTail blockTail
Definition VTPData.h:38
eHeader eventHeader
Definition VTPData.h:45
bHeader blockHeader
Definition VTPData.h:30
ClassDef(VTPData, 1)
std::vector< hpsSingleTrig > singletrigs
Definition VTPData.h:81
unsigned int slotid
Definition VTPData.h:26
unsigned int type
Definition VTPData.h:27
unsigned int blocklevel
Definition VTPData.h:23
unsigned int nothing
Definition VTPData.h:25
unsigned int blocknum
Definition VTPData.h:24
unsigned int nwords
Definition VTPData.h:33
unsigned int slotid
Definition VTPData.h:34
unsigned int type
Definition VTPData.h:35
unsigned int eventnum
Definition VTPData.h:41
unsigned int type
Definition VTPData.h:42
unsigned int reserved
Definition VTPData.h:101
unsigned int type
Definition VTPData.h:107
unsigned int T
Definition VTPData.h:100
unsigned int subtype
Definition VTPData.h:106
unsigned int multtot
Definition VTPData.h:117
unsigned int multtop
Definition VTPData.h:115
unsigned int type
Definition VTPData.h:120
unsigned int multbot
Definition VTPData.h:116
unsigned int subtype
Definition VTPData.h:119
unsigned int type
Definition VTPData.h:54
unsigned int T
Definition VTPData.h:56
unsigned int E
Definition VTPData.h:52
unsigned int nothing
Definition VTPData.h:58
unsigned int subtype
Definition VTPData.h:53
unsigned int N
Definition VTPData.h:57
unsigned int reserved
Definition VTPData.h:129
unsigned int type
Definition VTPData.h:131
unsigned int region
Definition VTPData.h:128
unsigned int T
Definition VTPData.h:127
unsigned int subtype
Definition VTPData.h:130
unsigned int type
Definition VTPData.h:93
unsigned int T
Definition VTPData.h:84
unsigned int inst
Definition VTPData.h:91
unsigned int subtype
Definition VTPData.h:92
unsigned int dummy
Definition VTPData.h:89
unsigned int type
Definition VTPData.h:77
unsigned int T
Definition VTPData.h:64
unsigned int inst
Definition VTPData.h:75
unsigned int subtype
Definition VTPData.h:76