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
HICSimpleNavigationSchool Class Reference

#include <HICSimpleNavigationSchool.h>

Inheritance diagram for HICSimpleNavigationSchool:
NavigationSchool

Public Member Functions

int getExcludedBarrelLayer ()
 
 HICSimpleNavigationSchool ()
 
 HICSimpleNavigationSchool (const GeometricSearchTracker *theTracker, const MagneticField *field)
 
 HICSimpleNavigationSchool (const GeometricSearchTracker *theTracker, const MagneticField *field, int j, int l)
 
virtual StateType navigableLayers () const
 
void setExcludedBarrelLayer (int &j)
 
- 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 ()
 
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

int excludedBarrelLayer
 
int excludedForwardLayer
 
BDLC theBarrelLayers
 
float theBarrelLength
 
BNLCType theBarrelNLC
 
std::vector< DetLayer * > theDetLayers
 
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 HICSimpleNavigationSchool.h.

Member Typedef Documentation

typedef std::vector<BarrelDetLayer*> HICSimpleNavigationSchool::BDLC
protected

Definition at line 42 of file HICSimpleNavigationSchool.h.

typedef BDLC::iterator HICSimpleNavigationSchool::BDLI
protected

Definition at line 45 of file HICSimpleNavigationSchool.h.

Definition at line 56 of file HICSimpleNavigationSchool.h.

typedef BDLC::const_iterator HICSimpleNavigationSchool::ConstBDLI
protected

Definition at line 47 of file HICSimpleNavigationSchool.h.

typedef FDLC::const_iterator HICSimpleNavigationSchool::ConstFDLI
protected

Definition at line 48 of file HICSimpleNavigationSchool.h.

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

Definition at line 41 of file HICSimpleNavigationSchool.h.

typedef DLC::iterator HICSimpleNavigationSchool::DLI
protected

Definition at line 44 of file HICSimpleNavigationSchool.h.

typedef std::vector<ForwardDetLayer*> HICSimpleNavigationSchool::FDLC
protected

Definition at line 43 of file HICSimpleNavigationSchool.h.

typedef FDLC::iterator HICSimpleNavigationSchool::FDLI
protected

Definition at line 46 of file HICSimpleNavigationSchool.h.

Definition at line 57 of file HICSimpleNavigationSchool.h.

Constructor & Destructor Documentation

HICSimpleNavigationSchool::HICSimpleNavigationSchool ( )
inline

Definition at line 23 of file HICSimpleNavigationSchool.h.

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

Definition at line 29 of file HICSimpleNavigationSchool.cc.

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

30  :
31  theBarrelLength(0),theField(field), theTracker(theInputTracker)
32 {
33 
34  theAllDetLayersInSystem=&theInputTracker->allLayers();
35 // vector<DetLayer*> theDetLayers;
36  // Get barrel layers
37  vector<BarrelDetLayer*> blc = theTracker->barrelLayers();
38 // int kk=-1;
39  for ( vector<BarrelDetLayer*>::iterator i = blc.begin(); i != blc.end(); i++) {
40  if((*i)->specificSurface().radius()<20. || (*i)->specificSurface().radius()>65.) {
41 // cout<<"Barrel surface "<<(*i)->specificSurface().radius()<<endl;
42 // kk++;
43 // if(kk==excludedBarrelLayer) continue;
44  theBarrelLayers.push_back( (*i) );
45  theDetLayers.push_back( (*i) );
46  }
47  }
48 
49  // get forward layers
50 
51  vector<ForwardDetLayer*> flc = theTracker->forwardLayers();
52  for ( vector<ForwardDetLayer*>::iterator i = flc.begin(); i != flc.end(); i++) {
53  if(((*i)->specificSurface().outerRadius()>60.&& (*i)->specificSurface().innerRadius()>20.)|| (*i)->specificSurface().innerRadius()<10.) {
54  // cout<<" Endcap surface "<<(*i)->specificSurface().outerRadius()<<" "<<(*i)->specificSurface().innerRadius()<<endl;
55  theForwardLayers.push_back( (*i) );
56  theDetLayers.push_back( (*i) );
57  }
58  }
59 
60 // cout<<" Number of detectors"<< theDetLayers.size()<<endl;
61 
62  FDLI middle = find_if( theForwardLayers.begin(), theForwardLayers.end(),
63  not1(DetBelowZ(0)));
64  // cout<<" Point 0 "<<endl;
65  theLeftLayers = FDLC( theForwardLayers.begin(), middle);
66  // cout<<" Point 1 "<<endl;
67  theRightLayers = FDLC( middle, theForwardLayers.end());
68  // cout<<" Point 2 "<<endl;
70  // cout<<" Point 3 "<<endl;
71  // only work on positive Z side; negative by mirror symmetry later
72  linkBarrelLayers( symFinder);
73  // cout<<" Point 4 "<<endl;
74  linkForwardLayers( symFinder);
75  // cout<<" Point 5 "<<endl;
77  // cout<<" Point 6 "<<endl;
78 }
int i
Definition: DBlmapReader.cc:9
std::vector< ForwardDetLayer * > FDLC
virtual void linkBarrelLayers(SymmetricLayerFinder &symFinder)
std::vector< DetLayer * > theDetLayers
std::vector< BarrelDetLayer * > const & barrelLayers() const
virtual void linkForwardLayers(SymmetricLayerFinder &symFinder)
const GeometricSearchTracker * theTracker
const std::vector< DetLayer * > * theAllDetLayersInSystem
std::vector< ForwardDetLayer * > const & forwardLayers() const
HICSimpleNavigationSchool::HICSimpleNavigationSchool ( const GeometricSearchTracker theTracker,
const MagneticField field,
int  j,
int  l 
)

