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 
21 namespace L1TMuon {
22 
24  public:
25  // Define the subsystems that we have available (none at the moment).
26  // Start at 20 for TTMuonTriggerPrimitive to avoid collision with MuonTriggerPrimitive
28 
29  // Rename these
31  typedef DetId TTDetId;
32 
33  // Define the raw data
34  struct TTData {
35  TTData() : row_f(0.), col_f(0.), bend(0), bx(0) {}
36  float row_f; // why float?
37  float col_f; // why float?
38  int bend;
39  int16_t bx;
40  };
41 
42  // Persistency
44 
45  // Constructor from track trigger digi
46  TTTriggerPrimitive(const TTDetId& detid, const TTDigi& digi);
47 
48  // Copy constructor
50 
51  // Destructor
53 
54  // Assignment operator
56 
57  // Equality operator
58  bool operator==(const TTTriggerPrimitive& tp) const;
59 
60  // Subsystem type
61  const subsystem_type subsystem() const { return _subsystem; }
62 
63  // Global coordinates
64  const double getCMSGlobalEta() const { return _eta; }
65  void setCMSGlobalEta(const double eta) { _eta = eta; }
66  const double getCMSGlobalPhi() const { return _phi; }
67  void setCMSGlobalPhi(const double phi) { _phi = phi; }
68  const double getCMSGlobalRho() const { return _rho; }
69  void setCMSGlobalRho(const double rho) { _rho = rho; }
70 
72  double theta = 2. * atan( exp(-_eta) );
74  };
75 
76 
77  // Detector id
78  TTDetId detId() const { return _id; }
79 
80  TTDetId rawId() const { return detId(); }
81 
82  // Accessors to raw data
83  void setTTData(const TTData& data) { _data = data; }
84 
85  const TTData getTTData() const { return _data; }
86 
87  TTData& accessTTData() { return _data; }
88 
89  // Accessors to common information
90  const int getStrip() const;
91  const int getSegment() const;
92  const int getBend() const;
93  const int getBX() const;
94 
95  const unsigned getGlobalSector() const { return _globalsector; }
96  const unsigned getSubSector() const { return _subsector; }
97 
98  void print(std::ostream&) const;
99 
100  private:
101  // Translate to 'global' position information at the level of 60
102  // degree sectors. Use CSC sectors as a template
103  void calculateTTGlobalSector(const TTDetId& detid,
104  unsigned& globalsector,
105  unsigned& subsector );
106 
108 
109  TTDetId _id;
110 
112 
113  unsigned _globalsector; // [1,6] in 60 degree sectors
114  unsigned _subsector; // [1,2] in 30 degree partitions of a sector
115  double _eta, _phi, _rho; // global pseudorapidity, phi, rho
116  double _theta; // bend angle with respect to ray from (0,0,0). // NOT USED
117  };
118 
119 } // namespace L1TMuon
120 
121 #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:18
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const double getCMSGlobalPhi() const
void setCMSGlobalRho(const double rho)
void setCMSGlobalEta(const double eta)
const double getCMSGlobalRho() const