#include <CmsTrackerSubStrctBuilder.h>
Private Member Functions | |
virtual void | buildComponent (DDFilteredView &, GeometricDet *, std::string) |
virtual void | sortNS (DDFilteredView &, GeometricDet *) |
Classes which abuilds all the tracker substructures
Definition at line 10 of file CmsTrackerSubStrctBuilder.h.
void CmsTrackerSubStrctBuilder::buildComponent | ( | DDFilteredView & | fv, |
GeometricDet * | g, | ||
std::string | s | ||
) | [private, virtual] |
Implements CmsTrackerLevelBuilder.
Definition at line 14 of file CmsTrackerSubStrctBuilder.cc.
References GeometricDet::addComponent(), CmsTrackerLevelBuilder::build(), GeometricDet::disk, ExtractStringFromDDD::getString(), GeometricDet::layer, CmsTrackerLevelBuilder::theCmsTrackerStringToEnum, CmsTrackerStringToEnum::type(), and GeometricDet::wheel.
{ CmsTrackerLayerBuilder theCmsTrackerLayerBuilder ; CmsTrackerWheelBuilder theCmsTrackerWheelBuilder; CmsTrackerDiskBuilder theCmsTrackerDiskBuilder; GeometricDet * subdet = new GeometricDet(&fv,theCmsTrackerStringToEnum.type(ExtractStringFromDDD::getString(s,&fv))); switch (theCmsTrackerStringToEnum.type(ExtractStringFromDDD::getString(s,&fv))){ case GeometricDet::layer: theCmsTrackerLayerBuilder.build(fv,subdet,s); break; case GeometricDet::wheel: theCmsTrackerWheelBuilder.build(fv,subdet,s); break; case GeometricDet::disk: theCmsTrackerDiskBuilder.build(fv,subdet,s); break; default: edm::LogError("CmsTrackerSubStrctBuilder")<<" ERROR - I was expecting a Layer ,Wheel or Disk... I got a "<<ExtractStringFromDDD::getString(s,&fv); } g->addComponent(subdet); }
void CmsTrackerSubStrctBuilder::sortNS | ( | DDFilteredView & | fv, |
GeometricDet * | det | ||
) | [private, virtual] |
Reimplemented from CmsTrackerLevelBuilder.
Definition at line 40 of file CmsTrackerSubStrctBuilder.cc.
References GeometricDet::components(), GeometricDet::disk, i, GeometricDet::layer, python::multivaluedict::sort(), and GeometricDet::wheel.
{ GeometricDet::GeometricDetContainer & comp = det->components(); switch(comp.front()->type()){ case GeometricDet::layer: std::sort(comp.begin(),comp.end(),LessR()); break; case GeometricDet::wheel: std::sort(comp.begin(),comp.end(),LessModZ()); break; case GeometricDet::disk: std::sort(comp.begin(),comp.end(),LessModZ()); break; default: edm::LogError("CmsTrackerSubStrctBuilder")<<"ERROR - wrong SubDet to sort..... "<<det->components().front()->type(); } for(uint32_t i=0; i<comp.size(); i++){ comp[i]->setGeographicalID(i+1); // Every subdetector: Layer/Disk/Wheel Number } }