19 theAirMedium(3.e4, 1.3
e-3*0.000307075*0.5/2),
20 theIronMedium(1.76,7.87*0.000307075*0.46556/2),
21 theMSEstimator(0.105), theELEstimator(0.105)
25 int myIronVolumes[126] = {6,9,11,14,15,18,22,23,26,29,30,33,36,37,43,46,49,53,56,57,60,62,
26 63,65,71,77,105,106,107,111,112,113,114,115,116,117,118,122,123,
27 125,126,128,129,130,131,132,133,135,137,141,145,147,148,149,153,
28 154,155,156,157,158,159,160,164,165,167,168,170,171,172,173,174,
29 175,177,178,179,180,184,185,186,187,188,189,190,191,195,196,198,
30 200,204,208,210,211,212,216,217,218,219,220,221,222,223,227,228,
31 230,231,233,234,235,236,237,238,240,241,242,243,247,248,249,250,
32 251,252,253,254,258,259,261};
49 std::pair<TrajectoryStateOnSurface,double>
51 const Plane& targetPlane)
const
54 LogDebug(
"NavPropagator") <<
"NavPropagator::propagateWithPath(TrajectoryStateOnSurface, Plane) called with "
58 TSOS startingState = inputState;
59 TSOS TempState = inputState;
66 LogDebug(
"NavPropagator") <<
"NavPropagator:: at beginning of while loop at iteration " <<
count ;
68 startingState = TempState;
69 bool isReflected =
false;
71 if (exitState.
volume() != 0) {
72 currentVolume = exitState.
volume();
91 if (currentVolume == 0) {
92 std::cout <<
"NavPropagator: findVolume failed to find volume containing point "
94 return std::pair<TrajectoryStateOnSurface,double>(
noNextVolume( startingState), 0);
100 LogDebug(
"NavPropagator") <<
"NavPropagator: calling crossToNextVolume" ;
102 LogDebug(
"NavPropagator") <<
"NavPropagator: crossToNextVolume returned" ;
103 LogDebug(
"NavPropagator") <<
"Volume pointer: " << exitState.
volume() <<
" and new ";
105 LogDebug(
"NavPropagator") <<
"So that was a path length " << exitState.
path() ;
118 std::vector<const VolumeMaterialEffectsEstimate*> matEstimates;
119 matEstimates.push_back(&msEstimate);
120 matEstimates.push_back(&elEstimate);
125 exitState = exitStateNM;
131 std::cout <<
"NavPropagator: failed to crossToNextVolume in volume at pos "
136 LogDebug(
"NavPropagator") <<
"NavPropagator: crossToNextVolume reached volume ";
137 if (exitState.
volume() != 0) {
138 LogDebug(
"NavPropagator") <<
" at pos "
140 <<
"with state " << exitState.
tsos() ;
142 else LogDebug(
"NavPropagator") <<
" unknown";
145 TempState = exitState.
tsos();
147 if (fabs(exitState.
path())<0.01) {
157 TempState = ShiftedState;
159 LogDebug(
"NavPropagator") <<
"Shifted to new position " << TempState.globalPosition();
181 TempState = ReflectedState;
186 if (count > maxCount) {
187 LogDebug(
"NavPropagator") <<
"Ohoh, NavPropagator in infinite loop, count = " <<
count;
205 LogDebug(
"NavPropagator") <<
"NavPropagator: calling theField->findVolume ";
213 LogDebug(
"NavPropagator") <<
"NavPropagator: got MagVolume* " << magVolume
214 <<
" when searching with pos " << gpSym ;
218 cout <<
"Got invalid volume pointer " << magVolume <<
" at position " << gpSym;
237 std::stringstream ss(pVol6->
name.substr(5));
241 std::cout <<
"Error (NavVolume6Faces) failed to get MagVolume6Faces pointer" << std::endl;
244 std::cout <<
"Error (NavVolume6Faces) unexpected Volume number!" << std::endl;
252 else result = i->second;
256 std::pair<TrajectoryStateOnSurface,double>
259 const Plane& targetPlane)
const
264 bool isReflected =
false;
265 TSOS okState = startingState;
267 Plane okPlane = targetPlane;
280 TSOS ReflectedState( fts, startingState.
surface());
281 okState = ReflectedState;
293 ReflectedPlane = pb.plane( gpSym, rot);
295 okPlane = *ReflectedPlane;
305 if (isReflected && res.first.isValid()) {
308 TSOS TempState = res.first;
319 res.first = ReflectedState;
324 if (res.first.isValid()) {
329 if (currentVolume->
inside( gpSym )) {
343 std::vector<const VolumeMaterialEffectsEstimate*> matEstimates;
344 matEstimates.push_back(&msEstimate);
345 matEstimates.push_back(&elEstimate);
347 return TsosWP(newState,res.second);
358 const TSOS& endState,
const Plane& plane)
const
380 LogDebug(
"NavPropagator") << std::endl
381 <<
"Propagation reached end of volume geometry without crossing target surface"
383 <<
"starting state of last propagation " << startingState;
390 std::pair<TrajectoryStateOnSurface,double>
394 LogDebug(
"NavPropagator") <<
"propagateWithPath(const FreeTrajectoryState&) not implemented yet in NavPropagator" ;
397 std::pair<TrajectoryStateOnSurface,double>
399 const Plane& cylinder)
const
401 LogDebug(
"NavPropagator") <<
"propagateWithPath(const FreeTrajectoryState&) not implemented yet in NavPropagator" ;
std::pair< TrajectoryStateOnSurface, double > propagateInVolume(const NavVolume *currentVolume, const TrajectoryStateOnSurface &startingState, const Plane &targetPlane) const
const VolumeBasedMagneticField * theField
MagVolumeMap theNavVolumeMap
GlobalVector normalVector() const
Global3DPoint GlobalPoint
TrajectoryStateOnSurface TSOS
NavPropagator(const MagneticField *field, PropagationDirection dir=alongMomentum)
virtual VolumeCrossReturnType crossToNextVolume(const TrajectoryStateOnSurface ¤tState, const Propagator &prop) const =0
double path() const
Access to actual NavSurface pointer.
const MagVolume * findVolume(const GlobalPoint &gp) const
GlobalPoint globalPosition() const
virtual const MagneticField * magneticField() const
const NavVolume * navVolume(const MagVolume *magVolume) const
bool destinationCrossed(const TSOS &startState, const TSOS &endState, const Plane &plane) const
const NavVolume * findVolume(const TrajectoryStateOnSurface &inputState) const
const TSOS & tsos() const
Access to actual Bounds pointer.
const NavVolume * volume() const
Access to actual NavVolume pointer.
virtual bool inside(const GlobalPoint &gp, double tolerance=0.) const =0
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Plane &) const
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
std::pair< TrajectoryStateOnSurface, double > TsosWP
virtual VolumeMaterialEffectsEstimate estimate(const TrajectoryStateOnSurface refTSOS, double pathLength, const VolumeMediumProperties &medium) const
Creates an estimate.
const VolumeMediumProperties theIronMedium
TrajectoryStateOnSurface updateState(const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir, const Estimate &estimate) const
virtual VolumeMaterialEffectsEstimate estimate(const TrajectoryStateOnSurface refTSOS, double pathLength, const VolumeMediumProperties &medium) const
Creates an estimate.
Vector3DBase unit() const
const VolumeMediumProperties theAirMedium
virtual bool isIron() const =0
const GlobalTrajectoryParameters & globalParameters() const
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const TrajectoryStateOnSurface &, const Plane &plane) const
propagation of TSOS to plane with path length
const VolumeMultipleScatteringEstimator theMSEstimator
GlobalVector globalMomentum() const
const VolumeEnergyLossEstimator theELEstimator
TkRotation< float > RotationType
virtual SurfaceOrientation::Side side(const LocalPoint &p, Scalar toler) const
const Surface & surface() const
const VolumeMaterialEffectsUpdator theMaterialUpdator
TrajectoryStateOnSurface noNextVolume(TrajectoryStateOnSurface startingState) const
TrackCharge charge() const
const PositionType & position() const
Global3DVector GlobalVector
virtual const MagneticField * magneticField() const