CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

BeamHaloPropagator Class Reference

#include <BeamHaloPropagator.h>

Inheritance diagram for BeamHaloPropagator:
Propagator

List of all members.

Public Member Functions

 BeamHaloPropagator (Propagator *aEndCapTkProp, Propagator *aCrossTkProp, const MagneticField *field, PropagationDirection dir=alongMomentum)
 Defines which propagator is used inside endcap and in barrel.
 BeamHaloPropagator (const Propagator &aEndCapTkProp, const Propagator &aCrossTkProp, const MagneticField *field, PropagationDirection dir=alongMomentum)
 Defines which propagator is used inside endcap and in barrel.
 BeamHaloPropagator (const BeamHaloPropagator &)
 Copy constructor.
virtual BeamHaloPropagatorclone () const
 Virtual constructor (using copy c'tor)
bool crossingTk (const FreeTrajectoryState &fts, const Plane &plane) const
 true if the plane and the fts z position have different sign
PropagatorgetCrossTkPropagator () const
 return the propagator used to cross the tracker
PropagatorgetEndCapTkPropagator () const
 return the propagator used in endcaps
virtual const MagneticFieldmagneticField () const
 return the magneticField
TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &tsos, const Plane &plane) const
TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &tsos, const Surface &surface) const
TrajectoryStateOnSurface propagate (const FreeTrajectoryState &fts, const Plane &plane) const
TrajectoryStateOnSurface propagate (const FreeTrajectoryState &fts, const Cylinder &cylinder) const
TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface &tsos, const Cylinder &cylinder) const
TrajectoryStateOnSurface propagate (const FreeTrajectoryState &fts, const Surface &surface) const
std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &fts, const Surface &surface) const
std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &fts, const Plane &plane) const
std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &tsos, const Cylinder &cylinder) const
std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &tsos, const Plane &plane) const
std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const TrajectoryStateOnSurface &tsos, const Surface &surface) const
std::pair
< TrajectoryStateOnSurface,
double > 
propagateWithPath (const FreeTrajectoryState &fts, const Cylinder &cylinder) const
void setPropagationDirection (PropagationDirection dir) const
virtual ~BeamHaloPropagator ()

Private Member Functions

void directionCheck (PropagationDirection dir) const

Private Attributes

PropagatortheCrossTkProp
PropagatortheEndCapTkProp
const MagneticFieldtheField

Detailed Description

A propagator which use different algorithm to propagate within an endcap or to cross over to the other endcap

Author:
Jean-Roch VLIMANT UCSB

Definition at line 24 of file BeamHaloPropagator.h.


Constructor & Destructor Documentation

BeamHaloPropagator::BeamHaloPropagator ( Propagator aEndCapTkProp,
Propagator aCrossTkProp,
const MagneticField field,
PropagationDirection  dir = alongMomentum 
)

Defines which propagator is used inside endcap and in barrel.

Definition at line 53 of file BeamHaloPropagator.cc.

References directionCheck().

Referenced by clone().

                                                           :
  Propagator(dir), theEndCapTkProp(aEndCapTkProp->clone()), theCrossTkProp(aCrossTkProp->clone()), theField(field) { 
  directionCheck(dir);
}
BeamHaloPropagator::BeamHaloPropagator ( const Propagator aEndCapTkProp,
const Propagator aCrossTkProp,
const MagneticField field,
PropagationDirection  dir = alongMomentum 
)

Defines which propagator is used inside endcap and in barrel.

Definition at line 60 of file BeamHaloPropagator.cc.

References directionCheck().

                                                           :
  Propagator(dir), theEndCapTkProp(aEndCapTkProp.clone()), theCrossTkProp(aCrossTkProp.clone()), theField(field) {
  directionCheck(dir);
}
BeamHaloPropagator::BeamHaloPropagator ( const BeamHaloPropagator aProp)
BeamHaloPropagator::~BeamHaloPropagator ( ) [virtual]

virtual destructor

Definition at line 76 of file BeamHaloPropagator.cc.

References theCrossTkProp, and theEndCapTkProp.

                                        {

  delete theEndCapTkProp;
  delete theCrossTkProp;

}

Member Function Documentation

virtual BeamHaloPropagator* BeamHaloPropagator::clone ( void  ) const [inline, virtual]
bool BeamHaloPropagator::crossingTk ( const FreeTrajectoryState fts,
const Plane plane 
) const

true if the plane and the fts z position have different sign

Definition at line 83 of file BeamHaloPropagator.cc.

