CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
SimpleNavigationSchool Class Reference

#include <SimpleNavigationSchool.h>

Inheritance diagram for SimpleNavigationSchool:
NavigationSchool BeamHaloNavigationSchool CosmicNavigationSchool SkippingLayerCosmicNavigationSchool

Public Member Functions

virtual StateType navigableLayers () override
 
 SimpleNavigationSchool ()
 
 SimpleNavigationSchool (const GeometricSearchTracker *theTracker, const MagneticField *field)
 
 ~SimpleNavigationSchool ()
 
- 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
 
BNLCType theBarrelNLC
 
const MagneticFieldtheField
 
FDLC theForwardLayers
 
FNLCType theForwardNLC
 
FDLC theLeftLayers
 
FDLC theRightLayers
 
const GeometricSearchTrackertheTracker
 
- Protected Attributes inherited from NavigationSchool
const std::vector< const
DetLayer * > * 
theAllDetLayersInSystem
 
StateType theAllNavigableLayer
 

Additional Inherited Members

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

Detailed Description

Concrete navigation school for the Tracker

Definition at line 20 of file SimpleNavigationSchool.h.

Member Typedef Documentation

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

Definition at line 34 of file SimpleNavigationSchool.h.

typedef BDLC::iterator SimpleNavigationSchool::BDLI
protected

Definition at line 37 of file SimpleNavigationSchool.h.

Definition at line 48 of file SimpleNavigationSchool.h.

typedef BDLC::const_iterator SimpleNavigationSchool::ConstBDLI
protected

Definition at line 39 of file SimpleNavigationSchool.h.

typedef FDLC::const_iterator SimpleNavigationSchool::ConstFDLI
protected

Definition at line 40 of file SimpleNavigationSchool.h.

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

Definition at line 33 of file SimpleNavigationSchool.h.

typedef DLC::iterator SimpleNavigationSchool::DLI
protected

Definition at line 36 of file SimpleNavigationSchool.h.

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

Definition at line 35 of file SimpleNavigationSchool.h.

typedef FDLC::iterator SimpleNavigationSchool::FDLI
protected

Definition at line 38 of file SimpleNavigationSchool.h.

Definition at line 49 of file SimpleNavigationSchool.h.

Constructor & Destructor Documentation

SimpleNavigationSchool::SimpleNavigationSchool ( )
inline

Definition at line 23 of file SimpleNavigationSchool.h.

23 : theField(0),theTracker(0){};
const GeometricSearchTracker * theTracker
const MagneticField * theField
SimpleNavigationSchool::SimpleNavigationSchool ( const GeometricSearchTracker theTracker,
const MagneticField field 
)

Definition at line 29 of file SimpleNavigationSchool.cc.

References GeometricSearchTracker::allLayers(), GeometricSearchTracker::barrelLayers(), establishInverseRelations(), GeometricSearchTracker::forwardLayers(), i, linkBarrelLayers(), linkForwardLayers(), NavigationSchool::theAllDetLayersInSystem, NavigationSchool::theAllNavigableLayer, theBarrelLayers, theForwardLayers, theLeftLayers, theRightLayers, and theTracker.

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

Definition at line 26 of file SimpleNavigationSchool.h.

Member Function Documentation

float SimpleNavigationSchool::barrelLength ( )
protectedvirtual

Definition at line 349 of file SimpleNavigationSchool.cc.

References i, LogDebug, bookConverter::max, theBarrelLayers, and theBarrelLength.

Referenced by linkNextBarrelLayer().

350 {
351  if ( theBarrelLength < 1.) {
352  for (BDLI i=theBarrelLayers.begin(); i!=theBarrelLayers.end(); i++) {
354  (**i).surface().bounds().length() / 2.f);
355  }
356 
357  LogDebug("TkNavigation") << "The barrel length is " << theBarrelLength ;
358  }
359  return theBarrelLength;
360 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
void SimpleNavigationSchool::cleanMemory ( )
protected

Definition at line 61 of file SimpleNavigationSchool.cc.

