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 
13 public:
14  struct entry;
16 
19  AlignableObjectId(const AlignableObjectId&) = default;
23  virtual ~AlignableObjectId() = default;
24 
26  Geometry geometry() const { return geometry_; }
27 
30 
33  const char* idToString(align::StructureType type) const;
34  align::StructureType stringToId(const char*) const;
35  align::StructureType stringToId(const std::string& s) const { return stringToId(s.c_str()); }
36 
39  template <typename TRACKER, typename MUON>
41  template <typename TRACKER>
42  static AlignableObjectId commonObjectIdProvider(const TRACKER*, std::nullptr_t);
43 
44 private:
46  static Geometry muonGeometry(const DTGeometry*, const CSCGeometry*);
47 
48  const entry* entries_{nullptr};
50 };
51 
52 template <typename TRACKER, typename MUON>
54  auto trackerGeometry = (tracker ? tracker->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
55  auto muonGeometry = (muon ? muon->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
57 }
58 
59 template <typename T>
61  auto trackerGeometry = (tracker ? tracker->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
63 }
64 
65 #endif
DTGeometry
Definition: DTGeometry.h:28
AlignableObjectId
Allows conversion between type and name, and vice-versa.
Definition: AlignableObjectId.h:12
AlignableObjectId::stringToId
align::StructureType stringToId(const std::string &s) const
Definition: AlignableObjectId.h:35
AlignableObjectId::Geometry::RunI
AlignableObjectId::typeToName
std::string typeToName(align::StructureType type) const
Convert type to name.
Definition: AlignableObjectId.cc:256
StructureType.h
muon
Definition: MuonCocktails.h:17
AlignableObjectId::commonObjectIdProvider
static AlignableObjectId commonObjectIdProvider(const AlignableObjectId &, const AlignableObjectId &)
Definition: AlignableObjectId.cc:320
AlignableObjectId::Geometry::PhaseII
AlignableObjectId::Geometry::General
AlignableObjectId::muonGeometry
static Geometry muonGeometry(const DTGeometry *, const CSCGeometry *)
Definition: AlignableObjectId.cc:302
AlignableObjectId::nameToType
align::StructureType nameToType(const std::string &name) const
Convert name to type.
Definition: AlignableObjectId.cc:253
CSCGeometry
Definition: CSCGeometry.h:24
AlignableObjectId::AlignableObjectId
AlignableObjectId(Geometry)
alignCSCRings.s
s
Definition: alignCSCRings.py:92
AlignableObjectId::Geometry::Unspecified
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
align::StructureType
StructureType
Definition: StructureType.h:16
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
pat::MUON
2:
Definition: ParticleCode.h:20
AlignableObjectId::entries_
const entry * entries_
Definition: AlignableObjectId.h:48
AlignableObjectId::entry
Definition: AlignableObjectId.cc:8
AlignableObjectId::operator=
AlignableObjectId & operator=(const AlignableObjectId &)=default
AlignableObjectId::~AlignableObjectId
virtual ~AlignableObjectId()=default
type
type
Definition: HCALResponse.h:21
T
long double T
Definition: Basic3DVectorLD.h:48
AlignableObjectId::stringToId
align::StructureType stringToId(const char *) const
Definition: AlignableObjectId.cc:270
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
AlignableObjectId::idToString
const char * idToString(align::StructureType type) const
Definition: AlignableObjectId.cc:259
sistripsummary::TRACKER
Definition: SiStripSummary.h:20
AlignableObjectId::geometry
Geometry geometry() const
retrieve the geometry information
Definition: AlignableObjectId.h:26
AlignableObjectId::commonGeometry
static Geometry commonGeometry(Geometry, Geometry)
Definition: AlignableObjectId.cc:307
AlignableObjectId::geometry_
Geometry geometry_
Definition: AlignableObjectId.h:49
AlignableObjectId::Geometry::PhaseI
AlignableObjectId::trackerGeometry
static Geometry trackerGeometry(const TrackerGeometry *)
Definition: AlignableObjectId.cc:280
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