Go to the documentation of this file.00001 #ifndef TrackCandidateMakerAlgorithm_h
00002 #define TrackCandidateMakerAlgorithm_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include <string>
00021
00022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00023 #include "FWCore/Framework/interface/EventSetup.h"
00024 #include "FWCore/Framework/interface/Event.h"
00025
00026 #include "DataFormats/Common/interface/OwnVector.h"
00027 #include "DataFormats/RoadSearchCloud/interface/RoadSearchCloudCollection.h"
00028 #include "DataFormats/TrackCandidate/interface/TrackCandidateCollection.h"
00029 #include "RecoTracker/MeasurementDet/interface/MeasurementTracker.h"
00030
00031 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00032 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
00033 #include "TrackingTools/Records/interface/TransientRecHitRecord.h"
00034 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00035 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
00036 #include "TrackingTools/PatternTools/interface/TrajectoryMeasurement.h"
00037 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
00038 #include "TrackingTools/PatternTools/interface/Trajectory.h"
00039
00040 #include "TrackingTools/GeomPropagators/interface/AnalyticalPropagator.h"
00041 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
00042 #include "TrackingTools/TrajectoryCleaning/interface/TrajectoryCleaner.h"
00043 #include "TrackingTools/TrajectoryCleaning/interface/TrajectoryCleanerBySharedHits.h"
00044 #include "TrackingTools/TrackFitters/interface/KFTrajectorySmoother.h"
00045
00046 class TrajectoryStateUpdator;
00047 class MeasurementEstimator;
00048 class PropagatorWithMaterial;
00049 class SteppingHelixPropagator;
00050
00051
00052 class RoadSearchTrackCandidateMakerAlgorithm
00053 {
00054 public:
00055
00056 RoadSearchTrackCandidateMakerAlgorithm(const edm::ParameterSet& conf);
00057 ~RoadSearchTrackCandidateMakerAlgorithm();
00058
00060 void run(const RoadSearchCloudCollection* input,
00061 const edm::Event& e,
00062 const edm::EventSetup& es,
00063 TrackCandidateCollection &output);
00064
00065
00066 std::vector<TrajectoryMeasurement> FindBestHitsByDet(const TrajectoryStateOnSurface& tsosBefore,
00067 const std::set<const GeomDet*>& theDets,
00068 edm::OwnVector<TrackingRecHit>& theHits);
00069
00070
00071 std::vector<TrajectoryMeasurement> FindBestHit(const TrajectoryStateOnSurface& tsosBefore,
00072 const std::set<const GeomDet*>& theDets,
00073 edm::OwnVector<TrackingRecHit>& theHits);
00074
00075
00076 std::vector<TrajectoryMeasurement> FindBestHits(const TrajectoryStateOnSurface& tsosBefore,
00077 const std::set<const GeomDet*>& theDets,
00078 const SiStripRecHitMatcher* theHitMatcher,
00079 edm::OwnVector<TrackingRecHit>& theHits);
00080
00081
00082 bool chooseStartingLayers( std::vector<std::pair<const DetLayer*, RoadSearchCloud::RecHitVector > >& RecHitsByLayer,
00083 std::vector<std::pair<const DetLayer*, RoadSearchCloud::RecHitVector > >::iterator ilyr0,
00084 const std::multimap<int, const DetLayer*>& layer_map,
00085 std::set<const DetLayer*>& good_layers,
00086 std::vector<const DetLayer*>& middle_layers ,
00087 RoadSearchCloud::RecHitVector& recHits_middle);
00088
00089
00090 FreeTrajectoryState initialTrajectory(const edm::EventSetup& es,
00091 const TrackingRecHit* InnerHit,
00092 const TrackingRecHit* OuterHit);
00093
00094 FreeTrajectoryState initialTrajectoryFromTriplet(const edm::EventSetup& es,
00095 const TrackingRecHit* InnerHit,
00096 const TrackingRecHit* MiddleHit,
00097 const TrackingRecHit* OuterHit);
00098
00099 Trajectory createSeedTrajectory(FreeTrajectoryState& fts,
00100 const TrackingRecHit* InnerHit,
00101 const DetLayer* innerHitLayer);
00102
00103
00104 std::vector<Trajectory> extrapolateTrajectory(const Trajectory& inputTrajectory,
00105 RoadSearchCloud::RecHitVector& theLayerHits,
00106 const DetLayer* innerHitLayer,
00107 const TrackingRecHit* outerHit,
00108 const DetLayer* outerHitLayer);
00109
00110 TrackCandidateCollection PrepareTrackCandidates(std::vector<Trajectory>& theTrajectories);
00111
00112 private:
00113 edm::ParameterSet conf_;
00114
00115 unsigned int theNumHitCut;
00116 double theChi2Cut;
00117 bool CosmicReco_;
00118 bool NoFieldCosmic_;
00119 bool CosmicTrackMerging_;
00120 int MinChunkLength_;
00121 int nFoundMin_;
00122
00123 double initialVertexErrorXY_;
00124 bool splitMatchedHits_;
00125 double cosmicSeedPt_;
00126
00127 double maxPropagationDistance;
00128
00129 std::string measurementTrackerName_;
00130
00131 bool debug_;
00132 bool debugCosmics_;
00133
00134 const MeasurementTracker* theMeasurementTracker;
00135 const TrackerGeometry* trackerGeom;
00136 const TransientTrackingRecHitBuilder* ttrhBuilder;
00137 const MagneticField* magField;
00138
00139 PropagatorWithMaterial* thePropagator;
00140 PropagatorWithMaterial* theAloPropagator;
00141 PropagatorWithMaterial* theRevPropagator;
00142 AnalyticalPropagator* theAnalyticalPropagator;
00143 TrajectoryStateUpdator* theUpdator;
00144 MeasurementEstimator* theEstimator;
00145 SiStripRecHitMatcher* theHitMatcher;
00146 KFTrajectorySmoother* theSmoother;
00147
00148 TrajectoryStateTransform* theTransformer;
00149 TrajectoryCleanerBySharedHits* theTrajectoryCleaner;
00150
00151 bool lstereo[128];
00152
00153
00154
00155 };
00156
00157 #endif