References LogDebug, GloballyPositioned< T >::position(), FreeTrajectoryState::position(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by propagate(), and propagateWithPath().

                                                                                            {
  LogDebug("BeamHaloPropagator")<<"going from: "<<fts.position()<<" to: "<<plane.position()<<"\n"
                                <<"and hence "<<((fts.position().z()*plane.position().z()<0)?"crossing":"not crossing");
  return (fts.position().z()*plane.position().z()<0);}
void BeamHaloPropagator::directionCheck ( PropagationDirection  dir) const [private]

Definition at line 34 of file BeamHaloPropagator.cc.

References anyDirection, dir, getCrossTkPropagator(), getEndCapTkPropagator(), Propagator::propagationDirection(), and Propagator::setPropagationDirection().

Referenced by BeamHaloPropagator().

                                                                     {

  //consistency check for direction
  if (getEndCapTkPropagator()->propagationDirection()!=dir && getEndCapTkPropagator()->propagationDirection()!=anyDirection){
    edm::LogError("BeamHaloPropagator")<<"composite propagator set with inconsistent direction components\n"
                                  <<"EndCap propagator is: "<<getEndCapTkPropagator()->propagationDirection()
                                  <<"\n to be set on: "<<dir;
    getEndCapTkPropagator()->setPropagationDirection(dir);
  }

  if (getCrossTkPropagator()->propagationDirection()!=dir && getCrossTkPropagator()->propagationDirection()!=anyDirection){
    edm::LogError("BeamHaloPropagator")<<"composite propagator set with inconsistent direction components\n"
                                  <<"Cross propagator is: "<<getCrossTkPropagator()->propagationDirection()
                                  <<"\n to be set on: "<<dir;
    getCrossTkPropagator()->setPropagationDirection(dir);
  }
  
}
Propagator * BeamHaloPropagator::getCrossTkPropagator ( ) const

return the propagator used to cross the tracker

Definition at line 130 of file BeamHaloPropagator.cc.

References LogDebug, and theCrossTkProp.

Referenced by BeamHaloPropagator(), clone(), directionCheck(), propagate(), propagateWithPath(), and setPropagationDirection().

                                                           {
  LogDebug("BeamHaloPropagator")<<"using the Crossing propagator";
  return theCrossTkProp;}
Propagator * BeamHaloPropagator::getEndCapTkPropagator ( ) const

return the propagator used in endcaps

Definition at line 125 of file BeamHaloPropagator.cc.

References LogDebug, and theEndCapTkProp.

Referenced by BeamHaloPropagator(), clone(), directionCheck(), propagate(), propagateWithPath(), and setPropagationDirection().

                                                            {
  LogDebug("BeamHaloPropagator")<<"using the EndCap propagator";
  return theEndCapTkProp;}
virtual const MagneticField* BeamHaloPropagator::magneticField ( ) const [inline, virtual]

return the magneticField

Implements Propagator.

Definition at line 124 of file BeamHaloPropagator.h.

References theField.

Referenced by clone().

{return theField;}
TrajectoryStateOnSurface BeamHaloPropagator::propagate ( const TrajectoryStateOnSurface tsos,
const Cylinder cylinder 
) const [inline, virtual]

Reimplemented from Propagator.

Definition at line 79 of file BeamHaloPropagator.h.

References propagate().

                                                                       {
      return Propagator::propagate(tsos, cylinder);
    }
TrajectoryStateOnSurface BeamHaloPropagator::propagate ( const TrajectoryStateOnSurface state,
const Surface sur 
) const [inline, virtual]

The following three methods are equivalent to the corresponding methods above, but if the starting state is a TrajectoryStateOnSurface, it's better to use it as such rather than use just the FreeTrajectoryState part. It may help some concrete propagators. Only use the generic method if the surface type (plane or cylinder) is not known at the calling point.

Reimplemented from Propagator.

Definition at line 63 of file BeamHaloPropagator.h.

References propagate().

                                                                     {
      return Propagator::propagate(tsos,surface);
    }
TrajectoryStateOnSurface BeamHaloPropagator::propagate ( const FreeTrajectoryState fts,
const Plane plane 
) const [virtual]

Implements Propagator.

Definition at line 94 of file BeamHaloPropagator.cc.

References crossingTk(), getCrossTkPropagator(), getEndCapTkPropagator(), and Propagator::propagate().

                                                                              {

  if (crossingTk(fts,plane)){
    return getCrossTkPropagator()->propagate(fts, plane);}
  else{
    return getEndCapTkPropagator()->propagate(fts, plane);}
}
TrajectoryStateOnSurface BeamHaloPropagator::propagate ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const [virtual]

Implements Propagator.

Definition at line 104 of file BeamHaloPropagator.cc.

References getCrossTkPropagator(), and Propagator::propagate().

                                                                                    {
  return getCrossTkPropagator()->propagate(fts, cylinder);
}
TrajectoryStateOnSurface BeamHaloPropagator::propagate ( const TrajectoryStateOnSurface tsos,
const Plane plane 
) const [inline, virtual]

Reimplemented from Propagator.

Definition at line 71 of file BeamHaloPropagator.h.

References propagate().

                                                                 {
      return Propagator::propagate(tsos, plane);
    }
TrajectoryStateOnSurface BeamHaloPropagator::propagate ( const FreeTrajectoryState state,
const Surface sur 
) const [virtual]

Propagate from a free state (e.g. position and momentum in in global cartesian coordinates) to a surface. Only use the generic method if the surface type (plane or cylinder) is not known at the calling point.

Reimplemented from Propagator.

Definition at line 88 of file BeamHaloPropagator.cc.

Referenced by propagate().

                                                                                  {
  return Propagator::propagate( fts, surface);
}
std::pair<TrajectoryStateOnSurface,double> BeamHaloPropagator::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Plane plane 
) const [inline, virtual]

