CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
SimpleNavigationSchool Class Reference

#include <SimpleNavigationSchool.h>

Inheritance diagram for SimpleNavigationSchool:
TkNavigationSchool NavigationSchool BeamHaloNavigationSchool CosmicNavigationSchool SkippingLayerCosmicNavigationSchool

Public Member Functions

StateType navigableLayers () override
 
 SimpleNavigationSchool ()
 
 SimpleNavigationSchool (const GeometricSearchTracker *tracker, const MagneticField *field)
 
 ~SimpleNavigationSchool () override
 
- Public Member Functions inherited from TkNavigationSchool
const MagneticFieldfield () const
 
const GeometricSearchTrackersearchTracker () const
 
 TkNavigationSchool (const GeometricSearchTracker *tracker, const MagneticField *field)
 
- Public Member Functions inherited from NavigationSchool
const std::vector< const DetLayer * > & allLayersInSystem () const
 
template<typename... Args>
std::vector< const DetLayer * > compatibleLayers (const DetLayer &detLayer, Args &&...args) const
 Returns all layers compatible. More...
 
 NavigationSchool ()
 
template<typename... Args>
std::vector< const DetLayer * > nextLayers (const DetLayer &detLayer, Args &&...args) const
 NavigationDirection. More...
 
virtual ~NavigationSchool ()
 

Protected Types

typedef std::vector< const BarrelDetLayer * > BDLC
 
typedef BDLC::iterator BDLI
 
typedef std::vector< SimpleBarrelNavigableLayer * > BNLCType
 
typedef BDLC::const_iterator ConstBDLI
 
typedef FDLC::const_iterator ConstFDLI
 
typedef std::vector< const DetLayer * > DLC
 
typedef DLC::iterator DLI
 
typedef std::vector< const ForwardDetLayer * > FDLC
 
typedef FDLC::iterator FDLI
 
typedef std::vector< SimpleForwardNavigableLayer * > FNLCType
 

Protected Member Functions

virtual float barrelLength ()
 
void cleanMemory ()
 
virtual void establishInverseRelations ()
 
virtual void linkBarrelLayers (SymmetricLayerFinder &symFinder)
 
virtual void linkForwardLayers (SymmetricLayerFinder &symFinder)
 
virtual void linkNextBarrelLayer (ForwardDetLayer const *fl, BDLC &)
 
virtual void linkNextForwardLayer (BarrelDetLayer const *, FDLC &)
 
virtual void linkNextLargerLayer (BDLI, BDLI, BDLC &)
 
virtual void linkNextLayerInGroup (FDLI fli, const FDLC &group, FDLC &reachableFL)
 
virtual void linkOuterGroup (ForwardDetLayer const *fl, const FDLC &group, FDLC &reachableFL)
 
virtual void linkWithinGroup (FDLI fl, const FDLC &group, FDLC &reachableFL)
 
virtual ConstFDLI outerRadiusIncrease (FDLI fl, const FDLC &group)
 
virtual std::vector< FDLCsplitForwardLayers ()
 
- Protected Member Functions inherited from NavigationSchool
void setState (const StateType &state)
 

Protected Attributes

BDLC theBarrelLayers
 
float theBarrelLength =0
 
BNLCType theBarrelNLC
 
FDLC theForwardLayers
 
FNLCType theForwardNLC
 
FDLC theLeftLayers
 
FDLC theRightLayers
 
- Protected Attributes inherited from TkNavigationSchool
const MagneticFieldtheField
 
const GeometricSearchTrackertheTracker
 
- Protected Attributes inherited from NavigationSchool
const std::vector< const DetLayer * > * theAllDetLayersInSystem
 
StateType theAllNavigableLayer
 

Private Member Functions

void init ()
 

Additional Inherited Members

- Public Types inherited from NavigationSchool
typedef std::vector< NavigableLayer * > StateType
 

Detailed Description

Concrete navigation school for the Tracker

Definition at line 18 of file SimpleNavigationSchool.h.

Member Typedef Documentation

