CMS 3D CMS Logo

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

#include <SimpleBarrelNavigableLayer.h>

Inheritance diagram for SimpleBarrelNavigableLayer:
SimpleNavigableLayer NavigableLayer

Public Member Functions

virtual std::vector< const
DetLayer * > 
compatibleLayers (NavigationDirection direction) const
 
virtual std::vector< const
DetLayer * > 
compatibleLayers (const FreeTrajectoryState &fts, PropagationDirection timeDirection) const
 
virtual DetLayerdetLayer () const
 
virtual std::vector< const
DetLayer * > 
nextLayers (NavigationDirection direction) const
 
virtual std::vector< const
DetLayer * > 
nextLayers (const FreeTrajectoryState &fts, PropagationDirection timeDirection) const
 
virtual void setAdditionalLink (DetLayer *, NavigationDirection direction=insideOut)
 
virtual void setDetLayer (DetLayer *dl)
 
virtual void setInwardLinks (const BDLC &theBarrelv, const FDLC &theForwardv, TkLayerLess sorter=TkLayerLess(outsideIn))
 
 SimpleBarrelNavigableLayer (BarrelDetLayer *detLayer, const BDLC &outerBLC, const FDLC &outerLeftFL, const FDLC &outerRightFL, const MagneticField *field, float epsilon, bool checkCrossingSide=true)
 
 SimpleBarrelNavigableLayer (BarrelDetLayer *detLayer, const BDLC &outerBLC, const BDLC &innerBLC, const BDLC &allOuterBLC, const BDLC &allInnerBLC, const FDLC &outerLeftFL, const FDLC &outerRightFL, const FDLC &allOuterLeftFL, const FDLC &allOuterRightFL, const FDLC &innerLeftFL, const FDLC &innerRightFL, const FDLC &allInnerLeftFL, const FDLC &allInnerRightFL, const MagneticField *field, float epsilon, bool checkCrossingSide=true)
 
- Public Member Functions inherited from SimpleNavigableLayer
virtual std::vector< const
DetLayer * > 
compatibleLayers (const FreeTrajectoryState &fts, PropagationDirection timeDirection, int &counter) const
 
void setCheckCrossingSide (bool docheck)
 
 SimpleNavigableLayer (const MagneticField *field, float eps, bool checkCrossingSide=true)
 
- Public Member Functions inherited from NavigableLayer
virtual ~NavigableLayer ()
 

Private Attributes

bool areAllReachableLayersSet
 
BDLC theAllInnerBarrelLayers
 
FDLC theAllInnerLeftForwardLayers
 
FDLC theAllInnerRightForwardLayers
 
BDLC theAllOuterBarrelLayers
 
FDLC theAllOuterLeftForwardLayers
 
FDLC theAllOuterRightForwardLayers
 
BarrelDetLayertheDetLayer
 
BDLC theInnerBarrelLayers
 
FDLC theInnerLeftForwardLayers
 
FDLC theInnerRightForwardLayers
 
DLC theNegInnerLayers
 
DLC theNegOuterLayers
 
BDLC theOuterBarrelLayers
 
FDLC theOuterLeftForwardLayers
 
FDLC theOuterRightForwardLayers
 
DLC thePosInnerLayers
 
DLC thePosOuterLayers
 

Additional Inherited Members

- Public Types inherited from SimpleNavigableLayer
typedef std::vector
< BarrelDetLayer * > 
BDLC
 
typedef std::vector< const
DetLayer * > 
DLC
 
typedef std::vector
< ForwardDetLayer * > 
FDLC
 
- Public Attributes inherited from SimpleNavigableLayer
bool theSelfSearch
 
- Protected Types inherited from SimpleNavigableLayer
typedef BDLC::iterator BDLI
 
typedef BDLC::const_iterator ConstBDLI
 
typedef FDLC::const_iterator ConstFDLI
 
typedef FDLC::iterator FDLI
 
typedef TrajectoryStateOnSurface TSOS
 
- Protected Member Functions inherited from SimpleNavigableLayer
TSOS crossingState (const FreeTrajectoryState &fts, PropagationDirection dir) const
 
Propagatorpropagator (PropagationDirection dir) const
 
void pushResult (DLC &result, const FDLC &tmp) const
 
