CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

TSiStripRecHit1D Class Reference

#include <TSiStripRecHit1D.h>

Inheritance diagram for TSiStripRecHit1D:
TransientTrackingRecHit TrackingRecHit ReferenceCountedPoolAllocated BlockWipedPoolAllocated

List of all members.

Public Types

typedef SiStripRecHit1D::ClusterRef SiStripClusterRef
typedef edm::LazyGetter
< SiStripCluster >::value_ref 
SiStripRegionalClusterRef

Public Member Functions

virtual bool canImproveWithTrack () const
virtual RecHitPointer clone (const TrajectoryStateOnSurface &ts) const
const
StripClusterParameterEstimator
cpe () const
virtual const GeomDetUnitdetUnit () const
virtual int dimension () const
virtual void getKfComponents (KfComponentsHolder &holder) const
virtual const TrackingRecHithit () const
virtual LocalPoint localPosition () const
virtual LocalError localPositionError () const
virtual AlgebraicVector parameters () const
virtual AlgebraicSymMatrix parametersError () const
virtual AlgebraicMatrix projectionMatrix () const
virtual std::vector
< TrackingRecHit * > 
recHits ()
 Non-const access to component RecHits (if any)
virtual std::vector< const
TrackingRecHit * > 
recHits () const
 Access to component RecHits (if any)
const SiStripRecHit1DspecificHit () const
virtual ~TSiStripRecHit1D ()

Static Public Member Functions

static RecHitPointer build (const GeomDet *geom, const SiStripRecHit1D *rh, const StripClusterParameterEstimator *cpe, float weight=1., float annealing=1., bool computeCoarseLocalPosition=false)
static RecHitPointer build (const LocalPoint &pos, const LocalError &err, const GeomDet *det, const SiStripRegionalClusterRef clust, const StripClusterParameterEstimator *cpe, float weight=1., float annealing=1.)
static RecHitPointer build (const LocalPoint &pos, const LocalError &err, const GeomDet *det, const SiStripClusterRef clust, const StripClusterParameterEstimator *cpe, float weight=1., float annealing=1.)

Private Member Functions

virtual TSiStripRecHit1Dclone () const
 TSiStripRecHit1D (const LocalPoint &pos, const LocalError &err, const GeomDet *det, const SiStripClusterRef clust, const StripClusterParameterEstimator *cpe, float weight, float annealing)
 Creates the TrackingRecHit internally, avoids redundent cloning.
 TSiStripRecHit1D (const LocalPoint &pos, const LocalError &err, const GeomDet *det, const SiStripRegionalClusterRef clust, const StripClusterParameterEstimator *cpe, float weight, float annealing)
 TSiStripRecHit1D (const GeomDet *geom, const SiStripRecHit1D *rh, const StripClusterParameterEstimator *cpe, float weight, float annealing, bool computeCoarseLocalPosition)

Private Attributes

const
StripClusterParameterEstimator
theCPE
SiStripRecHit1D theHitData

Detailed Description

Definition at line 13 of file TSiStripRecHit1D.h.


Member Typedef Documentation

Definition at line 16 of file TSiStripRecHit1D.h.

Definition at line 18 of file TSiStripRecHit1D.h.


Constructor & Destructor Documentation

virtual TSiStripRecHit1D::~TSiStripRecHit1D ( ) [inline, virtual]

Definition at line 20 of file TSiStripRecHit1D.h.

{}
TSiStripRecHit1D::TSiStripRecHit1D ( const GeomDet geom,
const SiStripRecHit1D rh,
const StripClusterParameterEstimator cpe,
float  weight,
float  annealing,
bool  computeCoarseLocalPosition 
) [inline, private]

Definition at line 94 of file TSiStripRecHit1D.h.

References SiStripRecHit1D::cluster(), SiStripRecHit1D::cluster_regional(), GeomDet::geographicalId(), relativeConstraints::geom, SiStripRecHit1D::hasPositionAndError(), asciidump::le, ClusterParameterEstimator< T >::localParameters(), LogDebug, theCPE, and theHitData.

Referenced by build(), and clone().

                                                     : 
    TransientTrackingRecHit(geom, weight, annealing), theCPE(cpe) 
    {
      if (rh->hasPositionAndError() || !computeCoarseLocalPosition)
        theHitData = SiStripRecHit1D(*rh);
      else{
      const GeomDetUnit* gdu = dynamic_cast<const GeomDetUnit*>(geom);
      LogDebug("TSiStripRecHit2DLocalPos")<<"calculating coarse position/error.";
      if (gdu){
        if (rh->cluster().isNonnull()){
          StripClusterParameterEstimator::LocalValues lval= theCPE->localParameters(*rh->cluster(), *gdu);
          LocalError le(lval.second.xx(),0.,DBL_MAX); //Correct??
          theHitData = SiStripRecHit1D(lval.first, le, geom->geographicalId(),rh->cluster());
        }else{
          StripClusterParameterEstimator::LocalValues lval= theCPE->localParameters(*rh->cluster_regional(), *gdu);
          LocalError le(lval.second.xx(),0.,DBL_MAX); //Correct??
          theHitData = SiStripRecHit1D(lval.first, le, geom->geographicalId(),rh->cluster_regional());
        }
      }else{
        edm::LogError("TSiStripRecHit2DLocalPos")<<" geomdet does not cast into geomdet unit. cannot create strip local parameters.";
        theHitData = SiStripRecHit1D(*rh);
      }
      }
    }
