45 LogTrace(
"CosmicNavigationSchool") <<
"*********Running CosmicNavigationSchool***********" ;
46 theBarrelLength = 0;theField = field; theTracker = theInputTracker;
48 theAllDetLayersInSystem=&theInputTracker->
allLayers();
49 theAllNavigableLayer.resize(theInputTracker->
allLayers().size(),
nullptr);
55 vector<BarrelDetLayer const*>
const& blc = theTracker->barrelLayers();
56 for (
auto i = blc.begin();
i != blc.end();
i++) {
60 theBarrelLayers.push_back( (*
i) );
64 vector<ForwardDetLayer const*>
const& flc = theTracker->forwardLayers();
65 for (
auto i = flc.begin();
i != flc.end();
i++) {
69 theForwardLayers.push_back( (*
i) );
72 FDLI middle = find_if( theForwardLayers.begin(), theForwardLayers.end(),
74 theLeftLayers =
FDLC( theForwardLayers.begin(), middle);
75 theRightLayers =
FDLC( middle, theForwardLayers.end());
80 linkBarrelLayers( symFinder);
81 linkForwardLayers( symFinder);
82 establishInverseRelations( symFinder );
90 const std::vector< const BarrelDetLayer * > & tobL = theInputTracker->
tobLayers();
93 LogDebug(
"CosmicNavigationSchool")<<
" adding all TOB self search.";
94 for (
auto lIt = tobL.begin(); lIt!=tobL.end(); ++lIt)
95 dynamic_cast<SimpleNavigableLayer*>(theAllNavigableLayer[(*lIt)->seqNum()])->theSelfSearch =
true;
99 LogDebug(
"CosmicNavigationSchool")<<
" adding TOB1 to TOB1.";
103 const std::vector< const BarrelDetLayer * > & tibL = theInputTracker->
tibLayers();
106 LogDebug(
"CosmicNavigationSchool")<<
" adding all TIB self search.";
107 for (
auto lIt = tibL.begin(); lIt!=tibL.end(); ++lIt)
108 dynamic_cast<SimpleNavigableLayer*>(theAllNavigableLayer[(*lIt)->seqNum()])->theSelfSearch =
true;
112 LogDebug(
"CosmicNavigationSchool")<<
" adding tib1 to tib1.";
116 const std::vector< const BarrelDetLayer * > & pxbL = theInputTracker->
pixelBarrelLayers();
119 LogDebug(
"CosmicNavigationSchool")<<
" adding all PXB self search.";
120 for (
auto lIt = pxbL.begin(); lIt!=pxbL.end(); ++lIt)
121 dynamic_cast<SimpleNavigableLayer*>(theAllNavigableLayer[(*lIt)->seqNum()])->theSelfSearch =
true;
125 LogDebug(
"CosmicNavigationSchool")<<
" adding pxb1 to pxb1.";
139 for (
BDLI i = theBarrelLayers.begin();
i != theBarrelLayers.end();
i++) {
145 if (
i+1 != theBarrelLayers.end()) reachableBL.push_back(*(
i+1));
148 if (
i != theBarrelLayers.end() - 1) {
149 linkNextForwardLayer( *
i, rightFL);
153 if (
i+2 < theBarrelLayers.end()) {
154 linkNextLargerLayer(
i, theBarrelLayers.end(), reachableBL);
157 theBarrelNLC.push_back(
new
159 symFinder.
mirror(rightFL),
160 rightFL,theField, 5.,
false));
173 setState(navigableLayers());
178 typedef map<const DetLayer*, vector<const BarrelDetLayer*>, less<const DetLayer*> > BarrelMapType;
179 typedef map<const DetLayer*, vector<const ForwardDetLayer*>, less<const DetLayer*> > ForwardMapType;
182 BarrelMapType reachedBarrelLayersMap;
183 ForwardMapType reachedForwardLayersMap;
185 for (
auto bli : theBarrelLayers) {
186 auto reachedLC = nextLayers(*bli,
insideOut);
187 for (
auto i : reachedLC) {
188 reachedBarrelLayersMap[
i].push_back(bli);
192 for (
auto fli : theForwardLayers) {
193 auto reachedLC = nextLayers(*fli,
insideOut);
194 for (
auto i : reachedLC) {
195 reachedForwardLayersMap[
i].push_back(fli);
199 for(
auto nl : theAllNavigableLayer) {
203 navigableLayer->setInwardLinks( reachedBarrelLayersMap[dl],reachedForwardLayersMap[dl] );
207 buildAdditionalForwardLinks(symFinder);
213 for (
auto i = theBarrelLayers.begin();
i != theBarrelLayers.end();
i++) {
230 for (
auto i : theRightLayers){
236 for (
auto j : theBarrelLayers) {
237 if ((
i)->specificSurface().outerRadius() < (
j)->specificSurface().radius() &&
238 fabs((
i)->specificSurface().
position().
z()) < (
j)->surface().bounds().length()/2.){
T getParameter(std::string const &) const
void linkBarrelLayers(SymmetricLayerFinder &symFinder)
std::vector< DetLayer const * > const & allLayers() const
void buildAdditionalBarrelLinks()
std::vector< const BarrelDetLayer * > BDLC
virtual DetLayer const * detLayer() const =0
std::vector< BarrelDetLayer const * > const & tobLayers() const
const ForwardDetLayer * mirror(const ForwardDetLayer *layer)
std::vector< BarrelDetLayer const * > const & pixelBarrelLayers() const
virtual void establishInverseRelations()
std::vector< const ForwardDetLayer * > FDLC
std::vector< BarrelDetLayer const * > const & tibLayers() const
void build(const GeometricSearchTracker *theTracker, const MagneticField *field, const CosmicNavigationSchoolConfiguration conf)
virtual void setAdditionalLink(const DetLayer *, NavigationDirection direction=insideOut)=0
void setCheckCrossingSide(bool docheck)
static int position[264][3]
CosmicNavigationSchoolConfiguration()
virtual void setAdditionalLink(const DetLayer *, NavigationDirection direction=insideOut) override
void buildAdditionalForwardLinks(SymmetricLayerFinder &symFinder)