Definition at line 80 of file HICSimpleNavigationSchool.cc.

References GeometricSearchTracker::allLayers(), GeometricSearchTracker::barrelLayers(), establishInverseRelations(), excludedBarrelLayer, excludedForwardLayer, GeometricSearchTracker::forwardLayers(), i, GetRecoTauVFromDQM_MC_cff::kk, linkBarrelLayers(), linkForwardLayers(), NavigationSchool::theAllDetLayersInSystem, theBarrelLayers, theDetLayers, theForwardLayers, theLeftLayers, theRightLayers, and theTracker.

81  :
82  theBarrelLength(0),theField(field), theTracker(theInputTracker)
83 {
84 
87 
88  theAllDetLayersInSystem=&theInputTracker->allLayers();
89 // vector<DetLayer*> theDetLayers;
90  // Get barrel layers
91  vector<BarrelDetLayer*> blc = theTracker->barrelLayers();
92  int kk = 0;
93 
94  //cout<<" kk= "<<kk<<" excludedBarrel "<<excludedBarrelLayer<<" excludedForward "<<excludedForwardLayer<<endl;
95 
96  for ( vector<BarrelDetLayer*>::iterator i = blc.begin(); i != blc.end(); i++) {
97  if((*i)->specificSurface().radius()<20. || (*i)->specificSurface().radius()>65.) {
98 // cout<<"Barrel surface "<<kk<<" "<<(*i)->specificSurface().radius()<<" "<<excludedBarrelLayer<<endl;
99  if(kk != excludedBarrelLayer ) {
100  //cout<<"Included layer "<<endl;
101  theBarrelLayers.push_back( (*i) );
102  theDetLayers.push_back( (*i) );
103  }
104  else {
105  // cout<<"Excluded layer "<<endl;
106  }
107  }
108  kk++;
109  }
110 
111  // get forward layers
112  if( excludedForwardLayer > -1 ) {
113  kk=0;
114  vector<ForwardDetLayer*> flc = theTracker->forwardLayers();
115  for ( vector<ForwardDetLayer*>::iterator i = flc.begin(); i != flc.end(); i++)
116  {
117  if(((*i)->specificSurface().outerRadius()>60.&&
118  (*i)->specificSurface().innerRadius()>20.)|| (*i)->specificSurface().innerRadius()<10.)
119  {
120 // cout<<" Endcap surface "<<kk<<" "<<(*i)->specificSurface().position().z()<<endl;
121  if(kk != excludedForwardLayer && kk != excludedForwardLayer + 14)
122  {
123  //cout<<"Excluded layer "<<endl;
124  theForwardLayers.push_back( (*i) );
125  theDetLayers.push_back( (*i) );
126  } else {
127  // cout<<"Excluded layer "<<endl;
128  }
129  } // radius
130  kk++;
131  } // forward layers
132  } else {
133  vector<ForwardDetLayer*> flc = theTracker->forwardLayers();
134  for ( vector<ForwardDetLayer*>::iterator i = flc.begin(); i != flc.end(); i++)
135  {
136  if(((*i)->specificSurface().outerRadius()>60.&&
137  (*i)->specificSurface().innerRadius()>20.)|| (*i)->specificSurface().innerRadius()<10.)
138  {
139 // cout<<" Endcap surface "<<kk<<" "<<(*i)->specificSurface().position().z()<<endl;
140  //cout<<"Excluded layer "<<endl;
141  theForwardLayers.push_back( (*i) );
142  theDetLayers.push_back( (*i) );
143  } // radius
144  kk++;
145  } // forward layers
146  } // No Excluded layer
147 
148 // cout<<" Number of detectors"<< theDetLayers.size()<<endl;
149 
150  FDLI middle = find_if( theForwardLayers.begin(), theForwardLayers.end(),
151  not1(DetBelowZ(0)));
152  //cout<<" Point 0 "<<endl;
153  theLeftLayers = FDLC( theForwardLayers.begin(), middle);
154  // cout<<" Point 1 "<<endl;
155  theRightLayers = FDLC( middle, theForwardLayers.end());
156  // cout<<" Point 2 "<<endl;
158  // cout<<" Point 3 "<<endl;
159  // only work on positive Z side; negative by mirror symmetry later
160  linkBarrelLayers( symFinder);
161  // cout<<" Point 4 "<<endl;
162  linkForwardLayers( symFinder);
163  // cout<<" Point 5 "<<endl;
165  // cout<<" Point 6 "<<endl;
166 }
int i
Definition: DBlmapReader.cc:9
std::vector< ForwardDetLayer * > FDLC
virtual void linkBarrelLayers(SymmetricLayerFinder &symFinder)
std::vector< DetLayer * > theDetLayers
std::vector< BarrelDetLayer * > const & barrelLayers() const
virtual void linkForwardLayers(SymmetricLayerFinder &symFinder)
const GeometricSearchTracker * theTracker
const std::vector< DetLayer * > * theAllDetLayersInSystem
std::vector< ForwardDetLayer * > const & forwardLayers() const