typedef std::vector<const BarrelDetLayer*> SimpleNavigationSchool::BDLC
protected

Definition at line 33 of file SimpleNavigationSchool.h.

typedef BDLC::iterator SimpleNavigationSchool::BDLI
protected

Definition at line 36 of file SimpleNavigationSchool.h.

Definition at line 47 of file SimpleNavigationSchool.h.

typedef BDLC::const_iterator SimpleNavigationSchool::ConstBDLI
protected

Definition at line 38 of file SimpleNavigationSchool.h.

typedef FDLC::const_iterator SimpleNavigationSchool::ConstFDLI
protected

Definition at line 39 of file SimpleNavigationSchool.h.

typedef std::vector<const DetLayer*> SimpleNavigationSchool::DLC
protected

Definition at line 32 of file SimpleNavigationSchool.h.

typedef DLC::iterator SimpleNavigationSchool::DLI
protected

Definition at line 35 of file SimpleNavigationSchool.h.

typedef std::vector<const ForwardDetLayer*> SimpleNavigationSchool::FDLC
protected

Definition at line 34 of file SimpleNavigationSchool.h.

typedef FDLC::iterator SimpleNavigationSchool::FDLI
protected

Definition at line 37 of file SimpleNavigationSchool.h.

Definition at line 48 of file SimpleNavigationSchool.h.

Constructor & Destructor Documentation

SimpleNavigationSchool::SimpleNavigationSchool ( )
inline

Definition at line 21 of file SimpleNavigationSchool.h.

21 : TkNavigationSchool(nullptr,nullptr){}
TkNavigationSchool(const GeometricSearchTracker *tracker, const MagneticField *field)
SimpleNavigationSchool::SimpleNavigationSchool ( const GeometricSearchTracker tracker,
const MagneticField field 
)
inline

Definition at line 22 of file SimpleNavigationSchool.h.

References init.

23  :
24  TkNavigationSchool(tracker,field) {init();}
TkNavigationSchool(const GeometricSearchTracker *tracker, const MagneticField *field)
SimpleNavigationSchool::~SimpleNavigationSchool ( )
inlineoverride

Member Function Documentation

float SimpleNavigationSchool::barrelLength ( )
protectedvirtual

Definition at line 363 of file SimpleNavigationSchool.cc.

References mps_fire::i, LogDebug, and SiStripPI::max.

364 {
365  if ( theBarrelLength < 1.) {
366  for (BDLI i=theBarrelLayers.begin(); i!=theBarrelLayers.end(); i++) {
368  (**i).surface().bounds().length() / 2.f);
369  }
370 
371  LogDebug("TkNavigation") << "The barrel length is " << theBarrelLength ;
372  }
373  return theBarrelLength;
374 }
#define LogDebug(id)
void SimpleNavigationSchool::cleanMemory ( )
protected

Definition at line 59 of file SimpleNavigationSchool.cc.

References cuy::ib.

Referenced by BeamHaloNavigationSchool::~BeamHaloNavigationSchool(), and CosmicNavigationSchool::~CosmicNavigationSchool().

59  {
60  // free the memory allocated to the SimpleNavigableLayers
61  for ( vector< SimpleBarrelNavigableLayer*>::const_iterator
62  ib = theBarrelNLC.begin(); ib != theBarrelNLC.end(); ib++) {
63  delete (*ib);
64  }
65  theBarrelNLC.clear();
66  for ( vector< SimpleForwardNavigableLayer*>::const_iterator
67  ifl = theForwardNLC.begin(); ifl != theForwardNLC.end(); ifl++) {
68  delete (*ifl);
69  }
70  theForwardNLC.clear();
71 }
ib
Definition: cuy.py:662
void SimpleNavigationSchool::establishInverseRelations ( )
protectedvirtual

Reimplemented in BeamHaloNavigationSchool.

Definition at line 376 of file SimpleNavigationSchool.cc.

References DEFINE_EDM_PLUGIN, NavigableLayer::detLayer(), mps_fire::i, and insideOut.

