47 LogTrace(
"CosmicNavigationSchool") <<
"*********Running CosmicNavigationSchool***********" ;
48 theBarrelLength = 0;theField = field; theTracker = theInputTracker;
50 theAllDetLayersInSystem=&theInputTracker->
allLayers();
53 vector<BarrelDetLayer*> blc = theTracker->barrelLayers();
54 for ( vector<BarrelDetLayer*>::iterator
i = blc.begin();
i != blc.end();
i++) {
58 theBarrelLayers.push_back( (*
i) );
62 vector<ForwardDetLayer*> flc = theTracker->forwardLayers();
63 for ( vector<ForwardDetLayer*>::iterator
i = flc.begin();
i != flc.end();
i++) {
67 theForwardLayers.push_back( (*
i) );
70 FDLI middle = find_if( theForwardLayers.begin(), theForwardLayers.end(),
72 theLeftLayers =
FDLC( theForwardLayers.begin(), middle);
73 theRightLayers =
FDLC( middle, theForwardLayers.end());
78 linkBarrelLayers( symFinder);
79 linkForwardLayers( symFinder);
80 establishInverseRelations( symFinder );
88 const std::vector< BarrelDetLayer * > & tobL = theInputTracker->
tobLayers();
91 LogDebug(
"CosmicNavigationSchool")<<
" adding all TOB self search.";
92 for (std::vector< BarrelDetLayer * >::const_iterator lIt = tobL.begin(); lIt!=tobL.end(); ++lIt)
93 dynamic_cast<SimpleNavigableLayer*>((*lIt)->navigableLayer())->theSelfSearch =
true;
96 LogDebug(
"CosmicNavigationSchool")<<
" adding TOB1 to TOB1.";
100 const std::vector< BarrelDetLayer * > & tibL = theInputTracker->
tibLayers();
103 LogDebug(
"CosmicNavigationSchool")<<
" adding all TIB self search.";
104 for (std::vector< BarrelDetLayer * >::const_iterator lIt = tibL.begin(); lIt!=tibL.end(); ++lIt)
105 dynamic_cast<SimpleNavigableLayer*>((*lIt)->navigableLayer())->theSelfSearch =
true;
108 LogDebug(
"CosmicNavigationSchool")<<
" adding tib1 to tib1.";
112 const std::vector< BarrelDetLayer * > & pxbL = theInputTracker->
pixelBarrelLayers();
115 LogDebug(
"CosmicNavigationSchool")<<
" adding all PXB self search.";
116 for (std::vector< BarrelDetLayer * >::const_iterator lIt = pxbL.begin(); lIt!=pxbL.end(); ++lIt)
117 dynamic_cast<SimpleNavigableLayer*>((*lIt)->navigableLayer())->theSelfSearch =
true;
120 LogDebug(
"CosmicNavigationSchool")<<
" adding pxb1 to pxb1.";
134 for (
BDLI i = theBarrelLayers.begin();
i != theBarrelLayers.end();
i++) {
140 if (
i+1 != theBarrelLayers.end()) reachableBL.push_back(*(
i+1));
143 if (
i != theBarrelLayers.end() - 1) {
144 linkNextForwardLayer( *
i, rightFL);
148 if (
i+2 < theBarrelLayers.end()) {
149 linkNextLargerLayer(
i, theBarrelLayers.end(), reachableBL);
152 theBarrelNLC.push_back(
new
154 symFinder.
mirror(rightFL),
155 rightFL,theField, 5.,
false));
169 typedef map<const DetLayer*, vector<BarrelDetLayer*>, less<const DetLayer*> > BarrelMapType;
170 typedef map<const DetLayer*, vector<ForwardDetLayer*>, less<const DetLayer*> > ForwardMapType;
173 BarrelMapType reachedBarrelLayersMap;
174 ForwardMapType reachedForwardLayersMap;
177 for (
BDLI bli = theBarrelLayers.begin();
178 bli!=theBarrelLayers.end(); bli++) {
180 for (
DLI i = reachedLC.begin();
i != reachedLC.end();
i++) {
181 reachedBarrelLayersMap[*
i].push_back( *bli);
185 for (
FDLI fli = theForwardLayers.begin();
186 fli!=theForwardLayers.end(); fli++) {
188 for (
DLI i = reachedLC.begin();
i != reachedLC.end();
i++) {
189 reachedForwardLayersMap[*
i].push_back( *fli);
194 vector<DetLayer*> lc = theTracker->allLayers();
195 for ( vector<DetLayer*>::iterator
i = lc.begin();
i != lc.end();
i++) {
198 navigableLayer->
setInwardLinks( reachedBarrelLayersMap[*
i],reachedForwardLayersMap[*i] );
201 buildAdditionalForwardLinks(symFinder);
207 for ( vector<BarrelDetLayer*>::iterator
i = theBarrelLayers.begin();
i != theBarrelLayers.end();
i++) {
222 for ( vector<ForwardDetLayer*>::iterator
i = theRightLayers.begin();
i != theRightLayers.end();
i++){
226 for (vector<BarrelDetLayer*>::iterator
j = theBarrelLayers.begin();
j != theBarrelLayers.end();
j++){
227 if ((*i)->specificSurface().outerRadius() < (*j)->specificSurface().radius() &&
228 fabs((*i)->specificSurface().position().z()) < (*j)->surface().bounds().length()/2.){
T getParameter(std::string const &) const
NavigableLayer * navigableLayer() const
Return the NavigableLayer associated with this DetLayer.
void linkBarrelLayers(SymmetricLayerFinder &symFinder)
void buildAdditionalBarrelLinks()
virtual void setAdditionalLink(DetLayer *, NavigationDirection direction=insideOut)
virtual void setInwardLinks(const BDLC &, const FDLC &, TkLayerLess sorter=TkLayerLess(outsideIn))=0
std::vector< ForwardDetLayer * > FDLC
std::vector< const DetLayer * > DLC
virtual void establishInverseRelations()
std::vector< DetLayer * > const & allLayers() const
virtual void setAdditionalLink(DetLayer *, NavigationDirection direction=insideOut)=0
void build(const GeometricSearchTracker *theTracker, const MagneticField *field, const CosmicNavigationSchoolConfiguration conf)
void setCheckCrossingSide(bool docheck)
std::vector< BarrelDetLayer * > const & tibLayers() const
CosmicNavigationSchoolConfiguration()
std::vector< BarrelDetLayer * > BDLC
void buildAdditionalForwardLinks(SymmetricLayerFinder &symFinder)
std::vector< BarrelDetLayer * > const & tobLayers() const
std::vector< BarrelDetLayer * > const & pixelBarrelLayers() const
ForwardDetLayer * mirror(const ForwardDetLayer *layer)