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);
307 dynamic_cast<MuonForwardNavigableLayer*>(
theAllNavigableLayer[((*eli).first)->seqNum()])->getOuterEndcapLayers();
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);
322 dynamic_cast<MuonForwardNavigableLayer*>(
theAllNavigableLayer[((*eli).first)->seqNum()])->getOuterEndcapLayers();
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]);