void pushResult (DLC &result, const BDLC &tmp) const
 
bool wellInside (const FreeTrajectoryState &fts, PropagationDirection dir, const BarrelDetLayer *bl, DLC &result) const
 
bool wellInside (const FreeTrajectoryState &fts, PropagationDirection dir, const ForwardDetLayer *bl, DLC &result) const
 
bool wellInside (const FreeTrajectoryState &fts, PropagationDirection dir, ConstBDLI begin, ConstBDLI end, DLC &result) const
 
bool wellInside (const FreeTrajectoryState &fts, PropagationDirection dir, const DLC &layers, DLC &result) const
 
bool wellInside (const FreeTrajectoryState &fts, PropagationDirection dir, ConstFDLI begin, ConstFDLI end, DLC &result) const
 
- Protected Attributes inherited from SimpleNavigableLayer
bool theCheckCrossingSide
 
float theEpsilon
 
AnalyticalPropagator thePropagator
 

Detailed Description

A concrete NavigableLayer for the barrel

Definition at line 12 of file SimpleBarrelNavigableLayer.h.

Constructor & Destructor Documentation

SimpleBarrelNavigableLayer::SimpleBarrelNavigableLayer ( BarrelDetLayer detLayer,
const BDLC outerBLC,
const FDLC outerLeftFL,
const FDLC outerRightFL,
const MagneticField field,
float  epsilon,
bool  checkCrossingSide = true 
)

Definition at line 23 of file SimpleBarrelNavigableLayer.cc.

References python.multivaluedict::sort(), theNegOuterLayers, theOuterBarrelLayers, theOuterLeftForwardLayers, theOuterRightForwardLayers, and thePosOuterLayers.

29  :
30  SimpleNavigableLayer(field,epsilon,checkCrossingSide),
32  theDetLayer( detLayer),
33  theOuterBarrelLayers( outerBLC),
34  theOuterLeftForwardLayers( outerLeftFL),
35  theOuterRightForwardLayers( outerRightFL)
36 
37 {
38  // put barrel and forward layers together
39  theNegOuterLayers.reserve( outerBLC.size() + outerLeftFL.size());
40  thePosOuterLayers.reserve( outerBLC.size() + outerRightFL.size());
41 
42  for (ConstBDLI bl=outerBLC.begin(); bl!=outerBLC.end(); bl++)
43  theNegOuterLayers.push_back( *bl);
44  thePosOuterLayers = theNegOuterLayers; // barrel part the same
45 
46  for (ConstFDLI fl=outerLeftFL.begin(); fl!=outerLeftFL.end(); fl++)
47  theNegOuterLayers.push_back( *fl);
48  for (ConstFDLI fl=outerRightFL.begin(); fl!=outerRightFL.end(); fl++)
49  thePosOuterLayers.push_back( *fl);
50 
51  // sort the outer layers
57 }
SimpleNavigableLayer(const MagneticField *field, float eps, bool checkCrossingSide=true)
FDLC::const_iterator ConstFDLI
const double epsilon
BDLC::const_iterator ConstBDLI
SimpleBarrelNavigableLayer::SimpleBarrelNavigableLayer ( BarrelDetLayer detLayer,
const BDLC outerBLC,
const BDLC innerBLC,
const BDLC allOuterBLC,
const BDLC allInnerBLC,
const FDLC outerLeftFL,
const FDLC outerRightFL,
const FDLC allOuterLeftFL,
const FDLC allOuterRightFL,
const FDLC innerLeftFL,
const FDLC innerRightFL,
const FDLC allInnerLeftFL,
const FDLC allInnerRightFL,
const MagneticField field,
float  epsilon,
bool  checkCrossingSide = true 
)

Definition at line 61 of file SimpleBarrelNavigableLayer.cc.

References outsideIn, python.multivaluedict::sort(), theInnerBarrelLayers, theInnerLeftForwardLayers, theInnerRightForwardLayers, theNegInnerLayers, theNegOuterLayers, theOuterBarrelLayers, theOuterLeftForwardLayers, theOuterRightForwardLayers, thePosInnerLayers, and thePosOuterLayers.

