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 CfgNavigationSchool CosmicNavigationSchool SkippingLayerCosmicNavigationSchool

Public Member Functions

virtual StateType navigableLayers () const
 
 SimpleNavigationSchool ()
 
 SimpleNavigationSchool (const GeometricSearchTracker *theTracker, const MagneticField *field)
 
 ~SimpleNavigationSchool ()
 
- Public Member Functions inherited from NavigationSchool
const std::vector< DetLayer * > & allLayersInSystem () const
 
 NavigationSchool ()
 
virtual ~NavigationSchool ()
 

Protected Types

typedef std::vector
< 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
< 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 *fl, BDLC &)
 
virtual void linkNextForwardLayer (BarrelDetLayer *, FDLC &)
 
virtual void linkNextLargerLayer (BDLI, BDLI, BDLC &)
 
virtual void linkNextLayerInGroup (FDLI fli, const FDLC &group, FDLC &reachableFL)
 
virtual void linkOuterGroup (ForwardDetLayer *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 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< DetLayer * > * theAllDetLayersInSystem
 

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<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<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, theBarrelLayers, theForwardLayers, theLeftLayers, theRightLayers, and theTracker.

30  :
31  theBarrelLength(0),theField(field), theTracker(theInputTracker)
32 {
33 
34  theAllDetLayersInSystem=&theInputTracker->allLayers();
35 
36  // Get barrel layers
37  vector<BarrelDetLayer*> blc = theTracker->barrelLayers();
38  for ( vector<BarrelDetLayer*>::iterator i = blc.begin(); i != blc.end(); i++) {
39  theBarrelLayers.push_back( (*i) );
40  }
41 
42  // get forward layers
43  vector<ForwardDetLayer*> flc = theTracker->forwardLayers();
44  for ( vector<ForwardDetLayer*>::iterator i = flc.begin(); i != flc.end(); i++) {
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
const GeometricSearchTracker * theTracker
std::vector< BarrelDetLayer * > const & barrelLayers() const
std::vector< ForwardDetLayer * > FDLC
virtual void linkForwardLayers(SymmetricLayerFinder &symFinder)
virtual void establishInverseRelations()
const MagneticField * theField
virtual void linkBarrelLayers(SymmetricLayerFinder &symFinder)
const std::vector< DetLayer * > * theAllDetLayersInSystem
std::vector< ForwardDetLayer * > const & forwardLayers() const
SimpleNavigationSchool::~SimpleNavigationSchool ( )
inline

Definition at line 26 of file SimpleNavigationSchool.h.

References cleanMemory().

Member Function Documentation

float SimpleNavigationSchool::barrelLength ( )
protectedvirtual

Definition at line 349 of file SimpleNavigationSchool.cc.

References i, LogDebug, 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
const T & max(const T &a, const T &b)
void SimpleNavigationSchool::cleanMemory ( )
protected

Definition at line 61 of file SimpleNavigationSchool.cc.

References theBarrelNLC, and theForwardNLC.

Referenced by BeamHaloNavigationSchool::~BeamHaloNavigationSchool(), CfgNavigationSchool::~CfgNavigationSchool(), CosmicNavigationSchool::~CosmicNavigationSchool(), ~SimpleNavigationSchool(), and SkippingLayerCosmicNavigationSchool::~SkippingLayerCosmicNavigationSchool().

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 }
void SimpleNavigationSchool::establishInverseRelations ( )
protectedvirtual

Reimplemented in BeamHaloNavigationSchool.

Definition at line 362 of file SimpleNavigationSchool.cc.

References GeometricSearchTracker::allLayers(), i, insideOut, SimpleNavigableLayer::setInwardLinks(), theBarrelLayers, theForwardLayers, and theTracker.

Referenced by CfgNavigationSchool::CfgNavigationSchool(), and SimpleNavigationSchool().

362  {
363 
364  NavigationSetter setter(*this);
365 
366  // find for each layer which are the barrel and forward
367  // layers that point to it
368  typedef map<const DetLayer*, vector<BarrelDetLayer*>, less<const DetLayer*> > BarrelMapType;
369  typedef map<const DetLayer*, vector<ForwardDetLayer*>, less<const DetLayer*> > ForwardMapType;
370 
371 
372  BarrelMapType reachedBarrelLayersMap;
373  ForwardMapType reachedForwardLayersMap;
374 
375 
376  for ( BDLI bli = theBarrelLayers.begin();
377  bli!=theBarrelLayers.end(); bli++) {
378  DLC reachedLC = (**bli).nextLayers( insideOut);
379  for ( DLI i = reachedLC.begin(); i != reachedLC.end(); i++) {
380  reachedBarrelLayersMap[*i].push_back( *bli);
381  }
382  }
383 
384  for ( FDLI fli = theForwardLayers.begin();
385  fli!=theForwardLayers.end(); fli++) {
386  DLC reachedLC = (**fli).nextLayers( insideOut);
387  for ( DLI i = reachedLC.begin(); i != reachedLC.end(); i++) {
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 }
int i
Definition: DBlmapReader.cc:9
const GeometricSearchTracker * theTracker
virtual void setInwardLinks(const BDLC &, const FDLC &, TkLayerLess sorter=TkLayerLess(outsideIn))=0
std::vector< const DetLayer * > DLC
std::vector< DetLayer * > const & allLayers() const
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
virtual void linkNextForwardLayer(BarrelDetLayer *, FDLC &)
std::vector< ForwardDetLayer * > FDLC
const MagneticField * theField
virtual void linkNextLargerLayer(BDLI, BDLI, BDLC &)
std::vector< BarrelDetLayer * > BDLC
ForwardDetLayer * mirror(const ForwardDetLayer *layer)
void SimpleNavigationSchool::linkForwardLayers ( SymmetricLayerFinder symFinder)
protectedvirtual

Definition at line 151 of file SimpleNavigationSchool.cc.

References g, 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
virtual void linkOuterGroup(ForwardDetLayer *fl, const FDLC &group, FDLC &reachableFL)
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
virtual void linkNextBarrelLayer(ForwardDetLayer *fl, BDLC &)
std::vector< ForwardDetLayer * > FDLC
virtual void linkNextLayerInGroup(FDLI fli, const FDLC &group, FDLC &reachableFL)
virtual void linkWithinGroup(FDLI fl, const FDLC &group, FDLC &reachableFL)
const MagneticField * theField
virtual std::vector< FDLC > splitForwardLayers()
std::vector< BarrelDetLayer * > BDLC
ForwardDetLayer * mirror(const ForwardDetLayer *layer)
void SimpleNavigationSchool::linkNextBarrelLayer ( ForwardDetLayer fl,
BDLC reachableBL 
)
protectedvirtual

Definition at line 210 of file SimpleNavigationSchool.cc.

References barrelLength(), BoundDisk::outerRadius(), 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 }
T z() const
Definition: PV3DBase.h:63
virtual const BoundDisk & specificSurface() const
virtual const Surface::PositionType & position() const
Returns position of the surface.
float outerRadius() const
The outer radius of the disk.
Definition: BoundDisk.h:75
void SimpleNavigationSchool::linkNextForwardLayer ( BarrelDetLayer bl,
FDLC rightFL 
)
protectedvirtual

Definition at line 119 of file SimpleNavigationSchool.cc.

References BoundSurface::bounds(), Bounds::length(), Cylinder::radius(), 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 }
virtual float length() const =0
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:55
const Bounds & bounds() const
Definition: BoundSurface.h:89
virtual const BoundSurface & surface() const
GeometricSearchDet interface.
virtual const BoundCylinder & specificSurface() const
Extension of the interface.
void SimpleNavigationSchool::linkNextLargerLayer ( BDLI  bli,
BDLI  end,
BDLC reachableBL 
)
protectedvirtual

Definition at line 135 of file SimpleNavigationSchool.cc.

References end, 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:38
const double epsilon
void SimpleNavigationSchool::linkNextLayerInGroup ( FDLI  fli,
const FDLC group,
FDLC reachableFL 
)
protectedvirtual

Definition at line 227 of file SimpleNavigationSchool.cc.

References 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
const double epsilon
void SimpleNavigationSchool::linkOuterGroup ( ForwardDetLayer fl,
const FDLC group,
FDLC reachableFL 
)
protectedvirtual

Definition at line 260 of file SimpleNavigationSchool.cc.

References 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 }
#define min(a, b)
Definition: mlp_lapack.h:161
FDLC::const_iterator ConstFDLI
T z() const
Definition: PV3DBase.h:63
bool first
Definition: L1TdeRCT.cc:94
virtual const Surface::PositionType & position() const
Returns position of the surface.
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
virtual ConstFDLI outerRadiusIncrease(FDLI fl, const FDLC &group)
SimpleNavigationSchool::StateType SimpleNavigationSchool::navigableLayers ( ) const
virtual

Implements NavigationSchool.

Definition at line 76 of file SimpleNavigationSchool.cc.

References query::result, theBarrelNLC, and theForwardNLC.

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 }
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 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 }
const double epsilon
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
std::vector< ForwardDetLayer * > FDLC
tuple result
Definition: query.py:137
#define end
Definition: vmac.h:38
#define begin
Definition: vmac.h:31

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
const MagneticField* SimpleNavigationSchool::theField
protected
FDLC SimpleNavigationSchool::theForwardLayers
protected
FNLCType SimpleNavigationSchool::theForwardNLC
protected
FDLC SimpleNavigationSchool::theLeftLayers
protected

Definition at line 45 of file SimpleNavigationSchool.h.

Referenced by SimpleNavigationSchool().

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