CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
AlignableTracker Class Reference

#include <AlignableTracker.h>

Inheritance diagram for AlignableTracker:
AlignableComposite Alignable

Public Member Functions

 AlignableTracker (const TrackerGeometry *tracker, const TrackerTopology *tTopo)
 Constructor (builds the full hierarchy) More...
 
AlignmentErrorsExtendedalignmentErrors () const
 Return alignment errors, sorted by DetId. More...
 
Alignmentsalignments () const
 Return alignments, sorted by DetId. More...
 
Alignables barrelGeomDets ()
 Return inner and outer barrel GeomDets together. More...
 
Alignables barrelLayers ()
 Return inner and outer barrel layers. More...
 
Alignables barrelRods ()
 Return inner and outer barrel rods. More...
 
AlignablesendcapGeomDets ()
 Return endcap GeomDets. More...
 
AlignablesendcapLayers ()
 Return endcap layers. More...
 
AlignablesendcapPetals ()
 Return encap petals. More...
 
AlignablesendCaps ()
 Return TECs. More...
 
AlignablesinnerBarrelGeomDets ()
 Return inner barrel GeomDets. More...
 
AlignablesinnerBarrelLayers ()
 Return inner barrel layers. More...
 
AlignablesinnerBarrelRods ()
 Return inner barrel rods. More...
 
AlignablesinnerHalfBarrels ()
 Return TIB half barrels. More...
 
AlignablesouterBarrelGeomDets ()
 Return outer barrel GeomDets. More...
 
AlignablesouterBarrelLayers ()
 Return outer barrel layers. More...
 
AlignablesouterBarrelRods ()
 Return outer barrel rods. More...
 
AlignablesouterHalfBarrels ()
 Return TOB half barrels. More...
 
AlignablespixelEndcapGeomDets ()
 Return pixel endcap GeomDets. More...
 
AlignablespixelEndcapLayers ()
 Return pixel endcap layers. More...
 
AlignablespixelEndcapPetals ()
 Return pixel endcap petals. More...
 
AlignablespixelEndCaps ()
 Return TPEs. More...
 
AlignablespixelHalfBarrelGeomDets ()
 Return pixel barrel GeomDets. More...
 
AlignablespixelHalfBarrelLadders ()
 Return pixel half barrel ladders (implemented as AlignableRods) More...
 
AlignablespixelHalfBarrelLayers ()
 Return pixel half barrel layers. More...
 
AlignablespixelHalfBarrels ()
 Return Pixel half barrels. More...
 
AlignablessubStructures (const std::string &subStructName)
 
Alignables TIBTIDGeomDets ()
 Return inner barrel and TID GeomDets together. More...
 
AlignablesTIDGeomDets ()
 Return TID GeomDets. More...
 
AlignablesTIDLayers ()
 Return TID layers. More...
 
AlignablesTIDRings ()
 Return TID rings. More...
 
AlignablesTIDs ()
 Return TIDs. More...
 
const TrackerTopologytrackerTopology () const
 Returns tracker topology. More...
 
- Public Member Functions inherited from AlignableComposite
virtual void addAlignmentPositionError (const AlignmentPositionError &ape, bool propagateDown)
 
virtual void addAlignmentPositionErrorFromLocalRotation (const RotationType &rotation, bool propagateDown)
 
virtual void addAlignmentPositionErrorFromRotation (const RotationType &rotation, bool propagateDown)
 
virtual void addComponent (Alignable *component)
 
virtual void addSurfaceDeformation (const SurfaceDeformation *deformation, bool propagateDown)
 
 AlignableComposite (align::ID id, StructureType aType, const RotationType &rot=RotationType())
 
virtual StructureType alignableObjectId () const
 Return the alignable type identifier. More...
 
virtual Alignables components () const
 Return vector of direct components. More...
 
virtual void dump () const
 Recursive printout of alignable structure. More...
 
virtual void move (const GlobalVector &displacement)
 Move with respect to the global reference frame. More...
 
virtual void moveComponentLocal (const int i, const LocalVector &localDisplacement)
 Move a single component with respect to the local reference frame. More...
 
virtual void moveComponentsLocal (const LocalVector &localDisplacement)
 Move with respect to the local reference frame. More...
 
virtual void recursiveComponents (Alignables &result) const
 Provide all components, subcomponents etc. (cf. description in base class) More...
 
virtual void rotateInGlobalFrame (const RotationType &rotation)
 Rotation interpreted in global reference frame. More...
 
virtual void setAlignmentPositionError (const AlignmentPositionError &ape, bool propagateDown)
 
virtual void setSurfaceDeformation (const SurfaceDeformation *deformation, bool propagateDown)
 Set the surface deformation parameters - if (!propagateDown) do not affect daughters. More...
 
virtual int surfaceDeformationIdPairs (std::vector< std::pair< int, SurfaceDeformation * > > &) const
 Return surface deformations. More...
 
virtual ~AlignableComposite ()
 deleting its components More...
 
- Public Member Functions inherited from Alignable
 Alignable (align::ID, const AlignableSurface &)
 
 Alignable (align::ID, const RotationType &)
 
AlignmentParametersalignmentParameters () const
 Get the AlignmentParameters. More...
 
virtual void cacheTransformation ()
 cache the current position, rotation and other parameters (e.g. surface deformations), also for possible components More...
 
const AlignablesdeepComponents () const
 
const GlobalVectordisplacement () const
 Return change of the global position since the creation of the object. More...
 
bool firstCompsWithParams (Alignables &paramComps) const
 
const DetIdgeomDetId () const
 
const PositionTypeglobalPosition () const
 Return the global position of the object. More...
 
const RotationTypeglobalRotation () const
 Return the global orientation of the object. More...
 
align::ID id () const
 Return the ID of Alignable, i.e. DetId of 'first' component GeomDet(Unit). More...
 
Alignablemother () const
 Return pointer to container alignable (if any) More...
 
virtual void restoreCachedTransformation ()
 restore the previously cached transformation, also for possible components More...
 
virtual void rotateAroundGlobalAxis (const GlobalVector &axis, Scalar radians)
 Rotation around arbitratry global axis. More...
 
virtual void rotateAroundGlobalX (Scalar radians)
 Rotation around global x-axis. More...
 
virtual void rotateAroundGlobalY (Scalar radians)
 Rotation around global y-axis. More...
 
virtual void rotateAroundGlobalZ (Scalar radians)
 Rotation around global z-axis. More...
 
virtual void rotateAroundLocalAxis (const LocalVector &axis, Scalar radians)
 Rotation around arbitratry local axis. More...
 
virtual void rotateAroundLocalX (Scalar radians)
 Rotation around local x-axis. More...
 
virtual void rotateAroundLocalY (Scalar radians)
 Rotation around local y-axis. More...
 
virtual void rotateAroundLocalZ (Scalar radians)
 Rotation around local z-axis. More...
 
virtual void rotateInLocalFrame (const RotationType &rotation)
 Rotation intepreted in the local reference frame. More...
 
const RotationTyperotation () const
 Return change of orientation since the creation of the object. More...
 
void setAlignmentParameters (AlignmentParameters *dap)
 Set the AlignmentParameters. More...
 
void setMother (Alignable *mother)
 Assign mother to alignable. More...
 
void setSurvey (const SurveyDet *)
 Set survey info. More...
 
int size () const
 Return number of direct components. More...
 
const AlignableSurfacesurface () const
 Return the Surface (global position and orientation) of the object. More...
 
AlignmentSurfaceDeformationssurfaceDeformations () const
 Return surface deformations, sorted by DetId. More...
 
const SurveyDetsurvey () const
 Return survey info. More...
 
virtual ~Alignable ()
 Destructor. More...
 

Private Member Functions

void buildBarrel (const std::string &subDet)
 Build a barrel for a given sub-detector (TPB, TIB, TOB). More...
 
void buildTEC ()
 
void buildTIB ()
 
void buildTID ()
 
void buildTOB ()
 
void buildTPB ()
 
void buildTPE ()
 
void buildTRK ()
 
void detsToAlignables (const TrackingGeometry::DetContainer &dets, const std::string &moduleName)
 Create list of lower-level modules. More...
 
Alignables merge (const Alignables &list1, const Alignables &list2) const
 

Private Attributes

AlignSetup< AlignablesalignableLists_
 
TrackerCounters tkCounters_
 
const TrackerTopologytTopo_
 

Additional Inherited Members

- Public Types inherited from Alignable
typedef align::Alignables Alignables
 
typedef align::GlobalVector GlobalVector
 
typedef align::LocalVector LocalVector
 
typedef align::PositionType PositionType
 
typedef align::RotationType RotationType
 
typedef align::Scalar Scalar
 
typedef align::StructureType StructureType
 
- Protected Member Functions inherited from AlignableComposite
 AlignableComposite (const GeomDet *geomDet)
 Constructor from GeomDet, only for use in AlignableDet. More...
 
void setSurface (const AlignableSurface &s)
 
- Protected Member Functions inherited from Alignable
void addDisplacement (const GlobalVector &displacement)
 
void addRotation (const RotationType &rotation)
 
- Protected Attributes inherited from AlignableComposite
StructureType theStructureType
 
- Protected Attributes inherited from Alignable
GlobalVector theCachedDisplacement
 
RotationType theCachedRotation
 
AlignableSurface theCachedSurface
 
Alignables theDeepComponents
 
DetId theDetId
 
GlobalVector theDisplacement
 
align::ID theId
 
RotationType theRotation
 
AlignableSurface theSurface
 

Detailed Description

Definition at line 15 of file AlignableTracker.h.

Constructor & Destructor Documentation

AlignableTracker::AlignableTracker ( const TrackerGeometry tracker,
const TrackerTopology tTopo 
)
explicit

Constructor (builds the full hierarchy)

Definition at line 24 of file AlignableTracker.cc.