Referenced by CosmicNavigationSchool::CosmicNavigationSchool(), and BeamHaloNavigationSchool::~BeamHaloNavigationSchool().

376  {
377 
378  // NavigationSetter setter(*this);
379 
381 
382  // find for each layer which are the barrel and forward
383  // layers that point to it
384  typedef map<const DetLayer*, vector<const BarrelDetLayer*>, less<const DetLayer*> > BarrelMapType;
385  typedef map<const DetLayer*, vector<const ForwardDetLayer*>, less<const DetLayer*> > ForwardMapType;
386 
387 
388  BarrelMapType reachedBarrelLayersMap;
389  ForwardMapType reachedForwardLayersMap;
390 
391 
392  for ( auto bli : theBarrelLayers) {
393  auto reachedLC = nextLayers(*bli, insideOut);
394  for ( auto i : reachedLC) {
395  reachedBarrelLayersMap[i].push_back(bli);
396  }
397  }
398 
399  for ( auto fli : theForwardLayers) {
400  auto reachedLC = nextLayers(*fli, insideOut);
401  for ( auto i : reachedLC) {
402  reachedForwardLayersMap[i].push_back(fli);
403  }
404  }
405 
406  /*
407  vector<DetLayer*> lc = theTracker->allLayers();
408  for ( vector<DetLayer*>::iterator i = lc.begin(); i != lc.end(); i++) {
409  SimpleNavigableLayer* navigableLayer =
410  dynamic_cast<SimpleNavigableLayer*>((**i).navigableLayer());
411  navigableLayer->setInwardLinks( reachedBarrelLayersMap[*i],reachedForwardLayersMap[*i] );
412  }
413  */
414 
415 
416  for(auto nl : theAllNavigableLayer) {
417  if (!nl) continue;
418  auto navigableLayer = static_cast<SimpleNavigableLayer*>(nl);
419  auto dl = nl->detLayer();
420  navigableLayer->setInwardLinks( reachedBarrelLayersMap[dl],reachedForwardLayersMap[dl] );
421  }
422 
423 
424 }
StateType navigableLayers() override
StateType theAllNavigableLayer
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&...args) const
NavigationDirection.
virtual DetLayer const * detLayer() const =0
void setState(const StateType &state)
void SimpleNavigationSchool::init ( void  )
private

Definition at line 29 of file SimpleNavigationSchool.cc.

References mps_fire::i.

30 {
31 
33  theAllNavigableLayer.resize(theTracker->allLayers().size(),nullptr);
34 
35 
36  // Get barrel layers
37  for( auto i : theTracker->barrelLayers()) {
38  theBarrelLayers.push_back( i );
39  }
40 
41  // get forward layers
42  for( auto i : theTracker->forwardLayers()) {
43  theForwardLayers.push_back( i );
44  }
45 
46  FDLI middle = find_if( theForwardLayers.begin(), theForwardLayers.end(),
47  not1(DetBelowZ(0)));
48  theLeftLayers = FDLC( theForwardLayers.begin(), middle);
49  theRightLayers = FDLC( middle, theForwardLayers.end());
50 
52 
53  // only work on positive Z side; negative by mirror symmetry later
54  linkBarrelLayers( symFinder);
55  linkForwardLayers( symFinder);
57 }
std::vector< DetLayer const * > const & allLayers() const
std::vector< ForwardDetLayer const * > const & forwardLayers() const
StateType theAllNavigableLayer
virtual void linkForwardLayers(SymmetricLayerFinder &symFinder)
virtual void establishInverseRelations()
std::vector< const ForwardDetLayer * > FDLC
const std::vector< const DetLayer * > * theAllDetLayersInSystem
virtual void linkBarrelLayers(SymmetricLayerFinder &symFinder)
const GeometricSearchTracker * theTracker
std::vector< BarrelDetLayer const * > const & barrelLayers() const
void SimpleNavigationSchool::linkBarrelLayers ( SymmetricLayerFinder symFinder)
protectedvirtual

