49 void buildAdditionalBarrelLinks();
95 LogTrace(
"CosmicNavigationSchool") <<
"*********Running CosmicNavigationSchool***********" ;
96 theBarrelLength = 0;theField = field; theTracker = theInputTracker;
98 theAllDetLayersInSystem=&theInputTracker->
allLayers();
99 theAllNavigableLayer.resize(theInputTracker->
allLayers().size(),
nullptr);
105 vector<BarrelDetLayer const*>
const& blc = theTracker->barrelLayers();
106 for (
auto i = blc.begin();
i != blc.end();
i++) {
110 theBarrelLayers.push_back( (*
i) );
114 vector<ForwardDetLayer const*>
const& flc = theTracker->forwardLayers();
115 for (
auto i = flc.begin();
i != flc.end();
i++) {
119 theForwardLayers.push_back( (*
i) );
122 FDLI middle = find_if( theForwardLayers.begin(), theForwardLayers.end(),
124 theLeftLayers =
FDLC( theForwardLayers.begin(), middle);
125 theRightLayers =
FDLC( middle, theForwardLayers.end());
130 linkBarrelLayers( symFinder);
131 linkForwardLayers( symFinder);
132 establishInverseRelations( symFinder );
140 const std::vector< const BarrelDetLayer * > & tobL = theInputTracker->
tobLayers();
143 LogDebug(
"CosmicNavigationSchool")<<
" adding all TOB self search.";
144 for (
auto lIt = tobL.begin(); lIt!=tobL.end(); ++lIt)
145 dynamic_cast<SimpleNavigableLayer*>(theAllNavigableLayer[(*lIt)->seqNum()])->theSelfSearch =
true;
149 LogDebug(
"CosmicNavigationSchool")<<
" adding TOB1 to TOB1.";
153 const std::vector< const BarrelDetLayer * > & tibL = theInputTracker->
tibLayers();
156 LogDebug(
"CosmicNavigationSchool")<<
" adding all TIB self search.";
157 for (
auto lIt = tibL.begin(); lIt!=tibL.end(); ++lIt)
158 dynamic_cast<SimpleNavigableLayer*>(theAllNavigableLayer[(*lIt)->seqNum()])->theSelfSearch =
true;
162 LogDebug(
"CosmicNavigationSchool")<<
" adding tib1 to tib1.";
166 const std::vector< const BarrelDetLayer * > & pxbL = theInputTracker->
pixelBarrelLayers();
169 LogDebug(
"CosmicNavigationSchool")<<
" adding all PXB self search.";
170 for (
auto lIt = pxbL.begin(); lIt!=pxbL.end(); ++lIt)
171 dynamic_cast<SimpleNavigableLayer*>(theAllNavigableLayer[(*lIt)->seqNum()])->theSelfSearch =
true;
175 LogDebug(
"CosmicNavigationSchool")<<
" adding pxb1 to pxb1.";
189 for (
BDLI i = theBarrelLayers.begin();
i != theBarrelLayers.end();
i++) {
195 if (
i+1 != theBarrelLayers.end()) reachableBL.push_back(*(
i+1));
198 if (
i != theBarrelLayers.end() - 1) {
199 linkNextForwardLayer( *
i, rightFL);
203 if (
i+2 < theBarrelLayers.end()) {
204 linkNextLargerLayer(
i, theBarrelLayers.end(), reachableBL);
207 theBarrelNLC.push_back(
new 209 symFinder.
mirror(rightFL),
210 rightFL,theField, 5.,
false));
222 setState(navigableLayers());
227 typedef map<const DetLayer*, vector<const BarrelDetLayer*>, less<const DetLayer*> > BarrelMapType;
228 typedef map<const DetLayer*, vector<const ForwardDetLayer*>, less<const DetLayer*> > ForwardMapType;
231 BarrelMapType reachedBarrelLayersMap;
232 ForwardMapType reachedForwardLayersMap;
234 for (
auto bli : theBarrelLayers) {
235 auto reachedLC = nextLayers(*bli,
insideOut);
236 for (
auto i : reachedLC) {
237 reachedBarrelLayersMap[
i].push_back(bli);
241 for (
auto fli : theForwardLayers) {
242 auto reachedLC = nextLayers(*fli,
insideOut);
243 for (
auto i : reachedLC) {
244 reachedForwardLayersMap[
i].push_back(fli);
248 for(
auto nl : theAllNavigableLayer) {
252 navigableLayer->setInwardLinks( reachedBarrelLayersMap[dl],reachedForwardLayersMap[dl] );
256 buildAdditionalForwardLinks(symFinder);
262 for (
auto i = theBarrelLayers.begin();
i != theBarrelLayers.end();
i++) {
279 for (
auto i : theRightLayers){
285 for (
auto j : theBarrelLayers) {
286 if ((
i)->specificSurface().outerRadius() < (j)->specificSurface().radius() &&
287 fabs((
i)->specificSurface().
position().
z()) < (j)->surface().bounds().length()/2.){
331 build(theInputTracker, field, conf);
356 theNavigationPSet = iConfig;
360 setWhatProduced(
this, theNavigationSchoolName);
377 std::unique_ptr<NavigationSchool> theNavigationSchool ;
390 return theNavigationSchool;
T getParameter(std::string const &) const
std::string theNavigationSchoolName
void linkBarrelLayers(SymmetricLayerFinder &symFinder) override
~SkippingLayerCosmicNavigationSchool() override
std::unique_ptr< NavigationSchool > ReturnType
std::vector< DetLayer const * > const & allLayers() const
void buildAdditionalBarrelLinks()
std::vector< const BarrelDetLayer * > BDLC
SkippingLayerCosmicNavigationSchool(const GeometricSearchTracker *theTracker, const MagneticField *field, const CosmicNavigationSchoolConfiguration conf)
std::vector< BarrelDetLayer const * > const & tobLayers() const
~CosmicNavigationSchool() override
const ForwardDetLayer * mirror(const ForwardDetLayer *layer)
SkippingLayerCosmicNavigationSchoolESProducer(const edm::ParameterSet &iConfig)
const DepRecordT getRecord() const
~SkippingLayerCosmicNavigationSchoolESProducer() override
std::vector< BarrelDetLayer const * > const & pixelBarrelLayers() const
virtual void establishInverseRelations()
std::vector< const ForwardDetLayer * > FDLC
std::vector< BarrelDetLayer const * > const & tibLayers() const
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
void build(const GeometricSearchTracker *theTracker, const MagneticField *field, const CosmicNavigationSchoolConfiguration conf)
virtual void setAdditionalLink(const DetLayer *, NavigationDirection direction=insideOut)=0
void setCheckCrossingSide(bool docheck)
virtual DetLayer const * detLayer() const =0
static int position[264][3]
CosmicNavigationSchoolConfiguration()
edm::ParameterSet theNavigationPSet
#define DEFINE_EDM_PLUGIN(factory, type, name)
ReturnType produce(const NavigationSchoolRecord &)
void setAdditionalLink(const DetLayer *, NavigationDirection direction=insideOut) override
T const * product() const
void buildAdditionalForwardLinks(SymmetricLayerFinder &symFinder)
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)