42 vector<const DetLayer*>
barrel;
46 for (
auto i = barrel.begin();
i != barrel.end();
i++ ) {
48 if ( mbp ==
nullptr )
throw cms::Exception(
"MTDNavigationSchool",
"Bad BarrelDetLayer");
54 vector<const DetLayer*>
endcap;
58 for (
auto i = endcap.begin();
i != endcap.end();
i++ ) {
60 if ( mep ==
nullptr )
throw cms::Exception(
"MTDNavigationSchool",
"Bad ForwardDetLayer");
91 vector<BTLNavigableLayer*>::const_iterator
ib;
92 vector<ETLNavigableLayer*>::const_iterator ie;
95 result.push_back(*ib);
99 result.push_back(*ie);
103 result.push_back(*ie);
115 float radius = bc.radius();
116 float length = bc.bounds().length()/2.;
130 float outRadius = bd.outerRadius();
131 float inRadius = bd.innerRadius();
132 float thick = bd.bounds().length()/2.;
133 float z = bd.position().z();
151 if ( z > 0 )
return -
log((
tan(atan(r/z)/2.)));
152 return log(-(
tan(atan(r/z)/2.)));
169 if ( plusOne !=
theBarrelLayers.end() ) { outerBarrel.insert(*plusOne);}
172 allOuterBarrel.insert(*iMBI);
175 MapE allOuterBackward;
178 if ( (*el).second.isCompatible(range) ) {
179 allOuterBackward.insert(*el);
186 if ( (*el).second.isCompatible(range) ) {
187 outerBackward.insert(*el);
193 MapE allOuterForward;
196 if ( (*el).second.isCompatible(range) ) {
197 allOuterForward.insert(*el);
205 if ( (*el).second.isCompatible(range) ) {
206 outerForward.insert(*el);
212 (*bl).first,outerBarrel, outerBackward, outerForward,
213 allOuterBarrel,allOuterBackward,allOuterForward));
220 vector<ETLNavigableLayer*>&
result) {
222 for (
MapEI el = layers.begin(); el != layers.end(); el++) {
229 if ( plusOne != layers.end() && (*plusOne).second.isCompatible(range) ) {
230 outerLayers.insert(*plusOne);
231 if ( !range.
isInside((*plusOne).second) ) {
233 MapEI tmpel(plusOne);
236 for (
MapEI l = tmpel;
l != layers.end();
l++ ) {
241 outerLayers.insert(*
l);
248 for (
MapEI iMEI = plusOne; iMEI!=layers.end(); iMEI++){
249 if ((*iMEI).second.isCompatible(range)) allOuterLayers.insert(*iMEI);
253 (*el).first,outerLayers, allOuterLayers));
269 typedef map<const DetLayer*, MapB, less<const DetLayer*> > BarrelMapType;
270 typedef map<const DetLayer*, MapE, less<const DetLayer*> > ForwardMapType;
273 BarrelMapType reachedBarrelLayersMap;
274 ForwardMapType reachedForwardLayersMap;
277 BarrelMapType compatibleBarrelLayersMap;
278 ForwardMapType compatibleForwardLayersMap;
287 for (
MapBI i = reacheableB.begin();
i != reacheableB.end();
i++ ) {
288 reachedBarrelLayersMap[(*i).first].insert(*bli);
291 for (
MapBI i = compatibleB.begin();
i != compatibleB.end();
i++ ) {
292 compatibleBarrelLayersMap[(*i).first].insert(*bli);
295 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
296 reachedBarrelLayersMap[(*i).first].insert(*bli);
299 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
300 reachedBarrelLayersMap[(*i).first].insert(*bli);
303 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
304 compatibleBarrelLayersMap[(*i).first].insert(*bli);
307 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
308 compatibleBarrelLayersMap[(*i).first].insert(*bli);
318 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
319 reachedForwardLayersMap[(*i).first].insert(*eli);
324 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
325 compatibleForwardLayersMap[(*i).first].insert(*eli);
334 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
335 reachedForwardLayersMap[(*i).first].insert(*eli);
340 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
341 compatibleForwardLayersMap[(*i).first].insert(*eli);
361 reachedForwardLayersMap[(*eli).first]);
364 compatibleForwardLayersMap[(*eli).first]);
373 reachedForwardLayersMap[(*eli).first]);
376 compatibleForwardLayersMap[(*eli).first]);
const std::vector< const DetLayer * > & allLayers() const
return all DetLayers (barrel + endcap), -Z to +Z
std::vector< BTLNavigableLayer * > theBarrelNLC
-z endcap
MapB::const_iterator MapBI
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
StateType navigableLayers() override
return navigable layers, from base class
std::map< const BarrelDetLayer *, MTDEtaRange, MTDDetLayerComp > MapB
const std::vector< const DetLayer * > & allEndcapLayers() const
return all endcap layers
std::vector< ETLNavigableLayer * > theBackwardNLC
MapB getOuterBarrelLayers() const
void linkBarrelLayers()
link barrel layers
MapE getOuterForwardLayers() const
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
void linkEndcapLayers(const MapE &, std::vector< ETLNavigableLayer * > &)
link endcap layers
~MTDNavigationSchool() override
Destructor.
std::vector< ETLNavigableLayer * > theForwardNLC
MapE getAllOuterForwardLayers() const
MTDEtaRange add(const MTDEtaRange &) const
create maximum of ranges
MapE getOuterBackwardLayers() const
MTDNavigationSchool(const MTDDetLayerGeometry *, bool enableBTL=true, bool enableETL=true)
Constructor.
StateType theAllNavigableLayer
Tan< T >::type tan(const T &t)
void createInverseLinks()
establish inward links
std::vector< NavigableLayer * > StateType
float calculateEta(const float &, const float &) const
calculate pseudorapidity from r and z
const std::vector< const DetLayer * > * theAllDetLayersInSystem
MapE theBackwardLayers
+z endcap
MapE getAllOuterBackwardLayers() const
virtual const BoundDisk & specificSurface() const final
bool isInside(float eta, float error=0.) const
void setInwardCompatibleLinks(const MapB &, const MapE &)
MapE theForwardLayers
barrel
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel layers
void addEndcapLayer(const ForwardDetLayer *)
add endcap layer (backward and forward)
MTDEtaRange subtract(const MTDEtaRange &) const
create new range of size this minus range
MapE::const_iterator MapEI
void addBarrelLayer(const BarrelDetLayer *)
add barrel layer
MapB getAllOuterBarrelLayers() const
void setInwardLinks(const MapB &)
set inward links
void setState(const StateType &state)
void setInwardCompatibleLinks(const MapB &)
bool isCompatible(const MTDEtaRange &range) const
true if this overlaps with range
void setInwardLinks(const MapB &, const MapE &)
set inward links
std::map< const ForwardDetLayer *, MTDEtaRange, MTDDetLayerComp > MapE