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