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 
12 
13 //_____________________________________________________________________________
14 AlignableTracker ::AlignableTracker(const TrackerGeometry* trackerGeometry, const TrackerTopology* trackerTopology)
15  : // id not yet known, will be set by builder
17  tTopo_(trackerTopology),
18  trackerNameSpace_(trackerTopology),
19  alignableObjectId_(trackerGeometry, nullptr, nullptr) {
20  AlignableTrackerBuilder builder(trackerGeometry, trackerTopology);
21  builder.buildAlignables(this);
24 }
25 
26 //_____________________________________________________________________________
27 void AlignableTracker::update(const TrackerGeometry* trackerGeometry, const TrackerTopology* trackerTopology) {
28  AlignableTrackerBuilder builder(trackerGeometry, trackerTopology);
29  builder.buildAlignables(this, /* update = */ true);
30 }
31 
32 //_____________________________________________________________________________
34  Alignables all = list1;
35 
36  all.insert(all.end(), list2.begin(), list2.end());
37 
38  return all;
39 }
40 
41 //_____________________________________________________________________________
44  Alignments* m_alignments = new Alignments();
45  // Add components recursively
46  for (align::Alignables::iterator i = comp.begin(); i != comp.end(); i++) {
47  Alignments* tmpAlignments = (*i)->alignments();
48  std::copy(tmpAlignments->m_align.begin(), tmpAlignments->m_align.end(), std::back_inserter(m_alignments->m_align));
49  delete tmpAlignments;
50  }
51 
52  // sort by rawId
53  std::sort(m_alignments->m_align.begin(), m_alignments->m_align.end());
54 
55  return m_alignments;
56 }
57 
58 //_____________________________________________________________________________
61  AlignmentErrorsExtended* m_alignmentErrors = new AlignmentErrorsExtended();
62 
63  // Add components recursively
64  for (align::Alignables::iterator i = comp.begin(); i != comp.end(); i++) {
65  AlignmentErrorsExtended* tmpAlignmentErrorsExtended = (*i)->alignmentErrors();
66  std::copy(tmpAlignmentErrorsExtended->m_alignError.begin(),
67  tmpAlignmentErrorsExtended->m_alignError.end(),
68  std::back_inserter(m_alignmentErrors->m_alignError));
69  delete tmpAlignmentErrorsExtended;
70  }
71 
72  // sort by rawId
73  std::sort(m_alignmentErrors->m_alignError.begin(), m_alignmentErrors->m_alignError.end());
74 
75  return m_alignmentErrors;
76 }
AlignmentErrorsExtended.h
AlignableTracker::AlignableTracker
AlignableTracker(const TrackerGeometry *, const TrackerTopology *)
Definition: AlignableTracker.cc:14
TkRotation< Scalar >
mps_fire.i
i
Definition: mps_fire.py:428
AlignableTracker::alignableObjectId_
AlignableObjectId alignableObjectId_
Definition: AlignableTracker.h:117
Alignable::Alignables
align::Alignables Alignables
Definition: Alignable.h:34
align
Definition: AlignableIndexer.h:30
AlignableTracker::trackerTopology
const TrackerTopology * trackerTopology() const
Return tracker topology used to build AlignableTracker.
Definition: AlignableTracker.h:104
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
AlignableComposite::components
const Alignables & components() const override
Return vector of direct components.
Definition: AlignableComposite.h:45
TrackerTopology
Definition: TrackerTopology.h:16
AlignableComposite
Definition: AlignableComposite.h:25
AlignableTracker::trackerNameSpace_
align::TrackerNameSpace trackerNameSpace_
Definition: AlignableTracker.h:116
Alignments.h
python.cmstools.all
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:26
AlCaHLTBitMon_QueryRunRegistry.comp
comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
align::Tracker
Definition: StructureType.h:70
AlignableTracker::alignmentErrors
AlignmentErrorsExtended * alignmentErrors() const override
Return alignment errors, sorted by DetId.
Definition: AlignableTracker.cc:59
AlignableTrackerBuilder.h
AlignableTrackerBuilder
Definition: AlignableTrackerBuilder.h:17
AlignableTrackerBuilder::objectIdProvider
const AlignableObjectId & objectIdProvider() const
Return tracker alignable object ID provider derived from the tracker's geometry.
Definition: AlignableTrackerBuilder.h:33
AlignableTracker::merge
Alignables merge(const Alignables &list1, const Alignables &list2) const
Definition: AlignableTracker.cc:33
AlignmentErrorsExtended
Definition: AlignmentErrorsExtended.h:10
AlignableTrackerBuilder::trackerNameSpace
const align::TrackerNameSpace & trackerNameSpace() const
Return tracker name space derived from the tracker's topology.
Definition: AlignableTrackerBuilder.h:30
align::Alignables
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
AlignableTracker::alignments
Alignments * alignments() const override
Return alignments, sorted by DetId.
Definition: AlignableTracker.cc:42
AlignableTracker::update
void update(const TrackerGeometry *, const TrackerTopology *)
Definition: AlignableTracker.cc:27
Alignments::m_align
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
AlignmentErrorsExtended::m_alignError
std::vector< AlignTransformErrorExtended > m_alignError
Definition: AlignmentErrorsExtended.h:19
AlignableTracker.h
AlignableTrackerBuilder::buildAlignables
void buildAlignables(AlignableTracker *, bool update=false)
Definition: AlignableTrackerBuilder.cc:52
Alignments
Definition: Alignments.h:10
TrackerGeometry
Definition: TrackerGeometry.h:14