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.
Loading...
Searching...
No Matches
TSData.h
Go to the documentation of this file.
1
7
8#ifndef _TS_DATA_H_
9#define _TS_DATA_H_
10
11#include <vector>
12
13//----------//
14// LCIO //
15//----------//
16#include <EVENT/LCGenericObject.h>
17
18//----------//
19// ROOT //
20//----------//
21#include <TObject.h>
22
23class TSData : public TObject {
24
25 public:
26 // tsHeader.type meaning:
27 // 0: Filler events
28 // 1-32: GTP Physics trigger;
29 // 33-64: Front panel physics trigger;
30 // 250: multi-hit on GTP or Front panel physics trigger
31 // 251: Multi-hit on GTP and Front panel physics trigger
32 // 253: VME trigger;
33 // 254: VME random trigger;
34 struct tsHeader
35 {
36 int wordCount; // 0-15 Event wordcount; Event header is excluded from the count
37 int test ; // 16-23 0000,0001, or 0x01
38 int type ; // 24-31 Trigger Type
40
41 struct tsBits
42 {
43 bool Single_0_Top ; // 0 ( 150-8191) MeV (-31,31) Low energy cluster
44 bool Single_1_Top ; // 1 ( 300-3000) MeV ( 5,31) e+
45 bool Single_2_Top ; // 2 ( 300-3000) MeV ( 5,31) e+ : Position dependent energy cut
46 bool Single_3_Top ; // 3 ( 300-3000) MeV ( 5,31) e+ : HODO L1*L2 Match with cluster
47 bool Single_0_Bot ; // 4 ( 150-8191) MeV (-31,31) Low energy cluster
48 bool Single_1_Bot ; // 5 ( 300-3000) MeV ( 5,31) e+
49 bool Single_2_Bot ; // 6 ( 300-3000) MeV ( 5,31) e+ : Position dependent energy cut
50 bool Single_3_Bot ; // 7 ( 300-3000) MeV ( 5,31) e+ : HODO L1*L2 Match with cluster
51 bool Pair_0 ; // 8 A'
52 bool Pair_1 ; // 9 Moller
53 bool Pair_2 ; // 10 pi0
54 bool Pair_3 ; // 11 -
55 bool LED ; // 12 LED
56 bool Cosmic ; // 13 Cosmic
57 bool Hodoscope ; // 14 Hodoscope
58 bool Pulser ; // 15 Pulser
59 bool Mult_0 ; // 16 Multiplicity-0 2 Cluster Trigger
60 bool Mult_1 ; // 17 Multiplicity-1 3 Cluster trigger
61 bool FEE_Top ; // 18 FEE Top ( 2600-5200)
62 bool FEE_Bot ; // 19 FEE Bot ( 2600-5200)
63 unsigned int NA ; // 20-31 Not used
64 unsigned int intval; // Full word
65 };
68
69 unsigned long EN; // Event Number in Run
70 unsigned long T; // Trigger Time
71
72 public:
74 ~TSData();
75
76 void print();
77
78 void Clear(){
79 TObject::Clear();
80 };
81
82 bool isSingleTrigger() const {
83 bool single0 = (prescaled.Single_0_Bot == 1 || prescaled.Single_0_Top == 1);
84 bool single1 = (prescaled.Single_1_Bot == 1 || prescaled.Single_1_Top == 1);
85 bool single2 = (prescaled.Single_2_Bot == 1 || prescaled.Single_2_Top == 1);
86 bool single3 = (prescaled.Single_3_Bot == 1 || prescaled.Single_3_Top == 1);
87 return (single0 || single1 || single2 || single3);
88 };
89
90 bool const isSingle2Trigger() const {
91 return (prescaled.Single_2_Bot == 1 || prescaled.Single_2_Top == 1);
92 };
93
94 bool const isSingle3Trigger() const {
95 return (prescaled.Single_3_Bot == 1 || prescaled.Single_3_Top == 1);
96 };
97
98 bool const isFEETrigger() const {
99 return (prescaled.FEE_Top == 1 || prescaled.FEE_Bot == 1);
100 };
101
102 // Pairs trigger (requires a top+bottom cluster coincidence; no top/bot split).
103 // OR of all pair triggers (Pair_0 = A', Pair_1 = Moller, Pair_2 = pi0, Pair_3).
104 bool const isPairTrigger() const {
105 return (prescaled.Pair_0 == 1 || prescaled.Pair_1 == 1 ||
106 prescaled.Pair_2 == 1 || prescaled.Pair_3 == 1);
107 };
108
109 bool const isPair0Trigger() const { return (prescaled.Pair_0 == 1); };
110 bool const isPair1Trigger() const { return (prescaled.Pair_1 == 1); };
111 bool const isPair2Trigger() const { return (prescaled.Pair_2 == 1); };
112 bool const isPair3Trigger() const { return (prescaled.Pair_3 == 1); };
113
115
116};
117
118#endif // __TS_DATA_H__
bool const isPair0Trigger() const
Definition TSData.h:109
unsigned long T
Definition TSData.h:70
bool const isSingle3Trigger() const
Definition TSData.h:94
bool const isPair3Trigger() const
Definition TSData.h:112
void print()
Definition TSData.cxx:20
ClassDef(TSData, 1)
bool const isFEETrigger() const
Definition TSData.h:98
struct TSData::tsHeader header
bool const isPair1Trigger() const
Definition TSData.h:110
tsBits prescaled
Definition TSData.h:66
~TSData()
Definition TSData.cxx:15
bool const isPair2Trigger() const
Definition TSData.h:111
bool isSingleTrigger() const
Definition TSData.h:82
bool const isSingle2Trigger() const
Definition TSData.h:90
void Clear()
Definition TSData.h:78
tsBits ext
Definition TSData.h:67
bool const isPairTrigger() const
Definition TSData.h:104
unsigned long EN
Definition TSData.h:69
bool Pulser
Definition TSData.h:58
bool Cosmic
Definition TSData.h:56
bool Single_1_Bot
Definition TSData.h:48
bool Pair_1
Definition TSData.h:52
bool Hodoscope
Definition TSData.h:57
bool Pair_2
Definition TSData.h:53
bool Single_1_Top
Definition TSData.h:44
bool Single_2_Bot
Definition TSData.h:49
bool Mult_0
Definition TSData.h:59
bool Single_0_Bot
Definition TSData.h:47
unsigned int NA
Definition TSData.h:63
bool Single_2_Top
Definition TSData.h:45
unsigned int intval
Definition TSData.h:64
bool Single_0_Top
Definition TSData.h:43
bool Single_3_Top
Definition TSData.h:46
bool Single_3_Bot
Definition TSData.h:50
bool Pair_3
Definition TSData.h:54
bool Mult_1
Definition TSData.h:60
bool FEE_Bot
Definition TSData.h:62
bool Pair_0
Definition TSData.h:51
bool FEE_Top
Definition TSData.h:61