CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RegionalMuonCand.h
Go to the documentation of this file.
1 #ifndef __l1t_regional_muon_candidate_h__
2 #define __l1t_regional_muon_candidate_h__
3 
4 #include <iostream>
6 
7 namespace l1t {
8 
9  enum tftype {
11  };
14 
15 
17  public:
19 
23  {};
24 
25  RegionalMuonCand(int pt, int phi, int eta, int sign, int signvalid, int quality, int processor, tftype trackFinder) :
26  m_hwPt(pt), m_hwPhi(phi), m_hwEta(eta), m_hwHF(false), m_hwSign(sign), m_hwSignValid(signvalid), m_hwQuality(quality),
28  {
29  setTFIdentifiers(processor, trackFinder);
30  };
31 
32  virtual ~RegionalMuonCand() {};
33 
35  void setHwPt(int bits) { m_hwPt = bits; };
37  void setHwPhi(int bits) { m_hwPhi = bits; };
39  void setHwEta(int bits) { m_hwEta = bits; };
41  void setHwSign(int bits) { m_hwSign = bits; };
45  void setHwQual(int bits) { m_hwQuality = bits; };
47  void setHwHF(bool bit) { m_hwHF = bit; };
51  void setTFIdentifiers(int processor, tftype trackFinder);
52  // this is left to still be compatible with OMTF
53  void setLink(int link);
54  // Set the 64 bit word from two 32 words. bits 0-31->lsbs, bits 32-63->msbs
55  void setDataword(int msbs, int lsbs) { m_dataword = (((uint64_t)msbs) << 32) + lsbs; };
56  // Set the 64 bit word coming from HW directly
58 
59 
61  const int hwPt() const { return m_hwPt; };
63  const int hwPhi() const { return m_hwPhi; };
65  const int hwEta() const { return m_hwEta; };
67  const int hwSign() const { return m_hwSign; };
69  const int hwSignValid() const { return m_hwSignValid; };
71  const int hwQual() const { return m_hwQuality; };
73  const int hwTrackAddress() const { return m_hwTrackAddress; };
75  const int link() const { return m_link; };
77  const int processor() const { return m_processor; };
79  const tftype trackFinderType() const { return m_trackFinder; };
81  const int hwHF() const { return m_hwHF; };
83  const uint64_t dataword() const { return m_dataword; };
85  const int dataword32Msb() const { return (int)((m_dataword >> 32) & 0xFFFFFFFF); };
87  const int dataword32Lsb() const { return (int)(m_dataword & 0xFFFFFFFF); };
88 
89  private:
90  int m_hwPt;
91  int m_hwPhi;
92  int m_hwEta;
93  bool m_hwHF;
94  int m_hwSign;
98  int m_link;
101 
104 
105 };
106 
107 }
108 
109 #endif /* define __l1t_regional_muon_candidate_h__ */
110 
void setLink(int link)
void setHwPhi(int bits)
Set compressed relative phi as transmitted by hardware LSB = 2*pi/576 (8 bits)
const int hwSignValid() const
Get charge sign valid bit (0 - not valid (high pT muon); 1 - valid)
BXVector< RegionalMuonCand > RegionalMuonCandBxCollection
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
double sign(double x)
const int hwQual() const
Get quality code.
const int hwTrackAddress() const
Get track address identifying trigger primitives.
const int dataword32Msb() const
Get 32 MSBs of data word.
void setTFIdentifiers(int processor, tftype trackFinder)
Set the processor ID, track-finder type. From these two, the link is set.
const int hwHF() const
Get HF (halo / fine eta) bit (EMTF: halo -&gt; 1; BMTF: fine eta -&gt; 1)
void setHwHF(bool bit)
Set HF (halo / fine eta) bit (EMTF: halo -&gt; 1; BMTF: fine eta -&gt; 1)
const int dataword32Lsb() const
Get 32 LSBs of data word.
void setDataword(uint64_t bits)
const int hwEta() const
Get compressed eta (returned int * 0.010875 = eta)
const int hwPhi() const
Get compressed local phi (returned int * 2*pi/576 = local phi in rad)
RegionalMuonCand(int pt, int phi, int eta, int sign, int signvalid, int quality, int processor, tftype trackFinder)
const int link() const
Get link on which the MicroGMT receives the candidate.
const tftype trackFinderType() const
Get track-finder which found the muon (bmtf, emtf_pos/emtf_neg or omtf_pos/omtf_neg) ...
void setHwQual(int bits)
Set compressed quality code as transmitted by hardware (4 bits)
void setHwPt(int bits)
Set compressed pT as transmitted by hardware LSB = 0.5 (9 bits)
void setHwEta(int bits)
Set compressed eta as transmitted by hardware LSB = 0.010875 (9 bits)
const int processor() const
Get processor ID on which the candidate was found (1..6 for OMTF/EMTF; 1..12 for BMTF) ...
void setHwTrackAddress(int bits)
Set compressed track address as transmitted by hardware. Identifies trigger primitives.
unsigned long long uint64_t
Definition: Time.h:15
const int hwPt() const
Get compressed pT (returned int * 0.5 = pT (GeV))
const uint64_t dataword() const
Get 64 bit data word.
const int hwSign() const
Get charge sign bit (charge = (-1)^(sign))
void setHwSignValid(int bits)
Set whether charge measurement is valid (0 for high pT muons)
volatile std::atomic< bool > shutdown_flag false
void setDataword(int msbs, int lsbs)
uint64_t m_dataword
This is the 64 bit word as transmitted in HW.
void setHwSign(int bits)
Set charge sign bit (charge = (-1)^(sign))