#include <TrackerGeomBuilderFromGeometricDet.h>
Public Member Functions | |
TrackerGeometry * | build (const GeometricDet *gd) |
Private Member Functions | |
void | buildGeomDet (TrackerGeometry *) |
void | buildPixel (std::vector< const GeometricDet * > const &, TrackerGeometry *, GeomDetType::SubDetector det, const std::string &part) |
PlaneBuilderFromGeometricDet::ResultType | buildPlaneWithMaterial (const GeometricDet *gd, double scaleFactor=1.) const |
void | buildSilicon (std::vector< const GeometricDet * > const &, TrackerGeometry *, GeomDetType::SubDetector det, const std::string &part) |
Private Attributes | |
GeomDetTypeIdToEnum | theDetIdToEnum |
std::map< std::string, PixelGeomDetType * > | thePixelDetTypeMap |
std::map< std::string, StripGeomDetType * > | theStripDetTypeMap |
GeomTopologyBuilder * | theTopologyBuilder |
Definition at line 17 of file TrackerGeomBuilderFromGeometricDet.h.
TrackerGeometry * TrackerGeomBuilderFromGeometricDet::build | ( | const GeometricDet * | gd | ) |
Definition at line 28 of file TrackerGeomBuilderFromGeometricDet.cc.
References buildGeomDet(), buildPixel(), buildSilicon(), GeometricDet::deepComponents(), i, theDetIdToEnum, thePixelDetTypeMap, theStripDetTypeMap, patCandidatesForDimuonsSequences_cff::tracker, and GeomDetTypeIdToEnum::type().
Referenced by AlignmentMonitorAsAnalyzer::analyze(), TrackerSystematicMisalignments::analyze(), SurveyInputTrackerFromDB::analyze(), CreateSurveyRcds::analyze(), SurveyMisalignmentInput::analyze(), TrackerGeometryIntoNtuples::analyze(), AlignmentProducer::createGeometries_(), TrackerGeometryCompare::createROOTGeometry(), LaserAlignment::produce(), TrackerDigiGeometryESModule::produce(), and MisalignedTrackerESProducer::produce().
{ thePixelDetTypeMap.clear(); theStripDetTypeMap.clear(); TrackerGeometry* tracker = new TrackerGeometry(gd); std::vector<const GeometricDet*> comp; gd->deepComponents(comp); std::vector<const GeometricDet*> dets[6]; std::vector<const GeometricDet*> & pixB = dets[0]; pixB.reserve(comp.size()); std::vector<const GeometricDet*> & pixF = dets[1]; pixF.reserve(comp.size()); std::vector<const GeometricDet*> & tib = dets[2]; tib.reserve(comp.size()); std::vector<const GeometricDet*> & tid = dets[3]; tid.reserve(comp.size()); std::vector<const GeometricDet*> & tob = dets[4]; tob.reserve(comp.size()); std::vector<const GeometricDet*> & tec = dets[5]; tec.reserve(comp.size()); for(u_int32_t i = 0;i<comp.size();i++) dets[comp[i]->geographicalID().subdetId()-1].push_back(comp[i]); buildPixel(pixB,tracker,theDetIdToEnum.type(1), "barrel"); //"PixelBarrel" buildPixel(pixF,tracker,theDetIdToEnum.type(2), "endcap"); //"PixelEndcap" buildSilicon(tib,tracker,theDetIdToEnum.type(3), "barrel");// "TIB" buildSilicon(tid,tracker,theDetIdToEnum.type(4), "endcap");//"TID" buildSilicon(tob,tracker,theDetIdToEnum.type(5), "barrel");//"TOB" buildSilicon(tec,tracker,theDetIdToEnum.type(6), "endcap");//"TEC" buildGeomDet(tracker);//"GeomDet" return tracker; }
void TrackerGeomBuilderFromGeometricDet::buildGeomDet | ( | TrackerGeometry * | tracker | ) | [private] |
Definition at line 120 of file TrackerGeomBuilderFromGeometricDet.cc.
References TrackerGeometry::addDet(), TrackerGeometry::addDetId(), TrackerGeometry::detUnitIds(), TrackerGeometry::detUnits(), Exception, StripSubdetector::glued(), i, StripSubdetector::partnerDetId(), PlaneBuilderForGluedDet::plane(), and StripSubdetector::stereo().
Referenced by build().
{ PlaneBuilderForGluedDet gluedplaneBuilder; std::vector<GeomDetUnit*> const & gdu= tracker->detUnits(); std::vector<DetId> const & gduId = tracker->detUnitIds(); for(u_int32_t i=0;i<gdu.size();i++){ StripSubdetector sidet( gduId[i].rawId()); tracker->addDet((GeomDet*) gdu[i]); tracker->addDetId(gduId[i]); if(sidet.glued()!=0&&sidet.stereo()==1){ int partner_pos=-1; for(u_int32_t jj=0;jj<gduId.size();jj++){ if(sidet.partnerDetId()== gduId[jj]) { partner_pos=jj; break; } } const GeomDetUnit* dus = gdu[i]; if(partner_pos==-1){ throw cms::Exception("Configuration") <<"No partner detector found \n" <<"There is a problem on Tracker geometry configuration\n"; } const GeomDetUnit* dum = gdu[partner_pos]; std::vector<const GeomDetUnit *> glued(2); glued[0]=dum; glued[1]=dus; PlaneBuilderForGluedDet::ResultType plane = gluedplaneBuilder.plane(glued); GluedGeomDet* gluedDet = new GluedGeomDet(&(*plane),dum,dus); tracker->addDet((GeomDet*) gluedDet); tracker->addDetId(DetId(sidet.glued())); } } }
void TrackerGeomBuilderFromGeometricDet::buildPixel | ( | std::vector< const GeometricDet * > const & | gdv, |
TrackerGeometry * | tracker, | ||
GeomDetType::SubDetector | det, | ||
const std::string & | part | ||
) | [private] |
Definition at line 59 of file TrackerGeomBuilderFromGeometricDet.cc.
References TrackerGeometry::addDetUnit(), TrackerGeometry::addDetUnitId(), TrackerGeometry::addType(), GeomTopologyBuilder::buildPixel(), buildPlaneWithMaterial(), i, matplotRender::t, cond::rpcobtemp::temp, thePixelDetTypeMap, and theTopologyBuilder.
Referenced by build().
{ for(u_int32_t i=0; i<gdv.size(); i++){ std::string const & detName = gdv[i]->name().fullname(); if (thePixelDetTypeMap.find(detName) == thePixelDetTypeMap.end()) { std::auto_ptr<const Bounds> bounds(gdv[i]->bounds()); PixelTopology* t = theTopologyBuilder->buildPixel(&*bounds, gdv[i]->pixROCRows(), gdv[i]->pixROCCols(), gdv[i]->pixROCx(), gdv[i]->pixROCy(), part); thePixelDetTypeMap[detName] = new PixelGeomDetType(t,detName,det); tracker->addType(thePixelDetTypeMap[detName]); } PlaneBuilderFromGeometricDet::ResultType plane = buildPlaneWithMaterial(gdv[i]); GeomDetUnit* temp = new PixelGeomDetUnit(&(*plane),thePixelDetTypeMap[detName],gdv[i]); tracker->addDetUnit(temp); tracker->addDetUnitId(gdv[i]->geographicalID()); } }
PlaneBuilderFromGeometricDet::ResultType TrackerGeomBuilderFromGeometricDet::buildPlaneWithMaterial | ( | const GeometricDet * | gd, |
double | scaleFactor = 1. |
||
) | const [private] |
Definition at line 205 of file TrackerGeomBuilderFromGeometricDet.cc.
References PlaneBuilderFromGeometricDet::plane(), GeometricDet::radLength(), and GeometricDet::xi().
Referenced by buildPixel(), and buildSilicon().
{ PlaneBuilderFromGeometricDet planeBuilder; PlaneBuilderFromGeometricDet::ResultType plane = planeBuilder.plane(gd); // // set medium properties (if defined) // plane->setMediumProperties(MediumProperties(gd->radLength()*scale,gd->xi()*scale)); return plane; }
void TrackerGeomBuilderFromGeometricDet::buildSilicon | ( | std::vector< const GeometricDet * > const & | gdv, |
TrackerGeometry * | tracker, | ||
GeomDetType::SubDetector | det, | ||
const std::string & | part | ||
) | [private] |
Definition at line 89 of file TrackerGeomBuilderFromGeometricDet.cc.
References TrackerGeometry::addDetUnit(), TrackerGeometry::addDetUnitId(), TrackerGeometry::addType(), buildPlaneWithMaterial(), GeomTopologyBuilder::buildStrip(), i, StripSubdetector::partnerDetId(), matplotRender::t, cond::rpcobtemp::temp, theStripDetTypeMap, and theTopologyBuilder.
Referenced by build().
{ for(u_int32_t i=0;i<gdv.size();i++){ std::string const & detName = gdv[i]->name().fullname(); if (theStripDetTypeMap.find(detName) == theStripDetTypeMap.end()) { std::auto_ptr<const Bounds> bounds(gdv[i]->bounds()); StripTopology* t = theTopologyBuilder->buildStrip(&*bounds, gdv[i]->siliconAPVNum(), part); theStripDetTypeMap[detName] = new StripGeomDetType( t,detName,det, gdv[i]->stereo()); tracker->addType(theStripDetTypeMap[detName]); } StripSubdetector sidet( gdv[i]->geographicalID()); double scale = (sidet.partnerDetId()) ? 0.5 : 1.0 ; PlaneBuilderFromGeometricDet::ResultType plane = buildPlaneWithMaterial(gdv[i],scale); GeomDetUnit* temp = new StripGeomDetUnit(&(*plane), theStripDetTypeMap[detName],gdv[i]); tracker->addDetUnit(temp); tracker->addDetUnitId(gdv[i]->geographicalID()); } }
Definition at line 36 of file TrackerGeomBuilderFromGeometricDet.h.
Referenced by build().
std::map<std::string,PixelGeomDetType*> TrackerGeomBuilderFromGeometricDet::thePixelDetTypeMap [private] |
Definition at line 39 of file TrackerGeomBuilderFromGeometricDet.h.
Referenced by build(), and buildPixel().
std::map<std::string,StripGeomDetType*> TrackerGeomBuilderFromGeometricDet::theStripDetTypeMap [private] |
Definition at line 40 of file TrackerGeomBuilderFromGeometricDet.h.
Referenced by build(), and buildSilicon().
Definition at line 37 of file TrackerGeomBuilderFromGeometricDet.h.
Referenced by buildPixel(), and buildSilicon().