54 for (ConstMuonRecHitContainer::const_iterator ir = hits.begin(); ir != hits.end(); ir++ ) {
55 if ( !(*ir)->isValid() ) {
56 output <<
"invalid RecHit"<<endl;
63 <<
"radius "<<pos.
perp()
64 <<
" dim " << (*ir)->dimension()
65 <<
" det " << (*ir)->det()->geographicalId().det()
66 <<
" sub det " << (*ir)->det()->subDetector()<<endl;
81 for (MuonRecHitContainer::const_iterator ir = hits.begin(); ir != hits.end(); ir++ ) {
82 if ( !(*ir)->isValid() ) {
83 output <<
"invalid RecHit"<<endl;
90 <<
"radius "<<pos.
perp()
91 <<
" dim " << (*ir)->dimension()
92 <<
" det " << (*ir)->det()->geographicalId().det()
93 <<
" sub det " << (*ir)->det()->subDetector()<<endl;
108 for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator ir = hits.begin(); ir != hits.end(); ir++ ) {
109 if ( !(*ir)->isValid() ) {
110 output <<
"invalid RecHit"<<endl;
117 <<
"radius "<<pos.
perp()
118 <<
" dim " << (*ir)->dimension()
119 <<
" det " << (*ir)->det()->geographicalId().det()
120 <<
" sub det " << (*ir)->det()->subDetector()<<endl;
135 if ( hits.empty() )
return false;
137 ConstRecHitContainer::const_iterator frontHit = hits.begin();
138 ConstRecHitContainer::const_iterator backHit = hits.end() - 1;
141 while ( !(*frontHit)->isValid() && frontHit != backHit) {++frontHit;}
142 while ( !(*backHit)->isValid() && backHit != frontHit) {--backHit;}
144 if ( frontHit == backHit )
return false;
146 GlobalPoint frontPos = (*frontHit)->globalPosition();
147 GlobalPoint backPos = (*backHit)->globalPosition();
151 if ( deltaPos.
mag() < 100.0 )
return false;
152 if ( fabs(deltaPos.
z() ) > 500.0 )
return true;
153 if ( deltaPos.
perp() > 350.0 )
return true;
155 (frontPos.
y()+backPos.
y())/2,
156 (frontPos.
z()+backPos.
z())/2);
158 return ( (middle.
perp() < frontPos.
perp()) && (middle.
perp() < backPos.
perp()) );
179 float totalDis = StepVector.
mag();
180 LogTrace(metname)<<
"stepPropagate: propagate from: "<<start<<
" to "<<
dest;
181 LogTrace(metname)<<
"stepPropagate: their distance: "<<totalDis;
185 float oneStep = totalDis/
steps;
187 for (
int istep = 0 ; istep < steps - 1 ; istep++) {
188 GP += oneStep*UnitStepVector;
190 LogTrace(metname)<<
"stepPropagate: a middle plane: "<<pos<<endl;
virtual FreeTrajectoryState propagate(const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
tuple start
Check for commandline option errors.
TrackCharge charge() const
const std::string metname
ReturnType plane(const PositionType &pos, const RotationType &rot) const
const CartesianTrajectoryError cartesianError() const
GlobalPoint globalPosition() const
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
const SurfaceType & surface() const
std::string print(const ConstMuonRecHitContainer &) const
TrajectoryStateOnSurface stepPropagate(const TrajectoryStateOnSurface &, const ConstRecHitPointer &, const Propagator &) const
bool isTraversing(const Trajectory &) const
std::vector< ConstMuonRecHitPointer > ConstMuonRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
Vector3DBase unit() const
GlobalVector globalMomentum() const
virtual ~CosmicMuonUtilities()
void reverseDirection(TrajectoryStateOnSurface &, const MagneticField *) const
std::vector< MuonRecHitPointer > MuonRecHitContainer