17 return( Panel1->
phi() < Panel2->
phi());
22 std::vector< GeometricDet const *>::iterator
end )
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.end()-1,theCompsInnerOuter.end());
65 std::rotate(theCompsInnerOuter.begin(),theCompsInnerOuter.begin()+num_inner-1,theCompsInnerOuter.begin()+num_inner);
66 std::copy(theCompsInnerOuter.begin(), theCompsInnerOuter.end(),
begin);
78 theCmsTrackerPanelBuilder.
build( fv, subdet, s );
96 PhiPosNegSplit_innerOuter( comp.begin(), comp.end());
99 edm::LogError(
"CmsTrackerPhase1DiskBuilder" ) <<
"ERROR - wrong SubDet to sort..... " << det->
components().front()->type();
105 uint32_t totalblade = comp.size()/2;
108 zminpanels.reserve( totalblade );
109 zmaxpanels.reserve( totalblade );
110 for( uint32_t j = 0; j < totalblade; j++ )
112 if(
std::abs( comp[2*j]->translation().z()) >
std::abs( comp[ 2*j +1 ]->translation().z()))
114 zmaxpanels.emplace_back( det->
component(2*j) );
115 zminpanels.emplace_back( det->
component(2*j+1) );
118 else if(
std::abs( comp[2*j]->translation().z()) <
std::abs( comp[ 2*j +1 ]->translation().z()))
120 zmaxpanels.emplace_back( det->
component(2*j+1) );
121 zminpanels.emplace_back( det->
component(2*j) );
125 edm::LogWarning(
"CmsTrackerPhase1DiskBuilder" ) <<
"WARNING - The Z of both panels are equal! ";
129 for( uint32_t fn = 0; fn < zminpanels.size(); fn++ )
131 uint32_t blade = fn + 1;
133 uint32_t
temp = ( blade << 2 ) | panel;
134 zminpanels[fn]->setGeographicalID( temp );
137 for( uint32_t bn = 0; bn < zmaxpanels.size(); bn++)
139 uint32_t blade = bn + 1;
141 uint32_t
temp = ( blade << 2) | panel;
142 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
void buildComponent(DDFilteredView &, GeometricDet *, std::string) override
ConstGeometricDetContainer & components()
Abs< T >::type abs(const T &t)
GeometricDet * component(size_t index)
void sortNS(DDFilteredView &, GeometricDet *) override
static bool PhiSort(const GeometricDet *Panel1, const GeometricDet *Panel2)
std::vector< GeometricDet const * > ConstGeometricDetContainer
void addComponents(GeometricDetContainer const &cont)
def rotate(angle, cx=0, cy=0)
void PhiPosNegSplit_innerOuter(std::vector< GeometricDet const * >::iterator begin, std::vector< GeometricDet const * >::iterator end)