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 361 of file SimpleNavigationSchool.cc.

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

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

Definition at line 56 of file SimpleNavigationSchool.cc.

References cuy::ib.

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

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

Reimplemented in BeamHaloNavigationSchool.

Definition at line 374 of file SimpleNavigationSchool.cc.

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

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

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

References mps_fire::i.

27 {
28 
30  theAllNavigableLayer.resize(theTracker->allLayers().size(),nullptr);
31 
32 
33  // Get barrel layers
34  for( auto i : theTracker->barrelLayers()) {
35  theBarrelLayers.push_back( i );
36  }
37 
38  // get forward layers
39  for( auto i : theTracker->forwardLayers()) {
40  theForwardLayers.push_back( i );
41  }
42 
43  FDLI middle = find_if( theForwardLayers.begin(), theForwardLayers.end(),
44  not1(DetBelowZ(0)));
45  theLeftLayers = FDLC( theForwardLayers.begin(), middle);
46  theRightLayers = FDLC( middle, theForwardLayers.end());
47 
49 
50  // only work on positive Z side; negative by mirror symmetry later
51  linkBarrelLayers( symFinder);
52  linkForwardLayers( symFinder);
54 }
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 86 of file SimpleNavigationSchool.cc.

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

Referenced by navigableLayers().

87 {
88  // Link barrel layers outwards
89  for ( BDLI i = theBarrelLayers.begin(); i != theBarrelLayers.end(); i++) {
90  BDLC reachableBL;
91  FDLC leftFL;
92  FDLC rightFL;
93 
94  // always add next barrel layer first
95  if ( i+1 != theBarrelLayers.end()) reachableBL.push_back(*(i+1));
96 
97  // Add closest reachable forward layer (except for last BarrelLayer)
98  if (i != theBarrelLayers.end() - 1) {
99  linkNextForwardLayer( *i, rightFL);
100  }
101 
102  // Add next BarrelLayer with length larger than the current BL
103  if ( i+2 < theBarrelLayers.end()) {
104  linkNextLargerLayer( i, theBarrelLayers.end(), reachableBL);
105  }
106 
107  theBarrelNLC.push_back( new
108  SimpleBarrelNavigableLayer( *i, reachableBL,
109  symFinder.mirror(rightFL),
110  rightFL,theField, 5.));
111  }
112 }
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 153 of file SimpleNavigationSchool.cc.

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

Referenced by linkNextLargerLayer().

154 {
155 
156  // handle right side first, groups are only on the right
157  vector<FDLC> groups = splitForwardLayers();
158 
159  LogDebug("TkNavigation") << "SimpleNavigationSchool, Forward groups size = " << groups.size() ;
160  for (vector<FDLC>::iterator g = groups.begin(); g != groups.end(); g++) {
161  LogDebug("TkNavigation") << "group " << g - groups.begin() << " has "
162  << g->size() << " layers " ;
163  }
164 
165  for ( vector<FDLC>::iterator group = groups.begin();
166  group != groups.end(); group++) {
167 
168  for ( FDLI i = group->begin(); i != group->end(); i++) {
169 
170  BDLC reachableBL;
171  FDLC reachableFL;
172 
173  // Always connect to next barrel layer first, if exists
174  linkNextBarrelLayer( *i, reachableBL);
175 
176  // Then always connect to next forward layer of "same" size,
177  // and layers of larger inner Radius
178  linkNextLayerInGroup( i, *group, reachableFL);
179 
180  // Then connect to next N fw layers of next size
181  if ( group+1 != groups.end()) {
182  linkOuterGroup( *i, *(group+1), reachableFL);
183  }
184 
185  // or connect within the group if outer radius increases
186  linkWithinGroup( i, *group, reachableFL);
187 
188  theForwardNLC.push_back( new SimpleForwardNavigableLayer( *i,reachableBL,
189  reachableFL,
190  theField,
191  5.));
192  theForwardNLC.push_back( new SimpleForwardNavigableLayer( symFinder.mirror(*i),
193  reachableBL,
194  symFinder.mirror(reachableFL),
195  theField,
196  5.));
197 
198  }
199  }
200 
201 // // now the left side by symmetry
202 // for ( FDLI ileft = theLeftLayers.begin();
203 // ileft != theLeftLayers.end(); ileft++) {
204 // ForwardDetLayer* right = symFinder.mirror( *ileft);
205 
206 // theForwardNLC.push_back( new
207 // SimpleForwardNavigableLayer( *ileft , right->nextBarrelLayers(),
208 // symFinder.mirror(right->nextForwardLayers())));
209 // }
210 }
#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 212 of file SimpleNavigationSchool.cc.

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

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

Definition at line 114 of file SimpleNavigationSchool.cc.

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

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

Definition at line 137 of file SimpleNavigationSchool.cc.

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

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

Definition at line 229 of file SimpleNavigationSchool.cc.

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

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

Definition at line 262 of file SimpleNavigationSchool.cc.

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

265 {
266 
267  // insert N layers with Z grater than fl
268 
269  ConstFDLI first = find_if( group.begin(), group.end(),
270  not1( DetBelowZ( fl->position().z())));
271  if ( first != group.end()) {
272 
273  // Hard-wired constant!!!!!!
274  ConstFDLI last = min( first + 7, group.end());
275 
276  reachableFL.insert( reachableFL.end(), first, last);
277  }
278 }
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 280 of file SimpleNavigationSchool.cc.

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

Implements NavigationSchool.

Definition at line 71 of file SimpleNavigationSchool.cc.

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

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

Definition at line 291 of file SimpleNavigationSchool.cc.

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

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

Definition at line 304 of file SimpleNavigationSchool.cc.

References a, b, begin, end, mps_fire::i, isDetLessZ(), LogDebug, mps_fire::result, and ForwardDetLayer::specificSurface().

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

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.