17 return( Panel1->
phi() < Panel2->
phi());
22 std::vector< GeometricDet const *>::iterator
end )
25 std::sort( begin, end, PhiSort );
28 std::vector<const GeometricDet*> theCompsPosNeg;
30 double theRmin = (**begin).rho();
31 double theRmax = theRmin;
32 for(vector<const GeometricDet*>::const_iterator it=begin;
34 if((**it).phi() >= 0) theCompsPosNeg.emplace_back(*it);
35 theRmin =
std::min( theRmin, (**it).rho());
36 theRmax =
std::max( theRmax, (**it).rho());
38 for(vector<const GeometricDet*>::const_iterator it=begin;
40 if((**it).phi() < 0) theCompsPosNeg.emplace_back(*it);
46 double radius_split = 100.;
47 std::vector<const GeometricDet*> theCompsInnerOuter;
48 unsigned int num_inner = 0;
49 for(vector<const GeometricDet*>::const_iterator it=theCompsPosNeg.begin();
50 it!=theCompsPosNeg.end();it++){
51 if((**it).rho() <= radius_split) {
52 theCompsInnerOuter.emplace_back(*it);
57 for(vector<const GeometricDet*>::const_iterator it=theCompsPosNeg.begin();
58 it!=theCompsPosNeg.end();it++){
59 if((**it).rho() > radius_split) theCompsInnerOuter.emplace_back(*it);
64 std::rotate(theCompsInnerOuter.begin()+num_inner,theCompsInnerOuter.begin()+num_inner+1,theCompsInnerOuter.end());
65 std::copy(theCompsInnerOuter.begin(), theCompsInnerOuter.end(),
begin);
77 theCmsTrackerPanelBuilder.
build( fv, subdet, s );
95 PhiPosNegSplit_innerOuter( comp.begin(), comp.end());
98 edm::LogError(
"CmsTrackerPhase2TPDiskBuilder" ) <<
"ERROR - wrong SubDet to sort..... " << det->
components().front()->type();
104 uint32_t totalblade = comp.size()/2;
107 zminpanels.reserve( totalblade );
108 zmaxpanels.reserve( totalblade );
109 for( uint32_t j = 0; j < totalblade; j++ )
111 if(
std::abs( comp[2*j]->translation().z()) >
std::abs( comp[ 2*j +1 ]->translation().z()))
113 zmaxpanels.emplace_back( det->
component(2*j) );
114 zminpanels.emplace_back( det->
component(2*j+1) );
117 else if(
std::abs( comp[2*j]->translation().z()) <
std::abs( comp[ 2*j +1 ]->translation().z()))
119 zmaxpanels.emplace_back( det->
component(2*j+1) );
120 zminpanels.emplace_back( det->
component(2*j) );
124 edm::LogWarning(
"CmsTrackerPhase2TPDiskBuilder" ) <<
"WARNING - The Z of both panels are equal! ";
128 for( uint32_t fn = 0; fn < zminpanels.size(); fn++ )
130 uint32_t blade = fn + 1;
132 uint32_t
temp = ( blade << 2 ) | panel;
133 zminpanels[fn]->setGeographicalID( temp );
136 for( uint32_t bn = 0; bn < zmaxpanels.size(); bn++)
138 uint32_t blade = bn + 1;
140 uint32_t
temp = ( blade << 2) | panel;
141 zmaxpanels[bn]->setGeographicalID( temp );
void addComponent(GeometricDet *)
void build(DDFilteredView &, GeometricDet *, std::string) override
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()
void PhiPosNegSplit_innerOuter(std::vector< GeometricDet const * >::iterator begin, std::vector< GeometricDet const * >::iterator end)
void sortNS(DDFilteredView &, GeometricDet *) override
Abs< T >::type abs(const T &t)
GeometricDet * component(size_t index)
static bool PhiSort(const GeometricDet *Panel1, const GeometricDet *Panel2)
std::vector< GeometricDet const * > ConstGeometricDetContainer
void addComponents(GeometricDetContainer const &cont)
void buildComponent(DDFilteredView &, GeometricDet *, std::string) override
def rotate(angle, cx=0, cy=0)