#include <CmsTrackerRingBuilder.h>
Private Member Functions | |
virtual void | buildComponent (DDFilteredView &, GeometricDet *, std::string) |
virtual void | sortNS (DDFilteredView &, GeometricDet *) |
Class which constructs TID/TEC rings
Definition at line 10 of file CmsTrackerRingBuilder.h.
void CmsTrackerRingBuilder::buildComponent | ( | DDFilteredView & | fv, |
GeometricDet * | g, | ||
std::string | s | ||
) | [private, virtual] |
Implements CmsTrackerLevelBuilder.
Definition at line 13 of file CmsTrackerRingBuilder.cc.
References CmsDetConstruction::buildComponent().
{ CmsDetConstruction theCmsDetConstruction; theCmsDetConstruction.buildComponent(fv,g,s); }
void CmsTrackerRingBuilder::sortNS | ( | DDFilteredView & | fv, |
GeometricDet * | det | ||
) | [private, virtual] |
Reimplemented from CmsTrackerLevelBuilder.
Definition at line 18 of file CmsTrackerRingBuilder.cc.
References GeometricDet::addComponents(), GeometricDet::clearComponents(), GeometricDet::components(), GeometricDet::DetUnit, DDFilteredView::firstChild(), ExtractStringFromDDD::getString(), i, GeometricDet::mergedDet, DDFilteredView::parent(), groupFilesInBlocks::temp, TrackerStablePhiSort(), GeometricDet::translation(), and z.
{ GeometricDet::GeometricDetContainer & comp = det->components(); fv.firstChild(); GeometricDet::GeometricDetContainer compfw; GeometricDet::GeometricDetContainer compbw; switch(comp.front()->type()) { case GeometricDet::mergedDet: TrackerStablePhiSort(comp.begin(), comp.end(), ExtractPhiGluedModule()); break; case GeometricDet::DetUnit: TrackerStablePhiSort(comp.begin(), comp.end(), ExtractPhi()); break; default: edm::LogError("CmsTrackerRingBuilder")<<"ERROR - wrong SubDet to sort..... "<<det->components().front()->type(); } static std::string const part("TkDDDStructure"); static std::string const TECGluedDet("TECGluedDet"); static std::string const TECDet("TECDet"); std::string const pname = ExtractStringFromDDD::getString(part,&fv); // TEC // Module Number: 3 bits [1,...,5 at most] if(pname== TECGluedDet || pname == TECDet){ // TEC- if( det->translation().z() < 0 && pname == TECDet) { TrackerStablePhiSort(comp.begin(), comp.end(), ExtractPhiMirror()); } if( det->translation().z() < 0 && pname == TECGluedDet) { TrackerStablePhiSort(comp.begin(), comp.end(), ExtractPhiGluedModuleMirror()); } for(uint32_t i=0; i<comp.size();i++) comp[i]->setGeographicalID(i+1); } else { // TID // Ring Side: 2 bits [back:1 front:2] // Module Number: 5 bits [1,...,20 at most] // for(uint32_t i=0; i<comp.size();i++){ if(fabs(comp[i]->translation().z())<fabs(det->translation().z())){ compfw.push_back(comp[i]); } else { compbw.push_back(comp[i]); } } for(uint32_t i=0; i<compbw.size();i++){ uint32_t temp = i+1; temp |=(1<<5); compbw[i]->setGeographicalID(temp); } for(uint32_t i=0; i<compfw.size();i++){ uint32_t temp = i+1; temp |=(2<<5); compfw[i]->setGeographicalID(temp); } det->clearComponents(); det->addComponents(compfw); det->addComponents(compbw); } fv.parent(); }