Reimplemented in CosmicNavigationSchool.

Definition at line 89 of file SimpleNavigationSchool.cc.

References mps_fire::i, and SymmetricLayerFinder::mirror().

Referenced by navigableLayers().

90 {
91  // Link barrel layers outwards
92  for ( BDLI i = theBarrelLayers.begin(); i != theBarrelLayers.end(); i++) {
93  BDLC reachableBL;
94  FDLC leftFL;
95  FDLC rightFL;
96 
97  // always add next barrel layer first
98  if ( i+1 != theBarrelLayers.end()) reachableBL.push_back(*(i+1));
99 
100  // Add closest reachable forward layer (except for last BarrelLayer)
101  if (i != theBarrelLayers.end() - 1) {
102  linkNextForwardLayer( *i, rightFL);
103  }
104 
105  // Add next BarrelLayer with length larger than the current BL
106  if ( i+2 < theBarrelLayers.end()) {
107  linkNextLargerLayer( i, theBarrelLayers.end(), reachableBL);
108  }
109 
110  theBarrelNLC.push_back( new
111  SimpleBarrelNavigableLayer( *i, reachableBL,
112  symFinder.mirror(rightFL),
113  rightFL,theField, 5.));
114  }
115 }
std::vector< const BarrelDetLayer * > BDLC
const ForwardDetLayer * mirror(const ForwardDetLayer *layer)
std::vector< const ForwardDetLayer * > FDLC
virtual void linkNextLargerLayer(BDLI, BDLI, BDLC &)
virtual void linkNextForwardLayer(BarrelDetLayer const *, FDLC &)
const MagneticField * theField
void SimpleNavigationSchool::linkForwardLayers ( SymmetricLayerFinder symFinder)
protectedvirtual

Definition at line 156 of file SimpleNavigationSchool.cc.

References g, edmIntegrityCheck::group, mps_fire::i, LogDebug, and SymmetricLayerFinder::mirror().

Referenced by linkNextLargerLayer().

157 {
158 
159  // handle right side first, groups are only on the right
160  vector<FDLC> groups = splitForwardLayers();
161 
162  LogDebug("TkNavigation") << "SimpleNavigationSchool, Forward groups size = " << groups.size() ;
163  for (vector<FDLC>::iterator g = groups.begin(); g != groups.end(); g++) {
164  LogDebug("TkNavigation") << "group " << g - groups.begin() << " has "
165  << g->size() << " layers " ;
166  }
167 
168  for ( vector<FDLC>::iterator group = groups.begin();
169  group != groups.end(); group++) {
170 
171  for ( FDLI i = group->begin(); i != group->end(); i++) {
172 
173  BDLC reachableBL;
174  FDLC reachableFL;
175 
176  // Always connect to next barrel layer first, if exists
177  linkNextBarrelLayer( *i, reachableBL);
178 
179  // Then always connect to next forward layer of "same" size,
180  // and layers of larger inner Radius
181  linkNextLayerInGroup( i, *group, reachableFL);
182 
183  // Then connect to next N fw layers of next size
184  if ( group+1 != groups.end()) {
185  linkOuterGroup( *i, *(group+1), reachableFL);
186  }
187 
188  // or connect within the group if outer radius increases
189  linkWithinGroup( i, *group, reachableFL);
190 
191  theForwardNLC.push_back( new SimpleForwardNavigableLayer( *i,reachableBL,
192  reachableFL,
193  theField,
194  5.));
195  theForwardNLC.push_back( new SimpleForwardNavigableLayer( symFinder.mirror(*i),
196  reachableBL,
197  symFinder.mirror(reachableFL),
198  theField,
199  5.));
200 
201  }
202  }
203 
204 // // now the left side by symmetry
205 // for ( FDLI ileft = theLeftLayers.begin();
206 // ileft != theLeftLayers.end(); ileft++) {
207 // ForwardDetLayer* right = symFinder.mirror( *ileft);
208 
209 // theForwardNLC.push_back( new
210 // SimpleForwardNavigableLayer( *ileft , right->nextBarrelLayers(),
211 // symFinder.mirror(right->nextForwardLayers())));
212 // }
213 }
#define LogDebug(id)
std::vector< const BarrelDetLayer * > BDLC
virtual void linkNextBarrelLayer(ForwardDetLayer const *fl, BDLC &)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
const ForwardDetLayer * mirror(const ForwardDetLayer *layer)
virtual void linkNextLayerInGroup(FDLI fli, const FDLC &group, FDLC &reachableFL)
virtual void linkWithinGroup(FDLI fl, const FDLC &group, FDLC &reachableFL)
std::vector< const ForwardDetLayer * > FDLC
virtual std::vector< FDLC > splitForwardLayers()
virtual void linkOuterGroup(ForwardDetLayer const *fl, const FDLC &group, FDLC &reachableFL)
const MagneticField * theField
void SimpleNavigationSchool::linkNextBarrelLayer ( ForwardDetLayer const *  fl,
BDLC  
)
protectedvirtual

