56 void buildAdditionalBarrelLinks();
98 LogTrace(
"CosmicNavigationSchool") <<
"*********Running CosmicNavigationSchool***********";
101 theTracker = theInputTracker;
103 theAllDetLayersInSystem = &theInputTracker->
allLayers();
104 theAllNavigableLayer.resize(theInputTracker->
allLayers().size(),
nullptr);
107 vector<BarrelDetLayer const*>
const& blc = theTracker->barrelLayers();
108 for (
auto i = blc.begin();
i != blc.end();
i++) {
115 theBarrelLayers.push_back((*
i));
119 vector<ForwardDetLayer const*>
const& flc = theTracker->forwardLayers();
120 for (
auto i = flc.begin();
i != flc.end();
i++) {
127 theForwardLayers.push_back((*
i));
131 find_if(theForwardLayers.begin(), theForwardLayers.end(), [](
auto const*
a) {
return a->position().z() >= 0.0; });
132 theLeftLayers =
FDLC(theForwardLayers.begin(), middle);
133 theRightLayers =
FDLC(middle, theForwardLayers.end());
138 linkBarrelLayers(symFinder);
139 linkForwardLayers(symFinder);
140 establishInverseRelations(symFinder);
147 const std::vector<const BarrelDetLayer*>& tobL = theInputTracker->
tobLayers();
150 LogDebug(
"CosmicNavigationSchool") <<
" adding all TOB self search.";
151 for (
auto lIt = tobL.begin(); lIt != tobL.end(); ++lIt)
152 dynamic_cast<SimpleNavigableLayer*>(theAllNavigableLayer[(*lIt)->seqNum()])->theSelfSearch =
true;
155 dynamic_cast<SimpleNavigableLayer*>(theAllNavigableLayer[tobL.front()->seqNum()]);
156 LogDebug(
"CosmicNavigationSchool") <<
" adding TOB1 to TOB1.";
160 const std::vector<const BarrelDetLayer*>& tibL = theInputTracker->
tibLayers();
163 LogDebug(
"CosmicNavigationSchool") <<
" adding all TIB self search.";
164 for (
auto lIt = tibL.begin(); lIt != tibL.end(); ++lIt)
165 dynamic_cast<SimpleNavigableLayer*>(theAllNavigableLayer[(*lIt)->seqNum()])->theSelfSearch =
true;
168 dynamic_cast<SimpleNavigableLayer*>(theAllNavigableLayer[tibL.front()->seqNum()]);
169 LogDebug(
"CosmicNavigationSchool") <<
" adding tib1 to tib1.";
173 const std::vector<const BarrelDetLayer*>& pxbL = theInputTracker->
pixelBarrelLayers();
176 LogDebug(
"CosmicNavigationSchool") <<
" adding all PXB self search.";
177 for (
auto lIt = pxbL.begin(); lIt != pxbL.end(); ++lIt)
178 dynamic_cast<SimpleNavigableLayer*>(theAllNavigableLayer[(*lIt)->seqNum()])->theSelfSearch =
true;
181 dynamic_cast<SimpleNavigableLayer*>(theAllNavigableLayer[pxbL.front()->seqNum()]);
182 LogDebug(
"CosmicNavigationSchool") <<
" adding pxb1 to pxb1.";
194 for (
BDLI i = theBarrelLayers.begin();
i != theBarrelLayers.end();
i++) {
200 if (
i + 1 != theBarrelLayers.end())
201 reachableBL.push_back(*(
i + 1));
204 if (
i != theBarrelLayers.end() - 1) {
205 linkNextForwardLayer(*
i, rightFL);
209 if (
i + 2 < theBarrelLayers.end()) {
210 linkNextLargerLayer(
i, theBarrelLayers.end(), reachableBL);
213 theBarrelNLC.push_back(
225 setState(navigableLayers());
229 typedef map<const DetLayer*, vector<const BarrelDetLayer*>, less<const DetLayer*> > BarrelMapType;
230 typedef map<const DetLayer*, vector<const ForwardDetLayer*>, less<const DetLayer*> > ForwardMapType;
232 BarrelMapType reachedBarrelLayersMap;
233 ForwardMapType reachedForwardLayersMap;
235 for (
auto bli : theBarrelLayers) {
236 auto reachedLC = nextLayers(*bli,
insideOut);
237 for (
auto i : reachedLC) {
238 reachedBarrelLayersMap[
i].push_back(bli);
242 for (
auto fli : theForwardLayers) {
243 auto reachedLC = nextLayers(*fli,
insideOut);
244 for (
auto i : reachedLC) {
245 reachedForwardLayersMap[
i].push_back(fli);
249 for (
auto nl : theAllNavigableLayer) {
252 auto navigableLayer = static_cast<SimpleNavigableLayer*>(nl);
253 auto dl = nl->detLayer();
254 navigableLayer->setInwardLinks(reachedBarrelLayersMap[dl], reachedForwardLayersMap[dl]);
258 buildAdditionalForwardLinks(symFinder);
262 for (
auto i = theBarrelLayers.begin();
i != theBarrelLayers.end();
i++) {
263 SimpleNavigableLayer* navigableLayer = dynamic_cast<SimpleNavigableLayer*>(theAllNavigableLayer[(*i)->seqNum()]);
264 if (
i + 1 != theBarrelLayers.end())
272 dynamic_cast<SimpleNavigableLayer*>(theAllNavigableLayer[theRightLayers.front()->seqNum()]);
274 dynamic_cast<SimpleNavigableLayer*>(theAllNavigableLayer[theLeftLayers.front()->seqNum()]);
276 firstL->setCheckCrossingSide(
false);
278 for (
auto i : theRightLayers) {
282 dynamic_cast<SimpleForwardNavigableLayer*>(theAllNavigableLayer[symFinder.
mirror(
i)->
seqNum()]);
283 for (
auto j : theBarrelLayers) {
284 if ((
i)->specificSurface().outerRadius() < (
j)->specificSurface().radius() &&
285 fabs((
i)->specificSurface().
position().z()) < (
j)->surface().bounds().length() / 2.) {
323 build(theInputTracker, field, conf);
348 magFieldToken_ =
cc.consumes();
349 geometricSearchTrackerToken_ =
cc.consumes();
368 &iRecord.
get(geometricSearchTrackerToken_), &iRecord.
get(magFieldToken_), config_));
374 desc.add<
bool>(
"noPXB");
375 desc.add<
bool>(
"noPXF");
376 desc.add<
bool>(
"noTIB");
377 desc.add<
bool>(
"noTID");
378 desc.add<
bool>(
"noTOB");
379 desc.add<
bool>(
"noTEC");
380 desc.add<
bool>(
"selfSearch");
381 desc.add<
bool>(
"allSelf");