ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::ChamberT0s Class Reference

Stores links between chambers and the reconstructed T0. More...

#include <ChamberT0s.h>

Collaboration diagram for Muon::ChamberT0s:

Public Member Functions

 ChamberT0s ()=default
 ChamberT0s (const std::vector< std::pair< Identifier, float > > &t0s)
 ChamberT0s (std::vector< std::pair< Identifier, float > > &&t0s)
bool haveChamber (const Identifier &id) const
 Returns true if we have the T0 for this chamber?
float getT0 (const Identifier &id) const
 Returns the T0 for this chamber (or ChamberT0s::ChamberUnknown if the chamber is not in list)
const std::vector< std::pair< Identifier, float > > & getAllT0s () const
 Returns entire list of T0s.

Static Public Attributes

static constexpr float ChamberUnknown = -99999.9
 Value returned by ChamberT0s::getT0(...) when chamber is not known to ChamberT0s.

Private Attributes

std::vector< std::pair< Identifier, float > > m_t0s

Detailed Description

Stores links between chambers and the reconstructed T0.

Author
edwar.nosp@m.d.mo.nosp@m.yse@c.nosp@m.ern..nosp@m.ch

Definition at line 19 of file ChamberT0s.h.

Constructor & Destructor Documentation

◆ ChamberT0s() [1/3]

Muon::ChamberT0s::ChamberT0s ( )
default

◆ ChamberT0s() [2/3]

Muon::ChamberT0s::ChamberT0s ( const std::vector< std::pair< Identifier, float > > & t0s)

Definition at line 11 of file ChamberT0s.cxx.

12 :
13 m_t0s (t0s)
14{}
std::vector< std::pair< Identifier, float > > m_t0s
Definition ChamberT0s.h:51

◆ ChamberT0s() [3/3]

Muon::ChamberT0s::ChamberT0s ( std::vector< std::pair< Identifier, float > > && t0s)

Definition at line 16 of file ChamberT0s.cxx.

17 :
18 m_t0s (std::move(t0s))
19{}

Member Function Documentation

◆ getAllT0s()

const std::vector< std::pair< Identifier, float > > & Muon::ChamberT0s::getAllT0s ( ) const
inline

Returns entire list of T0s.

It consists of a vector of pairs, where the first element is the Chamber Identifier, and the second is the T0

Definition at line 65 of file ChamberT0s.h.

65 {
66 return m_t0s;
67}

◆ getT0()

float Muon::ChamberT0s::getT0 ( const Identifier & id) const
inline

Returns the T0 for this chamber (or ChamberT0s::ChamberUnknown if the chamber is not in list)

You could use this as e.g.

float t0 = chamberT0.getT0( chamberId );
// we know about chamber, so use T0
}
static Double_t t0
static constexpr float ChamberUnknown
Value returned by ChamberT0s::getT0(...) when chamber is not known to ChamberT0s.
Definition ChamberT0s.h:22

Definition at line 59 of file ChamberT0s.h.

59 {
60 auto it = std::ranges::find(m_t0s, id, &std::pair<Identifier, float>::first);
61 if (it==m_t0s.end()) return ChamberUnknown; // No such chamber known.
62 return (it->second);
63}

◆ haveChamber()

bool Muon::ChamberT0s::haveChamber ( const Identifier & id) const
inline

Returns true if we have the T0 for this chamber?

Definition at line 54 of file ChamberT0s.h.

54 {
55 auto it = std::ranges::find(m_t0s, id, &std::pair<Identifier, float>::first);
56 return (it!=m_t0s.end());
57}

Member Data Documentation

◆ ChamberUnknown

float Muon::ChamberT0s::ChamberUnknown = -99999.9
staticconstexpr

Value returned by ChamberT0s::getT0(...) when chamber is not known to ChamberT0s.

Definition at line 22 of file ChamberT0s.h.

◆ m_t0s

std::vector< std::pair < Identifier, float > > Muon::ChamberT0s::m_t0s
private

Definition at line 51 of file ChamberT0s.h.


The documentation for this class was generated from the following files: