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)
 Constructor (builds the full hierarchy) More...
 
AlignmentErrorsalignmentErrors () 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...
 
- 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) 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_
 

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 13 of file AlignableTracker.h.

Constructor & Destructor Documentation

AlignableTracker::AlignableTracker ( const TrackerGeometry tracker)
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() ) // 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.
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

AlignmentErrors * AlignableTracker::alignmentErrors ( void  ) const
virtual

Return alignment errors, sorted by DetId.

Reimplemented from AlignableComposite.

Definition at line 305 of file AlignableTracker.cc.

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

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

306 {
307 
308  align::Alignables comp = this->components();
309  AlignmentErrors* m_alignmentErrors = new AlignmentErrors();
310 
311  // Add components recursively
312  for ( align::Alignables::iterator i=comp.begin(); i!=comp.end(); i++ )
313  {
314  AlignmentErrors* tmpAlignmentErrors = (*i)->alignmentErrors();
315  std::copy( tmpAlignmentErrors->m_alignError.begin(), tmpAlignmentErrors->m_alignError.end(),
316  std::back_inserter(m_alignmentErrors->m_alignError) );
317  delete tmpAlignmentErrors;
318  }
319 
320  std::sort( m_alignmentErrors->m_alignError.begin(), m_alignmentErrors->m_alignError.end(),
322 
323  return m_alignmentErrors;
324 
325 }
int i
Definition: DBlmapReader.cc:9
std::vector< AlignTransformError > 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 282 of file AlignableTracker.cc.

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

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

283 {
284 
285  align::Alignables comp = this->components();
286  Alignments* m_alignments = new Alignments();
287  // Add components recursively
288  for ( align::Alignables::iterator i=comp.begin(); i!=comp.end(); i++ )
289  {
290  Alignments* tmpAlignments = (*i)->alignments();
291  std::copy( tmpAlignments->m_align.begin(), tmpAlignments->m_align.end(),
292  std::back_inserter(m_alignments->m_align) );
293  delete tmpAlignments;
294  }
295 
296  std::sort( m_alignments->m_align.begin(), m_alignments->m_align.end(),
298 
299  return m_alignments;
300 
301 }
int i
Definition: DBlmapReader.cc:9
std::vector< AlignTransform > m_align
Definition: Alignments.h:14
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 41 of file AlignableTracker.h.

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

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

41  { return this->merge(this->innerBarrelGeomDets(),
42  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 76 of file AlignableTracker.h.

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

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

76  { return this->merge(this->innerBarrelLayers(),
77  this->outerBarrelLayers() );
78  }
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 61 of file AlignableTracker.h.

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

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

61 { 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(), and AlignableObjectId::nameToType().

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

136 {
137  AlignableObjectId objId;
138 
139  align::Alignables& halfBarrels = alignableLists_.find(subDet + "HalfBarrel");
140 
141  const std::string barrelName(subDet + "Barrel");
143  barrel.reserve(1);
144  barrel.push_back(new AlignableComposite(halfBarrels[0]->id(), objId.nameToType(barrelName),
145  RotationType()));
146  barrel[0]->addComponent(halfBarrels[0]);
147  barrel[0]->addComponent(halfBarrels[1]);
148 }
Type & find(const std::string &name="")
Definition: AlignSetup.h:58
AlignableComposite()
default constructor hidden
Type & get(const std::string &name="")
Definition: AlignSetup.h:52
Allows conversion between type and name, and vice-versa.
align::RotationType RotationType
Definition: Alignable.h:36
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
align::StructureType nameToType(const std::string &name) const
Convert name to type.
AlignSetup< Alignables > alignableLists_
void AlignableTracker::buildTEC ( )
private

Definition at line 217 of file AlignableTracker.cc.

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

Referenced by AlignableTracker().

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

Definition at line 177 of file AlignableTracker.cc.

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

Referenced by AlignableTracker().

178 {
180 
181  builder.addLevelInfo(align::TIBString , true, 28); // max 22 strings per surface
182  builder.addLevelInfo(align::TIBSurface , false, 2); // 2 surfaces per half shell
183  builder.addLevelInfo(align::TIBHalfShell , false, 2); // 2 half shells per layer
184  builder.addLevelInfo(align::TIBLayer , false, 4); // 4 layers per half barrel
185  builder.addLevelInfo(align::TIBHalfBarrel, false, 2); // 2 half barrels in TIB
186  builder.buildAll( alignableLists_ );
187 
188  buildBarrel("TIB");
189 }
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 192 of file AlignableTracker.cc.

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

Referenced by AlignableTracker().

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

Definition at line 204 of file AlignableTracker.cc.

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

Referenced by AlignableTracker().

205 {
207 
208  builder.addLevelInfo(align::TOBRod , true, 74); // max 74 rods per layer
209  builder.addLevelInfo(align::TOBLayer , false, 6); // 6 layers per half barrel
210  builder.addLevelInfo(align::TOBHalfBarrel, false, 2); // 2 half barrels in TOB
211  builder.buildAll( alignableLists_ );
212 
213  buildBarrel("TOB");
214 }
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 151 of file AlignableTracker.cc.

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

Referenced by AlignableTracker().

152 {
154 
155  builder.addLevelInfo(align::TPBLadder , true, 22); // max 22 ladders per layer
156  builder.addLevelInfo(align::TPBLayer , false, 3); // 3 layers per half barrel
157  builder.addLevelInfo(align::TPBHalfBarrel, false, 2); // 2 half barrels in TPB
158  builder.buildAll( alignableLists_ );
159 
160  buildBarrel("TPB");
161 }
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 164 of file AlignableTracker.cc.

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

Referenced by AlignableTracker().

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

Definition at line 230 of file AlignableTracker.cc.

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

Referenced by AlignableTracker().

231 {
232  // Build pixel, strip and full tracker 'by hand':
233 
234  // First create pixel:
235  const align::Alignables &pixelBarrel = alignableLists_.find("TPBBarrel");
236  const align::Alignables &pixelEndcap = alignableLists_.find("TPEEndcap");
237  align::Alignables &pixel = alignableLists_.get("Pixel");
238  pixel.reserve(1);
239  pixel.push_back(new AlignableComposite(pixelBarrel[0]->id(), align::Pixel, RotationType()));
240  pixel[0]->addComponent(pixelBarrel[0]);
241  pixel[0]->addComponent(pixelEndcap[0]);
242  pixel[0]->addComponent(pixelEndcap[1]);
243 
244  // Now create strip:
245  const align::Alignables &innerBarrel = alignableLists_.find("TIBBarrel");
246  const align::Alignables &outerBarrel = alignableLists_.find("TOBBarrel");
247  const align::Alignables &innerEndcap = alignableLists_.find("TIDEndcap");
248  const align::Alignables &outerEndcap = alignableLists_.find("TECEndcap");
250  strip.reserve(1);
251  strip.push_back(new AlignableComposite(innerBarrel[0]->id(), align::Strip, RotationType()));
252  strip[0]->addComponent(innerBarrel[0]);
253  strip[0]->addComponent(innerEndcap[0]);
254  strip[0]->addComponent(innerEndcap[1]);
255  strip[0]->addComponent(outerBarrel[0]);
256  strip[0]->addComponent(outerEndcap[0]);
257  strip[0]->addComponent(outerEndcap[1]);
258 
259  // Finally add strip and pixel to tracker - that of course already exists:
261  tracker.reserve(1);
262  tracker.push_back(this);
263  this->addComponent(pixel[0]); // add to tracker
264  this->addComponent(strip[0]); // add to tracker
265 
266 }
Type & find(const std::string &name="")
Definition: AlignSetup.h:58
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
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(), edm::hlt::Exception, AlignSetup< Type >::get(), SiStripDetId::glued(), i, LogDebug, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, SiStripDetId::TEC, SiStripDetId::TIB, SiStripDetId::TID, and SiStripDetId::TOB.

Referenced by AlignableTracker().

52 {
53  unsigned int nDet = dets.size();
54 
55  align::Alignables& alis = alignableLists_.get(moduleName);
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  const GeomDetUnit *detUnit = dynamic_cast<const GeomDetUnit*>(dets[i]);
65  if (!detUnit) {
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<GluedGeomDet*>(dets[i]);
89  if (!gluedDet) {
90  throw cms::Exception("LogicError")
91  << "[AlignableTracker]" << "dynamic_cast<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  const GeomDetUnit *detUnit = dynamic_cast<const GeomDetUnit*>(dets[i]);
103  if (!detUnit) {
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
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 54 of file AlignableTracker.h.

References subStructures().

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

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

Return endcap layers.

Definition at line 86 of file AlignableTracker.h.

References subStructures().

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

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

Return encap petals.

Definition at line 69 of file AlignableTracker.h.

References subStructures().

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

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

Return TECs.

Definition at line 34 of file AlignableTracker.h.

References subStructures().

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

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

Return inner barrel GeomDets.

Definition at line 48 of file AlignableTracker.h.

References subStructures().

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

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

Return inner barrel layers.

Definition at line 80 of file AlignableTracker.h.

References subStructures().

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

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

Return inner barrel rods.

Definition at line 63 of file AlignableTracker.h.

References subStructures().

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

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

Return TIB 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("TIBHalfBarrel");}
Alignables & subStructures(const std::string &subStructName)
align::Alignables AlignableTracker::merge ( const Alignables list1,
const Alignables list2 
) const
private

Definition at line 270 of file AlignableTracker.cc.

References cond::ecalcond::all.

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

272 {
273  Alignables all = list1;
274 
275  all.insert( all.end(), list2.begin(), list2.end() );
276 
277  return all;
278 }
align::Alignables Alignables
Definition: Alignable.h:39
Alignables& AlignableTracker::outerBarrelGeomDets ( )
inline

Return outer barrel GeomDets.

Definition at line 50 of file AlignableTracker.h.

References subStructures().

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

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

Return outer barrel layers.

Definition at line 82 of file AlignableTracker.h.

References subStructures().

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

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

Return outer barrel rods.

Definition at line 65 of file AlignableTracker.h.

References subStructures().

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

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

Return TOB half barrels.

Definition at line 28 of file AlignableTracker.h.

References subStructures().

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

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

Return pixel endcap GeomDets.

Definition at line 58 of file AlignableTracker.h.

References subStructures().

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

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

Return pixel endcap layers.

Definition at line 90 of file AlignableTracker.h.

References subStructures().

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

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

Return pixel endcap petals.

Definition at line 73 of file AlignableTracker.h.

References subStructures().

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

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

Return TPEs.

Definition at line 36 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addSelection().

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

Return pixel barrel GeomDets.

Definition at line 52 of file AlignableTracker.h.

References subStructures().

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

52 { 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 67 of file AlignableTracker.h.

References subStructures().

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

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

Return pixel half barrel layers.

Definition at line 84 of file AlignableTracker.h.

References subStructures().

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

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

Return Pixel half barrels.

Definition at line 32 of file AlignableTracker.h.

References subStructures().

Referenced by AlignmentParameterSelector::addSelection().

32 { 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 44 of file AlignableTracker.h.

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

Referenced by TrackerAlignment::moveAlignableTIBTIDs().

44  { return this->merge(this->innerBarrelGeomDets(),
45  this->TIDGeomDets());
46  }
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 88 of file AlignableTracker.h.

References subStructures().

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

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

Return TID rings.

Definition at line 71 of file AlignableTracker.h.

References subStructures().

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

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

Return TIDs.

Definition at line 38 of file AlignableTracker.h.

References subStructures().

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

38 { return this->subStructures("TIDEndcap");}
Alignables & subStructures(const std::string &subStructName)

Member Data Documentation

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

Definition at line 119 of file AlignableTracker.h.

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