Definition at line 215 of file SimpleNavigationSchool.cc.

References interestingEgammaIsoDetIdsSequence_cff::outerRadius, GeometricSearchDet::position(), ForwardDetLayer::specificSurface(), and PV3DBase< T, PVType, FrameType >::z().

217 {
218  if ( fl->position().z() > barrelLength()) return;
219 
220  float outerRadius = fl->specificSurface().outerRadius();
221  float zpos = fl->position().z();
222  for ( BDLI bli = theBarrelLayers.begin(); bli != theBarrelLayers.end(); bli++) {
223  if ( outerRadius < (**bli).specificSurface().radius() &&
224  zpos < (**bli).surface().bounds().length() / 2.) {
225  reachableBL.push_back( *bli);
226  return;
227  }
228  }
229 }
void SimpleNavigationSchool::linkNextForwardLayer ( BarrelDetLayer const *  ,
FDLC  
)
protectedvirtual

Definition at line 117 of file SimpleNavigationSchool.cc.

References Surface::bounds(), Bounds::length(), TCMET_cfi::radius, BarrelDetLayer::specificSurface(), and BarrelDetLayer::surface().

119 {
120  // find first forward layer with larger Z and larger outer radius
121  float length = bl->surface().bounds().length() / 2.;
122  float radius = bl->specificSurface().radius();
123  for ( FDLI fli = theRightLayers.begin();
124  fli != theRightLayers.end(); fli++) {
125  if ( length < (**fli).position().z() &&
126  radius < (**fli).specificSurface().outerRadius()) {
127  //search if there are any sovrapposition between forward layers
128  for ( FDLI fliNext = fli; fliNext != theRightLayers.end(); fliNext++) {
129  if ( (**fliNext).position().z() < (**fli).position().z() && (**fliNext).specificSurface().innerRadius() < (**fli).specificSurface().outerRadius()) {
130  rightFL.push_back( *fliNext);
131  return;
132  }
133  }
134  rightFL.push_back( *fli);
135  return;
136  }
137  }
138 }
void SimpleNavigationSchool::linkNextLargerLayer ( BDLI  bli,
BDLI  end,
BDLC reachableBL 
)
protectedvirtual

Definition at line 140 of file SimpleNavigationSchool.cc.

References end, geometryDiff::epsilon, mps_fire::i, and linkForwardLayers().

142 {
143  // compare length of next layer with length of following ones
144  float length = (**(bli+1)).surface().bounds().length();
145  float epsilon = 0.1;
146 
147  for ( BDLI i = bli+2; i < end; i++) {
148  if ( length + epsilon < (**i).surface().bounds().length()) {
149  reachableBL.push_back( *i);
150  return;
151  }
152  }
153 }
#define end
Definition: vmac.h:39
void SimpleNavigationSchool::linkNextLayerInGroup ( FDLI  fli,
const FDLC group,
FDLC reachableFL 
)
protectedvirtual

Definition at line 232 of file SimpleNavigationSchool.cc.

References geometryDiff::epsilon, and mps_fire::i.