References cuy::ib, theBarrelNLC, and theForwardNLC.

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

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

Reimplemented in BeamHaloNavigationSchool.

Definition at line 362 of file SimpleNavigationSchool.cc.

References diclist::dl, i, insideOut, navigableLayers(), NavigationSchool::nextLayers(), NavigationSchool::setState(), NavigationSchool::theAllNavigableLayer, theBarrelLayers, and theForwardLayers.

Referenced by SimpleNavigationSchool().

362  {
363 
364  // NavigationSetter setter(*this);
365 
367 
368  // find for each layer which are the barrel and forward
369  // layers that point to it
370  typedef map<const DetLayer*, vector<const BarrelDetLayer*>, less<const DetLayer*> > BarrelMapType;
371  typedef map<const DetLayer*, vector<const ForwardDetLayer*>, less<const DetLayer*> > ForwardMapType;
372 
373 
374  BarrelMapType reachedBarrelLayersMap;
375  ForwardMapType reachedForwardLayersMap;
376 
377 
378  for ( auto bli : theBarrelLayers) {
379  auto reachedLC = nextLayers(*bli, insideOut);
380  for ( auto i : reachedLC) {
381  reachedBarrelLayersMap[i].push_back(bli);
382  }
383  }
384 
385  for ( auto fli : theForwardLayers) {
386  auto reachedLC = nextLayers(*fli, insideOut);
387  for ( auto i : reachedLC) {
388  reachedForwardLayersMap[i].push_back(fli);
389  }
390  }
391 
392  /*
393  vector<DetLayer*> lc = theTracker->allLayers();
394  for ( vector<DetLayer*>::iterator i = lc.begin(); i != lc.end(); i++) {
395  SimpleNavigableLayer* navigableLayer =
396  dynamic_cast<SimpleNavigableLayer*>((**i).navigableLayer());
397  navigableLayer->setInwardLinks( reachedBarrelLayersMap[*i],reachedForwardLayersMap[*i] );
398  }
399  */
400 
401 
402  for(auto nl : theAllNavigableLayer) {
403  if (!nl) continue;
404  auto navigableLayer = static_cast<SimpleNavigableLayer*>(nl);
405  auto dl = nl->detLayer();
406  navigableLayer->setInwardLinks( reachedBarrelLayersMap[dl],reachedForwardLayersMap[dl] );
407  }
408 
409 
410 }
int i
Definition: DBlmapReader.cc:9
tuple dl
Definition: diclist.py:34
virtual StateType navigableLayers() override
StateType theAllNavigableLayer
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&...args) const
NavigationDirection.
void setState(const StateType &state)
void SimpleNavigationSchool::linkBarrelLayers ( SymmetricLayerFinder symFinder)
protectedvirtual

Reimplemented in CosmicNavigationSchool.

Definition at line 91 of file SimpleNavigationSchool.cc.

References i, linkNextForwardLayer(), linkNextLargerLayer(), SymmetricLayerFinder::mirror(), theBarrelLayers, theBarrelNLC, and theField.

Referenced by SimpleNavigationSchool().

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

Definition at line 151 of file SimpleNavigationSchool.cc.

References g, watchdog::group, i, linkNextBarrelLayer(), linkNextLayerInGroup(), linkOuterGroup(), linkWithinGroup(), LogDebug, SymmetricLayerFinder::mirror(), splitForwardLayers(), theField, and theForwardNLC.

Referenced by SimpleNavigationSchool().

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

Definition at line 210 of file SimpleNavigationSchool.cc.

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

Referenced by linkForwardLayers().

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

Definition at line 119 of file SimpleNavigationSchool.cc.

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

Referenced by linkBarrelLayers().

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

Definition at line 135 of file SimpleNavigationSchool.cc.

References end, geometryDiff::epsilon, and i.

Referenced by linkBarrelLayers().

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

Definition at line 227 of file SimpleNavigationSchool.cc.

References geometryDiff::epsilon, and i.

Referenced by linkForwardLayers().

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

Definition at line 260 of file SimpleNavigationSchool.cc.

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