Reimplemented from Propagator.

Definition at line 101 of file BeamHaloPropagator.h.

References propagateWithPath().

                                                  {
        return Propagator::propagateWithPath(tsos, plane);
      }
std::pair<TrajectoryStateOnSurface,double> BeamHaloPropagator::propagateWithPath ( const TrajectoryStateOnSurface state,
const Surface sur 
) const [inline, virtual]

The following three methods are equivalent to the corresponding methods above, but if the starting state is a TrajectoryStateOnSurface, it's better to use it as such rather than use just the FreeTrajectoryState part. It may help some concrete propagators. Only use the generic method if the surface type (plane or cylinder) is not known at the calling point.

Reimplemented from Propagator.

Definition at line 91 of file BeamHaloPropagator.h.

References propagateWithPath().

                                                      {
        return Propagator::propagateWithPath(tsos,surface);
      }
std::pair< TrajectoryStateOnSurface, double > BeamHaloPropagator::propagateWithPath ( const FreeTrajectoryState fts,
const Plane plane 
) const [virtual]

Implements Propagator.

Definition at line 110 of file BeamHaloPropagator.cc.

References crossingTk(), getCrossTkPropagator(), getEndCapTkPropagator(), and Propagator::propagateWithPath().

{
  if (crossingTk(fts,plane)){
    return getCrossTkPropagator()->propagateWithPath(fts, plane);}
  else{
    return getEndCapTkPropagator()->propagateWithPath(fts, plane);}
}
std::pair< TrajectoryStateOnSurface, double > BeamHaloPropagator::propagateWithPath ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const [virtual]

Implements Propagator.

Definition at line 120 of file BeamHaloPropagator.cc.

References getCrossTkPropagator(), and Propagator::propagateWithPath().

{  return getCrossTkPropagator()->propagateWithPath(fts, cylinder);}
std::pair<TrajectoryStateOnSurface,double> BeamHaloPropagator::propagateWithPath ( const TrajectoryStateOnSurface tsos,
const Cylinder cylinder 
) const [inline, virtual]

Reimplemented from Propagator.

Definition at line 111 of file BeamHaloPropagator.h.

References propagateWithPath().

                                                        {
        return Propagator::propagateWithPath(tsos, cylinder);
      }
std::pair<TrajectoryStateOnSurface,double> BeamHaloPropagator::propagateWithPath ( const FreeTrajectoryState state,
const Surface sur 
) const [inline, virtual]

The methods propagateWithPath() are identical to the corresponding methods propagate() in what concerns the resulting TrajectoryStateOnSurface, but they provide in addition the exact path length along the trajectory. Only use the generic method if the surface type (plane or cylinder) is not known at the calling point.

Reimplemented from Propagator.

Definition at line 85 of file BeamHaloPropagator.h.

Referenced by propagateWithPath().

                                                      {
        return Propagator::propagateWithPath(fts,surface);
      }
void BeamHaloPropagator::setPropagationDirection ( PropagationDirection  dir) const [inline, virtual]

The propagation direction can now be set for every propagator. There is no more distinction between unidirectional and bidirectional at class level. The value "anyDiriction" for PropagationDirection provides the functionality of the ex-BidirectionalPropagator. The values "alongMomentum" and "oppositeToMomentum" provide the functionality of the ex-UnidirectionalPropagator.

Reimplemented from Propagator.

Definition at line 50 of file BeamHaloPropagator.h.

References getCrossTkPropagator(), getEndCapTkPropagator(), and Propagator::setPropagationDirection().


Member Data Documentation

Definition at line 131 of file BeamHaloPropagator.h.

Referenced by magneticField().