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
 
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 32 of file SimpleNavigationSchool.h.

typedef BDLC::iterator SimpleNavigationSchool::BDLI
protected

Definition at line 35 of file SimpleNavigationSchool.h.

Definition at line 46 of file SimpleNavigationSchool.h.

typedef BDLC::const_iterator SimpleNavigationSchool::ConstBDLI
protected

Definition at line 37 of file SimpleNavigationSchool.h.

typedef FDLC::const_iterator SimpleNavigationSchool::ConstFDLI
protected

Definition at line 38 of file SimpleNavigationSchool.h.

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

Definition at line 31 of file SimpleNavigationSchool.h.

typedef DLC::iterator SimpleNavigationSchool::DLI
protected

Definition at line 34 of file SimpleNavigationSchool.h.

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

Definition at line 33 of file SimpleNavigationSchool.h.

typedef FDLC::iterator SimpleNavigationSchool::FDLI
protected

Definition at line 36 of file SimpleNavigationSchool.h.

Definition at line 47 of file SimpleNavigationSchool.h.

Constructor & Destructor Documentation

SimpleNavigationSchool::SimpleNavigationSchool ( )
inline

Definition at line 20 of file SimpleNavigationSchool.h.

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

Definition at line 21 of file SimpleNavigationSchool.h.

References init.

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

Member Function Documentation

float SimpleNavigationSchool::barrelLength ( )
protectedvirtual

Definition at line 312 of file SimpleNavigationSchool.cc.

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

312  {
313  if (theBarrelLength < 1.) {
314  for (BDLI i = theBarrelLayers.begin(); i != theBarrelLayers.end(); i++) {
315  theBarrelLength = max(theBarrelLength, (**i).surface().bounds().length() / 2.f);
316  }
317 
318  LogDebug("TkNavigation") << "The barrel length is " << theBarrelLength;
319  }
320  return theBarrelLength;
321 }
#define LogDebug(id)
void SimpleNavigationSchool::cleanMemory ( )
protected

Definition at line 53 of file SimpleNavigationSchool.cc.

References cuy::ib.

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

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

Reimplemented in BeamHaloNavigationSchool.

Definition at line 323 of file SimpleNavigationSchool.cc.

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

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

323  {
324  // NavigationSetter setter(*this);
325 
327 
328  // find for each layer which are the barrel and forward
329  // layers that point to it
330  typedef map<const DetLayer*, vector<const BarrelDetLayer*>, less<const DetLayer*> > BarrelMapType;
331  typedef map<const DetLayer*, vector<const ForwardDetLayer*>, less<const DetLayer*> > ForwardMapType;
332 
333  BarrelMapType reachedBarrelLayersMap;
334  ForwardMapType reachedForwardLayersMap;
335 
336  for (auto bli : theBarrelLayers) {
337  auto reachedLC = nextLayers(*bli, insideOut);
338  for (auto i : reachedLC) {
339  reachedBarrelLayersMap[i].push_back(bli);
340  }
341  }
342 
343  for (auto fli : theForwardLayers) {
344  auto reachedLC = nextLayers(*fli, insideOut);
345  for (auto i : reachedLC) {
346  reachedForwardLayersMap[i].push_back(fli);
347  }
348  }
349 
350  /*
351  vector<DetLayer*> lc = theTracker->allLayers();
352  for ( vector<DetLayer*>::iterator i = lc.begin(); i != lc.end(); i++) {
353  SimpleNavigableLayer* navigableLayer =
354  dynamic_cast<SimpleNavigableLayer*>((**i).navigableLayer());
355  navigableLayer->setInwardLinks( reachedBarrelLayersMap[*i],reachedForwardLayersMap[*i] );
356  }
357  */
358 
359  for (auto nl : theAllNavigableLayer) {
360  if (!nl)
361  continue;
362  auto navigableLayer = static_cast<SimpleNavigableLayer*>(nl);
363  auto dl = nl->detLayer();
364  navigableLayer->setInwardLinks(reachedBarrelLayersMap[dl], reachedForwardLayersMap[dl]);
365  }
366 }
StateType navigableLayers() override
StateType theAllNavigableLayer
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&...args) const
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.

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