Member Function Documentation

float HICSimpleNavigationSchool::barrelLength ( )
protectedvirtual

Definition at line 450 of file HICSimpleNavigationSchool.cc.

References i, LogDebug, max(), theBarrelLayers, and theBarrelLength.

Referenced by linkNextBarrelLayer().

451 {
452  if ( theBarrelLength < 1.) {
453  for (BDLI i=theBarrelLayers.begin(); i!=theBarrelLayers.end(); i++) {
455  (**i).surface().bounds().length() / 2.f);
456  }
457 
458  LogDebug("TkNavigation") << "The barrel length is " << theBarrelLength ;
459  }
460  return theBarrelLength;
461 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
const T & max(const T &a, const T &b)
void HICSimpleNavigationSchool::establishInverseRelations ( )
protectedvirtual

Definition at line 463 of file HICSimpleNavigationSchool.cc.

References i, insideOut, SimpleNavigableLayer::setInwardLinks(), theBarrelLayers, theDetLayers, and theForwardLayers.

Referenced by HICSimpleNavigationSchool().

463  {
464 
465  NavigationSetter setter(*this);
466 
467  // find for each layer which are the barrel and forward
468  // layers that point to it
469  typedef map<const DetLayer*, vector<BarrelDetLayer*>, less<const DetLayer*> > BarrelMapType;
470  typedef map<const DetLayer*, vector<ForwardDetLayer*>, less<const DetLayer*> > ForwardMapType;
471 
472  // cout<<"SimpleNavigationSchool::establishInverseRelations::point 0 "<<endl;
473  BarrelMapType reachedBarrelLayersMap;
474  ForwardMapType reachedForwardLayersMap;
475 
476 
477  for ( BDLI bli = theBarrelLayers.begin();
478  bli!=theBarrelLayers.end(); bli++) {
479  DLC reachedLC = (**bli).nextLayers( insideOut);
480  for ( DLI i = reachedLC.begin(); i != reachedLC.end(); i++) {
481  reachedBarrelLayersMap[*i].push_back( *bli);
482  }
483  }
484  // cout<<"SimpleNavigationSchool::establishInverseRelations::point 1 "<<endl;
485  for ( FDLI fli = theForwardLayers.begin();
486  fli!=theForwardLayers.end(); fli++) {
487  DLC reachedLC = (**fli).nextLayers( insideOut);
488  for ( DLI i = reachedLC.begin(); i != reachedLC.end(); i++) {
489  reachedForwardLayersMap[*i].push_back( *fli);
490  }
491  }
492 
493  // cout<<"SimpleNavigationSchool::establishInverseRelations::point 2:: size od detlayers "<<theDetLayers.size()<<endl;
494 // vector<DetLayer*> lc = theTracker->allLayers();
495  for ( vector<DetLayer*>::iterator i = theDetLayers.begin(); i != theDetLayers.end(); i++) {
496  SimpleNavigableLayer* navigableLayer =
497  dynamic_cast<SimpleNavigableLayer*>((**i).navigableLayer());
498  navigableLayer->setInwardLinks( reachedBarrelLayersMap[*i],reachedForwardLayersMap[*i] );
499  }
500  // cout<<"SimpleNavigationSchool::establishInverseRelations::point 3 "<<endl;
501 }
int i
Definition: DBlmapReader.cc:9
virtual void setInwardLinks(const BDLC &, const FDLC &, TkLayerLess sorter=TkLayerLess(outsideIn))=0
std::vector< DetLayer * > theDetLayers
std::vector< const DetLayer * > DLC
int HICSimpleNavigationSchool::getExcludedBarrelLayer ( )
inline

