CMS 3D CMS Logo

TTGeometryTranslator.h
Go to the documentation of this file.
1 #ifndef __L1TMuon_TTGeometryTranslator_h__
2 #define __L1TMuon_TTGeometryTranslator_h__
3 
4 //
5 // This class implements the translations from trigger primitive to
6 // global CMS coordinates for the Tracker trigger primitives analogous to
7 // the class GeometryTranslator.
8 //
9 
12 #include <memory>
13 
14 
15 // forwards
16 namespace edm {
17  class EventSetup;
18 }
19 
20 class TrackerGeometry;
21 class TrackerTopology;
22 class MagneticField;
23 
24 namespace L1TMuon {
25 
26  class TTTriggerPrimitive;
27 
29  public:
32 
33  // Things you have to do to just get simple det id info...
34  bool isBarrel (const TTTriggerPrimitive&) const;
35  bool isPSModule(const TTTriggerPrimitive&) const;
36  int region (const TTTriggerPrimitive&) const; // 0 for Barrel, +/-1 for +/- Endcap
37  int layer (const TTTriggerPrimitive&) const;
38  int ring (const TTTriggerPrimitive&) const;
39  int module (const TTTriggerPrimitive&) const;
40 
41  // The translations
42  double calculateGlobalEta(const TTTriggerPrimitive&) const;
43  double calculateGlobalPhi(const TTTriggerPrimitive&) const;
44  double calculateBendAngle(const TTTriggerPrimitive&) const;
45 
46  GlobalPoint getGlobalPoint(const TTTriggerPrimitive&) const;
47 
48  // Update geometry if necessary
49  void checkAndUpdateGeometry(const edm::EventSetup&);
50 
51  // Retrieve the geometry records
52  const TrackerGeometry& getTrackerGeometry() const { return *_geom; }
53  const TrackerTopology& getTrackerTopology() const { return *_topo; }
54  const MagneticField& getMagneticField() const { return *_magfield; }
55 
56  private:
57  // Pointers to the current geometry records
58  unsigned long long _geom_cache_id;
60 
61  unsigned long long _topo_cache_id;
63 
64  unsigned long long _magfield_cache_id;
66 
67  GlobalPoint getTTSpecificPoint(const TTTriggerPrimitive&) const;
68  double calcTTSpecificEta(const TTTriggerPrimitive&) const;
69  double calcTTSpecificPhi(const TTTriggerPrimitive&) const;
70  double calcTTSpecificBend(const TTTriggerPrimitive&) const;
71  };
72 }
73 
74 #endif
const TrackerTopology & getTrackerTopology() const
L1TMuon::TTGeometryTranslator TTGeometryTranslator
Definition: Common.h:36
edm::ESHandle< TrackerGeometry > _geom
edm::ESHandle< MagneticField > _magfield
edm::ESHandle< TrackerTopology > _topo
const MagneticField & getMagneticField() const
HLT enums.
const TrackerGeometry & getTrackerGeometry() const
Definition: vlib.h:208