CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GEM.h
Go to the documentation of this file.
1 // Class for Gas-Electron Multiplier (GEM) EMTF Data Record
2 
3 #ifndef __l1t_emtf_GEM_h__
4 #define __l1t_emtf_GEM_h__
5 
6 #include <vector>
7 #include <cstdint>
8 
9 namespace l1t {
10  namespace emtf {
11  class GEM {
12  public:
13  explicit GEM(const uint64_t dataword);
14 
15  GEM()
16  : pad(-99),
17  partition(-99),
18  cluster_size(-99),
19  cluster_id(-99),
20  link(-99),
21  gem_bxn(-99),
22  bc0(-99),
23  tbin(-99),
24  vp(-99),
25  format_errors(0),
26  dataword(-99){};
27 
28  virtual ~GEM() = default;
29 
30  inline void set_pad(const int bits) { pad = bits; }
31  inline void set_partition(const int bits) { partition = bits; }
32  inline void set_cluster_size(const int bits) { cluster_size = bits; }
33  inline void set_cluster_id(const int bits) { cluster_id = bits; }
34  inline void set_link(const int bits) { link = bits; }
35  inline void set_gem_bxn(const int bits) { gem_bxn = bits; }
36  inline void set_bc0(const int bits) { bc0 = bits; }
37  inline void set_tbin(const int bits) { tbin = bits; }
38  inline void set_vp(const int bits) { vp = bits; }
39  inline void add_format_error() { format_errors += 1; }
40  inline void set_dataword(const uint64_t bits) { dataword = bits; }
41 
43  inline int Pad() const { return pad; }
45  inline int Partition() const { return partition; }
47  inline int ClusterSize() const { return cluster_size; }
49  inline int ClusterID() const { return cluster_id; }
51  inline int Link() const { return link; }
53  inline int GEM_BXN() const { return gem_bxn; }
55  inline int BC0() const { return bc0; }
57  inline int TBIN() const { return tbin; }
59  inline int VP() const { return vp; }
61  inline int Format_errors() const { return format_errors; }
63  inline uint64_t Dataword() const { return dataword; }
64 
65  private:
66  int pad;
67  int partition;
69  int cluster_id;
70  int link;
71  int gem_bxn;
72  int bc0;
73  int tbin;
74  int vp;
77 
78  }; // End of class GEM
79 
80  // Define a vector of GEM
81  typedef std::vector<GEM> GEMCollection;
82 
83  } // End of namespace emtf
84 } // End of namespace l1t
85 
86 #endif /* define __l1t_emtf_GEM_h__ */
int ClusterSize() const
Returns the size (in pads) of the cluster.
Definition: GEM.h:47
int BC0() const
Returns whether the cluster has BC0.
Definition: GEM.h:55
int gem_bxn
BX ID of the GEM cluster.
Definition: GEM.h:71
int cluster_size
Size (in pads) of the GEM cluster.
Definition: GEM.h:68
void set_gem_bxn(const int bits)
Definition: GEM.h:35
int TBIN() const
Returns the time bin of the cluster.
Definition: GEM.h:57
int Link() const
Returns the input link of the cluster.
Definition: GEM.h:51
int Partition() const
Returns the eta partition (local eta) of the cluster.
Definition: GEM.h:45
void set_bc0(const int bits)
Definition: GEM.h:36
void set_link(const int bits)
Definition: GEM.h:34
void set_tbin(const int bits)
Definition: GEM.h:37
int tbin
Time bin of the GEM cluster.
Definition: GEM.h:73
int cluster_id
Cluster number of the GEM cluster.
Definition: GEM.h:69
int ClusterID() const
Returns the the cluster ID within the link.
Definition: GEM.h:49
void set_cluster_id(const int bits)
Definition: GEM.h:33
void set_dataword(const uint64_t bits)
Definition: GEM.h:40
int VP() const
Returns the valid flag? of the cluster.
Definition: GEM.h:59
int GEM_BXN() const
Returns the BX ID of the cluster.
Definition: GEM.h:53
void set_partition(const int bits)
Definition: GEM.h:31
int format_errors
Number of format errors for the GEM cluster.
Definition: GEM.h:75
int Pad() const
Returns the lowest pad (strip pair, i.e., local phi) of the cluster.
Definition: GEM.h:43
int pad
Pad (strip pair, i.e., local phi) of the GEM cluster.
Definition: GEM.h:66
void set_vp(const int bits)
Definition: GEM.h:38
void set_pad(const int bits)
Definition: GEM.h:30
void add_format_error()
Definition: GEM.h:39
unsigned long long uint64_t
Definition: Time.h:13
virtual ~GEM()=default
uint64_t dataword
Raw EMTF DAQ word for the GEM cluster.
Definition: GEM.h:76
int Format_errors() const
Returns the format errors associated with the cluster.
Definition: GEM.h:61
std::vector< GEM > GEMCollection
Definition: GEM.h:81
int bc0
BC0 valid for the GEM cluster.
Definition: GEM.h:72
uint64_t Dataword() const
Returns the raw data word of the cluster.
Definition: GEM.h:63
int vp
Valid status? of the GEM cluster.
Definition: GEM.h:74
int link
Input GEM link of the GEM cluster.
Definition: GEM.h:70
int partition
Partition (local eta) of the GEM cluster.
Definition: GEM.h:67
void set_cluster_size(const int bits)
Definition: GEM.h:32