Reimplemented in CosmicNavigationSchool.

Definition at line 78 of file SimpleNavigationSchool.cc.

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

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

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

137  {
138  // handle right side first, groups are only on the right
139  vector<FDLC> groups = splitForwardLayers();
140 
141  LogDebug("TkNavigation") << "SimpleNavigationSchool, Forward groups size = " << groups.size();
142  for (vector<FDLC>::iterator g = groups.begin(); g != groups.end(); g++) {
143  LogDebug("TkNavigation") << "group " << g - groups.begin() << " has " << g->size() << " layers ";
144  }
145 
146  for (vector<FDLC>::iterator group = groups.begin(); group != groups.end(); group++) {
147  for (FDLI i = group->begin(); i != group->end(); i++) {
148  BDLC reachableBL;
149  FDLC reachableFL;
150 
151  // Always connect to next barrel layer first, if exists
152  linkNextBarrelLayer(*i, reachableBL);
153 
154  // Then always connect to next forward layer of "same" size,
155  // and layers of larger inner Radius
156  linkNextLayerInGroup(i, *group, reachableFL);
157 
158  // Then connect to next N fw layers of next size
159  if (group + 1 != groups.end()) {
160  linkOuterGroup(*i, *(group + 1), reachableFL);
161  }
162 
163  // or connect within the group if outer radius increases
164  linkWithinGroup(i, *group, reachableFL);
165 
166  theForwardNLC.push_back(new SimpleForwardNavigableLayer(*i, reachableBL, reachableFL, theField, 5.));
168  symFinder.mirror(*i), reachableBL, symFinder.mirror(reachableFL), theField, 5.));
169  }
170  }
171 
172  // // now the left side by symmetry
173  // for ( FDLI ileft = theLeftLayers.begin();
174  // ileft != theLeftLayers.end(); ileft++) {
175  // ForwardDetLayer* right = symFinder.mirror( *ileft);
176 
177  // theForwardNLC.push_back( new
178  // SimpleForwardNavigableLayer( *ileft , right->nextBarrelLayers(),
179  // symFinder.mirror(right->nextForwardLayers())));
180  // }
181 }
#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 183 of file SimpleNavigationSchool.cc.

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

183  {
184  if (fl->position().z() > barrelLength())
185  return;
186 
187  float outerRadius = fl->specificSurface().outerRadius();
188  float zpos = fl->position().z();
189  for (BDLI bli = theBarrelLayers.begin(); bli != theBarrelLayers.end(); bli++) {
190  if (outerRadius < (**bli).specificSurface().radius() && zpos < (**bli).surface().bounds().length() / 2.) {
191  reachableBL.push_back(*bli);
192  return;
193  }
194  }
195 }
void SimpleNavigationSchool::linkNextForwardLayer ( BarrelDetLayer const *  ,
FDLC  
)
protectedvirtual

Definition at line 104 of file SimpleNavigationSchool.cc.

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

104  {
105  // find first forward layer with larger Z and larger outer radius
106  float length = bl->surface().bounds().length() / 2.;
107  float radius = bl->specificSurface().radius();
108  for (FDLI fli = theRightLayers.begin(); fli != theRightLayers.end(); fli++) {
109  if (length < (**fli).position().z() && radius < (**fli).specificSurface().outerRadius()) {
110  //search if there are any sovrapposition between forward layers
111  for (FDLI fliNext = fli; fliNext != theRightLayers.end(); fliNext++) {
112  if ((**fliNext).position().z() < (**fli).position().z() &&
113  (**fliNext).specificSurface().innerRadius() < (**fli).specificSurface().outerRadius()) {
114  rightFL.push_back(*fliNext);
115  return;
116  }
117  }
118  rightFL.push_back(*fli);
119  return;
120  }
121  }
122 }
void SimpleNavigationSchool::linkNextLargerLayer ( BDLI  bli,
BDLI  end,
BDLC reachableBL 
)
protectedvirtual

Definition at line 124 of file SimpleNavigationSchool.cc.

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

124  {
125  // compare length of next layer with length of following ones
126  float length = (**(bli + 1)).surface().bounds().length();
127  float epsilon = 0.1;
128 
129  for (BDLI i = bli + 2; i < end; i++) {
130  if (length + epsilon < (**i).surface().bounds().length()) {
131  reachableBL.push_back(*i);
132  return;
133  }
134  }
135 }
#define end
Definition: vmac.h:39
void SimpleNavigationSchool::linkNextLayerInGroup ( FDLI  fli,
const FDLC group,
FDLC reachableFL 
)
protectedvirtual

Definition at line 197 of file SimpleNavigationSchool.cc.

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

197  {
198  // Always connect to next forward layer of "same" size, if exists
199  if (fli + 1 != group.end()) {
200  reachableFL.push_back(*(fli + 1));
201  // If that layer has an inner radius larger then the current one
202  // also connect ALL next disks of same radius.
203  float innerRThis = (**fli).specificSurface().innerRadius();
204  float innerRNext = (**(fli + 1)).specificSurface().innerRadius();
205  const float epsilon = 2.f;
206 
207  if (innerRNext > innerRThis + epsilon) {
208  // next disk is smaller, so it doesn't cover fully subsequent ones
209  // of same radius
210 
211  int i = 2;
212  while ((fli + i) != group.end()) {
213  if ((**(fli + i)).specificSurface().innerRadius() < innerRNext + epsilon) {
214  // following disk has not increased in ineer radius
215  reachableFL.push_back(*(fli + i));
216  i++;
217  } else {
218  break;
219  }
220  }
221  }
222  }
223 }
void SimpleNavigationSchool::linkOuterGroup ( ForwardDetLayer const *  fl,
const FDLC group,
FDLC reachableFL 
)
protectedvirtual

Definition at line 225 of file SimpleNavigationSchool.cc.

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

225  {
226  // insert N layers with Z grater than fl
227 
228  ConstFDLI first = find_if(group.begin(), group.end(), [fl](const GeometricSearchDet* a) {
229  return a->position().z() >= fl->position().z();
230  });
231  if (first != group.end()) {
232  // Hard-wired constant!!!!!!
233  ConstFDLI last = min(first + 7, group.end());
234 
235  reachableFL.insert(reachableFL.end(), first, last);
236  }
237 }
FDLC::const_iterator ConstFDLI
T min(T a, T b)
Definition: MathUtil.h:58
double a
Definition: hdecay.h:119
void SimpleNavigationSchool::linkWithinGroup ( FDLI  fl,
const FDLC group,
FDLC reachableFL 
)
protectedvirtual

Definition at line 239 of file SimpleNavigationSchool.cc.

239  {
240  ConstFDLI biggerLayer = outerRadiusIncrease(fl, group);
241  if (biggerLayer != group.end() && biggerLayer != fl + 1) {
242  reachableFL.push_back(*biggerLayer);
243  }
244 }
FDLC::const_iterator ConstFDLI
virtual ConstFDLI outerRadiusIncrease(FDLI fl, const FDLC &group)
SimpleNavigationSchool::StateType SimpleNavigationSchool::navigableLayers ( )
overridevirtual

Implements NavigationSchool.

Definition at line 66 of file SimpleNavigationSchool.cc.

References cuy::ib, and mps_fire::result.

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

Definition at line 246 of file SimpleNavigationSchool.cc.

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

246  {
247  const float epsilon = 5.f;
248  float outerRadius = (**fl).specificSurface().outerRadius();
249  while (++fl != group.end()) {
250  if ((**fl).specificSurface().outerRadius() > outerRadius + epsilon) {
251  return fl;
252  }
253  }
254  return fl;
255 }
vector< SimpleNavigationSchool::FDLC > SimpleNavigationSchool::splitForwardLayers ( )
protectedvirtual