References buildTEC(), buildTIB(), buildTID(), buildTOB(), buildTPB(), buildTPE(), buildTRK(), AlignableComposite::components(), TrackerGeometry::detsPXB(), TrackerGeometry::detsPXF(), TrackerGeometry::detsTEC(), TrackerGeometry::detsTIB(), TrackerGeometry::detsTID(), detsToAlignables(), TrackerGeometry::detsTOB(), and Alignable::theId.

24  :
25  AlignableComposite( 0, align::Tracker, RotationType() ), tTopo_(tTopo) // id not yet known
26 {
27 
28  // Get levels from geometry
29  // for strip we create also <TIB/TID/TOB/TEC>ModuleUnit list for 1D components of 2D layers
30  detsToAlignables(tkGeom->detsPXB(), "TPBModule");
31  detsToAlignables(tkGeom->detsPXF(), "TPEModule");
32  detsToAlignables(tkGeom->detsTIB(), "TIBModule");
33  detsToAlignables(tkGeom->detsTID(), "TIDModule");
34  detsToAlignables(tkGeom->detsTOB(), "TOBModule");
35  detsToAlignables(tkGeom->detsTEC(), "TECModule");
36 
37  buildTPB();
38  buildTPE();
39  buildTIB();
40  buildTID();
41  buildTOB();
42  buildTEC();
43  buildTRK();
44 
45  theId = this->components()[0]->id(); // as all composites: id of first component
46 }
AlignableComposite()
default constructor hidden
void detsToAlignables(const TrackingGeometry::DetContainer &dets, const std::string &moduleName)
Create list of lower-level modules.
const TrackerTopology * tTopo_
align::RotationType RotationType
Definition: Alignable.h:36
virtual Alignables components() const
Return vector of direct components.
align::ID theId
Definition: Alignable.h:220

Member Function Documentation

AlignmentErrorsExtended * AlignableTracker::alignmentErrors ( void  ) const
virtual

Return alignment errors, sorted by DetId.

Reimplemented from AlignableComposite.

Definition at line 303 of file AlignableTracker.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, AlignableComposite::components(), filterCSVwithJSON::copy, i, AlignmentErrorsExtended::m_alignError, and python.multivaluedict::sort().

Referenced by TrackerSystematicMisalignments::analyze(), TrackerGeometryCompare::analyze(), LaserAlignment::endRunProduce(), TrackerAlignment::saveToDB(), AlignmentProducer::startingNewLoop(), ApeSettingAlgorithm::terminate(), and AlignmentProducer::writeForRunRange().

