CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StateOnTrackerBound.cc
Go to the documentation of this file.
8 
9 //Ported from ORCA
10 
12  thePropagator( prop->clone())
13 {}
14 
16 {
17  delete thePropagator;
18 }
19 
22 {
23  return operator()(*tsos.freeState());
24 }
25 
28 {
29  // try to guess if propagation should be first to cylinder or first to disk
30  float tanTheta = (fts.position().perp() > 70 ) ? fts.position().perp()/fts.position().z() : fts.momentum().perp()/fts.momentum().z();
32 
33  TrajectoryStateOnSurface firstTry;
34  if (tanTheta < 0 && fabs(tanTheta) < corner) {
35  firstTry =
37 
38  if (!firstTry.isValid()) {
40  }
41  if (firstTry.globalPosition().perp() > TrackerBounds::radius()) {
42  // the propagation should have gone to the cylinder
44  }
45  else return firstTry;
46  }
47  else if (tanTheta > 0 && fabs(tanTheta) < corner) {
48  firstTry =
50  if (!firstTry.isValid()) {
52  }
53  if (firstTry.globalPosition().perp() > TrackerBounds::radius()) {
55  }
56  else return firstTry;
57  }
58  else {
59  // barrel
60  firstTry =
62  if (!firstTry.isValid()) {
63  if (tanTheta < 0 ) return thePropagator->propagate( fts,TrackerBounds::negativeEndcapDisk());
64  if (tanTheta >= 0 ) return thePropagator->propagate( fts,TrackerBounds::positiveEndcapDisk());
65  return firstTry;
66  }
67  if (firstTry.globalPosition().z() < -TrackerBounds::halfLength()) {
68  // the propagation should have gone to the negative disk
69  return thePropagator->propagate( fts,
71  }
72  else if (firstTry.globalPosition().z() > TrackerBounds::halfLength()) {
73  // the propagation should have gone to the positive disk
74  return thePropagator->propagate( fts,
76  }
77  else return firstTry;
78  }
79  return firstTry;
80 }
T perp() const
Definition: PV3DBase.h:72
static const Cylinder & barrelBound()
Definition: TrackerBounds.h:27
GlobalPoint globalPosition() const
static float halfLength()
Definition: TrackerBounds.h:34
FreeTrajectoryState const * freeState(bool withErrors=true) const
T z() const
Definition: PV3DBase.h:64
StateOnTrackerBound(const Propagator *prop)
static const Disk & negativeEndcapDisk()
Definition: TrackerBounds.h:28
GlobalVector momentum() const
static float radius()
Definition: TrackerBounds.h:33
GlobalPoint position() const
TrajectoryStateOnSurface operator()(const TrajectoryStateOnSurface &tsos) const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:53
static const Disk & positiveEndcapDisk()
Definition: TrackerBounds.h:29