Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:27:16

0001 #ifndef RecoMuon_TrackerSeedGenerator_TSGForRoadSearch_H
0002 #define RecoMuon_TrackerSeedGenerator_TSGForRoadSearch_H
0003 
0004 /** \class TSGForRoadSearch
0005  * Description: 
0006  * this class generates hit-less TrajectorySeed from a given Track.
0007  * the original error matrix of the Track is adjusted (configurable).
0008  * this class is principally used for muon HLT.
0009  * for options are available:
0010  * - inside-out seeds, on innermost Pixel/Strip layer.
0011  * - inside-out seeds, on innermost Strip layer.
0012  * - outside-in seeds, on outermost Strip layer.
0013  *
0014  * regular operation is one seed per track, but optionnaly, more than one seed can be madefor one track.
0015  *
0016  * \author Jean-Roch Vlimant
0017 */
0018 
0019 #include "RecoMuon/TrackerSeedGenerator/interface/TrackerSeedGenerator.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 #include "FWCore/Framework/interface/ConsumesCollector.h"
0022 
0023 #include "FWCore/Framework/interface/ESHandle.h"
0024 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0025 #include "FWCore/Framework/interface/EventSetup.h"
0026 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
0027 #include "DataFormats/TrackReco/interface/Track.h"
0028 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
0029 #include <RecoTracker/MeasurementDet/interface/MeasurementTracker.h>
0030 #include <RecoTracker/MeasurementDet/interface/MeasurementTrackerEvent.h>
0031 #include "MagneticField/Engine/interface/MagneticField.h"
0032 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
0033 
0034 #include "TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimator.h"
0035 
0036 #include "TrackingTools/DetLayers/interface/DetLayer.h"
0037 #include "RecoMuon/TrackingTools/interface/MuonErrorMatrix.h"
0038 #include "FWCore/Framework/interface/ConsumesCollector.h"
0039 
0040 class TrackingRegion;
0041 class MuonServiceProxy;
0042 class TrajectoryStateUpdator;
0043 class TrackerTopology;
0044 class TrackerRecoGeometryRecord;
0045 
0046 class TSGForRoadSearch : public TrackerSeedGenerator {
0047 public:
0048   typedef std::vector<TrajectorySeed> BTSeedCollection;
0049   typedef std::pair<const Trajectory *, reco::TrackRef> TrackCand;
0050 
0051   TSGForRoadSearch(const edm::ParameterSet &pset, edm::ConsumesCollector &IC);
0052 
0053   ~TSGForRoadSearch() override;
0054 
0055   /// initialize the service
0056   void init(const MuonServiceProxy *service) override;
0057   /// set the event: update the MeasurementTracker
0058   void setEvent(const edm::Event &event) override;
0059 
0060   /// generated seed(s) for a track. the tracking region is not used.
0061   void trackerSeeds(const TrackCand &, const TrackingRegion &, const TrackerTopology *, BTSeedCollection &) override;
0062 
0063 private:
0064   //concrete implementation
0065   /// oseed from inside-out: innermost Strip layer
0066   void makeSeeds_0(const reco::Track &, std::vector<TrajectorySeed> &);
0067   /// not implemented
0068   void makeSeeds_1(const reco::Track &, std::vector<TrajectorySeed> &);
0069   /// not implemented
0070   void makeSeeds_2(const reco::Track &, std::vector<TrajectorySeed> &);
0071   /// outside-in: outermost Strip layer
0072   void makeSeeds_3(const reco::Track &, std::vector<TrajectorySeed> &);
0073   /// inside-out: innermost Pixel/Strip layer
0074   void makeSeeds_4(const reco::Track &, std::vector<TrajectorySeed> &);
0075 
0076 private:
0077   /// get the FTS for a Track: adjusting the error matrix if requested
0078   bool IPfts(const reco::Track &, FreeTrajectoryState &);
0079   /// make the adjustement away from PCA state if requested
0080   bool notAtIPtsos(TrajectoryStateOnSurface &state);
0081 
0082   /// adjust the state at IP or where it is defined for the seed
0083   bool theAdjustAtIp;
0084 
0085   /// add the seed(s) to the collection of seeds
0086   void pushTrajectorySeed(const reco::Track &muon,
0087                           std::vector<DetLayer::DetWithState> &compatible,
0088                           PropagationDirection direction,
0089                           std::vector<TrajectorySeed> &result) const;
0090   edm::ParameterSet theConfig;
0091 
0092   edm::ESHandle<GeometricSearchTracker> theGeometricSearchTracker;
0093   edm::ESGetToken<GeometricSearchTracker, TrackerRecoGeometryRecord> theGeometricSearchTrackerToken;
0094 
0095   edm::InputTag theMeasurementTrackerEventTag;
0096   edm::EDGetTokenT<MeasurementTrackerEvent> theMeasurementTrackerEventToken;
0097   const MeasurementTrackerEvent *theMeasurementTrackerEvent;
0098 
0099   TrajectoryStateUpdator *theUpdator;
0100   const MuonServiceProxy *theProxyService;
0101 
0102   unsigned int theOption;
0103   bool theCopyMuonRecHit;
0104   bool theManySeeds;
0105   std::string thePropagatorName;
0106   std::string thePropagatorCompatibleName;
0107   Chi2MeasurementEstimator *theChi2Estimator;
0108   std::string theCategory;
0109 
0110   MuonErrorMatrix *theErrorMatrixAdjuster;
0111 };
0112 
0113 #endif