#include <HICSeedMeasurementEstimator.h>
Public Member Functions | |
HICSeedMeasurementEstimator * | clone () const |
virtual MeasurementEstimator::HitReturnType | estimate (const TrajectoryStateOnSurface &ts, const TransientTrackingRecHit &hit) const |
virtual MeasurementEstimator::SurfaceReturnType | estimate (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const |
double | getPhi () |
double | getZ () |
HICSeedMeasurementEstimator (bool &trust, int nsig) | |
virtual MeasurementEstimator::Local2DVector | maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const |
double | nSigmaCut () const |
void | set (double &phi, double &z) |
Private Attributes | |
int | theNSigma |
double | thePhi |
double | theZ |
bool | trtrue |
Definition at line 9 of file HICSeedMeasurementEstimator.h.
cms::HICSeedMeasurementEstimator::HICSeedMeasurementEstimator | ( | bool & | trust, |
int | nsig | ||
) | [inline, explicit] |
Definition at line 12 of file HICSeedMeasurementEstimator.h.
Referenced by clone().
HICSeedMeasurementEstimator* cms::HICSeedMeasurementEstimator::clone | ( | void | ) | const [inline, virtual] |
Implements MeasurementEstimator.
Definition at line 32 of file HICSeedMeasurementEstimator.h.
References HICSeedMeasurementEstimator().
{ return new HICSeedMeasurementEstimator(*this); }
MeasurementEstimator::HitReturnType cms::HICSeedMeasurementEstimator::estimate | ( | const TrajectoryStateOnSurface & | ts, |
const TransientTrackingRecHit & | hit | ||
) | const [virtual] |
Returns pair( true, value) if the TrajectoryStateOnSurface is compatible with the RecHit, and pair( false, value) if it is not compatible. The TrajectoryStateOnSurface must be on the same Surface as the RecHit. For an estimator where there is no value computed, e.g. fixed window estimator, only the first(bool) part is of interest.
Implements MeasurementEstimator.
Definition at line 7 of file HICSeedMeasurementEstimator.cc.
References FreeTrajectoryState::charge(), gather_cfg::cout, PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::freeTrajectoryState(), TransientTrackingRecHit::globalPosition(), TrackingRecHit::isValid(), GlobalTrajectoryParameters::momentum(), FreeTrajectoryState::parameters(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), pi, GlobalTrajectoryParameters::position(), thePhi, theZ, and PV3DBase< T, PVType, FrameType >::z().
{ double dfimean = 0.; double dzmean = 0.; double pi=4.*atan(1.); double twopi=8.*atan(1.); #ifdef DEBUG std::cout<<" HICSeedMeasurementEstimator::estimate::start::eta "<<ts.freeTrajectoryState()->parameters().momentum().eta() <<std::endl; #endif // // For mixed are 0.8<|eta|<1.6 there is a shift for + and - // if( fabs(ts.freeTrajectoryState()->parameters().momentum().eta()) > 0.8 && fabs(ts.freeTrajectoryState()->parameters().momentum().eta()) < 1.6 ) { dfimean = -0.14; if( ts.freeTrajectoryState()->charge() > 0. ) dfimean = -0.24; dzmean = -10.; } if( fabs(ts.freeTrajectoryState()->parameters().momentum().eta()) > 1.6 ) { dfimean = -0.02; if( ts.freeTrajectoryState()->charge() > 0. ) dfimean = -0.1776; } if( !(hit.isValid()) ) { #ifdef DEBUG std::cout<<" HICSeedMeasurementEstimator::estimate::hit is not valid " <<std::endl; #endif return HitReturnType(false,0.); } #ifdef DEBUG std::cout<<" HICSeedMeasurementEstimator::estimate::hit is valid " <<std::endl; #endif double dfi = fabs( ts.freeTrajectoryState()->parameters().position().phi()- hit.globalPosition().phi() + dfimean ); if(dfi>pi) dfi=twopi-dfi; if(dfi>thePhi) { #ifdef DEBUG std::cout<<"HICSeedMeasurementEstimator::estimate::failed::phi hit::phi fts::thePhi "<<hit.globalPosition().phi()<<" "<< ts.freeTrajectoryState()->parameters().position().phi()<<" "<<dfi<< " "<<thePhi<<std::endl; #endif return HitReturnType(false,0.); } if( fabs(hit.globalPosition().z()) > 120.) { if(fabs(hit.globalPosition().perp()-ts.freeTrajectoryState()->parameters().position().perp()) >theZ) { #ifdef DEBUG std::cout<<"HICSeedMeasurementEstimator::estimate::failed::r hit::r fts::theZ "<<hit.globalPosition().perp()<<" "<< ts.freeTrajectoryState()->parameters().position().perp()<< " "<<theZ<<std::endl; #endif return HitReturnType(false,0.); } } else { if(fabs(hit.globalPosition().z()-ts.freeTrajectoryState()->parameters().position().z() + dzmean) >theZ) { #ifdef DEBUG std::cout<<"HICSeedMeasurementEstimator::estimate::failed::z hit::z fts::theZ "<<hit.globalPosition().z()<<" "<< ts.freeTrajectoryState()->parameters().position().z()<< " "<<theZ<<std::endl; #endif return HitReturnType(false,0.); } } #ifdef DEBUG std::cout<<"HICSeedMeasurementEstimator::estimate::accepted::phi::r::z "<<hit.globalPosition().phi()<<" "<< hit.globalPosition().perp()<<" "<< hit.globalPosition().z()<< std::endl; #endif return HitReturnType(true,1.); }
MeasurementEstimator::SurfaceReturnType cms::HICSeedMeasurementEstimator::estimate | ( | const TrajectoryStateOnSurface & | ts, |
const BoundPlane & | plane | ||
) | const [virtual] |
Returns true if the TrajectoryStateOnSurface is compatible with the BoundPlane, false otherwise. The TrajectoryStateOnSurface must be on the plane.
Implements MeasurementEstimator.
Definition at line 96 of file HICSeedMeasurementEstimator.cc.
References BoundSurface::bounds(), gather_cfg::cout, TrajectoryStateOnSurface::freeTrajectoryState(), Bounds::length(), FreeTrajectoryState::parameters(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), pi, GloballyPositioned< T >::position(), GlobalTrajectoryParameters::position(), thePhi, theZ, tablePrinter::width, Bounds::width(), and PV3DBase< T, PVType, FrameType >::z().
{ double pi=4.*atan(1.); double twopi=8.*atan(1.); #ifdef DEBUG std::cout<<"HICSeedMeasurementEstimator::estimate::Det::start::r,phi,z "<<plane.position().perp()<<" "<<plane.position().phi()<<" "<< plane.position().z()<<std::endl; std::cout<<"HICSeedMeasurementEstimator::estimate::Track::r,phi,z "<<ts.freeTrajectoryState()->parameters().position().perp()<<" "<< ts.freeTrajectoryState()->parameters().position().phi()<<" "<< ts.freeTrajectoryState()->parameters().position().z()<<std::endl; #endif double length = plane.bounds().length(); double width = plane.bounds().width(); double deltafi = atan2( width , (double)plane.position().perp() ); double phitrack = ts.freeTrajectoryState()->parameters().position().phi(); double phiplane = plane.position().phi(); if( phitrack < 0. ) phitrack = twopi + phitrack; if( phiplane < 0. ) phiplane = twopi + phiplane; double dphi = fabs(phitrack - phiplane); if( dphi > pi ) dphi = twopi - dphi; if( dphi > thePhi + deltafi ) { #ifdef DEBUG std::cout<<"HICSeedMeasurementEstimator::estimate::Det::phi failed "<<dphi<<" "<<thePhi<<" "<<deltafi<<std::endl; #endif return false; } if ( fabs( plane.position().z() ) < 111. ) { // barrel if( fabs(ts.freeTrajectoryState()->parameters().position().z() - plane.position().z()) > theZ+length ) { #ifdef DEBUG double dz = fabs(ts.freeTrajectoryState()->parameters().position().z() - plane.position().z()); std::cout<<"HICSeedMeasurementEstimator::estimate::Det::z failed "<<dz<<" "<<theZ<<" "<<length<<std::endl; #endif return false; } } else { // forward if( fabs(ts.freeTrajectoryState()->parameters().position().perp() - plane.position().perp()) > theZ + length ) { #ifdef DEBUG double dr = fabs(ts.freeTrajectoryState()->parameters().position().perp() - plane.position().perp()); std::cout<<"HICSeedMeasurementEstimator::estimate::Det::r failed "<<dr<<" "<<theZ<<" "<<length<<std::endl; #endif return false; } } #ifdef DEBUG std::cout<<" Good detector "<<std::endl; #endif return true; }
double cms::HICSeedMeasurementEstimator::getPhi | ( | ) | [inline] |
double cms::HICSeedMeasurementEstimator::getZ | ( | ) | [inline] |
MeasurementEstimator::Local2DVector cms::HICSeedMeasurementEstimator::maximalLocalDisplacement | ( | const TrajectoryStateOnSurface & | ts, |
const BoundPlane & | plane | ||
) | const [virtual] |
Returns the size of the compatibility region around the local position of the TrajectoryStateOnSurface along the directions of local x and y axis. The TrajectoryStateOnSurface must be on the plane. This method allows to limit the search for compatible detectors or RecHits. The MeasurementEstimator should not return "true" for any RecHit or BoundPlane which is entirely outside of the compatibility region defined by maximalLocalDisplacement().
Reimplemented from MeasurementEstimator.
Definition at line 162 of file HICSeedMeasurementEstimator.cc.
References gather_cfg::cout, TrajectoryStateOnSurface::hasError(), asciidump::le, TrajectoryStateOnSurface::localError(), nSigmaCut(), LocalTrajectoryError::positionError(), mathSSE::sqrt(), LocalError::xx(), and LocalError::yy().
{ #ifdef DEBUG std::cout<<"HICSeedMeasurementEstimator::malLocalDisplacement::start" <<ts.hasError()<<std::endl; #endif if ( ts.hasError()) { LocalError le = ts.localError().positionError(); #ifdef DEBUG std::cout<<"HICSeedMeasurementEstimator::malLocalDisplacement::localerror::sigma"<<Local2DVector( sqrt(le.xx())*nSigmaCut(), sqrt(le.yy())*nSigmaCut())<<std::endl; #endif return Local2DVector( sqrt(le.xx())*nSigmaCut(), sqrt(le.yy())*nSigmaCut()); } else return Local2DVector(0,0); }
double cms::HICSeedMeasurementEstimator::nSigmaCut | ( | ) | const [inline] |
Definition at line 24 of file HICSeedMeasurementEstimator.h.
References theNSigma.
Referenced by maximalLocalDisplacement().
{return theNSigma;}
void cms::HICSeedMeasurementEstimator::set | ( | double & | phi, |
double & | z | ||
) | [inline] |
int cms::HICSeedMeasurementEstimator::theNSigma [private] |
Definition at line 41 of file HICSeedMeasurementEstimator.h.
Referenced by nSigmaCut().
double cms::HICSeedMeasurementEstimator::thePhi [private] |
Definition at line 38 of file HICSeedMeasurementEstimator.h.
Referenced by estimate(), getPhi(), and set().
double cms::HICSeedMeasurementEstimator::theZ [private] |
Definition at line 39 of file HICSeedMeasurementEstimator.h.
Referenced by estimate(), getZ(), and set().
bool cms::HICSeedMeasurementEstimator::trtrue [private] |
Definition at line 40 of file HICSeedMeasurementEstimator.h.