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 
20 #include <memory>
21 
22 
23 // forwards
24 namespace edm {
25  class EventSetup;
26 }
27 
28 class ME0Geometry;
29 class GEMGeometry;
30 class RPCGeometry;
31 class CSCGeometry;
32 class CSCLayer;
33 class DTGeometry;
34 class MagneticField;
35 
36 namespace L1TMuon {
37  class TriggerPrimitive;
38 
40  public:
43 
44  double calculateGlobalEta(const TriggerPrimitive&) const;
45  double calculateGlobalPhi(const TriggerPrimitive&) const;
46  double calculateBendAngle(const TriggerPrimitive&) const;
47 
48  GlobalPoint getGlobalPoint(const TriggerPrimitive&) const;
49 
50  void checkAndUpdateGeometry(const edm::EventSetup&);
51 
52  const ME0Geometry& getME0Geometry() const { return *_geome0; }
53  const GEMGeometry& getGEMGeometry() const { return *_geogem; }
54  const RPCGeometry& getRPCGeometry() const { return *_georpc; }
55  const CSCGeometry& getCSCGeometry() const { return *_geocsc; }
56  const DTGeometry& getDTGeometry() const { return *_geodt; }
57 
58  const MagneticField& getMagneticField() const { return *_magfield; }
59 
60  private:
61  // pointers to the current geometry records
62  unsigned long long _geom_cache_id;
68 
69  unsigned long long _magfield_cache_id;
71 
72  GlobalPoint getGEMSpecificPoint(const TriggerPrimitive&) const;
73  double calcGEMSpecificEta(const TriggerPrimitive&) const;
74  double calcGEMSpecificPhi(const TriggerPrimitive&) const;
75  double calcGEMSpecificBend(const TriggerPrimitive&) const;
76 
77  GlobalPoint getRPCSpecificPoint(const TriggerPrimitive&) const;
78  double calcRPCSpecificEta(const TriggerPrimitive&) const;
79  double calcRPCSpecificPhi(const TriggerPrimitive&) const;
80  double calcRPCSpecificBend(const TriggerPrimitive&) const;
81 
82  GlobalPoint getCSCSpecificPoint(const TriggerPrimitive&) const;
83  double calcCSCSpecificEta(const TriggerPrimitive&) const;
84  double calcCSCSpecificPhi(const TriggerPrimitive&) const;
85  double calcCSCSpecificBend(const TriggerPrimitive&) const;
86  bool isCSCCounterClockwise(const std::unique_ptr<const CSCLayer>&) const;
87 
88  GlobalPoint calcDTSpecificPoint(const TriggerPrimitive&) const;
89  double calcDTSpecificEta(const TriggerPrimitive&) const;
90  double calcDTSpecificPhi(const TriggerPrimitive&) const;
91  double calcDTSpecificBend(const TriggerPrimitive&) const;
92  };
93 }
94 
95 #endif
edm::ESHandle< DTGeometry > _geodt
const RPCGeometry & getRPCGeometry() const
unsigned long long _geom_cache_id
edm::ESHandle< RPCGeometry > _georpc
edm::ESHandle< GEMGeometry > _geogem
edm::ESHandle< ME0Geometry > _geome0
edm::ESHandle< MagneticField > _magfield
L1TMuon::GeometryTranslator GeometryTranslator
Definition: Common.h:32
const CSCGeometry & getCSCGeometry() const
edm::ESHandle< CSCGeometry > _geocsc
const GEMGeometry & getGEMGeometry() const
HLT enums.
const MagneticField & getMagneticField() const
unsigned long long _magfield_cache_id
const DTGeometry & getDTGeometry() const
const ME0Geometry & getME0Geometry() const