CMS 3D CMS Logo

StateOnTrackerBound.cc
Go to the documentation of this file.
8 
9 //Ported from ORCA
10 
11 StateOnTrackerBound::StateOnTrackerBound(const Propagator* prop) : thePropagator(prop->clone()) {}
12 
14 
16  return operator()(*tsos.freeState());
17 }
18 
20  // try to guess if propagation should be first to cylinder or first to disk
21  float tanTheta = (fts.position().perp() > 70) ? fts.position().perp() / fts.position().z()
22  : fts.momentum().perp() / fts.momentum().z();
24 
25  TrajectoryStateOnSurface firstTry;
26  if (tanTheta < 0 && fabs(tanTheta) < corner) {
28 
29  if (!firstTry.isValid()) {
31  }
32  if (firstTry.globalPosition().perp() > TrackerBounds::radius()) {
33  // the propagation should have gone to the cylinder
35  } else
36  return firstTry;
37  } else if (tanTheta > 0 && fabs(tanTheta) < corner) {
39  if (!firstTry.isValid()) {
41  }
42  if (firstTry.globalPosition().perp() > TrackerBounds::radius()) {
44  } else
45  return firstTry;
46  } else {
47  // barrel
49  if (!firstTry.isValid()) {
50  if (tanTheta < 0)
52  if (tanTheta >= 0)
54  return firstTry;
55  }
56  if (firstTry.globalPosition().z() < -TrackerBounds::halfLength()) {
57  // the propagation should have gone to the negative disk
59  } else if (firstTry.globalPosition().z() > TrackerBounds::halfLength()) {
60  // the propagation should have gone to the positive disk
62  } else
63  return firstTry;
64  }
65  return firstTry;
66 }
T perp() const
Definition: PV3DBase.h:69
static const Cylinder & barrelBound()
Definition: TrackerBounds.h:26
GlobalPoint globalPosition() const
static float halfLength()
Definition: TrackerBounds.h:33
FreeTrajectoryState const * freeState(bool withErrors=true) const
T z() const
Definition: PV3DBase.h:61
StateOnTrackerBound(const Propagator *prop)
static const Disk & negativeEndcapDisk()
Definition: TrackerBounds.h:27
GlobalVector momentum() const
static float radius()
Definition: TrackerBounds.h:32
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:50
static const Disk & positiveEndcapDisk()
Definition: TrackerBounds.h:28