#include <CmsTrackerDiskBuilder.h>
Private Member Functions | |
virtual void | buildComponent (DDFilteredView &, GeometricDet *, std::string) |
virtual void | sortNS (DDFilteredView &, GeometricDet *) |
Class which contructs PixelForward/Disk.
Definition at line 10 of file CmsTrackerDiskBuilder.h.
void CmsTrackerDiskBuilder::buildComponent | ( | DDFilteredView & | fv, |
GeometricDet * | g, | ||
std::string | s | ||
) | [private, virtual] |
Implements CmsTrackerLevelBuilder.
Definition at line 12 of file CmsTrackerDiskBuilder.cc.
References GeometricDet::addComponent(), CmsTrackerLevelBuilder::build(), ExtractStringFromDDD::getString(), GeometricDet::panel, CmsTrackerLevelBuilder::theCmsTrackerStringToEnum, and CmsTrackerStringToEnum::type().
{ CmsTrackerPanelBuilder theCmsTrackerPanelBuilder; GeometricDet * subdet = new GeometricDet(&fv,theCmsTrackerStringToEnum.type(ExtractStringFromDDD::getString(s,&fv))); switch (theCmsTrackerStringToEnum.type(ExtractStringFromDDD::getString(s,&fv))){ case GeometricDet::panel: theCmsTrackerPanelBuilder.build(fv,subdet,s); break; default: edm::LogError("CmsTrackerDiskBuilder")<<" ERROR - I was expecting a Panel, I got a "<<ExtractStringFromDDD::getString(s,&fv); } g->addComponent(subdet); }
void CmsTrackerDiskBuilder::sortNS | ( | DDFilteredView & | fv, |
GeometricDet * | det | ||
) | [private, virtual] |
Reimplemented from CmsTrackerLevelBuilder.
Definition at line 27 of file CmsTrackerDiskBuilder.cc.
References GeometricDet::addComponents(), GeometricDet::clearComponents(), GeometricDet::components(), j, GeometricDet::panel, cond::rpcobtemp::temp, TrackerStablePhiSort(), and z.
{ GeometricDet::GeometricDetContainer & comp = det->components(); switch(det->components().front()->type()){ case GeometricDet::panel: TrackerStablePhiSort(comp.begin(),comp.end(), ExtractPhi()); break; default: edm::LogError("CmsTrackerDiskBuilder")<<"ERROR - wrong SubDet to sort..... "<<det->components().front()->type(); } GeometricDet::GeometricDetContainer zminpanels; // Here z refers abs(z); GeometricDet::GeometricDetContainer zmaxpanels; // So, zmin panel is always closer to ip. uint32_t totalblade = comp.size()/2; if ( totalblade != 24 ) edm::LogError("CmsTrackerDiskBuilder")<<"ERROR, The Total Number of Blade in one disk is "<<totalblade; zminpanels.reserve(totalblade); zmaxpanels.reserve(totalblade); for( uint32_t j=0; j<totalblade ;j++) { if ( fabs( comp[2*j]->translation().z() ) > fabs( comp[ 2*j +1 ]->translation().z() ) ) { zmaxpanels.push_back(comp[2*j] ); zminpanels.push_back(comp[2*j+1]); }else if ( fabs( comp[2*j]->translation().z() ) < fabs( comp[ 2*j +1 ]->translation().z() ) ) { zmaxpanels.push_back(comp[2*j+1] ); zminpanels.push_back(comp[2*j]); }else { edm::LogWarning("CmsTrackerDiskBuilder")<<"WARNING - The Z of both panels are equal! "; } } for ( uint32_t fn=0; fn< zminpanels.size(); fn++) { uint32_t blade = fn+1; uint32_t panel = 1; uint32_t temp = (blade<<2) | panel; zminpanels[fn]->setGeographicalID(temp); } for (uint32_t bn=0; bn< zmaxpanels.size(); bn++) { uint32_t blade = bn+1; uint32_t panel = 2; uint32_t temp = (blade<<2) | panel; zmaxpanels[bn]->setGeographicalID(temp); } det->clearComponents(); det->addComponents(zminpanels); det->addComponents(zmaxpanels); }