26 : _geom_cache_id(0ULL),
32 _magfield_cache_id(0ULL),
38 switch (
tp.subsystem()) {
61 switch (
tp.subsystem()) {
84 switch (
tp.subsystem()) {
101 return std::nan(
"Invalid TP type!");
107 switch (
tp.subsystem()) {
133 unsigned long long geomid =
geom.cacheIdentifier();
144 unsigned long long magfieldid =
magfield.cacheIdentifier();
163 if (
roll ==
nullptr) {
164 throw cms::Exception(
"Invalid GE0 Roll") <<
"Failed to get GEM roll for GE0" << std::endl;
168 int phiposition =
tp.getME0Data().phiposition;
169 int istrip = (phiposition >> 1);
170 int phiposition2 = (phiposition & 0x1);
171 float centreOfStrip = istrip + 0.25 + phiposition2 * 0.5;
184 if (
roll ==
nullptr) {
185 throw cms::Exception(
"Invalid ME0 Roll") <<
"Failed to get ME0 roll" << std::endl;
189 int phiposition =
tp.getME0Data().phiposition;
190 int istrip = (phiposition >> 1);
191 int phiposition2 = (phiposition & 0x1);
192 float centreOfStrip = istrip + 0.25 + phiposition2 * 0.5;
208 return tp.getME0Data().deltaphi * (
tp.getME0Data().bend == 0 ? 1 : -1);
219 const float pad = (0.5 *
static_cast<float>(
tp.getGEMData().pad_low +
tp.getGEMData().pad_hi)) + 0.5f;
243 const float strip = (0.5 *
static_cast<float>(
tp.getRPCData().strip_low +
tp.getRPCData().strip_hi)) - 0.5f;
277 const uint16_t halfstrip =
tp.getCSCData().strip;
278 const uint16_t
pattern =
tp.getCSCData().pattern;
279 const uint16_t keyWG =
tp.getCSCData().keywire;
289 const unsigned halfstrip_offs =
static_cast<unsigned>(0.5 + halfstrip +
offset);
290 const unsigned strip = halfstrip_offs / 2 + 1;
294 const LocalPoint& coarse_lp = layer_geom->stripWireGroupIntersection(
strip, keyWG);
295 const GlobalPoint& coarse_gp = layer->surface().toGlobal(coarse_lp);
299 const double hs_offset = layer_geom->stripPhiPitch() / 4.0;
304 const double phi_offset = ((halfstrip_offs % 2 ? 1 : -1) * (ccw ? -hs_offset : hs_offset));
317 layer_geom.release();
334 const int nStrips = layer->geometry()->numberOfStrips();
335 const double phi1 = layer->centerOfStrip(1).phi();
336 const double phiN = layer->centerOfStrip(
nStrips).phi();
345 std::unique_ptr<DTChamber> chamb(const_cast<DTChamber*>(
_geodt->
chamber(baseid)));
346 std::unique_ptr<DTTrigGeom> trig_geom(
new DTTrigGeom(chamb.get(),
false));
354 const int NBTI_theta = ((baseid.
station() != 4) ? trig_geom->nCell(2) : trig_geom->nCell(3));
355 const int bti_group =
tp.getDTData().theta_bti_group;
356 const unsigned bti_actual = bti_group * NBTI_theta / 7 + NBTI_theta / 14 + 1;
358 if (baseid.
station() != 4 && bti_group != -1) {
359 thetaBTI =
DTBtiId(baseid, 2, bti_actual);
363 thetaBTI =
DTBtiId(baseid, 3, 1);
365 const GlobalPoint& theta_gp = trig_geom->CMSPosition(thetaBTI);
368 double phi =
static_cast<double>(
tp.getDTData().radialAngle) / 4096.0;
369 phi +=
tp.getDTData().sector *
M_PI / 6.0;
380 int bend =
tp.getDTData().bendingAngle;
381 double bendf = bend / 512.0;
int station() const
Return the station number.
edm::ESHandle< DTGeometry > _geodt
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a GEMEtaPartition given its id.
GlobalPoint getCSCSpecificPoint(const TriggerPrimitive &) const
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return the eta partition corresponding to the given id.
unsigned long long _geom_cache_id
double calcGEMSpecificPhi(const TriggerPrimitive &) const
GlobalPoint getGlobalPoint(const TriggerPrimitive &) const
ret
prodAgent to be discontinued
Geom::Phi< T > phi() const
double calcCSCSpecificPhi(const TriggerPrimitive &) const
edm::ESHandle< RPCGeometry > _georpc
edm::ESHandle< GEMGeometry > _geogem
edm::ESHandle< ME0Geometry > _geome0
Global3DPoint GlobalPoint
double calcRPCSpecificPhi(const TriggerPrimitive &) const
double calculateGlobalPhi(const TriggerPrimitive &) const
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
double calcGEMSpecificEta(const TriggerPrimitive &) const
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
edm::ESHandle< MagneticField > _magfield
edm::ESGetToken< DTGeometry, MuonGeometryRecord > geodtToken_
double calcRPCSpecificEta(const TriggerPrimitive &) const
GeometryTranslator(edm::ConsumesCollector)
void checkAndUpdateGeometry(const edm::EventSetup &)
edm::ESHandle< CSCGeometry > _geocsc
double calcDTSpecificBend(const TriggerPrimitive &) const
const ME0Chamber * chamber(ME0DetId id) const
Return a chamber given its id.
Abs< T >::type abs(const T &t)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
double calcME0SpecificBend(const TriggerPrimitive &) const
GlobalPoint getRPCSpecificPoint(const TriggerPrimitive &) const
double calcGEMSpecificBend(const TriggerPrimitive &) const
double calcCSCSpecificEta(const TriggerPrimitive &) const
edm::ESGetToken< ME0Geometry, MuonGeometryRecord > geome0Token_
double calcME0SpecificEta(const TriggerPrimitive &) const
double calcCSCSpecificBend(const TriggerPrimitive &) const
double calculateGlobalEta(const TriggerPrimitive &) const
double calcDTSpecificPhi(const TriggerPrimitive &) const
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
double calcRPCSpecificBend(const TriggerPrimitive &) const
static double getLegacyPosition(int pattern)
double calcDTSpecificEta(const TriggerPrimitive &) const
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > georpcToken_
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > geocscToken_
T1 value() const
Explicit access to value in case implicit conversion not OK.
bool isCSCCounterClockwise(const std::unique_ptr< const CSCLayer > &) const
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geogemToken_
unsigned long long _magfield_cache_id
GlobalPoint getGEMSpecificPoint(const TriggerPrimitive &) const
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
double calcME0SpecificPhi(const TriggerPrimitive &) const
const GEMSuperChamber * superChamber(GEMDetId id) const
double calculateBendAngle(const TriggerPrimitive &) const
Geom::Theta< T > theta() const
GlobalPoint getME0SpecificPoint(const TriggerPrimitive &) const
GlobalPoint calcDTSpecificPoint(const TriggerPrimitive &) const
const ME0EtaPartition * etaPartition(ME0DetId id) const
Return the eta partition corresponding to the given id.