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;
29 theCompsPosNeg.empty();
30 theCompsPosNeg.clear();
32 double theRmin = (**begin).rho();
33 double theRmax = theRmin;
34 for(vector<const GeometricDet*>::const_iterator it=begin;
36 if((**it).phi() >= 0) theCompsPosNeg.emplace_back(*it);
37 theRmin =
std::min( theRmin, (**it).rho());
38 theRmax =
std::max( theRmax, (**it).rho());
40 for(vector<const GeometricDet*>::const_iterator it=begin;
42 if((**it).phi() < 0) theCompsPosNeg.emplace_back(*it);
48 double radius_split = 100.;
49 std::vector<const GeometricDet*> theCompsInnerOuter;
50 theCompsInnerOuter.empty();
51 theCompsInnerOuter.clear();
52 unsigned int num_inner = 0;
53 for(vector<const GeometricDet*>::const_iterator it=theCompsPosNeg.begin();
54 it!=theCompsPosNeg.end();it++){
55 if((**it).rho() <= radius_split) {
56 theCompsInnerOuter.emplace_back(*it);
61 for(vector<const GeometricDet*>::const_iterator it=theCompsPosNeg.begin();
62 it!=theCompsPosNeg.end();it++){
63 if((**it).rho() > radius_split) theCompsInnerOuter.emplace_back(*it);
68 std::rotate(theCompsInnerOuter.begin()+num_inner,theCompsInnerOuter.begin()+num_inner+1,theCompsInnerOuter.end());
69 std::copy(theCompsInnerOuter.begin(), theCompsInnerOuter.end(),
begin);
81 theCmsTrackerPanelBuilder.
build( fv, subdet, s );
99 PhiPosNegSplit_innerOuter( comp.begin(), comp.end());
102 edm::LogError(
"CmsTrackerPhase2TPDiskBuilder" ) <<
"ERROR - wrong SubDet to sort..... " << det->
components().front()->type();
108 uint32_t totalblade = comp.size()/2;
111 zminpanels.reserve( totalblade );
112 zmaxpanels.reserve( totalblade );
113 for( uint32_t j = 0; j < totalblade; j++ )
115 if(
std::abs( comp[2*j]->translation().z()) >
std::abs( comp[ 2*j +1 ]->translation().z()))
117 zmaxpanels.emplace_back( det->
component(2*j) );
118 zminpanels.emplace_back( det->
component(2*j+1) );
121 else if(
std::abs( comp[2*j]->translation().z()) <
std::abs( comp[ 2*j +1 ]->translation().z()))
123 zmaxpanels.emplace_back( det->
component(2*j+1) );
124 zminpanels.emplace_back( det->
component(2*j) );
128 edm::LogWarning(
"CmsTrackerPhase2TPDiskBuilder" ) <<
"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 );
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)