15 if (std::abs(
eta)==1) feb=layer-1;
16 else if(std::abs(
eta)==2) feb=layer+7;
17 else if(std::abs(
eta)==3) feb=layer+15;
28 return 4*(multiplet - 1) + gasGap;
32 uint32_t sectorNumber = sourceid & 0xf;
33 return (isSideA) ? sectorNumber + 1: -sectorNumber - 1;
38 constexpr size_t nbitsPhi{5};
39 constexpr size_t mask{(1 << nbitsPhi) - 1};
40 return std::pow(-1, phiid >> nbitsPhi) * (phiid & mask);
47 const auto vmmchan = tdschan %
NVMMCHAN;
63 return std::make_optional(pad_id);
69 Identifier surfaceId = (trkState) -> surface().associatedDetectorElementIdentifier();
73 if(!meas)
return std::nullopt;
76 if(!rot)
return std::nullopt;
85 return std::make_tuple(rot_id, rot);
89 std::optional<std::tuple<Identifier, const Trk::RIO_OnTrack*>> status =
getRotIdAndRotObject(trkState);
90 if (!status.has_value())
return std::nullopt;
91 std::tuple<Identifier, const Trk::RIO_OnTrack*> rotIDtuple = status.value();
93 return std::make_optional(std::get<Identifier>(rotIDtuple));
100 const auto vmmchan = tdschan %
NVMMCHAN;
125 int padPhi = help.padPhi(pad_id);
126 int padEta = help.padEta(pad_id);
127 int padPhiMax = help.padPhiMax();
128 int padEtaMax = help.padEtaMax();
132 std::string sideName = (side == 1) ?
"A" :
"C";
135 return std::make_optional(std::make_tuple(padPhiTotal, padEtaTotal, sideName, sizeName, layer + 1));
145 ATH_MSG_WARNING(
"Identifier for maximum value of NSW global Z-coordinate is invalid!");
150 (muonDetectorManagerObject -> getsTgcReadoutElement(maxNSWZid)) -> stripGlobalPosition(maxNSWZid, posNSW);
151 float posNSWZ = posNSW.z();
153 double theta = std::atan(rPosAtNSW/posNSWZ);
154 return std::make_optional(
theta);
158 std::optional<double> status =
band2theta(rPosAtNSW, muonDetectorManagerObject);
159 if (!status.has_value())
return std::nullopt;
160 double theta = status.value();
161 if (!std::isnormal(
theta/2.))
return std::nullopt;
162 double eta = -std::log(std::tan(
theta/2.));
163 return std::make_optional(
eta);
167 std::optional<double> status =
band2eta(rPosAtNSW, muonDetectorManagerObject);
168 if (!status.has_value())
return std::nullopt;
171 return std::make_optional(
band2eta);
174 return std::make_optional(-
band2eta);
180 std::optional<double> status =
rPosAtNsw2eta(rPosAtNSW, isA, muonDetectorManagerObject);
181 if (!status.has_value())
return std::nullopt;
189 double trigger_sector_phicenter = sectorMapping.
sectorPhi((sourceid & 0xf) + 1);
190 double trigger_phi = trigger_sector_phicenter + (trigger_phiid*9.)/1000.;
192 if((sourceid & 0xf) == 8 && trigger_phiid < 0) {
193 trigger_phi = -trigger_sector_phicenter + (trigger_phiid*9./1000.);
Scalar eta() const
pseudorapidity method
Scalar theta() const
theta method
#define ATH_MSG_WARNING(x)
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.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
static double triggerBandIdToRadius(bool isLarge, int triggerBand)
double sectorPhi(int sector) const
returns the centeral phi position of a sector in radians
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 uint32_t offlineStationAbsEta(const uint32_t pfeb)
static uint32_t offlineGasgap(const uint32_t pfeb)
static uint32_t radius(const uint32_t pfeb)
static bool isLarge(const uint32_t sec)
static uint32_t layer(const uint32_t pfeb)
static uint32_t offlineChannelNumber(const uint32_t sec, const uint32_t pfeb, const uint32_t vmm, const uint32_t vmmchan)
static uint32_t offlineStationPhi(const uint32_t sourceid)
static std::string offlineStationName(const uint32_t sec)
static uint32_t sector(const uint32_t sourceid)
static bool isA(const uint32_t sourceid)
static uint32_t offlineMultilayer(const uint32_t pfeb)
This class is the pure abstract base class for all fittable tracking measurements.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
represents the track state (measurement, material, fit parameters and quality) at a surface.
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
std::optional< std::tuple< Identifier, const Trk::RIO_OnTrack * > > getRotIdAndRotObject(const Trk::TrackStateOnSurface *trkState) const
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
std::optional< double > band2eta(double rPosAtNSW, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
int getLayer(const int multiplet, const int gasGap) const
int getSignedPhiId(const uint32_t phiid) const
std::optional< double > rPosAtNsw2eta(double rPosAtNSW, bool isA, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
int32_t sourceidToSector(uint32_t sourceid, bool isSideA) const
Muon::nsw::MapperSTG mapper
static constexpr uint32_t NVMMCHAN
static constexpr uint32_t FIRSTPFEBVMM
double triggersectorphiid2phi(uint32_t sourceid, int trigger_phiid) const
std::optional< std::tuple< int, int, std::string, std::string, int > > getPadEtaPhiTuple(uint32_t sourceid, uint32_t pfeb, uint32_t tdschan) const
std::optional< Identifier > getPadId(uint32_t sourceid, uint32_t pfeb, uint32_t tdschan) const
Muon::MuonSectorMapping MuonSectorMapping
std::optional< Identifier > getRotId(const Trk::TrackStateOnSurface *trkState) const
std::optional< double > bandId2eta(int bandid, bool isLarge, bool isA, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
int getSectors(const Identifier &id) const
std::optional< double > band2theta(double rPosAtNSW, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
int getFEBs(int eta, int layers) const
Eigen::Matrix< double, 3, 1 > Vector3D
@ OFFLINE_CHANNEL_TYPE_PAD