Referenced by linkForwardLayers().

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

Definition at line 278 of file SimpleNavigationSchool.cc.

References outerRadiusIncrease().

Referenced by linkForwardLayers().

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

Implements NavigationSchool.

Definition at line 76 of file SimpleNavigationSchool.cc.

References cuy::ib, query::result, theBarrelNLC, and theForwardNLC.

Referenced by establishInverseRelations().

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

Definition at line 289 of file SimpleNavigationSchool.cc.

References geometryDiff::epsilon.

Referenced by linkWithinGroup().

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

Definition at line 302 of file SimpleNavigationSchool.cc.

References begin, cond::rpcobimon::current, end, i, LogDebug, query::result, python.multivaluedict::sort(), and theRightLayers.

Referenced by linkForwardLayers().

303 {
304  // only work on positive Z side; negative by mirror symmetry later
305 
306  FDLC myRightLayers( theRightLayers);
307  FDLI begin = myRightLayers.begin();
308  FDLI end = myRightLayers.end();
309 
310  // sort according to inner radius
311  sort ( begin, end, DiskLessInnerRadius());
312 
313  // partition in cylinders
314  vector<FDLC> result;
315  FDLC current;
316  current.push_back( *begin);
317  for ( FDLI i = begin+1; i != end; i++) {
318 
319  LogDebug("TkNavigation") << "(**i).specificSurface().innerRadius() = "
320  << (**i).specificSurface().innerRadius() << endl
321  << "(**(i-1)).specificSurface().outerRadius()) = "
322  << (**(i-1)).specificSurface().outerRadius() ;
323 
324  // if inner radius of i is larger than outer radius of i-1 then split!
325  if ( (**i).specificSurface().innerRadius() >
326  (**(i-1)).specificSurface().outerRadius()) {
327 
328  LogDebug("TkNavigation") << "found break between groups" ;
329 
330  // sort layers in group along Z
331  sort ( current.begin(), current.end(), DetLessZ());
332 
333  result.push_back(current);
334  current.clear();
335  }
336  current.push_back(*i);
337  }
338  result.push_back(current); // save last one too
339 
340  // now sort subsets in Z
341  for ( vector<FDLC>::iterator ivec = result.begin();
342  ivec != result.end(); ivec++) {
343  sort( ivec->begin(), ivec->end(), DetLessZ());
344  }
345 
346  return result;
347 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: query.py:137
#define end
Definition: vmac.h:37
std::vector< const ForwardDetLayer * > FDLC
#define begin
Definition: vmac.h:30

Member Data Documentation

BDLC SimpleNavigationSchool::theBarrelLayers
protected
float SimpleNavigationSchool::theBarrelLength
protected

Definition at line 46 of file SimpleNavigationSchool.h.

Referenced by barrelLength().

BNLCType SimpleNavigationSchool::theBarrelNLC
protected

Definition at line 50 of file SimpleNavigationSchool.h.

Referenced by cleanMemory(), linkBarrelLayers(), and navigableLayers().

const MagneticField* SimpleNavigationSchool::theField
protected

Definition at line 78 of file SimpleNavigationSchool.h.

Referenced by linkBarrelLayers(), and linkForwardLayers().

FDLC SimpleNavigationSchool::theForwardLayers
protected

Definition at line 43 of file SimpleNavigationSchool.h.

Referenced by establishInverseRelations(), and SimpleNavigationSchool().

FNLCType SimpleNavigationSchool::theForwardNLC
protected

Definition at line 51 of file SimpleNavigationSchool.h.

Referenced by cleanMemory(), linkForwardLayers(), and navigableLayers().

FDLC SimpleNavigationSchool::theLeftLayers
protected

Definition at line 45 of file SimpleNavigationSchool.h.

Referenced by SimpleNavigationSchool().

FDLC SimpleNavigationSchool::theRightLayers
protected
const GeometricSearchTracker* SimpleNavigationSchool::theTracker
protected

Definition at line 79 of file SimpleNavigationSchool.h.

Referenced by SimpleNavigationSchool().