File indexing completed on 2025-01-18 09:13:51
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include <DD4hep/AlignmentData.h>
0016 #include <DD4hep/detail/AlignmentsInterna.h>
0017 #include <DD4hep/detail/ConditionsInterna.h>
0018
0019
0020 #include <sstream>
0021
0022 using namespace dd4hep;
0023
0024 const std::string dd4hep::align::Keys::deltaName("alignment_delta");
0025 const dd4hep::Condition::itemkey_type dd4hep::align::Keys::deltaKey =
0026 dd4hep::ConditionKey::itemCode("alignment_delta");
0027
0028 const std::string dd4hep::align::Keys::alignmentName("alignment");
0029 const dd4hep::Condition::itemkey_type dd4hep::align::Keys::alignmentKey =
0030 dd4hep::ConditionKey::itemCode("alignment");
0031
0032
0033 Alignment::Processor::Processor() {
0034 }
0035
0036
0037 Alignment::Alignment(const std::string& nam) {
0038 char* p = (char*)::operator new(sizeof(Object)+sizeof(AlignmentData));
0039 Object* o = new(p) Object(nam, "alignment", p+sizeof(Object), sizeof(AlignmentData));
0040 assign(o, nam, "alignment");
0041 o->hash = 0;
0042 }
0043
0044
0045 AlignmentCondition::AlignmentCondition(const std::string& nam) {
0046 char* p = (char*)::operator new(sizeof(Object)+sizeof(AlignmentData));
0047 Object* o = new(p) Object(nam, "alignment", p+sizeof(Object), sizeof(AlignmentData));
0048 assign(o, nam, "alignment");
0049 o->hash = 0;
0050 }
0051
0052
0053 AlignmentData& Alignment::data() {
0054 return access()->values();
0055 }
0056
0057
0058 const AlignmentData& Alignment::data() const {
0059 return access()->values();
0060 }
0061
0062
0063 const Delta& Alignment::delta() const {
0064 return access()->values().delta;
0065 }
0066
0067
0068 const TGeoHMatrix& Alignment::worldTransformation() const {
0069 return access()->values().worldTransformation();
0070 }
0071
0072
0073 const TGeoHMatrix& Alignment::detectorTransformation() const {
0074 return access()->values().detectorTransformation();
0075 }
0076
0077
0078 const std::vector<PlacedVolume>& Alignment::nodes() const {
0079 return access()->values().nodes;
0080 }
0081
0082
0083 void Alignment::localToWorld(const Position& local, Position& global) const {
0084 return access()->values().localToWorld(local,global);
0085 }
0086
0087
0088 void Alignment::localToWorld(const Double_t local[3], Double_t global[3]) const {
0089 return access()->values().localToWorld(local,global);
0090 }
0091
0092 Position Alignment::localToWorld(const Position& local) const {
0093 return access()->values().localToWorld(local);
0094 }
0095
0096
0097 void Alignment::worldToLocal(const Position& global, Position& local) const {
0098 return access()->values().worldToLocal(global,local);
0099 }
0100
0101
0102 void Alignment::worldToLocal(const Double_t global[3], Double_t local[3]) const {
0103 return access()->values().worldToLocal(global,local);
0104 }
0105
0106
0107 Position Alignment::worldToLocal(const Position& global) const {
0108 return access()->values().worldToLocal(global);
0109 }
0110
0111
0112 void Alignment::localToDetector(const Position& local, Position& detector) const {
0113 return access()->values().localToDetector(local,detector);
0114 }
0115
0116
0117 void Alignment::localToDetector(const Double_t local[3], Double_t detector[3]) const {
0118 return access()->values().localToDetector(local,detector);
0119 }
0120
0121
0122 Position Alignment::localToDetector(const Position& local) const {
0123 return access()->values().localToDetector(local);
0124 }
0125
0126
0127 void Alignment::detectorToLocal(const Position& detector, Position& local) const {
0128 return access()->values().detectorToLocal(detector,local);
0129 }
0130
0131
0132 void Alignment::detectorToLocal(const Double_t detector[3], Double_t local[3]) const {
0133 return access()->values().detectorToLocal(detector,local);
0134 }
0135
0136
0137 Position Alignment::detectorToLocal(const Position& detector) const {
0138 return access()->values().detectorToLocal(detector);
0139 }
0140
0141
0142 const dd4hep::IOVType& AlignmentCondition::iovType() const {
0143 return *(access()->iovType());
0144 }
0145
0146
0147 const dd4hep::IOV& AlignmentCondition::iov() const {
0148 return *(access()->iovData());
0149 }
0150
0151
0152 AlignmentCondition::key_type AlignmentCondition::key() const {
0153 return access()->hash;
0154 }
0155
0156
0157 AlignmentData& AlignmentCondition::data() {
0158 return *(access()->alignment_data);
0159 }
0160
0161
0162 const AlignmentData& AlignmentCondition::data() const {
0163 return *(access()->alignment_data);
0164 }
0165
0166
0167 const Delta& AlignmentCondition::delta() const {
0168 return access()->alignment_data->delta;
0169 }
0170
0171
0172 bool AlignmentCondition::is_bound() const {
0173 return isValid() ? ptr()->data.is_bound() : false;
0174 }
0175
0176
0177 const TGeoHMatrix& AlignmentCondition::worldTransformation() const {
0178 return data().worldTransformation();
0179 }
0180
0181
0182 const TGeoHMatrix& AlignmentCondition::detectorTransformation() const {
0183 return data().detectorTransformation();
0184 }