Definition at line 31 of file HICSimpleNavigationSchool.h.

References excludedBarrelLayer.

void HICSimpleNavigationSchool::linkBarrelLayers ( SymmetricLayerFinder symFinder)
protectedvirtual

Definition at line 184 of file HICSimpleNavigationSchool.cc.

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

Referenced by HICSimpleNavigationSchool().

185 {
186  // Link barrel layers outwards
187  for ( BDLI i = theBarrelLayers.begin(); i != theBarrelLayers.end(); i++) {
188  BDLC reachableBL;
189  FDLC leftFL;
190  FDLC rightFL;
191 
192  // always add next barrel layer first
193  if ( i+1 != theBarrelLayers.end()) reachableBL.push_back(*(i+1));
194 
195  // Add closest reachable forward layer (except for last BarrelLayer)
196  if (i != theBarrelLayers.end() - 1) {
197  linkNextForwardLayer( *i, rightFL);
198  }
199 
200  // Add next BarrelLayer with length larger than the current BL
201  if ( i+2 < theBarrelLayers.end()) {
202  linkNextLargerLayer( i, theBarrelLayers.end(), reachableBL);
203  }
204 
205  theBarrelNLC.push_back( new
206  SimpleBarrelNavigableLayer( *i, reachableBL,
207  symFinder.mirror(rightFL),
208  rightFL,theField, 5.));
209  }
210 }
int i
Definition: DBlmapReader.cc:9
std::vector< BarrelDetLayer * > BDLC
std::vector< ForwardDetLayer * > FDLC
virtual void linkNextLargerLayer(BDLI, BDLI, BDLC &)
virtual void linkNextForwardLayer(BarrelDetLayer *, FDLC &)
ForwardDetLayer * mirror(const ForwardDetLayer *layer)
void HICSimpleNavigationSchool::linkForwardLayers ( SymmetricLayerFinder symFinder)
protectedvirtual

Definition at line 249 of file HICSimpleNavigationSchool.cc.

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

Referenced by HICSimpleNavigationSchool().

