15 : m_totalBlade( totalBlade )
21 return( Panel1->
phi() < Panel2->
phi());
26 std::vector< GeometricDet const *>::iterator
end )
32 std::vector<const GeometricDet*> theCompsPosNeg;
33 theCompsPosNeg.empty();
34 theCompsPosNeg.clear();
36 double theRmin = (**begin).rho();
37 double theRmax = theRmin;
38 for(vector<const GeometricDet*>::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(vector<const GeometricDet*>::const_iterator it=begin;
46 if((**it).phi() < 0) theCompsPosNeg.push_back(*it);
50 double radius_split = 0.5 * (theRmin + theRmax);
51 std::vector<const GeometricDet*> theCompsInnerOuter;
52 theCompsInnerOuter.empty();
53 theCompsInnerOuter.clear();
55 for(vector<const GeometricDet*>::const_iterator it=theCompsPosNeg.begin();
56 it!=theCompsPosNeg.end();it++){
57 if((**it).rho() <= radius_split) {
58 theCompsInnerOuter.push_back(*it);
62 for(vector<const GeometricDet*>::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()))
117 zmaxpanels.push_back( comp[2*
j] );
118 zminpanels.push_back( comp[2*j+1] );
121 else if( fabs( comp[2*
j]->translation().
z()) < fabs( comp[ 2*
j +1 ]->translation().
z()))
123 zmaxpanels.push_back( comp[2*
j+1] );
124 zminpanels.push_back( comp[2*
j] );
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)
void PhiPosNegSplit_innerOuter(std::vector< GeometricDet const * >::iterator begin, std::vector< GeometricDet const * >::iterator end)
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
std::vector< GeometricDet const * > GeometricDetContainer
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)
CmsTrackerDiskBuilder(unsigned int totalBlade)
GeometricDetContainer & components()
void addComponents(GeometricDetContainer const &cont)
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum