CMS 3D CMS Logo

Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes

PropagatorWithMaterial Class Reference

#include <PropagatorWithMaterial.h>

Inheritance diagram for PropagatorWithMaterial:
Propagator

List of all members.

Public Types

enum  MaterialLocation { atSource, atDestination, fromDirection }

Public Member Functions

virtual PropagatorWithMaterialclone () const
const PropagatorgeometricalPropagator () const
 Access to the geometrical propagator.
virtual const MagneticFieldmagneticField () const
const MaterialEffectsUpdatormaterialEffectsUpdator () const
 Access to the MaterialEffectsUpdator.
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &tsos, const Cylinder &cylinder) const
virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState &fts, const Plane &plane) const
virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState &fts, const Cylinder &cylinder) const
virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &tsos, const Plane &plane) const
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &fts, const Cylinder &cylinder) const
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &fts, const Plane &plane) const
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &tsos, const Cylinder &cylinder) const
virtual std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &tsos, const Plane &plane) const
 PropagatorWithMaterial (const Propagator &Propagator, const MaterialEffectsUpdator &MEUpdator, const MagneticField *mf=0, bool useRungeKutta=false)
 PropagatorWithMaterial (PropagationDirection dir, const float mass, const MagneticField *mf=0, const float maxDPhi=1.6, bool useRungeKutta=false, float ptMin=-1.)
void setMaterialLocation (const MaterialLocation location)
virtual bool setMaxDirectionChange (float phiMax)
 Limit on change in azimuthal angle.
virtual void setPropagationDirection (PropagationDirection dir) const
 Propagation direction.
virtual ~PropagatorWithMaterial ()

Private Types

typedef std::pair
< TrajectoryStateOnSurface,
double > 
TsosWP

Private Member Functions

bool materialAtSource () const
 Inclusion of material at the source?

Private Attributes

const MagneticFieldfield
DeepCopyPointerByClone
< Propagator
theGeometricalPropagator
MaterialLocation theMaterialLocation
DeepCopyPointerByClone
< MaterialEffectsUpdator
theMEUpdator
bool useRungeKutta_

Detailed Description

Propagation including material effects.

Propagates using a specific for the geometrical part and a MaterialEffectsUpdator to include multiple scattering and energy loss. By default material effects are included at the source in the case of forward propagation and at the destination for backward propagation. Material effects at the source can only be included when propagating from a TrajectoryStateOnSurface. Ported from ORCA.

Date:
2011/03/28 13:20:25
Revision:
1.12
Author:
todorov, cerati

Definition at line 25 of file PropagatorWithMaterial.h.


Member Typedef Documentation

typedef std::pair<TrajectoryStateOnSurface,double> PropagatorWithMaterial::TsosWP [private]

Definition at line 141 of file PropagatorWithMaterial.h.


Member Enumeration Documentation

Enumerator:
atSource 
atDestination 
fromDirection 

Definition at line 101 of file PropagatorWithMaterial.h.


Constructor & Destructor Documentation

PropagatorWithMaterial::PropagatorWithMaterial ( PropagationDirection  dir,
const float  mass,
const MagneticField mf = 0,
const float  maxDPhi = 1.6,
bool  useRungeKutta = false,
float  ptMin = -1. 
)

Constructor with PropagationDirection and mass hypothesis. Uses AnalyticalPropagator and CombinedMaterialEffectsUpdator with explicit mass hypothesis.MaxDPhi is a cut on the max change in phi during state propagation. For propagation of very low pt tracks (e.g. loopers), this cut can be loosened. If ptMin > 0, then multiple scattering calculations will take into account the uncertainty in the reconstructed track momentum, (by default neglected), but assuming that the track Pt will never fall below ptMin.

Definition at line 14 of file PropagatorWithMaterial.cc.

References AnalyticalPropagator_cfi::AnalyticalPropagator, theGeometricalPropagator, and useRungeKutta_.

Referenced by clone().

PropagatorWithMaterial::PropagatorWithMaterial ( const Propagator Propagator,
const MaterialEffectsUpdator MEUpdator,
const MagneticField mf = 0,
bool  useRungeKutta = false 
)

Constructor with explicit propagator and material effects objects.

Definition at line 31 of file PropagatorWithMaterial.cc.

                                                                    :
  Propagator(aPropagator.propagationDirection()),
  theGeometricalPropagator(aPropagator.clone()),
  theMEUpdator(aMEUpdator.clone()),
  theMaterialLocation(atDestination), field(mf),useRungeKutta_(useRungeKutta) {}
PropagatorWithMaterial::~PropagatorWithMaterial ( ) [virtual]

Definition at line 11 of file PropagatorWithMaterial.cc.

{}

Member Function Documentation

virtual PropagatorWithMaterial* PropagatorWithMaterial::clone ( void  ) const [inline, virtual]

Implements Propagator.

Definition at line 125 of file PropagatorWithMaterial.h.

References PropagatorWithMaterial().

    {
      return new PropagatorWithMaterial(*this);
    }
const Propagator& PropagatorWithMaterial::geometricalPropagator ( ) const [inline]

Access to the geometrical propagator.

Definition at line 114 of file PropagatorWithMaterial.h.

References theGeometricalPropagator.

virtual const MagneticField* PropagatorWithMaterial::magneticField ( ) const [inline, virtual]

Implements Propagator.

Definition at line 122 of file PropagatorWithMaterial.h.

References field.

Referenced by CRackTrajectoryBuilder::innerState().

{return field;}
bool PropagatorWithMaterial::materialAtSource ( ) const [private]

Inclusion of material at the source?

Definition at line 127 of file PropagatorWithMaterial.cc.

References alongMomentum, anyDirection, atDestination, atSource, Exception, fromDirection, python::rootplot::argparse::message, Propagator::propagationDirection(), and theMaterialLocation.

Referenced by propagateWithPath().

                                               {
  if ( propagationDirection()==anyDirection ) {
    if ( theMaterialLocation!=atDestination ) { 
      string message("PropagatorWithMaterial: propagation direction = anyDirection is ");
      message += "incompatible with adding of material at source";
      throw cms::Exception("TrackingTools/MaterialEffects",message);
    }
  }
  return theMaterialLocation==atSource || (theMaterialLocation==fromDirection&&
                                           propagationDirection()==alongMomentum);
}
const MaterialEffectsUpdator& PropagatorWithMaterial::materialEffectsUpdator ( ) const [inline]

Access to the MaterialEffectsUpdator.

Definition at line 118 of file PropagatorWithMaterial.h.

References theMEUpdator.

                                                               {
    return *theMEUpdator;
  }
virtual TrajectoryStateOnSurface PropagatorWithMaterial::propagate ( const FreeTrajectoryState fts,
const Plane plane 
) const [inline, virtual]

Implements Propagator.

Definition at line 58 of file PropagatorWithMaterial.h.

References propagateWithPath().

  {
    // should be implemented (in case underlying propagator has an independent
    // implementation)
    return propagateWithPath(fts,plane).first;
  }
virtual TrajectoryStateOnSurface PropagatorWithMaterial::propagate ( const TrajectoryStateOnSurface tsos,
const Cylinder cylinder 
) const [inline, virtual]

Reimplemented from Propagator.

Definition at line 72 of file PropagatorWithMaterial.h.

References propagateWithPath().

  {
    // should be implemented (in case underlying propagator has an independent
    // implementation)
    return propagateWithPath(tsos,cylinder).first;
  }
virtual TrajectoryStateOnSurface PropagatorWithMaterial::propagate ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const [inline, virtual]

Implements Propagator.

Definition at line 80 of file PropagatorWithMaterial.h.

References propagateWithPath().

  {
    // should be implemented (in case underlying propagator has an independent
    // implementation)
    return propagateWithPath(fts,cylinder).first;
  }
virtual TrajectoryStateOnSurface PropagatorWithMaterial::propagate ( const TrajectoryStateOnSurface tsos,
const Plane plane 
) const [inline, virtual]
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Cylinder cylinder 
) const [virtual]

Reimplemented from Propagator.

Definition at line 95 of file PropagatorWithMaterial.cc.

References materialAtSource(), Propagator::propagationDirection(), theGeometricalPropagator, and theMEUpdator.

                                                                           {
  //
  // add material at starting surface, if requested
  //
  TsosWP newTsosWP(tsos,0.);
  if ( materialAtSource() ) {
    bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,propagationDirection());
    if (!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
  }
  if ( !newTsosWP.first.isValid() )  return newTsosWP;
  //
  // geometrical propagation
  //
  newTsosWP = theGeometricalPropagator->propagateWithPath(newTsosWP.first,cylinder);
  if ( !(newTsosWP.first).isValid() || materialAtSource() )  return newTsosWP;
  //
  // add material at destination surface, if requested
  //
  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
                                                   PropagationDirectionFromPath()(newTsosWP.second,
                                                                                  propagationDirection()));
  if (!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
  return newTsosWP;
}
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath ( const FreeTrajectoryState fts,
const Plane plane 
) const [virtual]

Implements Propagator.

Definition at line 41 of file PropagatorWithMaterial.cc.

References materialAtSource(), Propagator::propagationDirection(), theGeometricalPropagator, and theMEUpdator.

                                                                     {
  TsosWP newTsosWP = theGeometricalPropagator->propagateWithPath(fts,plane);
  if ( (newTsosWP.first).isValid() && !materialAtSource() ) { 
      bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
                                                       PropagationDirectionFromPath()(newTsosWP.second,
                                                                                      propagationDirection()));
      if (!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
  }
  return newTsosWP;
}
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Plane plane 
) const [virtual]

Reimplemented from Propagator.

Definition at line 68 of file PropagatorWithMaterial.cc.

References materialAtSource(), Propagator::propagationDirection(), theGeometricalPropagator, and theMEUpdator.

Referenced by propagate().

                                                                     {
  //
  // add material at starting surface, if requested
  //
  TsosWP newTsosWP(tsos,0.);
  if ( materialAtSource() ) {
    bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,propagationDirection());
    if (!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
  }
  if ( !newTsosWP.first.isValid() )  return newTsosWP;
  //
  // geometrical propagation
  //
  newTsosWP = theGeometricalPropagator->propagateWithPath(newTsosWP.first,plane);
  if ( !newTsosWP.first.isValid() || materialAtSource() )  return newTsosWP;
  //
  // add material at destination surface, if requested
  //
  bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
                                                   PropagationDirectionFromPath()(newTsosWP.second,
                                                                                  propagationDirection()));
  if (!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
  return newTsosWP;
}
pair< TrajectoryStateOnSurface, double > PropagatorWithMaterial::propagateWithPath ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const [virtual]

Implements Propagator.

Definition at line 54 of file PropagatorWithMaterial.cc.

References materialAtSource(), Propagator::propagationDirection(), theGeometricalPropagator, and theMEUpdator.

                                                                           {
  TsosWP newTsosWP = theGeometricalPropagator->propagateWithPath(fts,cylinder);
  if ( (newTsosWP.first).isValid() && !materialAtSource() ) { 
      bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
                                                       PropagationDirectionFromPath()(newTsosWP.second,
                                                                                      propagationDirection()));
      if (!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
  }
  return newTsosWP;
}
void PropagatorWithMaterial::setMaterialLocation ( const MaterialLocation  location) [inline]

Choice of location for including material effects: fromDirection is equivalent to atSource for propagation alongMomentum and to atDestination for propagation oppositeToMomentum. Inclusion of material effects at the source (either explicitely or implicitely) is not possible if propagating with anyDirection and will effectively disable material effects when propagating from a FreeTrajectoryState.

Definition at line 110 of file PropagatorWithMaterial.h.

References tests::location, and theMaterialLocation.

virtual bool PropagatorWithMaterial::setMaxDirectionChange ( float  phiMax) [inline, virtual]

Limit on change in azimuthal angle.

Reimplemented from Propagator.

Definition at line 95 of file PropagatorWithMaterial.h.

References theGeometricalPropagator.

                                                    { 
    return theGeometricalPropagator->setMaxDirectionChange(phiMax);
  }
void PropagatorWithMaterial::setPropagationDirection ( PropagationDirection  dir) const [virtual]

Propagation direction.

Reimplemented from Propagator.

Definition at line 121 of file PropagatorWithMaterial.cc.

References theGeometricalPropagator.


Member Data Documentation

Definition at line 144 of file PropagatorWithMaterial.h.

Referenced by magneticField().

Definition at line 143 of file PropagatorWithMaterial.h.

Referenced by materialAtSource(), and setMaterialLocation().

Definition at line 140 of file PropagatorWithMaterial.h.

Referenced by materialEffectsUpdator(), and propagateWithPath().

Definition at line 145 of file PropagatorWithMaterial.h.

Referenced by PropagatorWithMaterial().