TSiStripRecHit1D::TSiStripRecHit1D ( const LocalPoint pos,
const LocalError err,
const GeomDet det,
const SiStripClusterRef  clust,
const StripClusterParameterEstimator cpe,
float  weight,
float  annealing 
) [inline, private]

Creates the TrackingRecHit internally, avoids redundent cloning.

Definition at line 123 of file TSiStripRecHit1D.h.

                                                   :
    TransientTrackingRecHit(det, weight, annealing), theHitData(pos, err, det->geographicalId(), clust), 
    theCPE(cpe){} 
TSiStripRecHit1D::TSiStripRecHit1D ( const LocalPoint pos,
const LocalError err,
const GeomDet det,
const SiStripRegionalClusterRef  clust,
const StripClusterParameterEstimator cpe,
float  weight,
float  annealing 
) [inline, private]

Definition at line 136 of file TSiStripRecHit1D.h.

                                                   :
    TransientTrackingRecHit(det, weight, annealing), theHitData(pos, err, det->geographicalId(), clust), 
    theCPE(cpe){} 

Member Function Documentation

static RecHitPointer TSiStripRecHit1D::build ( const GeomDet geom,
const SiStripRecHit1D rh,
const StripClusterParameterEstimator cpe,
float  weight = 1.,
float  annealing = 1.,
bool  computeCoarseLocalPosition = false 
) [inline, static]
static RecHitPointer TSiStripRecHit1D::build ( const LocalPoint pos,
const LocalError err,
const GeomDet det,
const SiStripClusterRef  clust,
const StripClusterParameterEstimator cpe,
float  weight = 1.,
float  annealing = 1. 
) [inline, static]

Definition at line 71 of file TSiStripRecHit1D.h.

References TSiStripRecHit1D(), and TransientTrackingRecHit::weight().

                                                                   {
    return RecHitPointer( new TSiStripRecHit1D( pos, err, det, clust, cpe, weight, annealing));
  }
static RecHitPointer TSiStripRecHit1D::build ( const LocalPoint pos,
const LocalError err,
const GeomDet det,
const SiStripRegionalClusterRef  clust,
const StripClusterParameterEstimator cpe,
float  weight = 1.,
float  annealing = 1. 
) [inline, static]

Definition at line 79 of file TSiStripRecHit1D.h.

References TSiStripRecHit1D(), and TransientTrackingRecHit::weight().

                                                                   {
    return RecHitPointer( new TSiStripRecHit1D( pos, err, det, clust, cpe, weight, annealing));
  }
virtual bool TSiStripRecHit1D::canImproveWithTrack ( ) const [inline, virtual]

Returns true if the clone( const TrajectoryStateOnSurface&) method returns an improved hit, false if it returns an identical copy. In order to avoid redundent copies one should call canImproveWithTrack() before calling clone( const TrajectoryStateOnSurface&).

Reimplemented from TransientTrackingRecHit.

Definition at line 54 of file TSiStripRecHit1D.h.

{return true;}
virtual TSiStripRecHit1D* TSiStripRecHit1D::clone ( void  ) const [inline, private, virtual]

Implements TransientTrackingRecHit.

Definition at line 146 of file TSiStripRecHit1D.h.

References TSiStripRecHit1D().

Referenced by clone().

                                          {
    return new TSiStripRecHit1D(*this);
  }
TransientTrackingRecHit::RecHitPointer TSiStripRecHit1D::clone ( const TrajectoryStateOnSurface ts) const [virtual]

Returns a copy of the hit with parameters and errors computed with respect to the TrajectoryStateOnSurface given as argument. For concrete hits not capable to improve their parameters and errors this method returns an exact copy, and is equivalent to clone() without arguments.

FIXME: this only uses the first cluster and ignores the others

Reimplemented from TransientTrackingRecHit.

Definition at line 8 of file TSiStripRecHit1D.cc.

References build(), clone(), SiStripRecHit1D::cluster(), SiStripRecHit1D::cluster_regional(), TransientTrackingRecHit::det(), detUnit(), TransientTrackingRecHit::getAnnealingFactor(), asciidump::le, ClusterParameterEstimator< T >::localParameters(), specificHit(), theCPE, and TransientTrackingRecHit::weight().

