ATLAS Offline Software
AlignableTransform.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // AlignableTransform.cxx
6 // simple alignable transform
7 // Richard Hawkings, started 23/9/03
8 
9 #include <iostream>
11 
13  m_tag(tag), m_vec()
14 {}
15 
17  const HepGeom::Transform3D& trans)
18 {
19  m_vec.emplace_back(ident,trans);
20 }
21 
23  std::cout << "AlignableTransform::print tagname:" << m_tag <<
24  " vector size " << m_vec.size() << std::endl;
25 }
26 
28  print();
29  int i=0;
30  CLHEP::Hep3Vector trans;
31  for (AlignTransMem_citr cit=begin(); cit!=end(); ++cit) {
32  trans=(cit->transform()).getTranslation();
33  std::cout << "Member " << i++ << " transl [" << trans.x()*1.E3 << "," <<
34  trans.y()*1.E3 << "," << trans.z()*1.E3 << "]" << " ID: " <<
35  cit->identify().getString() << std::endl;
36  }
37 }
38 
40  const HepGeom::Transform3D& trans)
41 {
43  if (itr==m_vec.end()) return false;
44  itr->setTransform(trans);
45  return true;
46 }
47 
49  const HepGeom::Transform3D& trans)
50 {
52  if (itr==m_vec.end()) return false;
53  HepGeom::Transform3D newtrans=trans*(itr->transform());
54  itr->setTransform(newtrans);
55  return true;
56 }
57 
59  m_ident(), m_trans()
60 {}
61 
63 (const Identifier& ident,const HepGeom::Transform3D& trans) :
64  m_ident(ident), m_trans(trans)
65 {}
66 
67 
AlignableTransform::AlignTransMem_citr
std::vector< AlignTransMember >::const_iterator AlignTransMem_citr
Definition: AlignableTransform.h:46
AlignableTransform::update
bool update(const Identifier &ident, const HepGeom::Transform3D &trans)
Definition: AlignableTransform.cxx:39
AlignableTransform::AlignTransMember::AlignTransMember
AlignTransMember()
Definition: AlignableTransform.cxx:58
AlignableTransform::AlignableTransform
AlignableTransform()
Definition: AlignableTransform.h:98
AlignableTransform::m_tag
std::string m_tag
Definition: AlignableTransform.h:76
lumiFormat.i
int i
Definition: lumiFormat.py:85
AlignableTransform::end
AlignTransMem_citr end() const
Definition: AlignableTransform.h:106
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
AlignableTransform::add
void add(const Identifier &ident, const HepGeom::Transform3D &trans)
Definition: AlignableTransform.cxx:16
AlignableTransform::print
void print() const
Definition: AlignableTransform.cxx:22
AlignableTransform::print2
void print2() const
Definition: AlignableTransform.cxx:27
AlignableTransform::AlignTransMem_itr
std::vector< AlignTransMember >::iterator AlignTransMem_itr
Definition: AlignableTransform.h:51
TRT::Hit::ident
@ ident
Definition: HitInfo.h:77
AlignableTransform::findIdent
AlignTransMem_citr findIdent(const Identifier &ident) const
Definition: AlignableTransform.h:118
AlignableTransform.h
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
AlignableTransform::begin
AlignTransMem_citr begin() const
Definition: AlignableTransform.h:104
AlignableTransform::m_vec
std::vector< AlignTransMember > m_vec
Definition: AlignableTransform.h:77
AlignableTransform::tweak
bool tweak(const Identifier &ident, const HepGeom::Transform3D &trans)
Definition: AlignableTransform.cxx:48
Identifier
Definition: IdentifierFieldParser.cxx:14