250 {
251 
252  // handle right side first, groups are only on the right
253  vector<FDLC> groups = splitForwardLayers();
254 
255  LogDebug("TkNavigation") << "SimpleNavigationSchool, Forward groups size = " << groups.size() ;
256  for (vector<FDLC>::iterator g = groups.begin(); g != groups.end(); g++) {
257  LogDebug("TkNavigation") << "group " << g - groups.begin() << " has "
258  << g->size() << " layers " ;
259  }
260 
261  for ( vector<FDLC>::iterator group = groups.begin();
262  group != groups.end(); group++) {
263 
264  for ( FDLI i = group->begin(); i != group->end(); i++) {
265 
266  BDLC reachableBL;
267  FDLC reachableFL;
268 
269  // Always connect to next barrel layer first, if exists
270  linkNextBarrelLayer( *i, reachableBL);
271 
272  // Then always connect to next forward layer of "same" size,
273  // and layers of larger inner Radius
274  linkNextLayerInGroup( i, *group, reachableFL);
275 
276  // Then connect to next N fw layers of next size
277  if ( group+1 != groups.end()) {
278  linkOuterGroup( *i, *(group+1), reachableFL);
279  }
280 
281  // or connect within the group if outer radius increases
282  linkWithinGroup( i, *group, reachableFL);
283 
284  theForwardNLC.push_back( new SimpleForwardNavigableLayer( *i,reachableBL,
285  reachableFL,
286  theField,
287  5.));
288  theForwardNLC.push_back( new SimpleForwardNavigableLayer( symFinder.mirror(*i),
289  reachableBL,
290  symFinder.mirror(reachableFL),
291  theField,
292  5.));
293 
294  }
295  }
296 
297 // // now the left side by symmetry
298 // for ( FDLI ileft = theLeftLayers.begin();
299 // ileft != theLeftLayers.end(); ileft++) {
300 // ForwardDetLayer* right = symFinder.mirror( *ileft);
301 
302 // theForwardNLC.push_back( new
303 // SimpleForwardNavigableLayer( *ileft , right->nextBarrelLayers(),
304 // symFinder.mirror(right->nextForwardLayers())));
305 // }
306 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
std::vector< BarrelDetLayer * > BDLC
std::vector< ForwardDetLayer * > FDLC
virtual void linkNextLayerInGroup(FDLI fli, const FDLC &group, FDLC &reachableFL)
virtual std::vector< FDLC > splitForwardLayers()
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 &)
virtual void linkOuterGroup(ForwardDetLayer *fl, const FDLC &group, FDLC &reachableFL)
virtual void linkWithinGroup(FDLI fl, const FDLC &group, FDLC &reachableFL)
ForwardDetLayer * mirror(const ForwardDetLayer *layer)
void HICSimpleNavigationSchool::linkNextBarrelLayer ( ForwardDetLayer fl,
BDLC reachableBL 
)
protectedvirtual

Definition at line 308 of file HICSimpleNavigationSchool.cc.

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

Referenced by linkForwardLayers().

310 {
311  if ( fl->position().z() > barrelLength()) return;
312 
313  // float outerRadius = fl->specificSurface().outerRadius();
314  float zpos = fl->position().z();
315  for ( BDLI bli = theBarrelLayers.begin(); bli != theBarrelLayers.end(); bli++) {
316 // if ( outerRadius < (**bli).specificSurface().radius() &&
317 // zpos < (**bli).surface().bounds().length() / 2.)
318  if( fabs(zpos) > 130. && fabs(zpos) < 132. )
319  {
320  //cout<<" Forward layer "<<fl->position().z()<<" to Barrel layer "<<(**bli).specificSurface().radius()<<endl;
321  reachableBL.push_back( *bli);
322  return;
323  }
324  }
325 }
T z() const
Definition: PV3DBase.h:63
virtual const Surface::PositionType & position() const
Returns position of the surface.
void HICSimpleNavigationSchool::linkNextForwardLayer ( BarrelDetLayer bl,
FDLC rightFL 
)
protectedvirtual

Definition at line 212 of file HICSimpleNavigationSchool.cc.

References theRightLayers.

Referenced by linkBarrelLayers().

214 {
215  // find first forward layer with larger Z and larger outer radius
216  // float length = bl->surface().bounds().length() / 2.;
217 // float radius = bl->specificSurface().radius();
218  for ( FDLI fli = theRightLayers.begin();
219  fli != theRightLayers.end(); fli++) {
220  // if ( length < (**fli).position().z() &&
221  // radius < (**fli).specificSurface().outerRadius())
222  if(fabs((**fli).position().z())>130. && fabs((**fli).position().z())<132.)
223  {
224 #ifdef DEBUG
225 // cout<<" Add to barrel layer "<<radius<<" Forward layer "<<(**fli).position().z()<<endl;
226 #endif
227  rightFL.push_back( *fli);
228  return;
229  }
230  }
231 }
void HICSimpleNavigationSchool::linkNextLargerLayer ( BDLI  bli,
BDLI  end,
BDLC reachableBL 
)
protectedvirtual