{
  if (theCPE != 0) {


     if(!specificHit()->cluster().isNull()){
       const SiStripCluster&  clust = *specificHit()->cluster();  
       StripClusterParameterEstimator::LocalValues lv = 
         theCPE->localParameters( clust, *detUnit(), ts);
       LocalError le(lv.second.xx(),0.,DBL_MAX); //Correct??

       return TSiStripRecHit1D::build( lv.first, le, det(), 
                                       specificHit()->cluster(), theCPE, weight(), getAnnealingFactor());
     }else{
       const SiStripCluster&  clust = *specificHit()->cluster_regional();  
       StripClusterParameterEstimator::LocalValues lv = 
         theCPE->localParameters( clust, *detUnit(), ts);
       LocalError le(lv.second.xx(),0.,DBL_MAX); //Correct??
       return TSiStripRecHit1D::build( lv.first, le, det(), 
                                       specificHit()->cluster_regional(), theCPE, weight(), getAnnealingFactor());       
     }

  }
  else {
    //FIXME. It should report the problem with a LogWarning;
    return clone();
  }
}
const StripClusterParameterEstimator* TSiStripRecHit1D::cpe ( ) const [inline]

Definition at line 62 of file TSiStripRecHit1D.h.

References theCPE.

{return theCPE;}
const GeomDetUnit * TSiStripRecHit1D::detUnit ( ) const [virtual]

CAUTION: the GeomDetUnit* is zero for composite hits (matched hits in the tracker, segments in the muon). Always check this pointer before using it!

Reimplemented from TransientTrackingRecHit.

Definition at line 38 of file TSiStripRecHit1D.cc.

References TransientTrackingRecHit::det().

Referenced by clone().

{
  return static_cast<const GeomDetUnit*>(det());
}
virtual int TSiStripRecHit1D::dimension ( ) const [inline, virtual]

Implements TrackingRecHit.

Definition at line 38 of file TSiStripRecHit1D.h.

References RecHit1D::dimension(), and theHitData.

{return theHitData.dimension();}
virtual void TSiStripRecHit1D::getKfComponents ( KfComponentsHolder holder) const [inline, virtual]
virtual const TrackingRecHit* TSiStripRecHit1D::hit ( void  ) const [inline, virtual]

Implements TransientTrackingRecHit.

Definition at line 43 of file TSiStripRecHit1D.h.

References theHitData.

Referenced by recHits().

{return &theHitData;};
virtual LocalPoint TSiStripRecHit1D::localPosition ( ) const [inline, virtual]

Implements TrackingRecHit.

Definition at line 40 of file TSiStripRecHit1D.h.

References SiStripRecHit1D::localPosition(), and theHitData.

Referenced by TrackerDpgAnalysis::insertMeasurement().

virtual LocalError TSiStripRecHit1D::localPositionError ( ) const [inline, virtual]

Implements TrackingRecHit.

Definition at line 41 of file TSiStripRecHit1D.h.

References SiStripRecHit1D::localPositionError(), and theHitData.

virtual AlgebraicVector TSiStripRecHit1D::parameters ( void  ) const [inline, virtual]

Implements TrackingRecHit.

Definition at line 28 of file TSiStripRecHit1D.h.

References RecHit1D::parameters(), and theHitData.

{return theHitData.parameters();}
virtual AlgebraicSymMatrix TSiStripRecHit1D::parametersError ( ) const [inline, virtual]
virtual AlgebraicMatrix TSiStripRecHit1D::projectionMatrix ( ) const [inline, virtual]

Implements TrackingRecHit.

Definition at line 37 of file TSiStripRecHit1D.h.

References RecHit1D::projectionMatrix(), and theHitData.

virtual std::vector<const TrackingRecHit*> TSiStripRecHit1D::recHits ( ) const [inline, virtual]

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 45 of file TSiStripRecHit1D.h.

References hit(), and TrackingRecHit::recHits().

                                                           {
    return hit()->recHits();
  }
virtual std::vector<TrackingRecHit*> TSiStripRecHit1D::recHits ( ) [inline, virtual]

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 48 of file TSiStripRecHit1D.h.

References SiStripRecHit1D::recHits(), and theHitData.

                                               {
    return theHitData.recHits();
  }
const SiStripRecHit1D* TSiStripRecHit1D::specificHit ( ) const [inline]

Definition at line 61 of file TSiStripRecHit1D.h.

References theHitData.

Referenced by clone(), and TkAlCaOverlapTagger::produce().

{return &theHitData;};

Member Data Documentation

Definition at line 92 of file TSiStripRecHit1D.h.

Referenced by clone(), cpe(), and TSiStripRecHit1D().