|
ATLAS Offline Software
|
Go to the documentation of this file.
18 return 4*(multiplet - 1) +
gasGap;
22 uint32_t sectorNumber = sourceid & 0xf;
23 return (isSideA) ? sectorNumber + 1: -sectorNumber - 1;
28 constexpr
size_t nbitsPhi{5};
29 constexpr
size_t mask{(1 << nbitsPhi) - 1};
37 const auto vmmchan = tdschan %
NVMMCHAN;
53 return std::make_optional(pad_id);
59 Identifier surfaceId = (trkState) -> surface().associatedDetectorElementIdentifier();
63 if(!meas)
return std::nullopt;
66 if(!rot)
return std::nullopt;
75 return std::make_tuple(rot_id, rot);
80 if (!
status.has_value())
return std::nullopt;
81 std::tuple<Identifier, const Trk::RIO_OnTrack*> rotIDtuple =
status.value();
83 return std::make_optional(std::get<Identifier>(rotIDtuple));
90 const auto vmmchan = tdschan %
NVMMCHAN;
115 int padPhi =
help.padPhi(pad_id);
116 int padEta =
help.padEta(pad_id);
117 int padPhiMax =
help.padPhiMax();
118 int padEtaMax =
help.padEtaMax();
122 std::string sideName = (
side == 1) ?
"A" :
"C";
125 return std::make_optional(std::make_tuple(padPhiTotal, padEtaTotal, sideName, sizeName,
layer + 1));
135 ATH_MSG_WARNING(
"Identifier for maximum value of NSW global Z-coordinate is invalid!");
140 (muonDetectorManagerObject -> getsTgcReadoutElement(maxNSWZid)) -> stripGlobalPosition(maxNSWZid, posNSW);
141 float posNSWZ = posNSW.z();
144 return std::make_optional(
theta);
148 std::optional<double>
status =
band2theta(rPosAtNSW, muonDetectorManagerObject);
149 if (!
status.has_value())
return std::nullopt;
151 if (!std::isnormal(
theta/2.))
return std::nullopt;
153 return std::make_optional(
eta);
157 std::optional<double>
status =
band2eta(rPosAtNSW, muonDetectorManagerObject);
158 if (!
status.has_value())
return std::nullopt;
161 return std::make_optional(
band2eta);
164 return std::make_optional(-
band2eta);
171 if (!
status.has_value())
return std::nullopt;
179 double trigger_sector_phicenter = sectorMapping.
sectorPhi((sourceid & 0xf) + 1);
180 double trigger_phi = trigger_sector_phicenter + (trigger_phiid*9.)/1000.;
182 if((sourceid & 0xf) == 8 && trigger_phiid < 0) {
183 trigger_phi = -trigger_sector_phicenter + (trigger_phiid*9./1000.);
std::optional< double > rPosAtNsw2eta(double rPosAtNSW, bool isA, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
static uint32_t offlineStationPhi(const uint32_t sourceid)
Scalar eta() const
pseudorapidity method
static uint32_t offlineGasgap(const uint32_t pfeb)
static bool isLarge(const uint32_t sec)
uint16_t channel_number(uint8_t channel_type, uint8_t sector_type, uint8_t feb_radius, uint8_t layer, uint16_t vmm, uint16_t vmm_chan) const
static bool isA(const uint32_t sourceid)
static uint32_t offlineMultilayer(const uint32_t pfeb)
Scalar theta() const
theta method
static uint32_t sector(const uint32_t sourceid)
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
static constexpr uint32_t FIRSTPFEBVMM
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
bool is_valid() const
Check if id is in a valid state.
static double triggerBandIdToRadius(bool isLarge, int triggerBand)
static std::string offlineStationName(const uint32_t sec)
static uint32_t offlineChannelNumber(const uint32_t sec, const uint32_t pfeb, const uint32_t vmm, const uint32_t vmmchan)
@ OFFLINE_CHANNEL_TYPE_PAD
int getSectors(const Identifier &id) const
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
int getLayer(const int multiplet, const int gasGap) const
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
static uint32_t layer(const uint32_t pfeb)
static uint32_t radius(const uint32_t pfeb)
int32_t sourceidToSector(uint32_t sourceid, bool isSideA) const
double triggersectorphiid2phi(uint32_t sourceid, int trigger_phiid) const
double sectorPhi(int sector) const
returns the centeral phi position of a sector in radians
std::optional< Identifier > getPadId(uint32_t sourceid, uint32_t pfeb, uint32_t tdschan) const
int getSignedPhiId(const uint32_t phiid) const
represents the track state (measurement, material, fit parameters and quality) at a surface.
std::optional< Identifier > getRotId(const Trk::TrackStateOnSurface *trkState) const
Eigen::Matrix< double, 3, 1 > Vector3D
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
#define ATH_MSG_WARNING(x)
static constexpr uint32_t NVMMCHAN
std::optional< double > band2eta(double rPosAtNSW, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
constexpr uint8_t stationEta
1 to 3
std::optional< std::tuple< Identifier, const Trk::RIO_OnTrack * > > getRotIdAndRotObject(const Trk::TrackStateOnSurface *trkState) const
constexpr int pow(int base, int exp) noexcept
static uint32_t offlineStationAbsEta(const uint32_t pfeb)
std::optional< double > band2theta(double rPosAtNSW, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
std::optional< double > bandId2eta(int bandid, bool isLarge, bool isA, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
std::optional< std::tuple< int, int, std::string, std::string, int > > getPadEtaPhiTuple(uint32_t sourceid, uint32_t pfeb, uint32_t tdschan) const
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.