235 {
236  // Always connect to next forward layer of "same" size, if exists
237  if ( fli+1 != group.end()) {
238  reachableFL.push_back( *(fli+1));
239  // If that layer has an inner radius larger then the current one
240  // also connect ALL next disks of same radius.
241  float innerRThis = (**fli).specificSurface().innerRadius();
242  float innerRNext = (**(fli+1)).specificSurface().innerRadius();
243  const float epsilon = 2.f;
244 
245  if (innerRNext > innerRThis + epsilon) {
246  // next disk is smaller, so it doesn't cover fully subsequent ones
247  // of same radius
248 
249  int i = 2;
250  while ( (fli+i) != group.end()) {
251  if ( (**(fli+i)).specificSurface().innerRadius() <
252  innerRNext + epsilon) {
253  // following disk has not increased in ineer radius
254  reachableFL.push_back( *(fli+i));
255  i++;
256  } else {
257  break;
258  }
259  }
260  }
261  }
262 }
void SimpleNavigationSchool::linkOuterGroup ( ForwardDetLayer const *  fl,
const FDLC group,
FDLC reachableFL 
)
protectedvirtual

Definition at line 265 of file SimpleNavigationSchool.cc.

References plotBeamSpotDB::first, plotBeamSpotDB::last, min(), GeometricSearchDet::position(), and PV3DBase< T, PVType, FrameType >::z().

268 {
269 
270  // insert N layers with Z grater than fl
271 
272  ConstFDLI first = find_if( group.begin(), group.end(),
273  not1( DetBelowZ( fl->position().z())));
274  if ( first != group.end()) {
275 
276  // Hard-wired constant!!!!!!
277  ConstFDLI last = min( first + 7, group.end());
278 
279  reachableFL.insert( reachableFL.end(), first, last);
280  }
281 }
FDLC::const_iterator ConstFDLI
T min(T a, T b)
Definition: MathUtil.h:58
void SimpleNavigationSchool::linkWithinGroup ( FDLI  fl,
const FDLC group,
FDLC reachableFL 
)
protectedvirtual

Definition at line 283 of file SimpleNavigationSchool.cc.

286 {
287  ConstFDLI biggerLayer = outerRadiusIncrease( fl, group);
288  if ( biggerLayer != group.end() && biggerLayer != fl+1) {
289  reachableFL.push_back( *biggerLayer);
290  }
291 }
FDLC::const_iterator ConstFDLI
virtual ConstFDLI outerRadiusIncrease(FDLI fl, const FDLC &group)
SimpleNavigationSchool::StateType SimpleNavigationSchool::navigableLayers ( )
overridevirtual

Implements NavigationSchool.

Definition at line 74 of file SimpleNavigationSchool.cc.

References cuy::ib, linkBarrelLayers(), and mps_fire::result.

75 {
77  for ( vector< SimpleBarrelNavigableLayer*>::const_iterator
78  ib = theBarrelNLC.begin(); ib != theBarrelNLC.end(); ib++) {
79  result.push_back( *ib);
80  }
81  for ( vector< SimpleForwardNavigableLayer*>::const_iterator
82  ifl = theForwardNLC.begin(); ifl != theForwardNLC.end(); ifl++) {
83  result.push_back( *ifl);
84  }
85  return result;
86 }
std::vector< NavigableLayer * > StateType
ib
Definition: cuy.py:662
SimpleNavigationSchool::ConstFDLI SimpleNavigationSchool::outerRadiusIncrease ( FDLI  fl,
const FDLC group 
)
protectedvirtual

Definition at line 294 of file SimpleNavigationSchool.cc.

References geometryDiff::epsilon, and interestingEgammaIsoDetIdsSequence_cff::outerRadius.

295 {
296  const float epsilon = 5.f;
297  float outerRadius = (**fl).specificSurface().outerRadius();
298  while ( ++fl != group.end()) {
299  if ( (**fl).specificSurface().outerRadius() > outerRadius + epsilon) {
300  return fl;
301  }
302  }
303  return fl;
304 }
vector< SimpleNavigationSchool::FDLC > SimpleNavigationSchool::splitForwardLayers ( )
protectedvirtual

