#include <AlignableExtras.h>
Public Types | |
typedef align::Alignables | Alignables |
Public Member Functions | |
AlignableExtras () | |
Constructor (builds all alignables) | |
AlignmentErrors * | alignmentErrors () const |
Return alignment errors, sorted by DetId. | |
Alignments * | alignments () const |
Return alignments, sorted by DetId. | |
Alignables & | beamSpot () |
Return beam spot alignable as a vector with one element. | |
Alignables | components () const |
void | dump (void) const |
void | initializeBeamSpot (double x, double y, double z, double dxdz, double dydz) |
Initialize the alignable beam spot with the given parameters. | |
Alignables & | subStructures (const std::string &subStructName) |
Return alignables determined by name. | |
Private Attributes | |
AlignSetup< Alignables > | alignableLists_ |
Alignables | components_ |
A container for additional/extra alignables
Original author: Andreas Mussgiller, August 2010
(last update by
)
Definition at line 19 of file AlignableExtras.h.
Definition at line 23 of file AlignableExtras.h.
AlignableExtras::AlignableExtras | ( | ) | [explicit] |
Constructor (builds all alignables)
Definition at line 26 of file AlignableExtras.cc.
References alignableLists_, components_, and AlignSetup< Type >::get().
{ align::Alignables& alis = alignableLists_.get("BeamSpot"); alis.push_back(new AlignableBeamSpot()); components_.push_back(alis.back()); }
AlignmentErrors * AlignableExtras::alignmentErrors | ( | void | ) | const |
Return alignment errors, sorted by DetId.
Definition at line 68 of file AlignableExtras.cc.
References components(), filterCSVwithJSON::copy, i, AlignmentErrors::m_alignError, and python::multivaluedict::sort().
{ align::Alignables comp = this->components(); AlignmentErrors* m_alignmentErrors = new AlignmentErrors(); // Add components recursively for ( align::Alignables::iterator i=comp.begin(); i!=comp.end(); i++ ) { AlignmentErrors* tmpAlignmentErrors = (*i)->alignmentErrors(); std::copy( tmpAlignmentErrors->m_alignError.begin(), tmpAlignmentErrors->m_alignError.end(), std::back_inserter(m_alignmentErrors->m_alignError) ); delete tmpAlignmentErrors; } std::sort( m_alignmentErrors->m_alignError.begin(), m_alignmentErrors->m_alignError.end(), lessAlignmentDetId<AlignTransformError>() ); return m_alignmentErrors; }
Alignments * AlignableExtras::alignments | ( | void | ) | const |
Return alignments, sorted by DetId.
Definition at line 48 of file AlignableExtras.cc.
References components(), filterCSVwithJSON::copy, i, Alignments::m_align, and python::multivaluedict::sort().
{ align::Alignables comp = this->components(); Alignments* m_alignments = new Alignments(); // Add components recursively for ( align::Alignables::iterator i=comp.begin(); i!=comp.end(); i++ ) { Alignments* tmpAlignments = (*i)->alignments(); std::copy( tmpAlignments->m_align.begin(), tmpAlignments->m_align.end(), std::back_inserter(m_alignments->m_align) ); delete tmpAlignments; } std::sort( m_alignments->m_align.begin(), m_alignments->m_align.end(), lessAlignmentDetId<AlignTransform>() ); return m_alignments; }
Alignables& AlignableExtras::beamSpot | ( | ) | [inline] |
Return beam spot alignable as a vector with one element.
Definition at line 34 of file AlignableExtras.h.
References subStructures().
Referenced by initializeBeamSpot().
{ return this->subStructures("BeamSpot");}
Alignables AlignableExtras::components | ( | ) | const [inline] |
Definition at line 36 of file AlignableExtras.h.
References components_.
Referenced by AlignableNavigator::AlignableNavigator(), alignmentErrors(), alignments(), dump(), MomentumDependentPedeLabeler::MomentumDependentPedeLabeler(), PedeLabeler::PedeLabeler(), PedeSteerer::PedeSteerer(), and RunRangeDependentPedeLabeler::RunRangeDependentPedeLabeler().
{ return components_; }
void AlignableExtras::dump | ( | void | ) | const |
Definition at line 34 of file AlignableExtras.cc.
References components(), and i.
Referenced by AlignmentProducer::endOfJob().
{ Alignables comp = this->components(); // Dump this edm::LogInfo("AlignableDump") << " AlignableExtras knows " << comp.size() << " alignable(s)" << std::endl; // Dump components for ( Alignables::iterator i=comp.begin(); i!=comp.end(); i++ ) (*i)->dump(); }
void AlignableExtras::initializeBeamSpot | ( | double | x, |
double | y, | ||
double | z, | ||
double | dxdz, | ||
double | dydz | ||
) |
Initialize the alignable beam spot with the given parameters.
Definition at line 88 of file AlignableExtras.cc.
References beamSpot(), and AlignableBeamSpot::initialize().
Referenced by AlignmentProducer::duringLoop().
{ align::Alignables& alis = beamSpot(); AlignableBeamSpot * aliBS = dynamic_cast<AlignableBeamSpot*>(alis.back()); aliBS->initialize(x, y, z, dxdz, dydz); }
Alignables& AlignableExtras::subStructures | ( | const std::string & | subStructName | ) | [inline] |
Return alignables determined by name.
Definition at line 29 of file AlignableExtras.h.
References alignableLists_, and AlignSetup< Type >::find().
Referenced by AlignmentParameterSelector::addSelection(), and beamSpot().
{ return alignableLists_.find(subStructName); }
AlignSetup<Alignables> AlignableExtras::alignableLists_ [private] |
Definition at line 52 of file AlignableExtras.h.
Referenced by AlignableExtras(), and subStructures().
Alignables AlignableExtras::components_ [private] |
Definition at line 53 of file AlignableExtras.h.
Referenced by AlignableExtras(), and components().