ATLAS Offline Software
NSW_PadTriggerData.cxx
Go to the documentation of this file.
2 
3 namespace Muon {
6  uint32_t ec,
7  uint32_t fragid,
8  uint32_t secid,
9  uint32_t spare,
10  uint32_t orbit,
11  uint32_t bcid,
12  uint32_t l1id,
13  uint32_t orbitid,
14  uint32_t orbit1,
16  uint32_t hit_n,
17  uint32_t pfeb_n,
18  uint32_t trigger_n,
19  uint32_t bcid_n,
20  const uint32_vt& hit_relbcid,
21  const uint32_vt& hit_pfeb,
22  const uint32_vt& hit_tdschannel,
23  const uint32_vt& hit_vmmchannel,
24  const uint32_vt& hit_vmm,
25  const uint32_vt& hit_padchannel,
26  const uint32_vt& pfeb_addr,
27  const uint32_vt& pfeb_nchan,
28  const uint32_vt& pfeb_disconnected,
29  const uint32_vt& trigger_bandid,
30  const uint32_vt& trigger_phiid,
31  const uint32_vt& trigger_relbcid,
32  const uint32_vt& bcid_rel,
33  const uint32_vt& bcid_status,
34  const uint32_vt& bcid_multzero,
35  const uint32_vt& bcid_multiplicity):
36  m_sourceid(sourceid),
37  m_flags(flags),
38  m_ec(ec),
39  m_fragid(fragid),
40  m_secid(secid),
41  m_spare(spare),
42  m_orbit(orbit),
43  m_bcid(bcid),
44  m_l1id(l1id),
45  m_orbitid(orbitid),
46  m_orbit1(orbit1),
47  m_status(status),
48  m_hit_n(hit_n),
49  m_pfeb_n(pfeb_n),
50  m_trigger_n(trigger_n),
51  m_bcid_n(bcid_n),
52  m_hit_relbcid(hit_relbcid),
53  m_hit_pfeb(hit_pfeb),
54  m_hit_tdschannel(hit_tdschannel),
55  m_hit_vmmchannel(hit_vmmchannel),
56  m_hit_vmm(hit_vmm),
57  m_hit_padchannel(hit_padchannel),
58  m_pfeb_addr(pfeb_addr),
59  m_pfeb_nchan(pfeb_nchan),
60  m_pfeb_disconnected(pfeb_disconnected),
61  m_trigger_bandid(trigger_bandid),
62  m_trigger_phiid(trigger_phiid),
63  m_trigger_relbcid(trigger_relbcid),
64  m_bcid_rel(bcid_rel),
65  m_bcid_status(bcid_status),
66  m_bcid_multzero(bcid_multzero),
67  m_bcid_multiplicity(bcid_multiplicity)
68 {
71  m_trigger_n = static_cast<uint32_t>(m_trigger_bandid.size());
72 }
73 
75 {
76  m_sourceid = (side_A ? SIDE_A : SIDE_C) + 0x20 + sector;
77  m_secid = sector;
78  m_bcid = bcid;
79  m_l1id = l1id;
80 }
81 
82 std::string NSW_PadTriggerData::string() const {
83  std::stringstream sstream{};
84  sstream << "Source ID: " << std::hex << getSourceid() << std::dec << " N(hits): " << getNumberOfHits() << " N(triggers) " << getNumberOfTriggers();
85  return sstream.str();
86 }
87 
88 std::tuple< uint32_vt, uint32_vt, uint32_vt >
90  uint32_vt bandidsFiltered{}, phiidsFiltered{}, bcidsFiltered{};
91  for (size_t it = 0; it < bandids.size(); ++it) {
92  if (bandids.at(it) == NULL_BANDID and phiids.at(it) == NULL_PHIID) {
93  continue;
94  }
95  bandidsFiltered.push_back(bandids.at(it));
96  phiidsFiltered .push_back(phiids.at(it));
97  bcidsFiltered .push_back(bcids.at(it));
98  }
99  return std::make_tuple(bandidsFiltered, phiidsFiltered, bcidsFiltered);
100 }
101 
103  m_trigger_bandid.push_back(bandid);
104  m_trigger_phiid.push_back(phiid);
105  m_trigger_relbcid.push_back(relbcid);
106  m_trigger_n += 1;
107 }
108 
110  return m_sourceid < SIDE_C;
111 }
112 
114  return not sideA();
115 }
116 
118  return m_secid % 2 == 0;
119 }
120 
122  return not largeSector();
123 }
124 
125 std::ostream& operator<<(std::ostream& stream, const NSW_PadTriggerData& rhs) {
126  return stream << rhs.string();
127 }
128 
129 MsgStream& operator<<(MsgStream& stream, const NSW_PadTriggerData& rhs) {
130  return stream << rhs.string();
131 }
132 
133 } // namespace Muon
Muon::NSW_PadTriggerData::largeSector
bool largeSector() const
Definition: NSW_PadTriggerData.cxx:117
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
AthenaPoolTestRead.flags
flags
Definition: AthenaPoolTestRead.py:8
Muon::NSW_PadTriggerData::SIDE_C
static constexpr uint32_t SIDE_C
Definition: NSW_PadTriggerData.h:137
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Muon::NSW_PadTriggerData::m_secid
uint32_t m_secid
Definition: NSW_PadTriggerData.h:105
Muon::uint32_vt
std::vector< uint32_t > uint32_vt
Definition: NSW_PadTriggerData_p1.h:7
Muon::NSW_PadTriggerData::NULL_BANDID
static constexpr uint32_t NULL_BANDID
Definition: NSW_PadTriggerData.h:134
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:45
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Muon::NSW_PadTriggerData::SIDE_A
static constexpr uint32_t SIDE_A
Definition: NSW_PadTriggerData.h:136
Muon::NSW_PadTriggerData::m_trigger_n
uint32_t m_trigger_n
Definition: NSW_PadTriggerData.h:115
Muon::NSW_PadTriggerData::m_l1id
uint32_t m_l1id
Definition: NSW_PadTriggerData.h:109
Muon::NSW_PadTriggerData::sideA
bool sideA() const
Definition: NSW_PadTriggerData.cxx:109
NSW_PadTriggerData.h
Muon::NSW_PadTriggerData::getSourceid
uint32_t getSourceid() const
Definition: NSW_PadTriggerData.h:52
Muon::NSW_PadTriggerData
Definition: NSW_PadTriggerData.h:12
Muon::NSW_PadTriggerData::m_trigger_bandid
uint32_vt m_trigger_bandid
Definition: NSW_PadTriggerData.h:126
Muon::NSW_PadTriggerData::getNumberOfHits
uint32_t getNumberOfHits() const
Definition: NSW_PadTriggerData.h:64
Muon::NSW_PadTriggerData::m_trigger_relbcid
uint32_vt m_trigger_relbcid
Definition: NSW_PadTriggerData.h:128
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
Muon::NSW_PadTriggerData::string
std::string string() const
Definition: NSW_PadTriggerData.cxx:82
Muon::operator<<
std::ostream & operator<<(std::ostream &ostr, const Muon::HedgehogBoard &board)
Definition: HedgehogBoard.cxx:11
Muon::NSW_PadTriggerData::filterNonNulls
static std::tuple< uint32_vt, uint32_vt, uint32_vt > filterNonNulls(uint32_vt bandids, uint32_vt phiids, uint32_vt bcids)
Definition: NSW_PadTriggerData.cxx:89
Muon::NSW_PadTriggerData::addTrigger
void addTrigger(uint32_t bandid, uint32_t phiid, uint32_t relbcid)
Definition: NSW_PadTriggerData.cxx:102
Muon::NSW_PadTriggerData::getNumberOfTriggers
uint32_t getNumberOfTriggers() const
Definition: NSW_PadTriggerData.h:66
Muon::NSW_PadTriggerData::sideC
bool sideC() const
Definition: NSW_PadTriggerData.cxx:113
merge.status
status
Definition: merge.py:17
Muon::NSW_PadTriggerData::smallSector
bool smallSector() const
Definition: NSW_PadTriggerData.cxx:121
Muon::NSW_PadTriggerData::NSW_PadTriggerData
NSW_PadTriggerData(uint32_t sourceid, uint32_t flags, uint32_t ec, uint32_t fragid, uint32_t secid, uint32_t spare, uint32_t orbit, uint32_t bcid, uint32_t l1id, uint32_t orbitid, uint32_t orbit1, uint32_t status, uint32_t hit_n, uint32_t pfeb_n, uint32_t trigger_n, uint32_t bcid_n, const uint32_vt &hit_relbcid, const uint32_vt &hit_pfeb, const uint32_vt &hit_tdschannel, const uint32_vt &hit_vmmchannel, const uint32_vt &hit_vmm, const uint32_vt &hit_padchannel, const uint32_vt &pfeb_addr, const uint32_vt &pfeb_nchan, const uint32_vt &pfeb_disconnected, const uint32_vt &trigger_bandid, const uint32_vt &trigger_phiid, const uint32_vt &trigger_relbcid, const uint32_vt &bcid_rel, const uint32_vt &bcid_status, const uint32_vt &bcid_multzero, const uint32_vt &bcid_multiplicity)
Definition: NSW_PadTriggerData.cxx:4
Muon::NSW_PadTriggerData::m_trigger_phiid
uint32_vt m_trigger_phiid
Definition: NSW_PadTriggerData.h:127
Muon::NSW_PadTriggerData::m_sourceid
uint32_t m_sourceid
Definition: NSW_PadTriggerData.h:101
Muon::NSW_PadTriggerData::NULL_PHIID
static constexpr uint32_t NULL_PHIID
Definition: NSW_PadTriggerData.h:135
Muon::NSW_PadTriggerData::m_bcid
uint32_t m_bcid
Definition: NSW_PadTriggerData.h:108