49 for ( vector<DetLayer*>::const_iterator
i = barrel.begin();
i != barrel.end();
i++ ) {
51 if ( mbp == 0 )
throw Genexception(
"Bad BarrelDetLayer");
60 for ( vector<DetLayer*>::const_iterator
i = endcap.begin();
i != endcap.end();
i++ ) {
62 if ( mep == 0 )
throw Genexception(
"Bad ForwardDetLayer");
93 vector<MuonBarrelNavigableLayer*>::const_iterator ib;
94 vector<MuonForwardNavigableLayer*>::const_iterator ie;
97 result.push_back(*ib);
101 result.push_back(*ie);
105 result.push_back(*ie);
121 float eta_min = -eta_max;
153 if ( z > 0 )
return -
log((
tan(atan(r/z)/2.)));
154 return log(-(
tan(atan(r/z)/2.)));
171 if ( plusOne !=
theBarrelLayers.end() ) { outerBarrel.insert(*plusOne);}
174 allOuterBarrel.insert(*iMBI);
177 MapE allOuterBackward;
180 if ( (*el).second.isCompatible(range) ) {
181 allOuterBackward.insert(*el);
188 if ( (*el).second.isCompatible(range) ) {
189 outerBackward.insert(*el);
195 MapE allOuterForward;
198 if ( (*el).second.isCompatible(range) ) {
199 allOuterForward.insert(*el);
207 if ( (*el).second.isCompatible(range) ) {
208 outerForward.insert(*el);
214 (*bl).first,outerBarrel, outerBackward, outerForward,
215 allOuterBarrel,allOuterBackward,allOuterForward));
222 vector<MuonForwardNavigableLayer*>&
result) {
224 for (
MapEI el = layers.begin(); el != layers.end(); el++) {
231 if ( plusOne != layers.end() && (*plusOne).second.isCompatible(range) ) {
232 outerLayers.insert(*plusOne);
233 if ( !range.
isInside((*plusOne).second) ) {
235 MapEI tmpel(plusOne);
238 for (
MapEI l = tmpel;
l != layers.end();
l++ ) {
243 outerLayers.insert(*
l);
250 for (
MapEI iMEI = plusOne; iMEI!=layers.end(); iMEI++){
251 if ((*iMEI).second.isCompatible(range)) allOuterLayers.insert(*iMEI);
255 (*el).first,outerLayers, allOuterLayers));
268 typedef map<const DetLayer*, MapB, less<const DetLayer*> > BarrelMapType;
269 typedef map<const DetLayer*, MapE, less<const DetLayer*> > ForwardMapType;
272 BarrelMapType reachedBarrelLayersMap;
273 ForwardMapType reachedForwardLayersMap;
276 BarrelMapType compatibleBarrelLayersMap;
277 ForwardMapType compatibleForwardLayersMap;
286 for (
MapBI i = reacheableB.begin();
i != reacheableB.end();
i++ ) {
287 reachedBarrelLayersMap[(*i).first].insert(*bli);
290 for (
MapBI i = compatibleB.begin();
i != compatibleB.end();
i++ ) {
291 compatibleBarrelLayersMap[(*i).first].insert(*bli);
294 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
295 reachedBarrelLayersMap[(*i).first].insert(*bli);
298 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
299 reachedBarrelLayersMap[(*i).first].insert(*bli);
302 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
303 compatibleBarrelLayersMap[(*i).first].insert(*bli);
306 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
307 compatibleBarrelLayersMap[(*i).first].insert(*bli);
317 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
318 reachedForwardLayersMap[(*i).first].insert(*eli);
323 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
324 compatibleForwardLayersMap[(*i).first].insert(*eli);
333 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
334 reachedForwardLayersMap[(*i).first].insert(*eli);
339 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
340 compatibleForwardLayersMap[(*i).first].insert(*eli);
360 reachedForwardLayersMap[(*eli).first]);
363 compatibleForwardLayersMap[(*eli).first]);
372 reachedForwardLayersMap[(*eli).first]);
375 compatibleForwardLayersMap[(*eli).first]);
std::vector< MuonForwardNavigableLayer * > theForwardNLC
MapB getOuterBarrelLayers() const
MapE getAllOuterForwardLayers() const
MuonEtaRange add(const MuonEtaRange &) const
create maximum of ranges
virtual float length() const =0
MapE theBackwardLayers
+z endcap
const std::vector< DetLayer * > & allCSCLayers() const
return the CSC DetLayers (endcap), -Z to +Z
std::map< ForwardDetLayer *, MuonEtaRange, MuonDetLayerComp > MapE
MapB::const_iterator MapBI
const std::vector< DetLayer * > & allDTLayers() const
return the DT DetLayers (barrel), inside-out
MuonNavigationSchool(const MuonDetLayerGeometry *, bool enableRPC=true)
Constructor.
MapB getAllOuterBarrelLayers() const
void setInwardLinks(const MapB &, const MapE &)
set inward links
std::map< BarrelDetLayer *, MuonEtaRange, MuonDetLayerComp > MapB
void createInverseLinks() const
establish inward links
MapE getAllOuterBackwardLayers() const
void setInwardCompatibleLinks(const MapB &)
std::vector< MuonForwardNavigableLayer * > theBackwardNLC
float calculateEta(const float &, const float &) const
calculate pseudorapidity from r and z
MapE::const_iterator MapEI
Scalar radius() const
Radius of the cylinder.
const T & max(const T &a, const T &b)
std::vector< MuonBarrelNavigableLayer * > theBarrelNLC
-z endcap
virtual const BoundDisk & specificSurface() const
Tan< T >::type tan(const T &t)
void linkBarrelLayers()
link barrel layers
MapE getOuterBackwardLayers() const
std::vector< NavigableLayer * > StateType
const std::vector< DetLayer * > & allEndcapLayers() const
return all endcap DetLayers (CSC+RPC), -Z to +Z
const Bounds & bounds() const
MapE getOuterForwardLayers() const
Log< T >::type log(const T &t)
bool isInside(float eta, float error=0.) const
virtual const BoundCylinder & specificSurface() const
Extension of the interface.
const std::vector< DetLayer * > & allLayers() const
return all layers (DT+CSC+RPC), order: backward, barrel, forward
void linkEndcapLayers(const MapE &, std::vector< MuonForwardNavigableLayer * > &)
link endcap layers
~MuonNavigationSchool()
Destructor.
bool isCompatible(const MuonEtaRange &range) const
true if this overlaps with range
void setInwardLinks(const MapB &)
set inward links
float outerRadius() const
The outer radius of the disk.
void setInwardCompatibleLinks(const MapB &, const MapE &)
void addEndcapLayer(ForwardDetLayer *)
add endcap layer (backward and forward)
float innerRadius() const
The inner radius of the disk.
MuonEtaRange subtract(const MuonEtaRange &) const
create new range of size this minus range
MapE theForwardLayers
barrel
const std::vector< DetLayer * > * theAllDetLayersInSystem
const PositionType & position() const
void addBarrelLayer(BarrelDetLayer *)
add barrel layer
const std::vector< DetLayer * > & allBarrelLayers() const
return all barrel DetLayers (DT+RPC), inside-out
virtual StateType navigableLayers() const
return navigable layers, from base class