CMS 3D CMS Logo

TTMuonTriggerPrimitive.h
Go to the documentation of this file.
1 #ifndef __L1TMuon_TTMuonTriggerPrimitive_h__
2 #define __L1TMuon_TTMuonTriggerPrimitive_h__
3 
4 //
5 // This class implements a layer for Phase 2 Tracker trigger primitive
6 // analogous to the class MuonTriggerPrimitive.
7 //
8 
9 #include <cstdint>
10 #include <vector>
11 #include <iosfwd>
12 
13 // DetId
15 // Global point
17 // Track trigger data formats
19 
20 namespace L1TMuon {
21 
23  public:
24  // Define the subsystems that we have available (none at the moment).
25  // Start at 20 for TTMuonTriggerPrimitive to avoid collision with MuonTriggerPrimitive
27 
28  // Rename these
30  typedef DetId TTDetId;
31 
32  // Define the raw data
33  struct TTData {
34  TTData() : row_f(0.), col_f(0.), bend(0), bx(0) {}
35  float row_f; // why float?
36  float col_f; // why float?
37  int bend;
38  int16_t bx;
39  };
40 
41  // Persistency
43 
44  // Constructor from track trigger digi
45  TTTriggerPrimitive(const TTDetId& detid, const TTDigi& digi);
46 
47  // Copy constructor
49 
50  // Destructor
52 
53  // Assignment operator
55 
56  // Equality operator
57  bool operator==(const TTTriggerPrimitive& tp) const;
58 
59  // Subsystem type
60  const subsystem_type subsystem() const { return _subsystem; }
61 
62  // Global coordinates
63  const double getCMSGlobalEta() const { return _eta; }
64  void setCMSGlobalEta(const double eta) { _eta = eta; }
65  const double getCMSGlobalPhi() const { return _phi; }
66  void setCMSGlobalPhi(const double phi) { _phi = phi; }
67  const double getCMSGlobalRho() const { return _rho; }
68  void setCMSGlobalRho(const double rho) { _rho = rho; }
69 
71  double theta = 2. * atan(exp(-_eta));
73  };
74 
75  // Detector id
76  TTDetId detId() const { return _id; }
77 
78  TTDetId rawId() const { return detId(); }
79 
80  // Accessors to raw data
81  void setTTData(const TTData& data) { _data = data; }
82 
83  const TTData getTTData() const { return _data; }
84 
85  TTData& accessTTData() { return _data; }
86 
87  // Accessors to common information
88  const int getStrip() const;
89  const int getSegment() const;
90  const int getBend() const;
91  const int getBX() const;
92 
93  const unsigned getGlobalSector() const { return _globalsector; }
94  const unsigned getSubSector() const { return _subsector; }
95 
96  void print(std::ostream&) const;
97 
98  private:
99  // Translate to 'global' position information at the level of 60
100  // degree sectors. Use CSC sectors as a template
101  void calculateTTGlobalSector(const TTDetId& detid, unsigned& globalsector, unsigned& subsector);
102 
104 
105  TTDetId _id;
106 
108 
109  unsigned _globalsector; // [1,6] in 60 degree sectors
110  unsigned _subsector; // [1,2] in 30 degree partitions of a sector
111  double _eta, _phi, _rho; // global pseudorapidity, phi, rho
112  double _theta; // bend angle with respect to ray from (0,0,0). // NOT USED
113  };
114 
115 } // namespace L1TMuon
116 
117 #endif
const GlobalPoint getCMSGlobalPoint() const
const double getCMSGlobalEta() const
const unsigned getSubSector() const
void calculateTTGlobalSector(const TTDetId &detid, unsigned &globalsector, unsigned &subsector)
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Geom::Theta< T > theta() const
const unsigned getGlobalSector() const
void setCMSGlobalPhi(const double phi)
TTStub< Ref_Phase2TrackerDigi_ > TTDigi
TTTriggerPrimitive & operator=(const TTTriggerPrimitive &tp)
const subsystem_type subsystem() const
void setTTData(const TTData &data)
bool operator==(const TTTriggerPrimitive &tp) const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
void print(std::ostream &) const
Definition: DetId.h:17
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
const double getCMSGlobalPhi() const
void setCMSGlobalRho(const double rho)
void setCMSGlobalEta(const double eta)
const double getCMSGlobalRho() const