CMS 3D CMS Logo

GeometryTranslator.h
Go to the documentation of this file.
1 #ifndef __L1TMuon_GeometryTranslator_h__
2 #define __L1TMuon_GeometryTranslator_h__
3 //
4 // Class: L1TMuon::GeometryTranslator
5 //
6 // Info: This class implements a the translations from packed bits or
7 // digi information into local or global CMS coordinates for all
8 // types of L1 trigger primitives that we want to consider for
9 // use in the integrated muon trigger.
10 //
11 // Note: This should be considered as a base class to some sort of global
12 // look-up table
13 //
14 // Author: L. Gray (FNAL)
15 // Some pieces of code lifted from: Matt Carver & Bobby Scurlock (UF)
16 //
17 
18 #include <memory>
19 
24 
25 // Forward declarations
26 namespace edm {
27  class EventSetup;
28  class ConsumesCollector;
29 } // namespace edm
30 
31 class DTGeometry;
32 class CSCGeometry;
33 class CSCLayer;
34 class RPCGeometry;
35 class GEMGeometry;
36 class ME0Geometry;
37 class MagneticField;
38 
39 namespace L1TMuon {
40 
41  // Forward declaration
42  class TriggerPrimitive;
43 
45  public:
48 
49  double calculateGlobalEta(const TriggerPrimitive&) const;
50  double calculateGlobalPhi(const TriggerPrimitive&) const;
51  double calculateBendAngle(const TriggerPrimitive&) const;
52 
54 
56 
57  const DTGeometry& getDTGeometry() const { return *_geodt; }
58  const CSCGeometry& getCSCGeometry() const { return *_geocsc; }
59  const RPCGeometry& getRPCGeometry() const { return *_georpc; }
60  const GEMGeometry& getGEMGeometry() const { return *_geogem; }
61  const ME0Geometry& getME0Geometry() const { return *_geome0; }
62 
63  const MagneticField& getMagneticField() const { return *_magfield; }
64 
65  private:
66  unsigned long long _geom_cache_id;
72 
78 
79  unsigned long long _magfield_cache_id;
82 
84  double calcME0SpecificEta(const TriggerPrimitive&) const;
85  double calcME0SpecificPhi(const TriggerPrimitive&) const;
86  double calcME0SpecificBend(const TriggerPrimitive&) const;
87 
89  double calcGEMSpecificEta(const TriggerPrimitive&) const;
90  double calcGEMSpecificPhi(const TriggerPrimitive&) const;
91  double calcGEMSpecificBend(const TriggerPrimitive&) const;
92 
94  double calcRPCSpecificEta(const TriggerPrimitive&) const;
95  double calcRPCSpecificPhi(const TriggerPrimitive&) const;
96  double calcRPCSpecificBend(const TriggerPrimitive&) const;
97 
99  double calcCSCSpecificEta(const TriggerPrimitive&) const;
100  double calcCSCSpecificPhi(const TriggerPrimitive&) const;
101  double calcCSCSpecificBend(const TriggerPrimitive&) const;
102  bool isCSCCounterClockwise(const std::unique_ptr<const CSCLayer>&) const;
103 
105  double calcDTSpecificEta(const TriggerPrimitive&) const;
106  double calcDTSpecificPhi(const TriggerPrimitive&) const;
107  double calcDTSpecificBend(const TriggerPrimitive&) const;
108  };
109 
110 } // namespace L1TMuon
111 
112 #endif
edm::ESHandle< DTGeometry > _geodt
GlobalPoint getCSCSpecificPoint(const TriggerPrimitive &) const
const GEMGeometry & getGEMGeometry() const
unsigned long long _geom_cache_id
double calcGEMSpecificPhi(const TriggerPrimitive &) const
GlobalPoint getGlobalPoint(const TriggerPrimitive &) const
double calcCSCSpecificPhi(const TriggerPrimitive &) const
edm::ESHandle< RPCGeometry > _georpc
edm::ESHandle< GEMGeometry > _geogem
edm::ESHandle< ME0Geometry > _geome0
double calcRPCSpecificPhi(const TriggerPrimitive &) const
double calculateGlobalPhi(const TriggerPrimitive &) const
double calcGEMSpecificEta(const TriggerPrimitive &) const
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
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_
const RPCGeometry & getRPCGeometry() const
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_
const DTGeometry & getDTGeometry() const
double calcRPCSpecificBend(const TriggerPrimitive &) const
double calcDTSpecificEta(const TriggerPrimitive &) const
HLT enums.
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > georpcToken_
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > geocscToken_
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
double calcME0SpecificPhi(const TriggerPrimitive &) const
const CSCGeometry & getCSCGeometry() const
const ME0Geometry & getME0Geometry() const
const MagneticField & getMagneticField() const
double calculateBendAngle(const TriggerPrimitive &) const
GlobalPoint getME0SpecificPoint(const TriggerPrimitive &) const
GlobalPoint calcDTSpecificPoint(const TriggerPrimitive &) const