1 #ifndef Geometry_TrackerNumberingBuilder_CmsTrackerLevelBuilder_H 2 #define Geometry_TrackerNumberingBuilder_CmsTrackerLevelBuilder_H 13 typedef std::unary_function<const GeometricDet*, double>
uFcn;
23 return a->
type()%100 < b->
type()%100;
64 const double pi = 3.141592653592;
66 return( phi>= 0 ? phi:phi+2*pi);
72 const double pi = 3.141592653592;
73 std::vector<const GeometricDet*>
const &
comp = a->
components().back()->components();
78 if(fabs(
i->phi())>pi/2.) {
89 double temp = phi/
float(comp.size()) < 0. ?
90 2*pi + phi/
float(comp.size()):
91 phi/
float(comp.size());
96 double phi1 =
i->phi() >= 0 ?
i->phi():
101 double com = comp.front()->phi() >= 0 ? comp.front()->phi():
102 2*pi + comp.front()->phi();
103 double temp = fabs(phi/
float(comp.size()) - com) > 2. ?
104 pi - phi/
float(comp.size()):
105 phi/
float(comp.size());
106 temp = temp >= 0? temp:2*pi+
temp;
114 const double pi = 3.141592653592;
115 std::vector<const GeometricDet*>
comp;
120 for(
auto &
i : comp){
121 if(fabs(
i->phi())>pi/2.) {
128 for(
auto &
i : comp){
132 double temp = phi/
float(comp.size()) < 0. ?
133 2*pi + phi/
float(comp.size()):
134 phi/
float(comp.size());
138 for(
auto &
i : comp){
139 double phi1 =
i->phi() >= 0 ?
i->phi():
140 i->translation().phi()+2*
pi;
144 double com = comp.front()->phi() >= 0 ? comp.front()->phi():
145 2*pi + comp.front()->phi();
146 double temp = fabs(phi/
float(comp.size()) - com) > 2. ?
147 pi - phi/
float(comp.size()):
148 phi/
float(comp.size());
149 temp = temp >= 0? temp:2*pi+
temp;
157 const double pi = 3.141592653592;
159 phi = (phi>= 0 ? phi : phi+2*
pi);
160 return ( (pi-phi) >= 0 ? (pi-
phi) : (pi-phi)+2*
pi );
166 const double pi = 3.141592653592;
168 phi = ( phi <= pi ? phi : phi-2*
pi );
175 const double pi = 3.141592653592;
177 phi = ( phi <= pi ? phi : phi-2*
pi );
193 return a->
rho() < b->
rho();
void build(DDFilteredView &, GeometricDet *, std::string) override
virtual void sortNS(DDFilteredView &, GeometricDet *)
CmsTrackerStringToEnum _CmsTrackerStringToEnum
bool operator()(const GeometricDet *a, const GeometricDet *b) const
ConstGeometricDetContainer & components()
bool operator()(const GeometricDet *a, const GeometricDet *b) const
bool operator()(const GeometricDet *a, const GeometricDet *b) const
DDTranslation const & translation() const
~CmsTrackerLevelBuilder() override
bool operator()(const GeometricDet *a, const GeometricDet *b) const
bool operator()(const GeometricDet *a, const GeometricDet *b) const
bool operator()(const GeometricDet *a, const GeometricDet *b) const
ConstGeometricDetContainer deepComponents() const
std::unary_function< const GeometricDet *, double > uFcn
GeometricEnumType type() const
CmsTrackerStringToEnum theCmsTrackerStringToEnum
virtual void buildComponent(DDFilteredView &, GeometricDet *, std::string)=0