43 const MuonDetLayerGeometry* muonLayout,
bool enableRPC,
bool enableCSC,
bool enableGEM,
bool enableME0)
44 : theMuonDetLayerGeometry(muonLayout) {
49 vector<const DetLayer*>
barrel;
58 throw cms::Exception(
"MuonNavigationSchool",
"Bad BarrelDetLayer");
63 vector<const DetLayer*>
endcap;
64 if (enableCSC & enableGEM & enableRPC & enableME0)
66 else if (enableCSC & enableGEM & !enableRPC & !enableME0)
68 else if (!enableCSC & enableGEM & !enableRPC & !enableME0)
70 else if (enableCSC & !enableGEM & !enableRPC & !enableME0)
72 else if (enableCSC & !enableGEM & !enableRPC & enableME0)
74 else if (!enableCSC & !enableGEM & !enableRPC & enableME0)
84 throw cms::Exception(
"MuonNavigationSchool",
"Bad ForwardDetLayer");
108 vector<MuonBarrelNavigableLayer*>::const_iterator
ib;
109 vector<MuonForwardNavigableLayer*>::const_iterator ie;
129 float radius = bc.radius();
130 float length = bc.bounds().length() / 2.;
141 float outRadius =
bd.outerRadius();
142 float inRadius =
bd.innerRadius();
143 float thick =
bd.bounds().length() / 2.;
144 float z =
bd.position().z();
160 return -
log((
tan(atan(
r /
z) / 2.)));
161 return log(-(
tan(atan(
r /
z) / 2.)));
175 outerBarrel.insert(*plusOne);
179 allOuterBarrel.insert(*iMBI);
182 MapE allOuterBackward;
184 if ((*el).second.isCompatible(
range)) {
185 allOuterBackward.insert(*el);
191 if ((*el).second.isCompatible(
range)) {
192 outerBackward.insert(*el);
198 MapE allOuterForward;
200 if ((*el).second.isCompatible(
range)) {
201 allOuterForward.insert(*el);
208 if ((*el).second.isCompatible(
range)) {
209 outerForward.insert(*el);
215 (*bl).first, outerBarrel, outerBackward, outerForward, allOuterBarrel, allOuterBackward, allOuterForward));
226 if (plusOne !=
layers.end() && (*plusOne).second.isCompatible(
range)) {
227 outerLayers.insert(*plusOne);
228 if (!
range.isInside((*plusOne).second)) {
230 MapEI tmpel(plusOne);
238 outerLayers.insert(*
l);
245 for (
MapEI iMEI = plusOne; iMEI !=
layers.end(); iMEI++) {
246 if ((*iMEI).second.isCompatible(
range))
247 allOuterLayers.insert(*iMEI);
262 typedef map<const DetLayer*, MapB, less<const DetLayer*> > BarrelMapType;
263 typedef map<const DetLayer*, MapE, less<const DetLayer*> > ForwardMapType;
266 BarrelMapType reachedBarrelLayersMap;
267 ForwardMapType reachedForwardLayersMap;
270 BarrelMapType compatibleBarrelLayersMap;
271 ForwardMapType compatibleForwardLayersMap;
279 for (
MapBI i = reacheableB.begin();
i != reacheableB.end();
i++) {
280 reachedBarrelLayersMap[(*i).first].insert(*bli);
283 for (
MapBI i = compatibleB.begin();
i != compatibleB.end();
i++) {
284 compatibleBarrelLayersMap[(*i).first].insert(*bli);
287 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++) {
288 reachedBarrelLayersMap[(*i).first].insert(*bli);
291 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++) {
292 reachedBarrelLayersMap[(*i).first].insert(*bli);
295 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++) {
296 compatibleBarrelLayersMap[(*i).first].insert(*bli);
299 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++) {
300 compatibleBarrelLayersMap[(*i).first].insert(*bli);
308 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++) {
309 reachedForwardLayersMap[(*i).first].insert(*eli);
313 ->getAllOuterEndcapLayers();
314 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++) {
315 compatibleForwardLayersMap[(*i).first].insert(*eli);
323 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++) {
324 reachedForwardLayersMap[(*i).first].insert(*eli);
328 ->getAllOuterEndcapLayers();
329 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++) {
330 compatibleForwardLayersMap[(*i).first].insert(*eli);
346 mfnl->
setInwardLinks(reachedBarrelLayersMap[(*eli).first], reachedForwardLayersMap[(*eli).first]);
355 mfnl->
setInwardLinks(reachedBarrelLayersMap[(*eli).first], reachedForwardLayersMap[(*eli).first]);
void createInverseLinks()
establish inward links
const std::vector< const DetLayer * > & allEndcapCscME0Layers() const
return all endcap DetLayers (CSC+ME0), -Z to +Z
StateType navigableLayers() override
return navigable layers, from base class
std::vector< MuonForwardNavigableLayer * > theForwardNLC
MapE theBackwardLayers
+z endcap
void addEndcapLayer(const ForwardDetLayer *)
add endcap layer (backward and forward)
MapB getAllOuterBarrelLayers() const
MapB::const_iterator MapBI
std::map< const BarrelDetLayer *, MuonEtaRange, MuonDetLayerComp > MapB
void linkEndcapLayers(const MapE &, std::vector< MuonForwardNavigableLayer *> &)
link endcap layers
const std::vector< const DetLayer * > & allDTLayers() const
return the DT DetLayers (barrel), inside-out
MapB getOuterBarrelLayers() const
MapE getAllOuterBackwardLayers() const
void setInwardLinks(const MapB &, const MapE &)
set inward links
const std::vector< const DetLayer * > & allLayers() const
return all layers (DT+CSC+RPC+GEM), order: backward, barrel, forward
void setInwardCompatibleLinks(const MapB &)
std::vector< MuonForwardNavigableLayer * > theBackwardNLC
MapE::const_iterator MapEI
std::vector< MuonBarrelNavigableLayer * > theBarrelNLC
-z endcap
const std::vector< const DetLayer * > & allME0Layers() const
return the ME0 DetLayers (endcap), -Z to +Z
const std::vector< const DetLayer * > & allGEMLayers() const
return the GEM DetLayers (endcap), -Z to +Z
StateType theAllNavigableLayer
Tan< T >::type tan(const T &t)
void linkBarrelLayers()
link barrel layers
std::vector< NavigableLayer * > StateType
const std::vector< const DetLayer * > & allEndcapCscGemLayers() const
return all endcap DetLayers (CSC+GEM), -Z to +Z
const std::vector< const DetLayer * > & allCSCLayers() const
return the CSC DetLayers (endcap), -Z to +Z
const std::vector< const DetLayer * > * theAllDetLayersInSystem
std::map< const ForwardDetLayer *, MuonEtaRange, MuonDetLayerComp > MapE
MapE getOuterForwardLayers() const
void addBarrelLayer(const BarrelDetLayer *)
add barrel layer
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
~MuonNavigationSchool() override
Destructor.
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel DetLayers (DT+RPC), inside-out
void setInwardLinks(const MapB &)
set inward links
void setInwardCompatibleLinks(const MapB &, const MapE &)
const std::vector< const DetLayer * > & allEndcapLayers() const
return all endcap DetLayers (CSC+RPC+GEM+ME0), -Z to +Z
MuonNavigationSchool(const MuonDetLayerGeometry *, bool enableRPC=true, bool enableCSC=true, bool enableGEM=false, bool enableME0=false)
Constructor.
virtual const BoundDisk & specificSurface() const final
MapE getOuterBackwardLayers() const
float calculateEta(const float &, const float &) const
calculate pseudorapidity from r and z
MapE getAllOuterForwardLayers() const
MapE theForwardLayers
barrel
void setState(const StateType &state)