Definition at line 233 of file HICSimpleNavigationSchool.cc.

References end, epsilon, and i.

Referenced by linkBarrelLayers().

235 {
236  // compare length of next layer with length of following ones
237  float length = (**(bli+1)).surface().bounds().length();
238  float epsilon = 0.1;
239 
240  for ( BDLI i = bli+2; i < end; i++) {
241  if ( length + epsilon < (**i).surface().bounds().length()) {
242  reachableBL.push_back( *i);
243  return;
244  }
245  }
246 }
int i
Definition: DBlmapReader.cc:9
#define end
Definition: vmac.h:38
const double epsilon
void HICSimpleNavigationSchool::linkNextLayerInGroup ( FDLI  fli,
const FDLC group,
FDLC reachableFL 
)
protectedvirtual

Definition at line 328 of file HICSimpleNavigationSchool.cc.

References epsilon, and i.

Referenced by linkForwardLayers().

331 {
332  // Always connect to next forward layer of "same" size, if exists
333  if ( fli+1 != group.end()) {
334  reachableFL.push_back( *(fli+1));
335  // If that layer has an inner radius larger then the current one
336  // also connect ALL next disks of same radius.
337  float innerRThis = (**fli).specificSurface().innerRadius();
338  float innerRNext = (**(fli+1)).specificSurface().innerRadius();
339  const float epsilon = 2.f;
340 
341  if (innerRNext > innerRThis + epsilon) {
342  // next disk is smaller, so it doesn't cover fully subsequent ones
343  // of same radius
344 
345  int i = 2;
346  while ( (fli+i) != group.end()) {
347  if ( (**(fli+i)).specificSurface().innerRadius() <
348  innerRNext + epsilon) {
349  // following disk has not increased in ineer radius
350  reachableFL.push_back( *(fli+i));
351  i++;
352  } else {
353  break;
354  }
355  }
356  }
357  }
358 }
int i
Definition: DBlmapReader.cc:9
const double epsilon
void HICSimpleNavigationSchool::linkOuterGroup ( ForwardDetLayer fl,
const FDLC group,
FDLC reachableFL 
)
protectedvirtual

Definition at line 361 of file HICSimpleNavigationSchool.cc.

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

Referenced by linkForwardLayers().

364 {
365 
366  // insert N layers with Z grater than fl
367 
368  ConstFDLI first = find_if( group.begin(), group.end(),
369  not1( DetBelowZ( fl->position().z())));
370  if ( first != group.end()) {
371 
372  // Hard-wired constant!!!!!!
373  ConstFDLI last = min( first + 7, group.end());
374 
375  reachableFL.insert( reachableFL.end(), first, last);
376  }
377 }
#define min(a, b)
Definition: mlp_lapack.h:161
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 HICSimpleNavigationSchool::linkWithinGroup ( FDLI  fl,
const FDLC group,
FDLC reachableFL 
)
protectedvirtual

Definition at line 379 of file HICSimpleNavigationSchool.cc.

References outerRadiusIncrease().

Referenced by linkForwardLayers().

382 {
383  ConstFDLI biggerLayer = outerRadiusIncrease( fl, group);
384  if ( biggerLayer != group.end() && biggerLayer != fl+1) {
385  reachableFL.push_back( *biggerLayer);
386  }
387 }
virtual ConstFDLI outerRadiusIncrease(FDLI fl, const FDLC &group)
HICSimpleNavigationSchool::StateType HICSimpleNavigationSchool::navigableLayers ( ) const
virtual

Implements NavigationSchool.

Definition at line 169 of file HICSimpleNavigationSchool.cc.

References query::result, theBarrelNLC, and theForwardNLC.

170 {
172  for ( vector< SimpleBarrelNavigableLayer*>::const_iterator
173  ib = theBarrelNLC.begin(); ib != theBarrelNLC.end(); ib++) {
174  result.push_back( *ib);
175  }
176  for ( vector< SimpleForwardNavigableLayer*>::const_iterator
177  ifl = theForwardNLC.begin(); ifl != theForwardNLC.end(); ifl++) {
178  result.push_back( *ifl);
179  }
180  return result;
181 }
tuple result
Definition: query.py:137
std::vector< NavigableLayer * > StateType
HICSimpleNavigationSchool::ConstFDLI HICSimpleNavigationSchool::outerRadiusIncrease ( FDLI  fl,
const FDLC group 
)
protectedvirtual