Definition at line 307 of file SimpleNavigationSchool.cc.

References begin, end, mps_fire::i, LogDebug, and mps_fire::result.

308 {
309  // only work on positive Z side; negative by mirror symmetry later
310 
311  FDLC myRightLayers( theRightLayers);
312  FDLI begin = myRightLayers.begin();
313  FDLI end = myRightLayers.end();
314 
315  // sort according to inner radius, but keeping the ordering in z!
316  stable_sort ( begin, end, DiskLessInnerRadius());
317 
318  // partition in cylinders
319  vector<FDLC> result;
320  FDLC current;
321  current.push_back( *begin);
322  for ( FDLI i = begin+1; i != end; i++) {
323 
324 #ifdef EDM_ML_DEBUG
325  LogDebug("TkNavigation") << "(**i).specificSurface().innerRadius() = "
326  << (**i).specificSurface().innerRadius() << endl
327  << "(**(i-1)).specificSurface().outerRadius()) = "
328  << (**(i-1)).specificSurface().outerRadius() ;
329  LogDebug("TkNavigation") << "(**i).specificSurface().position().z() = "
330  << (**i).specificSurface().position().z() << endl
331  << "(**(i-1)).specificSurface().position().z() = "
332  << (**(i-1)).specificSurface().position().z() ;
333 #endif
334 
335  // if inner radius of i is larger than outer radius of i-1 then split!
336  // FIXME: The solution found for phase2 is a bit dirty, we can do better.
337  // For phase2 we compare the EXTENDED pixel with the TID to get the assignment right!
338  if ( (**i).specificSurface().innerRadius() > (**(i-1)).specificSurface().outerRadius() ||
339  (theTracker->posPixelForwardLayers().back()->specificSurface().position().z() > theTracker->posTidLayers().front()->specificSurface().position().z() &&
340  (**i).specificSurface().position().z() < (**(i-1)).specificSurface().position().z()) ){
341 
342  LogDebug("TkNavigation") << "found break between groups" ;
343 
344  // sort layers in group along Z
345  stable_sort ( current.begin(), current.end(), DetLessZ());
346 
347  result.push_back(current);
348  current.clear();
349  }
350  current.push_back(*i);
351  }
352  result.push_back(current); // save last one too
353 
354  // now sort subsets in Z
355  for ( vector<FDLC>::iterator ivec = result.begin();
356  ivec != result.end(); ivec++) {
357  stable_sort( ivec->begin(), ivec->end(), DetLessZ());
358  }
359 
360  return result;
361 }
#define LogDebug(id)
std::vector< ForwardDetLayer const * > const & posPixelForwardLayers() const
#define end
Definition: vmac.h:39
std::vector< const ForwardDetLayer * > FDLC
std::vector< ForwardDetLayer const * > const & posTidLayers() const
const GeometricSearchTracker * theTracker
#define begin
Definition: vmac.h:32

Member Data Documentation

BDLC SimpleNavigationSchool::theBarrelLayers
protected

Definition at line 41 of file SimpleNavigationSchool.h.

float SimpleNavigationSchool::theBarrelLength =0
protected

Definition at line 45 of file SimpleNavigationSchool.h.

BNLCType SimpleNavigationSchool::theBarrelNLC
protected

Definition at line 49 of file SimpleNavigationSchool.h.

FDLC SimpleNavigationSchool::theForwardLayers
protected

Definition at line 42 of file SimpleNavigationSchool.h.

FNLCType SimpleNavigationSchool::theForwardNLC
protected

Definition at line 50 of file SimpleNavigationSchool.h.

FDLC SimpleNavigationSchool::theLeftLayers
protected

Definition at line 44 of file SimpleNavigationSchool.h.

FDLC SimpleNavigationSchool::theRightLayers
protected

Definition at line 43 of file SimpleNavigationSchool.h.