76  :
77  SimpleNavigableLayer(field,epsilon,checkCrossingSide),
79  theDetLayer( detLayer),
80  theOuterBarrelLayers( outerBLC),
81  theInnerBarrelLayers( innerBLC),
82  theAllOuterBarrelLayers( allOuterBLC),
83  theAllInnerBarrelLayers( allInnerBLC),
84  theOuterLeftForwardLayers( outerLeftFL),
85  theOuterRightForwardLayers( outerRightFL),
86  theAllOuterLeftForwardLayers( allOuterLeftFL),
87  theAllOuterRightForwardLayers( allOuterRightFL),
88  theInnerLeftForwardLayers( innerLeftFL),
89  theInnerRightForwardLayers( innerRightFL),
90  theAllInnerLeftForwardLayers( allInnerLeftFL),
91  theAllInnerRightForwardLayers( allInnerRightFL)
92 {
93  // put barrel and forward layers together
94  theNegOuterLayers.reserve( outerBLC.size() + outerLeftFL.size());
95  thePosOuterLayers.reserve( outerBLC.size() + outerRightFL.size());
96  theNegInnerLayers.reserve( innerBLC.size() + innerLeftFL.size());
97  thePosInnerLayers.reserve( innerBLC.size() + innerRightFL.size());
98 
99 
100  for (ConstBDLI bl=outerBLC.begin(); bl!=outerBLC.end(); bl++)
101  theNegOuterLayers.push_back( *bl);
102  thePosOuterLayers = theNegOuterLayers; // barrel part the same
103 
104  for (ConstFDLI fl=outerLeftFL.begin(); fl!=outerLeftFL.end(); fl++)
105  theNegOuterLayers.push_back( *fl);
106  for (ConstFDLI fl=outerRightFL.begin(); fl!=outerRightFL.end(); fl++)
107  thePosOuterLayers.push_back( *fl);
108 
109  for (ConstBDLI bl=innerBLC.begin(); bl!=innerBLC.end(); bl++)
110  theNegInnerLayers.push_back( *bl);
111  thePosInnerLayers = theNegInnerLayers; // barrel part the same
112 
113  for (ConstFDLI fl=innerLeftFL.begin(); fl!=innerLeftFL.end(); fl++)
114  theNegInnerLayers.push_back( *fl);
115  for (ConstFDLI fl=innerRightFL.begin(); fl!=innerRightFL.end(); fl++)
116  thePosInnerLayers.push_back( *fl);
117 
118  // sort the outer layers
129 
130 }
SimpleNavigableLayer(const MagneticField *field, float eps, bool checkCrossingSide=true)
FDLC::const_iterator ConstFDLI
const double epsilon
BDLC::const_iterator ConstBDLI

Member Function Documentation

vector< const DetLayer * > SimpleBarrelNavigableLayer::compatibleLayers ( NavigationDirection  direction) const
virtual

Implements NavigableLayer.

Definition at line 257 of file SimpleBarrelNavigableLayer.cc.

References areAllReachableLayersSet, i, insideOut, query::result, theAllInnerBarrelLayers, theAllInnerLeftForwardLayers, theAllInnerRightForwardLayers, theAllOuterBarrelLayers, theAllOuterLeftForwardLayers, and theAllOuterRightForwardLayers.

Referenced by compatibleLayers().

258 {
260  edm::LogError("TkNavigation") << "ERROR: compatibleLayers() method used without all reachableLayers are set" ;
261  throw DetLayerException("compatibleLayers() method used without all reachableLayers are set");
262  }
263 
264  vector<const DetLayer*> result;
265  if ( dir == insideOut) {
266  for ( BDLC::const_iterator i=theAllOuterBarrelLayers.begin();
267  i!=theAllOuterBarrelLayers.end(); i++) {
268  result.push_back(*i);
269  }
270 // result = theAllOuterBarrelLayers;
271  for ( FDLC::const_iterator i=theAllOuterLeftForwardLayers.begin();
272  i!=theAllOuterLeftForwardLayers.end(); i++) {
273  // avoid duplication of barrel layers
274  result.push_back(*i);
275  }
276  for ( FDLC::const_iterator i=theAllOuterRightForwardLayers.begin();
277  i!=theAllOuterRightForwardLayers.end(); i++) {
278  // avoid duplication of barrel layers
279  result.push_back(*i);
280  }
281  }
282  else {
283  for ( BDLC::const_iterator i=theAllInnerBarrelLayers.begin();
284  i!=theAllInnerBarrelLayers.end(); i++) {
285  result.push_back(*i);
286  }
287  for ( FDLC::const_iterator i=theAllInnerLeftForwardLayers.begin();
288  i!=theAllInnerLeftForwardLayers.end(); i++) {
289  // avoid duplication of barrel layers
290  result.push_back(*i);
291  }
292  for ( FDLC::const_iterator i=theAllInnerRightForwardLayers.begin();
293  i!=theAllInnerRightForwardLayers.end(); i++) {
294  // avoid duplication of barrel layers
295  result.push_back(*i);
296  }
297 
298  }
299 
300  return result;
301 }
Common base class.
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: query.py:137
dbl *** dir
Definition: mlp_gen.cc:35
vector< const DetLayer * > SimpleBarrelNavigableLayer::compatibleLayers ( const FreeTrajectoryState fts,
PropagationDirection  timeDirection 
) const
virtual