Definition at line 257 of file SimpleNavigationSchool.cc.

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

257  {
258  // only work on positive Z side; negative by mirror symmetry later
259 
260  FDLC myRightLayers(theRightLayers);
261  FDLI begin = myRightLayers.begin();
262  FDLI end = myRightLayers.end();
263 
264  // sort according to inner radius, but keeping the ordering in z!
265  std::stable_sort(begin, end, [](const ForwardDetLayer* a, const ForwardDetLayer* b) {
266  return a->specificSurface().innerRadius() < b->specificSurface().innerRadius();
267  });
268 
269  // partition in cylinders
270  vector<FDLC> result;
271  FDLC current;
272  current.push_back(*begin);
273  for (FDLI i = begin + 1; i != end; i++) {
274 #ifdef EDM_ML_DEBUG
275  LogDebug("TkNavigation") << "(**i).specificSurface().innerRadius() = " << (**i).specificSurface().innerRadius()
276  << endl
277  << "(**(i-1)).specificSurface().outerRadius()) = "
278  << (**(i - 1)).specificSurface().outerRadius();
279  LogDebug("TkNavigation") << "(**i).specificSurface().position().z() = "
280  << (**i).specificSurface().position().z() << endl
281  << "(**(i-1)).specificSurface().position().z() = "
282  << (**(i - 1)).specificSurface().position().z();
283 #endif
284 
285  // if inner radius of i is larger than outer radius of i-1 then split!
286  // FIXME: The solution found for phase2 is a bit dirty, we can do better.
287  // For phase2 we compare the EXTENDED pixel with the TID to get the assignment right!
288  if ((**i).specificSurface().innerRadius() > (**(i - 1)).specificSurface().outerRadius() ||
289  (theTracker->posPixelForwardLayers().back()->specificSurface().position().z() >
290  theTracker->posTidLayers().front()->specificSurface().position().z() &&
291  (**i).specificSurface().position().z() < (**(i - 1)).specificSurface().position().z())) {
292  LogDebug("TkNavigation") << "found break between groups";
293 
294  // sort layers in group along Z
295  std::stable_sort(current.begin(), current.end(), isDetLessZ);
296 
297  result.push_back(current);
298  current.clear();
299  }
300  current.push_back(*i);
301  }
302  result.push_back(current); // save last one too
303 
304  // now sort subsets in Z
305  for (vector<FDLC>::iterator ivec = result.begin(); ivec != result.end(); ivec++) {
306  std::stable_sort(ivec->begin(), ivec->end(), isDetLessZ);
307  }
308 
309  return result;
310 }
#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:118
std::vector< ForwardDetLayer const * > const & posTidLayers() const
const GeometricSearchTracker * theTracker
#define begin
Definition: vmac.h:32
double a
Definition: hdecay.h:119

Member Data Documentation

BDLC SimpleNavigationSchool::theBarrelLayers
protected

Definition at line 40 of file SimpleNavigationSchool.h.

float SimpleNavigationSchool::theBarrelLength = 0
protected

Definition at line 44 of file SimpleNavigationSchool.h.

BNLCType SimpleNavigationSchool::theBarrelNLC
protected

Definition at line 48 of file SimpleNavigationSchool.h.

FDLC SimpleNavigationSchool::theForwardLayers
protected

Definition at line 41 of file SimpleNavigationSchool.h.

FNLCType SimpleNavigationSchool::theForwardNLC
protected

Definition at line 49 of file SimpleNavigationSchool.h.

FDLC SimpleNavigationSchool::theLeftLayers
protected

Definition at line 43 of file SimpleNavigationSchool.h.

FDLC SimpleNavigationSchool::theRightLayers
protected

Definition at line 42 of file SimpleNavigationSchool.h.