CMS 3D CMS Logo

AlignableTracker.cc
Go to the documentation of this file.
2 
3 // Original Author: ?
4 // Last Update: Max Stark
5 // Date: Mon, 15 Feb 2016 09:32:12 CET
6 
7 // alignment
9 
13 
14 
15 
16 //_____________________________________________________________________________
18 ::AlignableTracker(const TrackerGeometry* trackerGeometry,
19  const TrackerTopology* trackerTopology) :
20  // id not yet known, will be set by builder
22  tTopo_(trackerTopology),
23  trackerNameSpace_(trackerTopology),
24  alignableObjectId_(trackerGeometry, nullptr, nullptr)
25 {
26  AlignableTrackerBuilder builder(trackerGeometry, trackerTopology);
27  builder.buildAlignables(this);
28  trackerNameSpace_ = builder.trackerNameSpace();
29  alignableObjectId_ = builder.objectIdProvider();
30 }
31 
32 //_____________________________________________________________________________
33 void AlignableTracker::update(const TrackerGeometry* trackerGeometry,
34  const TrackerTopology* trackerTopology)
35 {
36  AlignableTrackerBuilder builder(trackerGeometry, trackerTopology);
37  builder.buildAlignables(this, /* update = */ true);
38 }
39 
40 //_____________________________________________________________________________
42  const Alignables& list2 ) const
43 {
44  Alignables all = list1;
45 
46  all.insert( all.end(), list2.begin(), list2.end() );
47 
48  return all;
49 }
50 
51 //_____________________________________________________________________________
53 {
54 
56  Alignments* m_alignments = new Alignments();
57  // Add components recursively
58  for ( align::Alignables::iterator i=comp.begin(); i!=comp.end(); i++ )
59  {
60  Alignments* tmpAlignments = (*i)->alignments();
61  std::copy( tmpAlignments->m_align.begin(), tmpAlignments->m_align.end(),
62  std::back_inserter(m_alignments->m_align) );
63  delete tmpAlignments;
64  }
65 
66  std::sort( m_alignments->m_align.begin(), m_alignments->m_align.end(),
68 
69  return m_alignments;
70 
71 }
72 
73 //_____________________________________________________________________________
75 {
76 
78  AlignmentErrorsExtended* m_alignmentErrors = new AlignmentErrorsExtended();
79 
80  // Add components recursively
81  for ( align::Alignables::iterator i=comp.begin(); i!=comp.end(); i++ )
82  {
83  AlignmentErrorsExtended* tmpAlignmentErrorsExtended = (*i)->alignmentErrors();
84  std::copy( tmpAlignmentErrorsExtended->m_alignError.begin(), tmpAlignmentErrorsExtended->m_alignError.end(),
85  std::back_inserter(m_alignmentErrors->m_alignError) );
86  delete tmpAlignmentErrorsExtended;
87  }
88 
89  std::sort( m_alignmentErrors->m_alignError.begin(), m_alignmentErrors->m_alignError.end(),
91 
92  return m_alignmentErrors;
93 
94 }
Alignables merge(const Alignables &list1, const Alignables &list2) const
void update(const TrackerGeometry *, const TrackerTopology *)
#define nullptr
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
const AlignableObjectId & objectIdProvider() const
Return tracker alignable object ID provider derived from the tracker&#39;s geometry.
AlignableTracker(const TrackerGeometry *, const TrackerTopology *)
Alignables components() const override
Return vector of direct components.
std::vector< AlignTransformErrorExtended > m_alignError
const align::TrackerNameSpace & trackerNameSpace() const
Return tracker name space derived from the tracker&#39;s topology.
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
Alignments * alignments() const override
Return alignments, sorted by DetId.
AlignmentErrorsExtended * alignmentErrors() const override
Return alignment errors, sorted by DetId.
void buildAlignables(AlignableTracker *, bool update=false)
align::Alignables Alignables
Definition: Alignable.h:37