56 for (ConstMuonRecHitContainer::const_iterator ir = hits.begin(); ir != hits.end(); ir++ ) {
57 if ( !(*ir)->isValid() ) {
58 output <<
"invalid RecHit"<<endl;
65 <<
"radius "<<pos.
perp()
66 <<
" dim " << (*ir)->dimension()
67 <<
" det " << (*ir)->det()->geographicalId().det()
68 <<
" sub det " << (*ir)->det()->subDetector()<<endl;
83 for (MuonRecHitContainer::const_iterator ir = hits.begin(); ir != hits.end(); ir++ ) {
84 if ( !(*ir)->isValid() ) {
85 output <<
"invalid RecHit"<<endl;
92 <<
"radius "<<pos.
perp()
93 <<
" dim " << (*ir)->dimension()
94 <<
" det " << (*ir)->det()->geographicalId().det()
95 <<
" sub det " << (*ir)->det()->subDetector()<<endl;
110 for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator ir = hits.begin(); ir != hits.end(); ir++ ) {
111 if ( !(*ir)->isValid() ) {
112 output <<
"invalid RecHit"<<endl;
119 <<
"radius "<<pos.
perp()
120 <<
" dim " << (*ir)->dimension()
121 <<
" det " << (*ir)->det()->geographicalId().det()
122 <<
" sub det " << (*ir)->det()->subDetector()<<endl;
137 if ( hits.empty() )
return false;
139 ConstRecHitContainer::const_iterator frontHit = hits.begin();
140 ConstRecHitContainer::const_iterator backHit = hits.end() - 1;
143 while ( !(*frontHit)->isValid() && frontHit != backHit) {++frontHit;}
144 while ( !(*backHit)->isValid() && backHit != frontHit) {--backHit;}
146 if ( frontHit == backHit )
return false;
148 GlobalPoint frontPos = (*frontHit)->globalPosition();
149 GlobalPoint backPos = (*backHit)->globalPosition();
153 if ( deltaPos.
mag() < 100.0 )
return false;
154 if ( fabs(deltaPos.
z() ) > 500.0 )
return true;
155 if ( deltaPos.
perp() > 350.0 )
return true;
157 (frontPos.
y()+backPos.
y())/2,
158 (frontPos.
z()+backPos.
z())/2);
160 return ( (middle.
perp() < frontPos.
perp()) && (middle.
perp() < backPos.
perp()) );
172 const std::string
metname =
"Muon|RecoMuon|CosmicMuonUtilities";
181 float totalDis = StepVector.
mag();
182 LogTrace(metname)<<
"stepPropagate: propagate from: "<<start<<
" to "<<
dest;
183 LogTrace(metname)<<
"stepPropagate: their distance: "<<totalDis;
187 float oneStep = totalDis/
steps;
189 for (
int istep = 0 ; istep < steps - 1 ; istep++) {
190 GP += oneStep*UnitStepVector;
192 LogTrace(metname)<<
"stepPropagate: a middle plane: "<<
pos<<endl;
202 predTsos = prop.
propagate(currTsos, hit->det()->surface());
TrackCharge charge() const
const std::string metname
ReturnType plane(const PositionType &pos, const RotationType &rot) const
const CartesianTrajectoryError cartesianError() const
GlobalPoint globalPosition() const
ConstRecHitContainer recHits(bool splitting=false) 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
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
std::vector< ConstRecHitPointer > ConstRecHitContainer
Vector3DBase unit() const
GlobalVector globalMomentum() const
const Surface & surface() const
virtual ~CosmicMuonUtilities()
void reverseDirection(TrajectoryStateOnSurface &, const MagneticField *) const
std::vector< MuonRecHitPointer > MuonRecHitContainer