18 return( Panel1->
phi() < Panel2->
phi());
23 std::vector< GeometricDet const *>::iterator
end )
26 std::sort( begin, end, PhiSort );
29 std::vector<const GeometricDet*> theCompsPosNeg;
30 theCompsPosNeg.empty();
31 theCompsPosNeg.clear();
33 double theRmin = (**begin).rho();
34 double theRmax = theRmin;
35 for(vector<const GeometricDet*>::const_iterator it=begin;
37 if((**it).phi() >= 0) theCompsPosNeg.push_back(*it);
38 theRmin =
std::min( theRmin, (**it).rho());
39 theRmax =
std::max( theRmax, (**it).rho());
41 for(vector<const GeometricDet*>::const_iterator it=begin;
43 if((**it).phi() < 0) theCompsPosNeg.push_back(*it);
49 double radius_split = 100.;
50 std::vector<const GeometricDet*> theCompsInnerOuter;
51 theCompsInnerOuter.empty();
52 theCompsInnerOuter.clear();
53 unsigned int num_inner = 0;
54 for(vector<const GeometricDet*>::const_iterator it=theCompsPosNeg.begin();
55 it!=theCompsPosNeg.end();it++){
56 if((**it).rho() <= radius_split) {
57 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);
69 std::rotate(theCompsInnerOuter.begin()+num_inner,theCompsInnerOuter.begin()+num_inner+1,theCompsInnerOuter.end());
70 std::copy(theCompsInnerOuter.begin(), theCompsInnerOuter.end(),
begin);
82 theCmsTrackerPanelBuilder.
build( fv, subdet, s );
100 PhiPosNegSplit_innerOuter( comp.begin(), comp.end());
103 edm::LogError(
"CmsTrackerPhase2TPDiskBuilder" ) <<
"ERROR - wrong SubDet to sort..... " << det->
components().front()->type();
109 uint32_t totalblade = comp.size()/2;
112 zminpanels.reserve( totalblade );
113 zmaxpanels.reserve( totalblade );
114 for( uint32_t
j = 0;
j < totalblade;
j++ )
116 if( fabs( comp[2*
j]->translation().z()) > fabs( comp[ 2*
j +1 ]->translation().z()))
119 zminpanels.push_back( det->
component(2*
j+1) );
122 else if( fabs( comp[2*
j]->translation().z()) < fabs( comp[ 2*
j +1 ]->translation().z()))
124 zmaxpanels.push_back( det->
component(2*
j+1) );
129 edm::LogWarning(
"CmsTrackerPhase2TPDiskBuilder" ) <<
"WARNING - The Z of both panels are equal! ";
133 for( uint32_t
fn = 0;
fn < zminpanels.size();
fn++ )
135 uint32_t blade =
fn + 1;
137 uint32_t
temp = ( blade << 2 ) | panel;
138 zminpanels[
fn]->setGeographicalID( temp );
141 for( uint32_t bn = 0; bn < zmaxpanels.size(); bn++)
143 uint32_t blade = bn + 1;
145 uint32_t
temp = ( blade << 2) | panel;
146 zmaxpanels[bn]->setGeographicalID( temp );
void addComponent(GeometricDet *)
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
virtual void buildComponent(DDFilteredView &, GeometricDet *, std::string)
ConstGeometricDetContainer & components()
virtual void build(DDFilteredView &, GeometricDet *, std::string)
void PhiPosNegSplit_innerOuter(std::vector< GeometricDet const * >::iterator begin, std::vector< GeometricDet const * >::iterator end)
GeometricDet * component(size_t index)
virtual void sortNS(DDFilteredView &, GeometricDet *)
static bool PhiSort(const GeometricDet *Panel1, const GeometricDet *Panel2)
std::vector< GeometricDet const * > ConstGeometricDetContainer
void addComponents(GeometricDetContainer const &cont)