CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SteppingHelixPropagator.h
Go to the documentation of this file.
1 #ifndef SteppingHelixPropagator_SteppingHelixPropagator_h
2 #define SteppingHelixPropagator_SteppingHelixPropagator_h
3 
4 
5 
17 //
18 // Original Author: Vyacheslav Krutelyov
19 // Created: Fri Mar 3 16:01:24 CST 2006
20 // $Id: SteppingHelixPropagator.h,v 1.30 2010/03/10 22:35:20 slava77 Exp $
21 //
22 //
23 
24 
25 
32 
33 #include "CLHEP/Matrix/SymMatrix.h"
34 #include "CLHEP/Matrix/Matrix.h"
35 #include "CLHEP/Vector/ThreeVector.h"
36 
37 
39 
40 class MagneticField;
42 class MagVolume;
43 
45  public:
46  typedef CLHEP::Hep3Vector Vector;
47  typedef CLHEP::Hep3Vector Point;
48 
51 
52  struct Basis {
56  };
57 
58  enum Pars {
60  Z_P = 0,
61  PATHL_P = 0
62  };
63 
64  enum DestType {
74  };
75 
76  enum Fancy {
77  HEL_AS_F=0, //simple analytical helix, eloss at end of step
78  HEL_ALL_F, //analytical helix with linear eloss
79  POL_1_F, //1st order approximation, straight line
80  POL_2_F,//2nd order
81  POL_M_F //highest available
82  };
83 
87 
88  virtual SteppingHelixPropagator* clone() const {return new SteppingHelixPropagator(*this);}
89 
92 
93  virtual const MagneticField* magneticField() const { return field_;}
94 
97  propagate(const FreeTrajectoryState& ftsStart, const Plane& pDest) const;
100  propagate(const FreeTrajectoryState& ftsStart, const Cylinder& cDest) const;
102  virtual FreeTrajectoryState
103  propagate(const FreeTrajectoryState& ftsStart, const GlobalPoint& pDest) const;
105  virtual FreeTrajectoryState
106  propagate(const FreeTrajectoryState& ftsStart,
107  const GlobalPoint& pDest1, const GlobalPoint& pDest2) const;
109  virtual FreeTrajectoryState
110  propagate(const FreeTrajectoryState& ftsStart,
111  const reco::BeamSpot& beamSpot) const;
112 
115  virtual std::pair<TrajectoryStateOnSurface, double>
116  propagateWithPath(const FreeTrajectoryState& ftsStart, const Plane& pDest) const;
119  virtual std::pair<TrajectoryStateOnSurface, double>
120  propagateWithPath(const FreeTrajectoryState& ftsStart, const Cylinder& cDest) const;
122  virtual std::pair<FreeTrajectoryState, double>
123  propagateWithPath(const FreeTrajectoryState& ftsStart, const GlobalPoint& pDest) const;
125  virtual std::pair<FreeTrajectoryState, double>
126  propagateWithPath(const FreeTrajectoryState& ftsStart,
127  const GlobalPoint& pDest1, const GlobalPoint& pDest2) const;
129  virtual std::pair<FreeTrajectoryState, double>
130  propagateWithPath(const FreeTrajectoryState& ftsStart,
131  const reco::BeamSpot& beamSpot) const;
132 
133 
135  const SteppingHelixStateInfo&
136  propagate(const SteppingHelixStateInfo& ftsStart, const Surface& sDest) const;
137  const SteppingHelixStateInfo&
138  propagate(const SteppingHelixStateInfo& ftsStart, const Plane& pDest) const;
140  const SteppingHelixStateInfo&
141  propagate(const SteppingHelixStateInfo& ftsStart, const Cylinder& cDest) const;
143  const SteppingHelixStateInfo&
144  propagate(const SteppingHelixStateInfo& ftsStart, const GlobalPoint& pDest) const;
146  const SteppingHelixStateInfo&
147  propagate(const SteppingHelixStateInfo& ftsStart,
148  const GlobalPoint& pDest1, const GlobalPoint& pDest2) const;
149 
150 
152  void setDebug(bool debug){ debug_ = debug;}
153 
155  void setMaterialMode(bool noMaterial) { noMaterialMode_ = noMaterial;}
156 
158  void setNoErrorPropagation(bool noErrorPropagation) { noErrorPropagation_ = noErrorPropagation;}
159 
165 
167  void setUseMagVolumes(bool val){ useMagVolumes_ = val;}
168 
170  void setUseMatVolumes(bool val){ useMatVolumes_ = val;}
171 
174 
176  void setSendLogWarning(bool val){ sendLogWarning_ = val;}
177 
180  void setUseIsYokeFlag(bool val){ useIsYokeFlag_ = val;}
181 
185 
190 
193 
195  void setEndcapShiftsInZPosNeg(double valPos, double valNeg){
196  ecShiftPos_ = valPos; ecShiftNeg_ = valNeg;
197  }
198 
199  protected:
202  void setIState(const SteppingHelixStateInfo& sStart) const;
203 
208  const double pars[6], double epsilon = 1e-3) const;
209 
214  const SteppingHelixPropagator::Point& r3, int charge,
216  const AlgebraicSymMatrix55& covCurv) const;
217 
220  void getNextState(const SteppingHelixPropagator::StateInfo& svPrevious,
222  double dP,
224  double dS, double dX0,
225  const AlgebraicMatrix55& dCovCurv) const;
226 
229  const SteppingHelixPropagator::Vector& tau) const;
230 
234  double dS, PropagationDirection dir,
235  SteppingHelixPropagator::Fancy fancy) const;
236 
239  double& dEdXPrime, double& radX0, MatBounds& rzLims) const;
240 
242  int cIndex_(int ind) const;
243 
246  const double pars[6],
247  double& dist, double& tanDist, PropagationDirection& refDirection,
248  double fastSkipDist = 1e12) const;
249 
254  double& dist, double& tanDist,
255  double fastSkipDist = 1e12, bool expectNewMagVolume = false, double maxStep = 1e12) const;
256 
259  double& dist, double& tanDist,
260  double fastSkipDist = 1e12) const;
261 
263  bool isYokeVolume(const MagVolume* vol) const;
264 
265 
266  private:
267  typedef std::pair<TrajectoryStateOnSurface, double> TsosPP;
268  typedef std::pair<FreeTrajectoryState, double> FtsPP;
269  static const int MAX_STEPS = 10000;
270  static const int MAX_POINTS = 7;
271  mutable int nPoints_;
273 
275 
278 
282  bool debug_;
293 
294  double defaultStep_;
295 
296  double ecShiftPos_;
297  double ecShiftNeg_;
298 };
299 
300 #endif
type
Definition: HCALResponse.h:22
void setDebug(bool debug)
Switch debug printouts (to cout) .. very verbose.
void setVBFPointer(const VolumeBasedMagneticField *val)
Result refToDest(DestType dest, const SteppingHelixPropagator::StateInfo &sv, const double pars[6], double &dist, double &tanDist, PropagationDirection &refDirection, double fastSkipDist=1e12) const
(Internals) determine distance and direction from the current position to the plane ...
bool isYokeVolume(const MagVolume *vol) const
check if it&#39;s a yoke/iron based on this MagVol internals
SteppingHelixStateInfo::VolumeBounds MatBounds
SteppingHelixStateInfo StateInfo
std::pair< TrajectoryStateOnSurface, double > TsosPP
int cIndex_(int ind) const
(Internals) circular index for array of transients
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
double getDeDx(const SteppingHelixPropagator::StateInfo &sv, double &dEdXPrime, double &radX0, MatBounds &rzLims) const
estimate average (in fact smth. close to MPV and median) energy loss per unit path length ...
PropagationDirection
std::pair< FreeTrajectoryState, double > FtsPP
Result refToMatVolume(const SteppingHelixPropagator::StateInfo &sv, PropagationDirection dir, double &dist, double &tanDist, double fastSkipDist=1e12) const
double charge(const std::vector< uint8_t > &Ampls)
Definition: Plane.h:17
void loadState(SteppingHelixPropagator::StateInfo &svCurrent, const SteppingHelixPropagator::Vector &p3, const SteppingHelixPropagator::Point &r3, int charge, PropagationDirection dir, const AlgebraicSymMatrix55 &covCurv) const
void setUseMagVolumes(bool val)
Switch to using MagneticField Volumes .. as in VolumeBasedMagneticField.
SteppingHelixStateInfo::Result Result
void applyRadX0Correction(bool applyRadX0Correction)
virtual const MagneticField * magneticField() const
const VolumeBasedMagneticField * vbField_
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &ftsStart, const Plane &pDest) const
Propagate to Plane given a starting point.
bool makeAtomStep(SteppingHelixPropagator::StateInfo &svCurrent, SteppingHelixPropagator::StateInfo &svNext, double dS, PropagationDirection dir, SteppingHelixPropagator::Fancy fancy) const
main stepping function: compute next state vector after a step of length dS
Result refToMagVolume(const SteppingHelixPropagator::StateInfo &sv, PropagationDirection dir, double &dist, double &tanDist, double fastSkipDist=1e12, bool expectNewMagVolume=false, double maxStep=1e12) const
void setUseMatVolumes(bool val)
Switch to using Material Volumes .. internally defined for now.
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &ftsStart, const Plane &pDest) const
const AlgebraicSymMatrix55 unit55_
void setRep(SteppingHelixPropagator::Basis &rep, const SteppingHelixPropagator::Vector &tau) const
Set/compute basis vectors for local coordinates at current step (called by incrementState) ...
StateInfo svBuf_[MAX_POINTS+1]
void setIState(const SteppingHelixStateInfo &sStart) const
(Internals) Init starting point
void setReturnTangentPlane(bool val)
flag to return tangent plane for non-plane input
void setSendLogWarning(bool val)
flag to send LogWarning on failures
void setUseInTeslaFromMagField(bool val)
force getting field value from MagneticField, not the geometric one
dbl *** dir
Definition: mlp_gen.cc:35
const double epsilon
void getNextState(const SteppingHelixPropagator::StateInfo &svPrevious, SteppingHelixPropagator::StateInfo &svNext, double dP, const SteppingHelixPropagator::Vector &tau, const SteppingHelixPropagator::Vector &drVec, double dS, double dX0, const AlgebraicMatrix55 &dCovCurv) const
#define debug
Definition: MEtoEDMFormat.h:34
const MagneticField * field_
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
void setEndcapShiftsInZPosNeg(double valPos, double valNeg)
set shifts in Z for endcap pieces (includes EE, HE, ME, YE)
void setMaterialMode(bool noMaterial)
Switch for material effects mode: no material effects if true.
virtual SteppingHelixPropagator * clone() const
void setNoErrorPropagation(bool noErrorPropagation)
Force no error propagation.
double p3[4]
Definition: TauolaWrapper.h:91