#include <TrackerGeomBuilderFromGeometricDet.h>
Public Member Functions | |
TrackerGeometry * | build (const GeometricDet *gd, const edm::ParameterSet &pSet) |
Private Member Functions | |
void | buildGeomDet (TrackerGeometry *) |
void | buildPixel (std::vector< const GeometricDet * > const &, TrackerGeometry *, GeomDetType::SubDetector det, bool upgradeGeometry, int BIG_PIX_PER_ROC_X, int BIG_PIX_PER_ROC_Y) |
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 | |
std::map< std::string, PixelGeomDetType * > | thePixelDetTypeMap |
std::map< std::string, StripGeomDetType * > | theStripDetTypeMap |
Definition at line 15 of file TrackerGeomBuilderFromGeometricDet.h.
TrackerGeometry * TrackerGeomBuilderFromGeometricDet::build | ( | const GeometricDet * | gd, |
const edm::ParameterSet & | pSet | ||
) |
Definition at line 38 of file TrackerGeomBuilderFromGeometricDet.cc.
References fireworks::BIG_PIX_PER_ROC_X, fireworks::BIG_PIX_PER_ROC_Y, buildGeomDet(), buildPixel(), buildSilicon(), AlCaHLTBitMon_QueryRunRegistry::comp, GeometricDet::deepComponents(), edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), i, GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, sistripsummary::TEC, thePixelDetTypeMap, theStripDetTypeMap, sistripsummary::TIB, sistripsummary::TID, sistripsummary::TOB, and patCandidatesForDimuonsSequences_cff::tracker.
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().
{ bool upgradeGeometry = false; int BIG_PIX_PER_ROC_X = 1; int BIG_PIX_PER_ROC_Y = 2; if( pSet.exists( "trackerGeometryConstants" )) { const edm::ParameterSet tkGeomConsts( pSet.getParameter<edm::ParameterSet>( "trackerGeometryConstants" )); upgradeGeometry = tkGeomConsts.getParameter<bool>( "upgradeGeometry" ); BIG_PIX_PER_ROC_X = tkGeomConsts.getParameter<int>( "BIG_PIX_PER_ROC_X" ); BIG_PIX_PER_ROC_Y = tkGeomConsts.getParameter<int>( "BIG_PIX_PER_ROC_Y" ); } 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]); // this order is VERY IMPORTANT!!!!! buildPixel(pixB,tracker,GeomDetEnumerators::SubDetector::PixelBarrel, upgradeGeometry, BIG_PIX_PER_ROC_X, BIG_PIX_PER_ROC_Y); //"PixelBarrel" buildPixel(pixF,tracker,GeomDetEnumerators::SubDetector::PixelEndcap, upgradeGeometry, BIG_PIX_PER_ROC_X, BIG_PIX_PER_ROC_Y); //"PixelEndcap" buildSilicon(tib,tracker,GeomDetEnumerators::SubDetector::TIB, "barrel");//"TIB" buildSilicon(tid,tracker,GeomDetEnumerators::SubDetector::TID, "endcap");//"TID" buildSilicon(tob,tracker,GeomDetEnumerators::SubDetector::TOB, "barrel");//"TOB" buildSilicon(tec,tracker,GeomDetEnumerators::SubDetector::TEC, "endcap");//"TEC" buildGeomDet(tracker);//"GeomDet" verifyDUinTG(*tracker); return tracker; }
void TrackerGeomBuilderFromGeometricDet::buildGeomDet | ( | TrackerGeometry * | tracker | ) | [private] |
Definition at line 163 of file TrackerGeomBuilderFromGeometricDet.cc.
References TrackerGeometry::addDet(), TrackerGeometry::addDetId(), TrackerGeometry::detUnitIds(), TrackerGeometry::detUnits(), Exception, StripSubdetector::glued(), i, findQualityFiles::jj, 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, | ||
bool | upgradeGeometry, | ||
int | BIG_PIX_PER_ROC_X, | ||
int | BIG_PIX_PER_ROC_Y | ||
) | [private] |
Definition at line 90 of file TrackerGeomBuilderFromGeometricDet.cc.
References TrackerGeometry::addDetUnit(), TrackerGeometry::addDetUnitId(), TrackerGeometry::addType(), PixelTopologyBuilder::build(), buildPlaneWithMaterial(), i, TrackerGeometry::setEndsetDU(), TrackerGeometry::setOffsetDU(), AlCaHLTBitMon_QueryRunRegistry::string, lumiQTWidget::t, groupFilesInBlocks::temp, and thePixelDetTypeMap.
Referenced by build().
{ tracker->setOffsetDU(det); 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 = PixelTopologyBuilder().build(&*bounds, upgradeGeometry, gdv[i]->pixROCRows(), gdv[i]->pixROCCols(), BIG_PIX_PER_ROC_X, BIG_PIX_PER_ROC_Y, gdv[i]->pixROCx(), gdv[i]->pixROCy()); 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()); } tracker->setEndsetDU(det); }
PlaneBuilderFromGeometricDet::ResultType TrackerGeomBuilderFromGeometricDet::buildPlaneWithMaterial | ( | const GeometricDet * | gd, |
double | scaleFactor = 1. |
||
) | const [private] |
Definition at line 198 of file TrackerGeomBuilderFromGeometricDet.cc.
References PlaneBuilderFromGeometricDet::plane(), GeometricDet::radLength(), pileupReCalc_HLTpaths::scale, 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 128 of file TrackerGeomBuilderFromGeometricDet.cc.
References TrackerGeometry::addDetUnit(), TrackerGeometry::addDetUnitId(), TrackerGeometry::addType(), StripTopologyBuilder::build(), buildPlaneWithMaterial(), i, StripSubdetector::partnerDetId(), pileupReCalc_HLTpaths::scale, TrackerGeometry::setEndsetDU(), TrackerGeometry::setOffsetDU(), AlCaHLTBitMon_QueryRunRegistry::string, lumiQTWidget::t, groupFilesInBlocks::temp, and theStripDetTypeMap.
Referenced by build().
{ tracker->setOffsetDU(det); 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 = StripTopologyBuilder().build(&*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()); } tracker->setEndsetDU(det); }
std::map<std::string,PixelGeomDetType*> TrackerGeomBuilderFromGeometricDet::thePixelDetTypeMap [private] |
Definition at line 34 of file TrackerGeomBuilderFromGeometricDet.h.
Referenced by build(), and buildPixel().
std::map<std::string,StripGeomDetType*> TrackerGeomBuilderFromGeometricDet::theStripDetTypeMap [private] |
Definition at line 35 of file TrackerGeomBuilderFromGeometricDet.h.
Referenced by build(), and buildSilicon().