Reimplemented from NavigableLayer.

Definition at line 304 of file SimpleBarrelNavigableLayer.cc.

References areAllReachableLayersSet, SimpleNavigableLayer::compatibleLayers(), compatibleLayers(), FreeTrajectoryState::hasError(), insideOut, FreeTrajectoryState::momentum(), oppositeToMomentum, outsideIn, FreeTrajectoryState::parameters(), FreeTrajectoryState::position(), query::result, groupFilesInBlocks::temp, SimpleNavigableLayer::wellInside(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

306 {
308  int counter = 0;
309  return SimpleNavigableLayer::compatibleLayers(fts,dir,counter);
310  // edm::LogError("TkNavigation") << "ERROR: compatibleLayers() method used without all reachableLayers are set" ;
311  // throw DetLayerException("compatibleLayers() method used without all reachableLayers are set");
312  }
313 
314  vector<const DetLayer*> result;
315  FreeTrajectoryState ftsWithoutErrors = (fts.hasError()) ?
316  FreeTrajectoryState( fts.parameters()) : fts;
317 
318  //establish whether the tracks is crossing the tracker from outer layers to inner ones
319  //or from inner to outer.
320  GlobalVector transversePosition(fts.position().x(), fts.position().y(), 0);
321  //GlobalVector transverseMomentum(fts.momentum().x(), fts.momentum().y(), 0);
322  //bool isInOutTrack = (fts.position().basicVector().dot(fts.momentum().basicVector())>0) ? 1 : 0;
323  bool isInOutTrack = (transversePosition.dot(fts.momentum())>0) ? 1 : 0;
324  //establish whether inner or outer layers are crossed after propagation, according
325  //to BOTH propagationDirection AND track momentum
326  bool dirOppositeXORisInOutTrack = ( !(dir == oppositeToMomentum) && isInOutTrack) || ((dir == oppositeToMomentum) && !isInOutTrack);
327 
328  vector<const DetLayer*> temp = dirOppositeXORisInOutTrack ? compatibleLayers(insideOut) : compatibleLayers(outsideIn);
329  wellInside( ftsWithoutErrors, dir, temp, result);
330 
331  return result;
332 
333 }
const GlobalTrajectoryParameters & parameters() const
T y() const
Definition: PV3DBase.h:62
virtual std::vector< const DetLayer * > compatibleLayers(const FreeTrajectoryState &fts, PropagationDirection timeDirection, int &counter) const
tuple result
Definition: query.py:137
GlobalVector momentum() const
GlobalPoint position() const
virtual std::vector< const DetLayer * > compatibleLayers(NavigationDirection direction) const
bool wellInside(const FreeTrajectoryState &fts, PropagationDirection dir, const BarrelDetLayer *bl, DLC &result) const
dbl *** dir
Definition: mlp_gen.cc:35
T x() const
Definition: PV3DBase.h:61
DetLayer * SimpleBarrelNavigableLayer::detLayer ( ) const
virtual

Implements NavigableLayer.

Definition at line 336 of file SimpleBarrelNavigableLayer.cc.

References theDetLayer.

Referenced by nextLayers().

336 { return theDetLayer;}
vector< const DetLayer * > SimpleBarrelNavigableLayer::nextLayers ( NavigationDirection  direction) const
virtual

