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 // forwards
15 namespace edm {
16  class EventSetup;
17 }
18 
19 class TrackerGeometry;
20 class TrackerTopology;
21 class MagneticField;
22 
23 namespace L1TMuon {
24 
25  class TTTriggerPrimitive;
26 
28  public:
31 
32  // Things you have to do to just get simple det id info...
33  bool isBarrel(const TTTriggerPrimitive&) const;
34  bool isPSModule(const TTTriggerPrimitive&) const;
35  int region(const TTTriggerPrimitive&) const; // 0 for Barrel, +/-1 for +/- Endcap
36  int layer(const TTTriggerPrimitive&) const;
37  int ring(const TTTriggerPrimitive&) const;
38  int module(const TTTriggerPrimitive&) const;
39 
40  // The translations
41  double calculateGlobalEta(const TTTriggerPrimitive&) const;
42  double calculateGlobalPhi(const TTTriggerPrimitive&) const;
43  double calculateBendAngle(const TTTriggerPrimitive&) const;
44 
45  GlobalPoint getGlobalPoint(const TTTriggerPrimitive&) const;
46 
47  // Update geometry if necessary
48  void checkAndUpdateGeometry(const edm::EventSetup&);
49 
50  // Retrieve the geometry records
51  const TrackerGeometry& getTrackerGeometry() const { return *_geom; }
52  const TrackerTopology& getTrackerTopology() const { return *_topo; }
53  const MagneticField& getMagneticField() const { return *_magfield; }
54 
55  private:
56  // Pointers to the current geometry records
57  unsigned long long _geom_cache_id;
59 
60  unsigned long long _topo_cache_id;
62 
63  unsigned long long _magfield_cache_id;
65 
66  GlobalPoint getTTSpecificPoint(const TTTriggerPrimitive&) const;
67  double calcTTSpecificEta(const TTTriggerPrimitive&) const;
68  double calcTTSpecificPhi(const TTTriggerPrimitive&) const;
69  double calcTTSpecificBend(const TTTriggerPrimitive&) const;
70  };
71 } // namespace L1TMuon
72 
73 #endif
const TrackerTopology & getTrackerTopology() const
edm::ESHandle< TrackerGeometry > _geom
edm::ESHandle< MagneticField > _magfield
edm::ESHandle< TrackerTopology > _topo
const MagneticField & getMagneticField() const
L1TMuon::TTGeometryTranslator TTGeometryTranslator
Definition: Common.h:36
HLT enums.
const TrackerGeometry & getTrackerGeometry() const
Definition: vlib.h:198