35 : theMTDDetLayerGeometry(mtdLayout) {
40 vector<const DetLayer*>
barrel;
54 vector<const DetLayer*>
endcap;
63 throw cms::Exception(
"MTDNavigationSchool",
"Bad ForwardDetLayer");
87 vector<BTLNavigableLayer*>::const_iterator
ib;
88 vector<ETLNavigableLayer*>::const_iterator ie;
108 float radius = bc.radius();
109 float length = bc.bounds().length() / 2.;
120 float outRadius =
bd.outerRadius();
121 float inRadius =
bd.innerRadius();
122 float thick =
bd.bounds().length() / 2.;
123 float z =
bd.position().z();
139 return -
log((
tan(atan(
r /
z) / 2.)));
140 return log(-(
tan(atan(
r /
z) / 2.)));
154 outerBarrel.insert(*plusOne);
158 allOuterBarrel.insert(*iMBI);
161 MapE allOuterBackward;
163 if ((*el).second.isCompatible(
range)) {
164 allOuterBackward.insert(*el);
170 if ((*el).second.isCompatible(
range)) {
171 outerBackward.insert(*el);
177 MapE allOuterForward;
179 if ((*el).second.isCompatible(
range)) {
180 allOuterForward.insert(*el);
187 if ((*el).second.isCompatible(
range)) {
188 outerForward.insert(*el);
194 (*bl).first, outerBarrel, outerBackward, outerForward, allOuterBarrel, allOuterBackward, allOuterForward));
205 if (plusOne !=
layers.end() && (*plusOne).second.isCompatible(
range)) {
206 outerLayers.insert(*plusOne);
207 if (!
range.isInside((*plusOne).second)) {
209 MapEI tmpel(plusOne);
217 outerLayers.insert(*
l);
224 for (
MapEI iMEI = plusOne; iMEI !=
layers.end(); iMEI++) {
225 if ((*iMEI).second.isCompatible(
range))
226 allOuterLayers.insert(*iMEI);
241 typedef map<const DetLayer*, MapB, less<const DetLayer*> > BarrelMapType;
242 typedef map<const DetLayer*, MapE, less<const DetLayer*> > ForwardMapType;
245 BarrelMapType reachedBarrelLayersMap;
246 ForwardMapType reachedForwardLayersMap;
249 BarrelMapType compatibleBarrelLayersMap;
250 ForwardMapType compatibleForwardLayersMap;
257 for (
MapBI i = reacheableB.begin();
i != reacheableB.end();
i++) {
258 reachedBarrelLayersMap[(*i).first].insert(*bli);
261 for (
MapBI i = compatibleB.begin();
i != compatibleB.end();
i++) {
262 compatibleBarrelLayersMap[(*i).first].insert(*bli);
265 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++) {
266 reachedBarrelLayersMap[(*i).first].insert(*bli);
269 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++) {
270 reachedBarrelLayersMap[(*i).first].insert(*bli);
273 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++) {
274 compatibleBarrelLayersMap[(*i).first].insert(*bli);
277 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++) {
278 compatibleBarrelLayersMap[(*i).first].insert(*bli);
285 dynamic_cast<ETLNavigableLayer*>(
theAllNavigableLayer[((*eli).first)->seqNum()])->getOuterEndcapLayers();
286 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++) {
287 reachedForwardLayersMap[(*i).first].insert(*eli);
291 dynamic_cast<ETLNavigableLayer*>(
theAllNavigableLayer[((*eli).first)->seqNum()])->getAllOuterEndcapLayers();
292 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++) {
293 compatibleForwardLayersMap[(*i).first].insert(*eli);
300 dynamic_cast<ETLNavigableLayer*>(
theAllNavigableLayer[((*eli).first)->seqNum()])->getOuterEndcapLayers();
301 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++) {
302 reachedForwardLayersMap[(*i).first].insert(*eli);
306 dynamic_cast<ETLNavigableLayer*>(
theAllNavigableLayer[((*eli).first)->seqNum()])->getAllOuterEndcapLayers();
307 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++) {
308 compatibleForwardLayersMap[(*i).first].insert(*eli);
322 mfnl->
setInwardLinks(reachedBarrelLayersMap[(*eli).first], reachedForwardLayersMap[(*eli).first]);
330 mfnl->
setInwardLinks(reachedBarrelLayersMap[(*eli).first], reachedForwardLayersMap[(*eli).first]);