CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/RecoTracker/NuclearSeedGenerator/interface/SeedFromNuclearInteraction.h

Go to the documentation of this file.
00001 #ifndef SeedFromNuclearInteraction_H
00002 #define SeedFromNuclearInteraction_H
00003 
00004 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
00005 
00006 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00007 
00008 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
00009 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00010 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
00011 #include "TrackingTools/PatternTools/interface/TrajectoryMeasurement.h"
00012 
00013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00014 
00015 #include "RecoTracker/NuclearSeedGenerator/interface/TangentHelix.h"
00016 
00017 #include <boost/shared_ptr.hpp>
00018 
00019 class FreeTrajectoryState;
00020 
00021 class SeedFromNuclearInteraction {
00022 private :
00023   typedef TrajectoryMeasurement                       TM;
00024   typedef TrajectoryStateOnSurface                    TSOS;
00025   typedef edm::OwnVector<TrackingRecHit>              recHitContainer;
00026   typedef TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer;
00027   typedef std::vector<ConstRecHitPointer>             ConstRecHitContainer;
00028 
00029 public :
00030   SeedFromNuclearInteraction(const Propagator* prop, const TrackerGeometry* geom, const edm::ParameterSet& iConfig);
00031 
00032   virtual ~SeedFromNuclearInteraction(){}
00033 
00035   void setMeasurements(const TSOS& tsosAtInteractionPoint, ConstRecHitPointer ihit, ConstRecHitPointer ohit);
00036 
00038   void setMeasurements(TangentHelix& primHelix, const TSOS& inner_TSOS, ConstRecHitPointer ihit, ConstRecHitPointer ohit);
00039 
00040   PTrajectoryStateOnDet trajectoryState() const { return *pTraj; }
00041 
00042   FreeTrajectoryState* stateWithError() const;
00043 
00044   FreeTrajectoryState* stateWithError(TangentHelix& helix) const;
00045 
00046   PropagationDirection direction() const { return alongMomentum; }
00047 
00048   recHitContainer hits() const; 
00049 
00050   TrajectorySeed TrajSeed() const { return TrajectorySeed(trajectoryState(),hits(),direction()); }
00051  
00052   bool isValid() const { return isValid_; }
00053 
00054   const TSOS& updatedTSOS() const { return *updatedTSOS_; }
00055 
00056   const TSOS& initialTSOS() const { return *initialTSOS_; }
00057 
00058   GlobalPoint outerHitPosition() const {
00059           return theTrackerGeom->idToDet(outerHitDetId())->surface().toGlobal(outerHit_->localPosition()); 
00060   }
00061 
00062   DetId outerHitDetId() const { return outerHit_->geographicalId(); }
00063 
00064   ConstRecHitPointer outerHit() const { return outerHit_; }
00065 
00068   AlgebraicMatrix33  rotationMatrix(const GlobalVector& perp) const;
00069 
00070 private :
00071   bool                                     isValid_;        
00073   ConstRecHitContainer                     theHits;         
00074                                                             /*   initial freeTS and to be fitted       */
00075 
00076   ConstRecHitPointer                       innerHit_;        
00077   ConstRecHitPointer                       outerHit_;        
00079   boost::shared_ptr<TSOS>                      updatedTSOS_;   
00081   boost::shared_ptr<TSOS>                      initialTSOS_;     
00083   boost::shared_ptr<FreeTrajectoryState>       freeTS_;          
00085   boost::shared_ptr<PTrajectoryStateOnDet> pTraj;           
00088   // input parameters
00089 
00090   double ptMin;                  
00092   const Propagator*                        thePropagator;
00093   const TrackerGeometry*                   theTrackerGeom;
00094 
00095   bool construct();
00096 
00097 };
00098 #endif