304 {
305 
307  AlignmentErrorsExtended* m_alignmentErrors = new AlignmentErrorsExtended();
308 
309  // Add components recursively
310  for ( align::Alignables::iterator i=comp.begin(); i!=comp.end(); i++ )
311  {
312  AlignmentErrorsExtended* tmpAlignmentErrorsExtended = (*i)->alignmentErrors();
313  std::copy( tmpAlignmentErrorsExtended->m_alignError.begin(), tmpAlignmentErrorsExtended->m_alignError.end(),
314  std::back_inserter(m_alignmentErrors->m_alignError) );
315  delete tmpAlignmentErrorsExtended;
316  }
317 
318  std::sort( m_alignmentErrors->m_alignError.begin(), m_alignmentErrors->m_alignError.end(),
320 
321  return m_alignmentErrors;
322 
323 }
int i
Definition: DBlmapReader.cc:9
std::vector< AlignTransformErrorExtended > m_alignError
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
virtual Alignables components() const
Return vector of direct components.
Alignments * AlignableTracker::alignments ( void  ) const
virtual

Return alignments, sorted by DetId.

Reimplemented from AlignableComposite.

Definition at line 280 of file AlignableTracker.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, AlignableComposite::components(), filterCSVwithJSON::copy, i, Alignments::m_align, and python.multivaluedict::sort().

Referenced by TrackerSystematicMisalignments::analyze(), TrackerGeometryCompare::analyze(), LaserAlignment::endRunProduce(), TrackerAlignment::saveToDB(), AlignmentProducer::startingNewLoop(), and AlignmentProducer::writeForRunRange().

281 {
282 
284  Alignments* m_alignments = new Alignments();
285  // Add components recursively
286  for ( align::Alignables::iterator i=comp.begin(); i!=comp.end(); i++ )
287  {
288  Alignments* tmpAlignments = (*i)->alignments();
289  std::copy( tmpAlignments->m_align.begin(), tmpAlignments->m_align.end(),
290  std::back_inserter(m_alignments->m_align) );
291  delete tmpAlignments;
292  }
293 
294  std::sort( m_alignments->m_align.begin(), m_alignments->m_align.end(),
296 
297  return m_alignments;
298 
299 }
int i
Definition: DBlmapReader.cc:9
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
virtual Alignables components() const
Return vector of direct components.
Alignables AlignableTracker::barrelGeomDets ( )
inline

Return inner and outer barrel GeomDets together.

Definition at line 43 of file AlignableTracker.h.

References innerBarrelGeomDets(), merge(), and outerBarrelGeomDets().

Referenced by AlignmentParameterSelector::addAllDets(), and AlignmentParameterSelector::addSelection().

43  { return this->merge(this->innerBarrelGeomDets(),
44  this->outerBarrelGeomDets());}
Alignables merge(const Alignables &list1, const Alignables &list2) const
Alignables & innerBarrelGeomDets()
Return inner barrel GeomDets.
Alignables & outerBarrelGeomDets()
Return outer barrel GeomDets.
Alignables AlignableTracker::barrelLayers ( )
inline

Return inner and outer barrel layers.

Definition at line 78 of file AlignableTracker.h.

References innerBarrelLayers(), merge(), and outerBarrelLayers().

Referenced by AlignmentParameterSelector::addAllLayers(), and AlignmentParameterSelector::addSelection().

78  { return this->merge(this->innerBarrelLayers(),
79  this->outerBarrelLayers() );
80  }
Alignables merge(const Alignables &list1, const Alignables &list2) const
Alignables & outerBarrelLayers()
Return outer barrel layers.
Alignables & innerBarrelLayers()
Return inner barrel layers.
Alignables AlignableTracker::barrelRods ( )
inline

Return inner and outer barrel rods.

Definition at line 63 of file AlignableTracker.h.

References innerBarrelRods(), merge(), and outerBarrelRods().

Referenced by AlignmentParameterSelector::addAllRods(), and AlignmentParameterSelector::addSelection().

63 { return this->merge(this->innerBarrelRods(), this->outerBarrelRods());}
Alignables merge(const Alignables &list1, const Alignables &list2) const
Alignables & outerBarrelRods()
Return outer barrel rods.
Alignables & innerBarrelRods()
Return inner barrel rods.
void AlignableTracker::buildBarrel ( const std::string &  subDet)
private

Build a barrel for a given sub-detector (TPB, TIB, TOB).

Definition at line 135 of file AlignableTracker.cc.

References AlignableComposite::AlignableComposite(), alignableLists_, Reference_intrackfit_cff::barrel, AlignSetup< Type >::find(), AlignSetup< Type >::get(), AlCaHLTBitMon_QueryRunRegistry::string, and AlignableObjectId::stringToId().

Referenced by buildTIB(), buildTOB(), and buildTPB().

136 {
137  align::Alignables& halfBarrels = alignableLists_.find(subDet + "HalfBarrel");
138 
139  const std::string barrelName(subDet + "Barrel");
141  barrel.reserve(1);
142  barrel.push_back(new AlignableComposite(halfBarrels[0]->id(),AlignableObjectId::stringToId(barrelName),
143  RotationType()));
144  barrel[0]->addComponent(halfBarrels[0]);
145  barrel[0]->addComponent(halfBarrels[1]);
146 }
Type & find(const std::string &name="")
Definition: AlignSetup.h:58
AlignableComposite()
default constructor hidden
static align::StructureType stringToId(const char *)
Type & get(const std::string &name="")
Definition: AlignSetup.h:52
align::RotationType RotationType
Definition: Alignable.h:36
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
AlignSetup< Alignables > alignableLists_
void AlignableTracker::buildTEC ( )
private

Definition at line 215 of file AlignableTracker.cc.

References AlignableBuilder::addLevelInfo(), alignableLists_, AlignableBuilder::buildAll(), align::TECDisk, align::TECEndcap, align::TECModule, align::TECPetal, align::TECRing, align::TECSide, tkCounters_, and tTopo_.

Referenced by AlignableTracker().

216 {
218 
219  builder.addLevelInfo(align::TECRing , true, 7); // max 7 rings per petal
220  builder.addLevelInfo(align::TECPetal , true, 8); // 8 petals per side
221  builder.addLevelInfo(align::TECSide , false, 2); // 2 sides per disk
222  builder.addLevelInfo(align::TECDisk , false, 9); // 9 disks per endcap
223  builder.addLevelInfo(align::TECEndcap, false, 2); // 2 endcaps in TEC
224  builder.buildAll( alignableLists_ );
225 }
const TrackerTopology * tTopo_
TrackerCounters tkCounters_
AlignSetup< Alignables > alignableLists_
void AlignableTracker::buildTIB ( )
private

Definition at line 175 of file AlignableTracker.cc.

References AlignableBuilder::addLevelInfo(), alignableLists_, AlignableBuilder::buildAll(), buildBarrel(), align::TIBHalfBarrel, align::TIBHalfShell, align::TIBLayer, align::TIBModule, align::TIBString, align::TIBSurface, tkCounters_, and tTopo_.

Referenced by AlignableTracker().

176 {
178 
179  builder.addLevelInfo(align::TIBString , true, 28); // max 22 strings per surface
180  builder.addLevelInfo(align::TIBSurface , false, 2); // 2 surfaces per half shell
181  builder.addLevelInfo(align::TIBHalfShell , false, 2); // 2 half shells per layer
182  builder.addLevelInfo(align::TIBLayer , false, 4); // 4 layers per half barrel
183  builder.addLevelInfo(align::TIBHalfBarrel, false, 2); // 2 half barrels in TIB
184  builder.buildAll( alignableLists_ );
185 
186  buildBarrel("TIB");
187 }
const TrackerTopology * tTopo_
void buildBarrel(const std::string &subDet)
Build a barrel for a given sub-detector (TPB, TIB, TOB).
TrackerCounters tkCounters_
AlignSetup< Alignables > alignableLists_
void AlignableTracker::buildTID ( )
private

Definition at line 190 of file AlignableTracker.cc.

References AlignableBuilder::addLevelInfo(), alignableLists_, AlignableBuilder::buildAll(), align::TIDDisk, align::TIDEndcap, align::TIDModule, align::TIDRing, align::TIDSide, tkCounters_, and tTopo_.

Referenced by AlignableTracker().

191 {
193 
194  builder.addLevelInfo(align::TIDSide , false, 2); // 2 sides per ring
195  builder.addLevelInfo(align::TIDRing , false, 3); // 3 rings per disk
196  builder.addLevelInfo(align::TIDDisk , false, 3); // 3 disks per endcap
197  builder.addLevelInfo(align::TIDEndcap, false, 2); // 2 endcaps in TID
198  builder.buildAll( alignableLists_ );
199 }
const TrackerTopology * tTopo_
TrackerCounters tkCounters_
AlignSetup< Alignables > alignableLists_
void AlignableTracker::buildTOB ( )
private

Definition at line 202 of file AlignableTracker.cc.

References AlignableBuilder::addLevelInfo(), alignableLists_, AlignableBuilder::buildAll(), buildBarrel(), tkCounters_, align::TOBHalfBarrel, align::TOBLayer, align::TOBModule, align::TOBRod, and tTopo_.

Referenced by AlignableTracker().

203 {
205 
206  builder.addLevelInfo(align::TOBRod , true, 74); // max 74 rods per layer
207  builder.addLevelInfo(align::TOBLayer , false, 6); // 6 layers per half barrel
208  builder.addLevelInfo(align::TOBHalfBarrel, false, 2); // 2 half barrels in TOB
209  builder.buildAll( alignableLists_ );
210 
211  buildBarrel("TOB");
212 }
const TrackerTopology * tTopo_
void buildBarrel(const std::string &subDet)
Build a barrel for a given sub-detector (TPB, TIB, TOB).
TrackerCounters tkCounters_
AlignSetup< Alignables > alignableLists_
void AlignableTracker::buildTPB ( )
private

Definition at line 149 of file AlignableTracker.cc.

References AlignableBuilder::addLevelInfo(), alignableLists_, AlignableBuilder::buildAll(), buildBarrel(), tkCounters_, align::TPBHalfBarrel, align::TPBLadder, align::TPBLayer, align::TPBModule, and tTopo_.

Referenced by AlignableTracker().

150 {
152 
153  builder.addLevelInfo(align::TPBLadder , true, 22); // max 22 ladders per layer
154  builder.addLevelInfo(align::TPBLayer , false, 3); // 3 layers per half barrel
155  builder.addLevelInfo(align::TPBHalfBarrel, false, 2); // 2 half barrels in TPB
156  builder.buildAll( alignableLists_ );
157 
158  buildBarrel("TPB");
159 }
const TrackerTopology * tTopo_
void buildBarrel(const std::string &subDet)
Build a barrel for a given sub-detector (TPB, TIB, TOB).
TrackerCounters tkCounters_
AlignSetup< Alignables > alignableLists_
void AlignableTracker::buildTPE ( )
private

Definition at line 162 of file AlignableTracker.cc.

References AlignableBuilder::addLevelInfo(), alignableLists_, AlignableBuilder::buildAll(), tkCounters_, align::TPEBlade, align::TPEEndcap, align::TPEHalfCylinder, align::TPEHalfDisk, align::TPEModule, align::TPEPanel, and tTopo_.

Referenced by AlignableTracker().

163 {
165 
166  builder.addLevelInfo(align::TPEPanel , true, 2); // 2 panels per blade
167  builder.addLevelInfo(align::TPEBlade , true, 12); // 12 blades per half disk
168  builder.addLevelInfo(align::TPEHalfDisk , false, 3); // max 3 disks per cylinder
169  builder.addLevelInfo(align::TPEHalfCylinder, false, 2); // 2 HC per endcap
170  builder.addLevelInfo(align::TPEEndcap , false, 2); // 2 endcaps in TPE
171  builder.buildAll( alignableLists_ );
172 }
const TrackerTopology * tTopo_
TrackerCounters tkCounters_
AlignSetup< Alignables > alignableLists_
void AlignableTracker::buildTRK ( )
private

Definition at line 228 of file AlignableTracker.cc.

References AlignableComposite::addComponent(), AlignableComposite::AlignableComposite(), alignableLists_, AlignSetup< Type >::find(), AlignSetup< Type >::get(), align::Pixel, align::Strip, and patCandidatesForDimuonsSequences_cff::tracker.

Referenced by AlignableTracker().

229 {
230  // Build pixel, strip and full tracker 'by hand':
231 
232  // First create pixel:
233  const align::Alignables &pixelBarrel = alignableLists_.find("TPBBarrel");
234  const align::Alignables &pixelEndcap = alignableLists_.find("TPEEndcap");
235  align::Alignables &pixel = alignableLists_.get("Pixel");
236  pixel.reserve(1);
237  pixel.push_back(new AlignableComposite(pixelBarrel[0]->id(), align::Pixel, RotationType()));
238  pixel[0]->addComponent(pixelBarrel[0]);
239  pixel[0]->addComponent(pixelEndcap[0]);
240  pixel[0]->addComponent(pixelEndcap[1]);
241 
242  // Now create strip:
243  const align::Alignables &innerBarrel = alignableLists_.find("TIBBarrel");
244  const align::Alignables &outerBarrel = alignableLists_.find("TOBBarrel");
245  const align::Alignables &innerEndcap = alignableLists_.find("TIDEndcap");
246  const align::Alignables &outerEndcap = alignableLists_.find("TECEndcap");
247  align::Alignables &strip = alignableLists_.get("Strip");
248  strip.reserve(1);
249  strip.push_back(new AlignableComposite(innerBarrel[0]->id(), align::Strip, RotationType()));
250  strip[0]->addComponent(innerBarrel[0]);
251  strip[0]->addComponent(innerEndcap[0]);
252  strip[0]->addComponent(innerEndcap[1]);
253  strip[0]->addComponent(outerBarrel[0]);
254  strip[0]->addComponent(outerEndcap[0]);
255  strip[0]->addComponent(outerEndcap[1]);
256 
257  // Finally add strip and pixel to tracker - that of course already exists:
259  tracker.reserve(1);
260  tracker.push_back(this);
261  this->addComponent(pixel[0]); // add to tracker
262  this->addComponent(strip[0]); // add to tracker
263 
264 }
Type & find(const std::string &name="")
Definition: AlignSetup.h:58
AlignableComposite()
default constructor hidden
Type & get(const std::string &name="")
Definition: AlignSetup.h:52
align::RotationType RotationType
Definition: Alignable.h:36
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
virtual void addComponent(Alignable *component)
AlignSetup< Alignables > alignableLists_
void AlignableTracker::detsToAlignables ( const TrackingGeometry::DetContainer dets,
const std::string &  moduleName 
)
private

Create list of lower-level modules.

Definition at line 50 of file AlignableTracker.cc.

References align::AlignableDetUnit, alignableLists_, AlignableComposite::components(), Exception, AlignSetup< Type >::get(), SiStripDetId::glued(), i, LogDebug, edm::moduleName(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, SiStripDetId::TEC, SiStripDetId::TIB, SiStripDetId::TID, and SiStripDetId::TOB.

Referenced by AlignableTracker().

52 {
53  unsigned int nDet = dets.size();
54 
56  alis.reserve(nDet);
57  align::Alignables *aliUnits = 0;// If we need also units, they will be at moduleName + "Unit".
58 
59  for (unsigned int i = 0; i < nDet; ++i) {
60 
61  const unsigned int subdetId = dets[i]->geographicalId().subdetId();//don't check det()==Tracker
62  if (subdetId == PixelSubdetector::PixelBarrel || subdetId == PixelSubdetector::PixelEndcap) {
63  // Treat all pixel dets in same way with one AlignableDetUnit.
64  auto detUnit = dets[i];
65  if (!detUnit->isLeaf()) {
66  throw cms::Exception("BadHierarchy")
67  << "[AlignableTracker] Pixel GeomDet (subdetector " << subdetId << ") not GeomDetUnit.\n";
68  }
69  alis.push_back(new AlignableDetUnit(detUnit));
70 
71  // Add pixel modules to list of units since they are in fact units
72  if (!aliUnits) {
73  aliUnits = &alignableLists_.get(moduleName + "Unit");
74  aliUnits->reserve(576); // ugly hardcode to save some memory due to vector doubling
75  }
76  aliUnits->push_back(alis.back());
77 
78  } else if (subdetId == SiStripDetId::TIB || subdetId == SiStripDetId::TID
79  || subdetId == SiStripDetId::TOB || subdetId == SiStripDetId::TEC) {
80  // In strip we have:
81  // 1) 'Pure' 1D-modules like TOB layers 3-6 (not glued): AlignableDetUnit
82  // 2) Composite 2D-modules like TOB layers 1&2 (not glued): AlignableDet
83  // 3) The two 1D-components of case 2 (glued): AlignableDetUnit that is constructed
84  // inside AlignableDet-constructor of 'mother', only need to add to alignableLists_
85  const SiStripDetId detId(dets[i]->geographicalId());
86  if (!detId.glued()) { // 2D- or 'pure' 1D-module
87  if (dets[i]->components().size()) { // 2D-module
88  const GluedGeomDet *gluedDet = dynamic_cast<const GluedGeomDet*>(dets[i]);
89  if (!gluedDet) {
90  throw cms::Exception("LogicError")
91  << "[AlignableTracker]" << "dynamic_cast<const GluedGeomDet*> failed.\n";
92  }
93  alis.push_back(new AlignableSiStripDet(gluedDet)); // components constructed within
94  const align::Alignables detUnits(alis.back()->components());
95  // Ensure pointer existence and make list available via moduleName appended with "Unit"
96  if (!aliUnits) {
97  aliUnits = &alignableLists_.get(moduleName + "Unit");
98  aliUnits->reserve(576); // ugly hardcode to save some memory due to vector doubling
99  }
100  aliUnits->insert(aliUnits->end(), detUnits.begin(), detUnits.end()); // only 2...
101  } else { // no components: pure 1D-module
102  auto detUnit = dets[i];
103  if (!detUnit->isLeaf()) {
104  throw cms::Exception("BadHierarchy")
105  << "[AlignableTracker] pure 1D GeomDet (subdetector " << subdetId << ") not GeomDetUnit.\n";
106  }
107  alis.push_back(new AlignableDetUnit(detUnit));
108 
109  // Add pure 1D-modules to list of units since they are in fact units
110  if (!aliUnits) {
111  aliUnits = &alignableLists_.get(moduleName + "Unit");
112  aliUnits->reserve(576); // ugly hardcode to save some memory due to vector doubling
113  }
114  aliUnits->push_back(alis.back());
115  }
116  } // no else: glued components of AlignableDet constructed within AlignableDet, see above
117  } else {
118  throw cms::Exception("LogicError")
119  << "[AlignableTracker] GeomDet of unknown subdetector.";
120  }
121  }
122 
123  LogDebug("Alignment") << "@SUB=AlignableTracker"
124  << alis.size() << " AlignableDet(Unit)s for " << moduleName;
125  if (aliUnits) {
126  LogDebug("Alignment") << "@SUB=AlignableTracker"
127  << aliUnits->size() << " AlignableDetUnits for "
128  << moduleName + "Unit (capacity = " << aliUnits->capacity() << ").";
129  }
130 
131 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
Type & get(const std::string &name="")
Definition: AlignSetup.h:52
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
virtual Alignables components() const
Return vector of direct components.
AlignSetup< Alignables > alignableLists_
Alignables& AlignableTracker::endcapGeomDets ( )
inline

Return endcap GeomDets.

Definition at line 56 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addAllDets(), AlignmentParameterSelector::addSelection(), SurveyDataConverter::applyAPEs(), TrackerAlignment::moveAlignableEndCaps(), and TrackerGeometryCompare::surveyToTracker().

56 { return this->subStructures("TECModule");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::endcapLayers ( )
inline

Return endcap layers.

Definition at line 88 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addAllLayers(), AlignmentParameterSelector::addSelection(), and SurveyDataConverter::applyAPEs().

88 { return this->subStructures("TECDisk");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::endcapPetals ( )
inline

Return encap petals.

Definition at line 71 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addAllRods(), AlignmentParameterSelector::addSelection(), and SurveyDataConverter::applyAPEs().

71 { return this->subStructures("TECPetal");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::endCaps ( )
inline

Return TECs.

Definition at line 36 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addSelection(), SurveyDataConverter::applyAPEs(), and LASGeometryUpdater::TrackerUpdate().

36 { return this->subStructures("TECEndcap");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::innerBarrelGeomDets ( )
inline

Return inner barrel GeomDets.

Definition at line 50 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addSelection(), SurveyDataConverter::applyAPEs(), barrelGeomDets(), TrackerAlignment::moveAlignableInnerHalfBarrels(), TrackerGeometryCompare::surveyToTracker(), and TIBTIDGeomDets().

50 { return this->subStructures("TIBModule");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::innerBarrelLayers ( )
inline

Return inner barrel layers.

Definition at line 82 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addSelection(), SurveyDataConverter::applyAPEs(), and barrelLayers().

82 { return this->subStructures("TIBLayer");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::innerBarrelRods ( )
inline

Return inner barrel rods.

Definition at line 65 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addSelection(), and barrelRods().

65 { return this->subStructures("TIBString");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::innerHalfBarrels ( )
inline

Return TIB half barrels.

Definition at line 32 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addSelection(), SurveyDataConverter::applyAPEs(), and LASGeometryUpdater::TrackerUpdate().

32 { return this->subStructures("TIBHalfBarrel");}
Alignables & subStructures(const std::string &subStructName)
align::Alignables AlignableTracker::merge ( const Alignables list1,
const Alignables list2 
) const
private

Definition at line 268 of file AlignableTracker.cc.

References cond::ecalcond::all.

Referenced by barrelGeomDets(), barrelLayers(), barrelRods(), and TIBTIDGeomDets().

270 {
271  Alignables all = list1;
272 
273  all.insert( all.end(), list2.begin(), list2.end() );
274 
275  return all;
276 }
std::vector< Alignable * > Alignables
Definition: Alignable.h:246
Alignables& AlignableTracker::outerBarrelGeomDets ( )
inline

Return outer barrel GeomDets.

Definition at line 52 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addSelection(), SurveyDataConverter::applyAPEs(), barrelGeomDets(), TrackerAlignment::moveAlignableOuterHalfBarrels(), and TrackerGeometryCompare::surveyToTracker().

52 { return this->subStructures("TOBModule");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::outerBarrelLayers ( )
inline

Return outer barrel layers.

Definition at line 84 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addSelection(), and barrelLayers().

84 { return this->subStructures("TOBLayer");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::outerBarrelRods ( )
inline

Return outer barrel rods.

Definition at line 67 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addSelection(), SurveyDataConverter::applyAPEs(), and barrelRods().

67 { return this->subStructures("TOBRod");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::outerHalfBarrels ( )
inline

Return TOB half barrels.

Definition at line 30 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addSelection(), SurveyDataConverter::applyAPEs(), and LASGeometryUpdater::TrackerUpdate().

30 { return this->subStructures("TOBHalfBarrel");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::pixelEndcapGeomDets ( )
inline

Return pixel endcap GeomDets.

Definition at line 60 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addAllDets(), AlignmentParameterSelector::addSelection(), TrackerAlignment::moveAlignablePixelEndCaps(), and TrackerGeometryCompare::surveyToTracker().

60 { return this->subStructures("TPEModule");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::pixelEndcapLayers ( )
inline

Return pixel endcap layers.

Definition at line 92 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addAllLayers(), and AlignmentParameterSelector::addSelection().

92 { return this->subStructures("TPEHalfDisk");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::pixelEndcapPetals ( )
inline

Return pixel endcap petals.

Definition at line 75 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addAllRods(), and AlignmentParameterSelector::addSelection().

75 { return this->subStructures("TPEPanel");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::pixelEndCaps ( )
inline

Return TPEs.

Definition at line 38 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addSelection().

38 { return this->subStructures("TPEEndcap");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::pixelHalfBarrelGeomDets ( )
inline

Return pixel barrel GeomDets.

Definition at line 54 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addAllDets(), AlignmentParameterSelector::addSelection(), TrackerAlignment::moveAlignablePixelHalfBarrels(), and TrackerGeometryCompare::surveyToTracker().

54 { return this->subStructures("TPBModule");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::pixelHalfBarrelLadders ( )
inline

Return pixel half barrel ladders (implemented as AlignableRods)

Definition at line 69 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addAllRods(), and AlignmentParameterSelector::addSelection().

69 { return this->subStructures("TPBLadder");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::pixelHalfBarrelLayers ( )
inline

Return pixel half barrel layers.

Definition at line 86 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addAllLayers(), and AlignmentParameterSelector::addSelection().

86 { return this->subStructures("TPBLayer");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::pixelHalfBarrels ( )
inline

Return Pixel half barrels.

Definition at line 34 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addSelection().

34 { return this->subStructures("TPBHalfBarrel");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::subStructures ( const std::string &  subStructName)
inline
Alignables AlignableTracker::TIBTIDGeomDets ( )
inline

Return inner barrel and TID GeomDets together.

Definition at line 46 of file AlignableTracker.h.

References innerBarrelGeomDets(), merge(), and TIDGeomDets().

Referenced by TrackerAlignment::moveAlignableTIBTIDs().

46  { return this->merge(this->innerBarrelGeomDets(),
47  this->TIDGeomDets());
48  }
Alignables merge(const Alignables &list1, const Alignables &list2) const
Alignables & innerBarrelGeomDets()
Return inner barrel GeomDets.
Alignables & TIDGeomDets()
Return TID GeomDets.
Alignables& AlignableTracker::TIDGeomDets ( )
inline
Alignables& AlignableTracker::TIDLayers ( )
inline

Return TID layers.

Definition at line 90 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addAllLayers(), AlignmentParameterSelector::addSelection(), and SurveyDataConverter::applyAPEs().

90 { return this->subStructures("TIDDisk");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::TIDRings ( )
inline

Return TID rings.

Definition at line 73 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addAllRods(), AlignmentParameterSelector::addSelection(), and SurveyDataConverter::applyAPEs().

73 { return this->subStructures("TIDRing");}
Alignables & subStructures(const std::string &subStructName)
Alignables& AlignableTracker::TIDs ( )
inline

Return TIDs.

Definition at line 40 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addSelection(), and SurveyDataConverter::applyAPEs().

40 { return this->subStructures("TIDEndcap");}
Alignables & subStructures(const std::string &subStructName)
const TrackerTopology* AlignableTracker::trackerTopology ( ) const
inline

Returns tracker topology.

Definition at line 101 of file AlignableTracker.h.

References tTopo_.

Referenced by AlignmentParameterSelector::layerDeselected(), and AlignmentParameterSelector::outsideDetIdRanges().

101 { return tTopo_;}
const TrackerTopology * tTopo_

Member Data Documentation

AlignSetup<Alignables> AlignableTracker::alignableLists_
private
TrackerCounters AlignableTracker::tkCounters_
private

Definition at line 123 of file AlignableTracker.h.

Referenced by buildTEC(), buildTIB(), buildTID(), buildTOB(), buildTPB(), and buildTPE().

const TrackerTopology* AlignableTracker::tTopo_
private