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();
162 int phiposition =
tp.getME0Data().phiposition;
163 int istrip = (phiposition >> 1);
164 int phiposition2 = (phiposition & 0x1);
165 float centreOfStrip = istrip + 0.25 + phiposition2 * 0.5;
180 return tp.getME0Data().deltaphi * (
tp.getME0Data().bend == 0 ? 1 : -1);
191 const float pad = (0.5 *
static_cast<float>(
tp.getGEMData().pad_low +
tp.getGEMData().pad_hi)) + 0.5f;
215 const float strip = (0.5 *
static_cast<float>(
tp.getRPCData().strip_low +
tp.getRPCData().strip_hi)) - 0.5f;
249 const uint16_t halfstrip =
tp.getCSCData().strip;
250 const uint16_t
pattern =
tp.getCSCData().pattern;
251 const uint16_t keyWG =
tp.getCSCData().keywire;
261 const unsigned halfstrip_offs =
static_cast<unsigned>(0.5 + halfstrip +
offset);
262 const unsigned strip = halfstrip_offs / 2 + 1;
266 const LocalPoint& coarse_lp = layer_geom->stripWireGroupIntersection(
strip, keyWG);
267 const GlobalPoint& coarse_gp = layer->surface().toGlobal(coarse_lp);
271 const double hs_offset = layer_geom->stripPhiPitch() / 4.0;
276 const double phi_offset = ((halfstrip_offs % 2 ? 1 : -1) * (ccw ? -hs_offset : hs_offset));
289 layer_geom.release();
306 const int nStrips = layer->geometry()->numberOfStrips();
307 const double phi1 = layer->centerOfStrip(1).phi();
308 const double phiN = layer->centerOfStrip(
nStrips).phi();
317 std::unique_ptr<DTChamber> chamb(const_cast<DTChamber*>(
_geodt->
chamber(baseid)));
318 std::unique_ptr<DTTrigGeom> trig_geom(
new DTTrigGeom(chamb.get(),
false));
326 const int NBTI_theta = ((baseid.
station() != 4) ? trig_geom->nCell(2) : trig_geom->nCell(3));
327 const int bti_group =
tp.getDTData().theta_bti_group;
328 const unsigned bti_actual = bti_group * NBTI_theta / 7 + NBTI_theta / 14 + 1;
330 if (baseid.
station() != 4 && bti_group != -1) {
331 thetaBTI =
DTBtiId(baseid, 2, bti_actual);
335 thetaBTI =
DTBtiId(baseid, 3, 1);
337 const GlobalPoint& theta_gp = trig_geom->CMSPosition(thetaBTI);
340 double phi =
static_cast<double>(
tp.getDTData().radialAngle) / 4096.0;
341 phi +=
tp.getDTData().sector *
M_PI / 6.0;
352 int bend =
tp.getDTData().bendingAngle;
353 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.
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)
double calcME0SpecificBend(const TriggerPrimitive &) const
LocalPoint centreOfStrip(int strip) const
GlobalPoint getRPCSpecificPoint(const TriggerPrimitive &) const
double calcGEMSpecificBend(const TriggerPrimitive &) const
double calcCSCSpecificEta(const TriggerPrimitive &) const
edm::ESGetToken< ME0Geometry, MuonGeometryRecord > geome0Token_
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
double calcME0SpecificEta(const TriggerPrimitive &) const
double calcCSCSpecificBend(const TriggerPrimitive &) const
double calculateGlobalEta(const TriggerPrimitive &) const
double calcDTSpecificPhi(const TriggerPrimitive &) const
const Plane & surface() const
The nominal surface of the GeomDet.
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
double calculateBendAngle(const TriggerPrimitive &) const
Geom::Theta< T > theta() const
GlobalPoint getME0SpecificPoint(const TriggerPrimitive &) const
GlobalPoint calcDTSpecificPoint(const TriggerPrimitive &) const
LocalPoint centreOfStrip(int strip) const
const ME0EtaPartition * etaPartition(ME0DetId id) const
Return the eta partition corresponding to the given id.