47 for ( vector<DetLayer*>::const_iterator
i = barrel.begin();
i != barrel.end();
i++ ) {
49 if ( mbp == 0 )
throw cms::Exception(
"MuonNavigationSchool",
"Bad BarrelDetLayer");
58 for ( vector<DetLayer*>::const_iterator
i = endcap.begin();
i != endcap.end();
i++ ) {
60 if ( mep == 0 )
throw cms::Exception(
"MuonNavigationSchool",
"Bad ForwardDetLayer");
91 vector<MuonBarrelNavigableLayer*>::const_iterator
ib;
92 vector<MuonForwardNavigableLayer*>::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.;
119 float eta_min = -eta_max;
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<MuonForwardNavigableLayer*>&
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));
266 typedef map<const DetLayer*, MapB, less<const DetLayer*> > BarrelMapType;
267 typedef map<const DetLayer*, MapE, less<const DetLayer*> > ForwardMapType;
270 BarrelMapType reachedBarrelLayersMap;
271 ForwardMapType reachedForwardLayersMap;
274 BarrelMapType compatibleBarrelLayersMap;
275 ForwardMapType compatibleForwardLayersMap;
284 for (
MapBI i = reacheableB.begin();
i != reacheableB.end();
i++ ) {
285 reachedBarrelLayersMap[(*i).first].insert(*bli);
288 for (
MapBI i = compatibleB.begin();
i != compatibleB.end();
i++ ) {
289 compatibleBarrelLayersMap[(*i).first].insert(*bli);
292 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
293 reachedBarrelLayersMap[(*i).first].insert(*bli);
296 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
297 reachedBarrelLayersMap[(*i).first].insert(*bli);
300 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
301 compatibleBarrelLayersMap[(*i).first].insert(*bli);
304 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
305 compatibleBarrelLayersMap[(*i).first].insert(*bli);
315 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
316 reachedForwardLayersMap[(*i).first].insert(*eli);
321 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
322 compatibleForwardLayersMap[(*i).first].insert(*eli);
331 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
332 reachedForwardLayersMap[(*i).first].insert(*eli);
337 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
338 compatibleForwardLayersMap[(*i).first].insert(*eli);
358 reachedForwardLayersMap[(*eli).first]);
361 compatibleForwardLayersMap[(*eli).first]);
370 reachedForwardLayersMap[(*eli).first]);
373 compatibleForwardLayersMap[(*eli).first]);
std::vector< MuonForwardNavigableLayer * > theForwardNLC
MapB getOuterBarrelLayers() const
MapE getAllOuterForwardLayers() const
MuonEtaRange add(const MuonEtaRange &) const
create maximum of ranges
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
const T & max(const T &a, const T &b)
std::vector< MuonBarrelNavigableLayer * > theBarrelNLC
-z endcap
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
MapE getOuterForwardLayers() const
bool isInside(float eta, float error=0.) const
const std::vector< DetLayer * > & allLayers() const
return all layers (DT+CSC+RPC), order: backward, barrel, forward
virtual const BoundDisk & specificSurface() const GCC11_FINAL
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
void setInwardCompatibleLinks(const MapB &, const MapE &)
void addEndcapLayer(ForwardDetLayer *)
add endcap layer (backward and forward)
MuonEtaRange subtract(const MuonEtaRange &) const
create new range of size this minus range
MapE theForwardLayers
barrel
const std::vector< DetLayer * > * theAllDetLayersInSystem
virtual const BoundCylinder & specificSurface() const GCC11_FINAL
Extension of the interface.
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