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

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

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

Definition at line 55 of file SimpleNavigationSchool.cc.

References cuy::ib.

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

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

Reimplemented in BeamHaloNavigationSchool.

Definition at line 373 of file SimpleNavigationSchool.cc.

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

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

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

References a, and mps_fire::i.

26 {
27 
29  theAllNavigableLayer.resize(theTracker->allLayers().size(),nullptr);
30 
31 
32  // Get barrel layers
33  for( auto i : theTracker->barrelLayers()) {
34  theBarrelLayers.push_back( i );
35  }
36 
37  // get forward layers
38  for( auto i : theTracker->forwardLayers()) {
39  theForwardLayers.push_back( i );
40  }
41 
42  FDLI middle = find_if( theForwardLayers.begin(), theForwardLayers.end(),
43  [](const GeometricSearchDet* a){ return a->position().z() >= 0.0; });
44  theLeftLayers = FDLC( theForwardLayers.begin(), middle);
45  theRightLayers = FDLC( middle, theForwardLayers.end());
46 
48 
49  // only work on positive Z side; negative by mirror symmetry later
50  linkBarrelLayers( symFinder);
51  linkForwardLayers( symFinder);
53 }
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
double a
Definition: hdecay.h:121
std::vector< BarrelDetLayer const * > const & barrelLayers() const
void SimpleNavigationSchool::linkBarrelLayers ( SymmetricLayerFinder symFinder)
protectedvirtual

Reimplemented in CosmicNavigationSchool.

Definition at line 85 of file SimpleNavigationSchool.cc.

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

Referenced by navigableLayers().

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

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

Referenced by linkNextLargerLayer().

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

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

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

Definition at line 113 of file SimpleNavigationSchool.cc.

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

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

Definition at line 136 of file SimpleNavigationSchool.cc.

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

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

Definition at line 228 of file SimpleNavigationSchool.cc.

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

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

Definition at line 261 of file SimpleNavigationSchool.cc.

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

264 {
265 
266  // insert N layers with Z grater than fl
267 
268  ConstFDLI first = find_if( group.begin(), group.end(),
269  [fl](const GeometricSearchDet* a){ return a->position().z() >= fl->position().z(); });
270  if ( first != group.end()) {
271 
272  // Hard-wired constant!!!!!!
273  ConstFDLI last = min( first + 7, group.end());
274 
275  reachableFL.insert( reachableFL.end(), first, last);
276  }
277 }
FDLC::const_iterator ConstFDLI
T min(T a, T b)
Definition: MathUtil.h:58
double a
Definition: hdecay.h:121
void SimpleNavigationSchool::linkWithinGroup ( FDLI  fl,
const FDLC group,
FDLC reachableFL 
)
protectedvirtual

Definition at line 279 of file SimpleNavigationSchool.cc.

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

Implements NavigationSchool.

Definition at line 70 of file SimpleNavigationSchool.cc.

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

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

Definition at line 290 of file SimpleNavigationSchool.cc.

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

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

Definition at line 303 of file SimpleNavigationSchool.cc.

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

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