Implements NavigableLayer.

Definition at line 134 of file SimpleBarrelNavigableLayer.cc.

References GeomDetEnumerators::endcap, i, insideOut, query::result, theNegInnerLayers, theNegOuterLayers, thePosInnerLayers, and thePosOuterLayers.

135 {
136  vector<const DetLayer*> result;
137 
138  // the order is the one in which layers
139  // should be checked for a reasonable trajectory
140 
141  if ( dir == insideOut) {
142  result = theNegOuterLayers;
143  for ( DLC::const_iterator i=thePosOuterLayers.begin();
144  i!=thePosOuterLayers.end(); i++) {
145  // avoid duplication of barrel layers
146  if ((**i).location() == GeomDetEnumerators::endcap) result.push_back(*i);
147  }
148  }
149  else {
150  result = theNegInnerLayers;
151  for ( DLC::const_iterator i=thePosInnerLayers.begin();
152  i!=thePosInnerLayers.end(); i++) {
153  // avoid duplication of barrel layers
154  if ((**i).location() == GeomDetEnumerators::endcap) result.push_back(*i);
155  }
156  }
157  return result;
158 }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: query.py:137
dbl *** dir
Definition: mlp_gen.cc:35
vector< const DetLayer * > SimpleBarrelNavigableLayer::nextLayers ( const FreeTrajectoryState fts,
PropagationDirection  timeDirection 
) const
virtual

Implements NavigableLayer.

Definition at line 161 of file SimpleBarrelNavigableLayer.cc.

