CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/RecoTracker/SiTrackerMRHTools/interface/SiTrackerMultiRecHitUpdatorMTF.h

Go to the documentation of this file.
00001 #ifndef SiTrackerMultiRecHitUpdatorMTF_h
00002 #define SiTrackerMultiRecHitUpdatorMTF_h
00003 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
00004 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00005 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
00006 #include "RecoTracker/SiTrackerMRHTools/interface/MultiTrajectoryMeasurement.h"
00007 
00008 #include <vector>
00009 
00010 class SiTrackerMultiRecHit;
00011 class TrajectoryStateOnSurface;
00012 class TrackingRecHit;   
00013 class TransientTrackingRecHitBuilder;
00014 class LocalError;
00015 class TrackingRecHitPropagator;
00016 
00017 typedef TrajectoryStateOnSurface TSOS;
00018 
00019 
00020 /*
00021 builds a TSiTrackerMultiRecHit out of a vector of TrackingRecHit and a vector of tsos
00022 or updates an existing TSiTrackerMultiRecHitout given a vector of tsos.
00023 */
00024 class SiTrackerMultiRecHitUpdatorMTF{
00025  public:
00026     typedef std::pair<LocalPoint,LocalError>  LocalParameters;
00027 
00028   SiTrackerMultiRecHitUpdatorMTF(const TransientTrackingRecHitBuilder* builder,
00029                                  const TrackingRecHitPropagator* hitpropagator,
00030                                  const float Chi2Cut,
00031                                  const std::vector<double>& anAnnealingProgram);
00032   virtual ~SiTrackerMultiRecHitUpdatorMTF(){};
00033   
00034   //  const std::vector<double>&  annealingProgram() const {return theAnnealingProgram;}
00035   
00036   //builds a TSiTrackerMultiRecHit 
00037   virtual TransientTrackingRecHit::RecHitPointer  buildMultiRecHit(TrajectoryStateOnSurface& tsos,
00038                                                                    TransientTrackingRecHit::ConstRecHitContainer& hits,
00039                                                                    MultiTrajectoryMeasurement* mtm,
00040                                                                    float annealing=1.) const;
00041   
00042   //updates an existing TSiTrackerMultiRecHit
00043   //in case a diffrenet king of rechit is passed it returns  clone(tsos)
00044   virtual double update(TransientTrackingRecHit::ConstRecHitPointer original,  
00045                        TrajectoryStateOnSurface tsos,
00046                        float annealing=1.) const;
00047   
00048   //returns a TSiTrackerMultiRecHit out of the transient components     
00049   virtual TransientTrackingRecHit::RecHitPointer update(double rowsum, 
00050                                                         MultiTrajectoryMeasurement* mtm, 
00051                                                         double c, 
00052                                                         std::vector< std::pair<TransientTrackingRecHit::RecHitPointer, double> >& mymap, 
00053                                                         std::vector<TransientTrackingRecHit::RecHitPointer>& updatedcomponents, 
00054                                                         float annealing=1.) const;
00055 
00056   
00057   virtual double updaterow(TransientTrackingRecHit::ConstRecHitContainer& tcomponents,
00058                           TrajectoryStateOnSurface& tsos,
00059                           std::vector<TransientTrackingRecHit::RecHitPointer>& updatedcomponents,
00060                           float annealing) const;
00061   
00062   virtual double updatecolumn(TransientTrackingRecHit::ConstRecHitPointer trechit, 
00063                              MultiTrajectoryMeasurement* multi,
00064                              float annealing) const;
00065   
00066   virtual double calculatecut(TransientTrackingRecHit::ConstRecHitContainer& trechit, 
00067                              TrajectoryStateOnSurface& vtsos, 
00068                              std::vector<TransientTrackingRecHit::RecHitPointer>& updatedcomponents,
00069                              float annealing) const;
00070   
00071   virtual std::vector< std::pair<TransientTrackingRecHit::RecHitPointer, double> > mapmaker(TransientTrackingRecHit::ConstRecHitContainer& tcomponents,
00072                                                                                            TrajectoryStateOnSurface& tsos,
00073                                                                                            float annealing) const;
00074   
00075   
00076 
00077   virtual std::vector<TransientTrackingRecHit::RecHitPointer> updatecomponents(TransientTrackingRecHit::ConstRecHitContainer& tcomponents,
00078                                                                                TrajectoryStateOnSurface& tsos,
00079                                                                                float annealing) const;
00080   
00081   
00082 
00083   
00084 
00085 
00086         const std::vector<double>& getAnnealingProgram() const {return theAnnealingProgram;}
00087         
00088         private:
00089         LocalError calcParametersError(TransientTrackingRecHit::ConstRecHitContainer& map) const;
00090         LocalPoint calcParameters(TransientTrackingRecHit::ConstRecHitContainer& map, const LocalError& er) const;
00091         LocalParameters calcParameters(TransientTrackingRecHit::ConstRecHitContainer& map) const;
00092 
00093         const TransientTrackingRecHitBuilder* theBuilder;
00094         const TrackingRecHitPropagator* theHitPropagator;
00095         const float theChi2Cut;
00096         const std::vector<double> theAnnealingProgram;
00097 
00098 };
00099 #endif