Definition at line 390 of file HICSimpleNavigationSchool.cc.

References epsilon.

Referenced by linkWithinGroup().

391 {
392  const float epsilon = 5.f;
393  float outerRadius = (**fl).specificSurface().outerRadius();
394  while ( ++fl != group.end()) {
395  if ( (**fl).specificSurface().outerRadius() > outerRadius + epsilon) {
396  return fl;
397  }
398  }
399  return fl;
400 }
const double epsilon
void HICSimpleNavigationSchool::setExcludedBarrelLayer ( int &  j)
inline

Definition at line 29 of file HICSimpleNavigationSchool.h.

References excludedBarrelLayer, and j.

vector< HICSimpleNavigationSchool::FDLC > HICSimpleNavigationSchool::splitForwardLayers ( )
protectedvirtual

Definition at line 403 of file HICSimpleNavigationSchool.cc.

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

Referenced by linkForwardLayers().

404 {
405  // only work on positive Z side; negative by mirror symmetry later
406 
407  FDLC myRightLayers( theRightLayers);
408  FDLI begin = myRightLayers.begin();
409  FDLI end = myRightLayers.end();
410 
411  // sort according to inner radius
412  sort ( begin, end, DiskLessInnerRadius());
413 
414  // partition in cylinders
415  vector<FDLC> result;
416  FDLC current;
417  current.push_back( *begin);
418  for ( FDLI i = begin+1; i != end; i++) {
419 
420  LogDebug("TkNavigation") << "(**i).specificSurface().innerRadius() = "
421  << (**i).specificSurface().innerRadius() << endl
422  << "(**(i-1)).specificSurface().outerRadius()) = "
423  << (**(i-1)).specificSurface().outerRadius() ;
424 
425  // if inner radius of i is larger than outer radius of i-1 then split!
426  if ( (**i).specificSurface().innerRadius() >
427  (**(i-1)).specificSurface().outerRadius()) {
428 
429  LogDebug("TkNavigation") << "found break between groups" ;
430 
431  // sort layers in group along Z
432  sort ( current.begin(), current.end(), DetLessZ());
433 
434  result.push_back(current);
435  current.clear();
436  }
437  current.push_back(*i);
438  }
439  result.push_back(current); // save last one too
440 
441  // now sort subsets in Z
442  for ( vector<FDLC>::iterator ivec = result.begin();
443  ivec != result.end(); ivec++) {
444  sort( ivec->begin(), ivec->end(), DetLessZ());
445  }
446 
447  return result;
448 }
#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

int HICSimpleNavigationSchool::excludedBarrelLayer
protected
int HICSimpleNavigationSchool::excludedForwardLayer
protected

Definition at line 40 of file HICSimpleNavigationSchool.h.

Referenced by HICSimpleNavigationSchool().

BDLC HICSimpleNavigationSchool::theBarrelLayers
protected
float HICSimpleNavigationSchool::theBarrelLength
protected

Definition at line 54 of file HICSimpleNavigationSchool.h.

Referenced by barrelLength().

BNLCType HICSimpleNavigationSchool::theBarrelNLC
protected

Definition at line 58 of file HICSimpleNavigationSchool.h.

Referenced by linkBarrelLayers(), and navigableLayers().

std::vector<DetLayer*> HICSimpleNavigationSchool::theDetLayers
protected
const MagneticField* HICSimpleNavigationSchool::theField
protected

Definition at line 87 of file HICSimpleNavigationSchool.h.

Referenced by linkBarrelLayers(), and linkForwardLayers().

FDLC HICSimpleNavigationSchool::theForwardLayers
protected
FNLCType HICSimpleNavigationSchool::theForwardNLC
protected

Definition at line 59 of file HICSimpleNavigationSchool.h.

Referenced by linkForwardLayers(), and navigableLayers().

FDLC HICSimpleNavigationSchool::theLeftLayers
protected

Definition at line 53 of file HICSimpleNavigationSchool.h.

Referenced by HICSimpleNavigationSchool().

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

Definition at line 88 of file HICSimpleNavigationSchool.h.

Referenced by HICSimpleNavigationSchool().