15 : m_totalBlade( totalBlade )
21 return( Panel1->
phi() < Panel2->
phi());
26 GeometricDet::ConstGeometricDetContainer::iterator
end )
33 theCompsPosNeg.empty();
34 theCompsPosNeg.clear();
36 double theRmin = (**begin).rho();
37 double theRmax = theRmin;
38 for(GeometricDet::ConstGeometricDetContainer::const_iterator it=begin;
40 if((**it).phi() >= 0) theCompsPosNeg.push_back(*it);
41 theRmin =
std::min( theRmin, (**it).rho());
42 theRmax =
std::max( theRmax, (**it).rho());
44 for(GeometricDet::ConstGeometricDetContainer::const_iterator it=begin;
46 if((**it).phi() < 0) theCompsPosNeg.push_back(*it);
50 double radius_split = 0.5 * (theRmin + theRmax);
52 theCompsInnerOuter.empty();
53 theCompsInnerOuter.clear();
55 for(GeometricDet::ConstGeometricDetContainer::const_iterator it=theCompsPosNeg.begin();
56 it!=theCompsPosNeg.end();it++){
57 if((**it).rho() <= radius_split) {
58 theCompsInnerOuter.push_back(*it);
62 for(GeometricDet::ConstGeometricDetContainer::const_iterator it=theCompsPosNeg.begin();
63 it!=theCompsPosNeg.end();it++){
64 if((**it).rho() > radius_split) theCompsInnerOuter.push_back(*it);
67 std::copy(theCompsInnerOuter.begin(), theCompsInnerOuter.end(),
begin);
79 theCmsTrackerPanelBuilder.
build( fv, subdet, s );
101 edm::LogError(
"CmsTrackerDiskBuilder" ) <<
"ERROR - wrong SubDet to sort..... " << det->
components().front()->type();
107 uint32_t totalblade = comp.size()/2;
109 edm::LogError(
"CmsTrackerDiskBuilder" ) <<
"ERROR, The Total Number of Blade in one disk is " << totalblade <<
"; configured " <<
m_totalBlade;
111 zminpanels.reserve( totalblade );
112 zmaxpanels.reserve( totalblade );
113 for( uint32_t
j = 0;
j < totalblade;
j++ )
115 if( fabs( comp[2*
j]->translation().
z()) > fabs( comp[ 2*
j +1 ]->translation().
z()))
118 zminpanels.push_back( det->
component(2*
j+1) );
121 else if( fabs( comp[2*
j]->translation().
z()) < fabs( comp[ 2*
j +1 ]->translation().
z()))
123 zmaxpanels.push_back( det->
component(2*
j+1) );
128 edm::LogWarning(
"CmsTrackerDiskBuilder" ) <<
"WARNING - The Z of both panels are equal! ";
132 for( uint32_t fn = 0; fn < zminpanels.size(); fn++ )
134 uint32_t blade = fn + 1;
136 uint32_t
temp = ( blade << 2 ) | panel;
137 zminpanels[fn]->setGeographicalID( temp );
140 for( uint32_t bn = 0; bn < zmaxpanels.size(); bn++)
142 uint32_t blade = bn + 1;
144 uint32_t
temp = ( blade << 2) | panel;
145 zmaxpanels[bn]->setGeographicalID( temp );
virtual void sortNS(DDFilteredView &, GeometricDet *)
unsigned int m_totalBlade
void addComponent(GeometricDet *)
bool PhiSort(const GeometricDet *Panel1, const GeometricDet *Panel2)
std::vector< GeometricDet * > GeometricDetContainer
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
ConstGeometricDetContainer & components()
virtual void build(DDFilteredView &, GeometricDet *, std::string)
void TrackerStablePhiSort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
const T & max(const T &a, const T &b)
virtual void buildComponent(DDFilteredView &, GeometricDet *, std::string)
GeometricDet * component(size_t index)
CmsTrackerDiskBuilder(unsigned int totalBlade)
std::vector< GeometricDet const * > ConstGeometricDetContainer
void addComponents(GeometricDetContainer const &cont)
void PhiPosNegSplit_innerOuter(GeometricDet::ConstGeometricDetContainer::iterator begin, GeometricDet::ConstGeometricDetContainer::iterator end)
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum