CMS 3D CMS Logo

AlignableObjectId.h
Go to the documentation of this file.
1 #ifndef Alignment_CommonAlignment_AlignableObjectId_h
2 #define Alignment_CommonAlignment_AlignableObjectId_h
3 
4 #include <string>
6 
7 class TrackerGeometry;
8 class DTGeometry;
9 class CSCGeometry;
10 class GEMGeometry;
11 
14 public:
15  struct entry;
17 
19  AlignableObjectId(const TrackerGeometry*, const DTGeometry*, const CSCGeometry*, const GEMGeometry*);
20  AlignableObjectId(const AlignableObjectId&) = default;
24  virtual ~AlignableObjectId() = default;
25 
27  Geometry geometry() const { return geometry_; }
28 
31 
34  const char* idToString(align::StructureType type) const;
35  align::StructureType stringToId(const char*) const;
36  align::StructureType stringToId(const std::string& s) const { return stringToId(s.c_str()); }
37 
40  template <typename TRACKER, typename MUON>
42  template <typename TRACKER>
43  static AlignableObjectId commonObjectIdProvider(const TRACKER*, std::nullptr_t);
44 
45 private:
47  static Geometry muonGeometry(const DTGeometry*, const CSCGeometry*, const GEMGeometry*);
48 
49  const entry* entries_{nullptr};
51 };
52 
53 template <typename TRACKER, typename MUON>
55  auto trackerGeometry = (tracker ? tracker->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
56  auto muonGeometry = (muon ? muon->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
58 }
59 
60 template <typename T>
62  auto trackerGeometry = (tracker ? tracker->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
64 }
65 
66 #endif
DTGeometry
Definition: DTGeometry.h:28
AlignableObjectId
Allows conversion between type and name, and vice-versa.
Definition: AlignableObjectId.h:13
AlignableObjectId::stringToId
align::StructureType stringToId(const std::string &s) const
Definition: AlignableObjectId.h:36
AlignableObjectId::Geometry::RunI
AlignableObjectId::typeToName
std::string typeToName(align::StructureType type) const
Convert type to name.
Definition: AlignableObjectId.cc:270
StructureType.h
muon
Definition: MuonCocktails.h:17
AlignableObjectId::commonObjectIdProvider
static AlignableObjectId commonObjectIdProvider(const AlignableObjectId &, const AlignableObjectId &)
Definition: AlignableObjectId.cc:336
AlignableObjectId::Geometry::PhaseII
AlignableObjectId::Geometry::General
AlignableObjectId::muonGeometry
static Geometry muonGeometry(const DTGeometry *, const CSCGeometry *, const GEMGeometry *)
Definition: AlignableObjectId.cc:316
AlignableObjectId::nameToType
align::StructureType nameToType(const std::string &name) const
Convert name to type.
Definition: AlignableObjectId.cc:267
CSCGeometry
Definition: CSCGeometry.h:24
AlignableObjectId::AlignableObjectId
AlignableObjectId(Geometry)
alignCSCRings.s
s
Definition: alignCSCRings.py:92
AlignableObjectId::Geometry::Unspecified
align::StructureType
StructureType
Definition: StructureType.h:16
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
pat::MUON
2:
Definition: ParticleCode.h:20
AlignableObjectId::entries_
const entry * entries_
Definition: AlignableObjectId.h:49
AlignableObjectId::entry
Definition: AlignableObjectId.cc:8
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
AlignableObjectId::operator=
AlignableObjectId & operator=(const AlignableObjectId &)=default
AlignableObjectId::~AlignableObjectId
virtual ~AlignableObjectId()=default
T
long double T
Definition: Basic3DVectorLD.h:48
AlignableObjectId::stringToId
align::StructureType stringToId(const char *) const
Definition: AlignableObjectId.cc:284
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
AlignableObjectId::idToString
const char * idToString(align::StructureType type) const
Definition: AlignableObjectId.cc:273
sistripsummary::TRACKER
Definition: SiStripSummary.h:20
AlignableObjectId::geometry
Geometry geometry() const
retrieve the geometry information
Definition: AlignableObjectId.h:27
GEMGeometry
Definition: GEMGeometry.h:24
AlignableObjectId::commonGeometry
static Geometry commonGeometry(Geometry, Geometry)
Definition: AlignableObjectId.cc:323
AlignableObjectId::geometry_
Geometry geometry_
Definition: AlignableObjectId.h:50
AlignableObjectId::Geometry::PhaseI
AlignableObjectId::trackerGeometry
static Geometry trackerGeometry(const TrackerGeometry *)
Definition: AlignableObjectId.cc:294
Geometry
Class Geometry Contains vector for fit parameters (mean, sigma, etc.) obtained from multiple IOVs See...
Definition: DMRtrends.cc:182
TrackerGeometry
Definition: TrackerGeometry.h:14