References alongMomentum, detLayer(), FreeTrajectoryState::hasError(), LogDebug, FreeTrajectoryState::momentum(), oppositeToMomentum, FreeTrajectoryState::parameters(), FreeTrajectoryState::position(), query::result, theInnerBarrelLayers, theInnerLeftForwardLayers, theInnerRightForwardLayers, theNegInnerLayers, theNegOuterLayers, theOuterBarrelLayers, theOuterLeftForwardLayers, theOuterRightForwardLayers, thePosInnerLayers, thePosOuterLayers, SimpleNavigableLayer::theSelfSearch, SimpleNavigableLayer::wellInside(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

163 {
164  // This method contains the sequence in which the layers are tested.
165  // The iteration stops as soon as a layer contains the propagated state
166  // within epsilon.
167 
168  vector<const DetLayer*> result;
169 
170  FreeTrajectoryState ftsWithoutErrors = (fts.hasError()) ?
172  fts;
173 
174  //establish whether the tracks is crossing the tracker from outer layers to inner ones
175  //or from inner to outer.
176  GlobalVector transversePosition(fts.position().x(), fts.position().y(), 0);
177  //GlobalVector transverseMomentum(fts.momentum().x(), fts.momentum().y(), 0);
178  //bool isInOutTrack = (fts.position().basicVector().dot(fts.momentum().basicVector())>0) ? 1 : 0;
179  bool isInOutTrackBarrel = (transversePosition.dot(fts.momentum())>0) ? 1 : 0;
180  //cout << "dot: " << transversePosition.dot(fts.momentum()) << endl;
181 
182  float zpos = fts.position().z();
183  bool isInOutTrackFWD = fts.momentum().z()*zpos>0;
184 
185 
186  //establish whether inner or outer layers are crossed after propagation, according
187  //to BOTH propagationDirection AND track momentum
188  bool dirOppositeXORisInOutTrackBarrel = ( !(dir == oppositeToMomentum) && isInOutTrackBarrel) || ((dir == oppositeToMomentum) && !isInOutTrackBarrel);
189  bool dirOppositeXORisInOutTrackFWD = ( !(dir == oppositeToMomentum) && isInOutTrackFWD) || ((dir == oppositeToMomentum) && !isInOutTrackFWD);
190 
191  LogDebug("SimpleBarrelNavigableLayer") << "is alongMomentum? " << (dir == alongMomentum) << endl
192  << "isInOutTrackBarrel: " << isInOutTrackBarrel << endl
193  << "isInOutTrackFWD: " << isInOutTrackFWD << endl
194  << "dirOppositeXORisInOutTrackFWD: " << dirOppositeXORisInOutTrackFWD << endl
195  << "dirOppositeXORisInOutTrackBarrel: "<< dirOppositeXORisInOutTrackBarrel << endl;
196 
197  bool signZmomentumXORdir = (( (fts.momentum().z() > 0) && !(dir == alongMomentum) ) ||
198  (!(fts.momentum().z() > 0) && (dir == alongMomentum) ) );
199 
200 
201  if ( dirOppositeXORisInOutTrackBarrel && dirOppositeXORisInOutTrackFWD) {
202 
203  if ( signZmomentumXORdir ) {
204  wellInside( ftsWithoutErrors, dir, theNegOuterLayers, result);
205  }
206  else {
207  wellInside( ftsWithoutErrors, dir, thePosOuterLayers, result);
208  }
209  } else if (!dirOppositeXORisInOutTrackBarrel && !dirOppositeXORisInOutTrackFWD){
210  if ( signZmomentumXORdir ) {
211  wellInside( ftsWithoutErrors, dir, thePosInnerLayers, result);
212  }
213  else {
214  wellInside( ftsWithoutErrors, dir, theNegInnerLayers, result);
215  }
216  } else if (!dirOppositeXORisInOutTrackBarrel && dirOppositeXORisInOutTrackFWD){
217  wellInside(ftsWithoutErrors, dir, theInnerBarrelLayers.begin(), theInnerBarrelLayers.end(), result);
218 
219  if (signZmomentumXORdir){
220  wellInside(ftsWithoutErrors, dir, theInnerLeftForwardLayers.begin(), theInnerLeftForwardLayers.end(), result);
221  wellInside(ftsWithoutErrors, dir, theOuterLeftForwardLayers.begin(), theOuterLeftForwardLayers.end(), result);
222  } else {
223  wellInside(ftsWithoutErrors, dir, theInnerRightForwardLayers.begin(), theInnerRightForwardLayers.end(), result);
224  wellInside(ftsWithoutErrors, dir, theOuterRightForwardLayers.begin(), theOuterRightForwardLayers.end(), result);
225  }
226  } else {
227  if (signZmomentumXORdir){
228  wellInside(ftsWithoutErrors, dir, theInnerLeftForwardLayers.begin(), theInnerLeftForwardLayers.end(), result);
229  } else {
230  wellInside(ftsWithoutErrors, dir, theInnerRightForwardLayers.begin(), theInnerRightForwardLayers.end(), result);
231  }
232  wellInside(ftsWithoutErrors, dir, theOuterBarrelLayers.begin(), theOuterBarrelLayers.end(), result);
233  }
234 
235  bool goingIntoTheBarrel = (!isInOutTrackBarrel && dir==alongMomentum) || (isInOutTrackBarrel && dir==oppositeToMomentum) ;
236 
237  LogDebug("SimpleBarrelNavigableLayer") << "goingIntoTheBarrel: " << goingIntoTheBarrel;
238 
239 
240  if (theSelfSearch && result.size()==0){
241  if (!goingIntoTheBarrel){ LogDebug("SimpleBarrelNavigableLayer")<<" state is not going toward the center of the barrel. not adding self search.";}
242  else{
243  const BarrelDetLayer * bl = dynamic_cast<const BarrelDetLayer *>(detLayer()); unsigned int before=result.size();
244  LogDebug("SimpleBarrelNavigableLayer")<<" I am trying to added myself as a next layer.";
245  wellInside(ftsWithoutErrors, dir, bl, result);
246  unsigned int after=result.size();
247  if (before!=after)
248  LogDebug("SimpleBarrelNavigableLayer")<<" I have added myself as a next layer.";
249  }
250  }
251 
252  return result;
253 }
#define LogDebug(id)
const GlobalTrajectoryParameters & parameters() const
T y() const
Definition: PV3DBase.h:62
T z() const
Definition: PV3DBase.h:63
tuple result
Definition: query.py:137
GlobalVector momentum() const
GlobalPoint position() const
bool wellInside(const FreeTrajectoryState &fts, PropagationDirection dir, const BarrelDetLayer *bl, DLC &result) const
dbl *** dir
Definition: mlp_gen.cc:35
virtual DetLayer * detLayer() const
T x() const
Definition: PV3DBase.h:61
void SimpleBarrelNavigableLayer::setAdditionalLink ( DetLayer additional,
NavigationDirection  direction = insideOut 
)
virtual

Implements SimpleNavigableLayer.

Definition at line 385 of file SimpleBarrelNavigableLayer.cc.

References insideOut, GeometricSearchDet::position(), theAllInnerBarrelLayers, theAllInnerLeftForwardLayers, theAllInnerRightForwardLayers, theAllOuterBarrelLayers, theAllOuterLeftForwardLayers, theAllOuterRightForwardLayers, theInnerBarrelLayers, theInnerLeftForwardLayers, theInnerRightForwardLayers, theNegInnerLayers, theNegOuterLayers, theOuterBarrelLayers, theOuterLeftForwardLayers, theOuterRightForwardLayers, thePosInnerLayers, thePosOuterLayers, and PV3DBase< T, PVType, FrameType >::z().

385  {
386  ForwardDetLayer* fadditional = dynamic_cast<ForwardDetLayer*>(additional);
387  BarrelDetLayer* badditional = dynamic_cast<BarrelDetLayer*>(additional);
388  if (badditional){
389  if (direction==insideOut){
390  theAllOuterBarrelLayers.push_back(badditional);
391  theOuterBarrelLayers.push_back(badditional);
392  theNegOuterLayers.push_back(badditional);
393  thePosOuterLayers.push_back(badditional);
394  return;
395  }
396  theAllInnerBarrelLayers.push_back(badditional);
397  theInnerBarrelLayers.push_back(badditional);
398  theNegInnerLayers.push_back(badditional);
399  thePosInnerLayers.push_back(badditional);
400  return;
401  } else if (fadditional){
402  double zpos = fadditional->position().z();
403  if (direction==insideOut){
404  if (zpos>0){
405  theOuterRightForwardLayers.push_back(fadditional);
406  theAllOuterRightForwardLayers.push_back(fadditional);
407  thePosOuterLayers.push_back(fadditional);
408  return;
409  }
410  theOuterLeftForwardLayers.push_back(fadditional);
411  theAllOuterLeftForwardLayers.push_back(fadditional);
412  theNegOuterLayers.push_back(fadditional);
413  return;
414  }
415  if (zpos>0){
416  theInnerRightForwardLayers.push_back(fadditional);
417  theAllInnerRightForwardLayers.push_back(fadditional);
418  thePosInnerLayers.push_back(fadditional);
419  return;
420  }
421  theInnerLeftForwardLayers.push_back(fadditional);
422  theAllInnerLeftForwardLayers.push_back(fadditional);
423  theNegInnerLayers.push_back(fadditional);
424  return;
425  }
426  edm::LogError("TkNavigation") << "trying to add neither a ForwardDetLayer nor a BarrelDetLayer";
427  return;
428 }
T z() const
Definition: PV3DBase.h:63
virtual const Surface::PositionType & position() const
Returns position of the surface.
void SimpleBarrelNavigableLayer::setDetLayer ( DetLayer dl)
virtual

Implements NavigableLayer.

Definition at line 338 of file SimpleBarrelNavigableLayer.cc.

References dtNoiseDBValidation_cfg::cerr.

338  {
339  cerr << "Warniong: SimpleBarrelNavigableLayer::setDetLayer called."
340  << endl << "This should never happen!" << endl;
341 }
void SimpleBarrelNavigableLayer::setInwardLinks ( const BDLC theBarrelv,
const FDLC theForwardv,
TkLayerLess  sorter = TkLayerLess(outsideIn) 
)
virtual

Implements SimpleNavigableLayer.

Definition at line 343 of file SimpleBarrelNavigableLayer.cc.

References python.multivaluedict::sort(), MCScenario_CRAFT1_22X::sorter(), theInnerBarrelLayers, theInnerLeftForwardLayers, theInnerRightForwardLayers, theNegInnerLayers, and thePosInnerLayers.

346 {
347  theInnerBarrelLayers=theBarrelv;
348  // sort the inner layers
350 
351 
352  ConstFDLI middle = find_if( theForwardv.begin(),theForwardv.end(),
353  not1(DetBelowZ(0)));
354  theInnerLeftForwardLayers=FDLC(theForwardv.begin(),middle);
355  theInnerRightForwardLayers=FDLC(middle,theForwardv.end());
356 
357  // sort the inner layers
358  sort(theInnerLeftForwardLayers.begin(), theInnerLeftForwardLayers.end(),sorter);
359  sort(theInnerRightForwardLayers.begin(), theInnerRightForwardLayers.end(),sorter);
360 
361 
362 
363  // put barrel and forward layers together
364  theNegInnerLayers.reserve( theInnerBarrelLayers.size() + theInnerLeftForwardLayers.size());
365  thePosInnerLayers.reserve( theInnerBarrelLayers.size() + theInnerRightForwardLayers.size());
366 
367  for (ConstBDLI bl=theInnerBarrelLayers.begin(); bl!=theInnerBarrelLayers.end(); bl++)
368  theNegInnerLayers.push_back( *bl);
369  thePosInnerLayers = theNegInnerLayers; // barrel part the same
370 
371  for (ConstFDLI fl=theInnerLeftForwardLayers.begin(); fl!=theInnerLeftForwardLayers.end(); fl++)
372  theNegInnerLayers.push_back( *fl);
373  for (ConstFDLI fl=theInnerRightForwardLayers.begin(); fl!=theInnerRightForwardLayers.end(); fl++)
374  thePosInnerLayers.push_back( *fl);
375 
376  // sort the inner layers
380  sort(theInnerLeftForwardLayers.begin(), theInnerLeftForwardLayers.end(),sorter);
381  sort(theInnerRightForwardLayers.begin(), theInnerRightForwardLayers.end(),sorter);
382 
383 }
FDLC::const_iterator ConstFDLI
std::vector< ForwardDetLayer * > FDLC
BDLC::const_iterator ConstBDLI

Member Data Documentation

bool SimpleBarrelNavigableLayer::areAllReachableLayersSet
private

Definition at line 64 of file SimpleBarrelNavigableLayer.h.

Referenced by compatibleLayers().

BDLC SimpleBarrelNavigableLayer::theAllInnerBarrelLayers
private

Definition at line 70 of file SimpleBarrelNavigableLayer.h.

Referenced by compatibleLayers(), and setAdditionalLink().

FDLC SimpleBarrelNavigableLayer::theAllInnerLeftForwardLayers
private

Definition at line 79 of file SimpleBarrelNavigableLayer.h.

Referenced by compatibleLayers(), and setAdditionalLink().

FDLC SimpleBarrelNavigableLayer::theAllInnerRightForwardLayers
private

Definition at line 80 of file SimpleBarrelNavigableLayer.h.

Referenced by compatibleLayers(), and setAdditionalLink().

BDLC SimpleBarrelNavigableLayer::theAllOuterBarrelLayers
private

Definition at line 69 of file SimpleBarrelNavigableLayer.h.

Referenced by compatibleLayers(), and setAdditionalLink().

FDLC SimpleBarrelNavigableLayer::theAllOuterLeftForwardLayers
private

Definition at line 74 of file SimpleBarrelNavigableLayer.h.

Referenced by compatibleLayers(), and setAdditionalLink().

FDLC SimpleBarrelNavigableLayer::theAllOuterRightForwardLayers
private

Definition at line 75 of file SimpleBarrelNavigableLayer.h.

Referenced by compatibleLayers(), and setAdditionalLink().

BarrelDetLayer* SimpleBarrelNavigableLayer::theDetLayer
private

Definition at line 66 of file SimpleBarrelNavigableLayer.h.

Referenced by detLayer().

BDLC SimpleBarrelNavigableLayer::theInnerBarrelLayers
private
FDLC SimpleBarrelNavigableLayer::theInnerLeftForwardLayers
private
FDLC SimpleBarrelNavigableLayer::theInnerRightForwardLayers
private
DLC SimpleBarrelNavigableLayer::theNegInnerLayers
private
DLC SimpleBarrelNavigableLayer::theNegOuterLayers
private
BDLC SimpleBarrelNavigableLayer::theOuterBarrelLayers
private
FDLC SimpleBarrelNavigableLayer::theOuterLeftForwardLayers
private
FDLC SimpleBarrelNavigableLayer::theOuterRightForwardLayers
private
DLC SimpleBarrelNavigableLayer::thePosInnerLayers
private
DLC SimpleBarrelNavigableLayer::thePosOuterLayers
private