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 // $Date: 2011/02/08 14:59:45 $
11 // $Revision: 1.9 $
12 
14  thePropagator( prop->clone())
15 {}
16 
18 {
19  delete thePropagator;
20 }
21 
24 {
25  return operator()(*tsos.freeState());
26 }
27 
30 {
31  // try to guess if propagation should be first to cylinder or first to disk
32  float tanTheta = (fts.position().perp() > 70 ) ? fts.position().perp()/fts.position().z() : fts.momentum().perp()/fts.momentum().z();
34 
35  TrajectoryStateOnSurface firstTry;
36  if (tanTheta < 0 && fabs(tanTheta) < corner) {
37  firstTry =
39 
40  if (!firstTry.isValid()) {
42  }
43  if (firstTry.globalPosition().perp() > TrackerBounds::radius()) {
44  // the propagation should have gone to the cylinder
46  }
47  else return firstTry;
48  }
49  else if (tanTheta > 0 && fabs(tanTheta) < corner) {
50  firstTry =
52  if (!firstTry.isValid()) {
54  }
55  if (firstTry.globalPosition().perp() > TrackerBounds::radius()) {
57  }
58  else return firstTry;
59  }
60  else {
61  // barrel
62  firstTry =
64  if (!firstTry.isValid()) {
65  if (tanTheta < 0 ) return thePropagator->propagate( fts,TrackerBounds::negativeEndcapDisk());
66  if (tanTheta >= 0 ) return thePropagator->propagate( fts,TrackerBounds::positiveEndcapDisk());
67  return firstTry;
68  }
69  if (firstTry.globalPosition().z() < -TrackerBounds::halfLength()) {
70  // the propagation should have gone to the negative disk
71  return thePropagator->propagate( fts,
73  }
74  else if (firstTry.globalPosition().z() > TrackerBounds::halfLength()) {
75  // the propagation should have gone to the positive disk
76  return thePropagator->propagate( fts,
78  }
79  else return firstTry;
80  }
81  return firstTry;
82 }
T perp() const
Definition: PV3DBase.h:71
GlobalPoint globalPosition() const
static float halfLength()
Definition: TrackerBounds.h:36
static const BoundCylinder & barrelBound()
Definition: TrackerBounds.h:29
FreeTrajectoryState * freeState(bool withErrors=true) const
T z() const
Definition: PV3DBase.h:63
StateOnTrackerBound(const Propagator *prop)
static const BoundDisk & positiveEndcapDisk()
Definition: TrackerBounds.h:31
GlobalVector momentum() const
static float radius()
Definition: TrackerBounds.h:35
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:12
GlobalPoint position() const
TrajectoryStateOnSurface operator()(const TrajectoryStateOnSurface &tsos) const
static const BoundDisk & negativeEndcapDisk()
Definition: TrackerBounds.h:30
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135