Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-10 06:14:15

0001 #ifndef CkfTrackCandidateMakerBase_h
0002 #define CkfTrackCandidateMakerBase_h
0003 
0004 #include "FWCore/Framework/interface/Event.h"
0005 #include "FWCore/Framework/interface/EventSetup.h"
0006 #include "FWCore/Framework/interface/ConsumesCollector.h"
0007 
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0010 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0011 
0012 #include "TrackingTools/PatternTools/interface/TrajectoryBuilder.h"
0013 #include "RecoTracker/CkfPattern/interface/BaseCkfTrajectoryBuilder.h"
0014 
0015 #include "TrackingTools/TrajectoryCleaning/interface/TrajectoryCleaner.h"
0016 
0017 #include "MagneticField/Engine/interface/MagneticField.h"
0018 #include "TrackingTools/DetLayers/interface/NavigationSchool.h"
0019 #include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h"
0020 
0021 #include "RecoTracker/CkfPattern/interface/RedundantSeedCleaner.h"
0022 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
0023 #include "DataFormats/Common/interface/DetSetVectorNew.h"
0024 #include "DataFormats/Common/interface/ContainerMask.h"
0025 #include "DataFormats/SiStripCluster/interface/SiStripCluster.h"
0026 #include "DataFormats/SiPixelCluster/interface/SiPixelCluster.h"
0027 #include "DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h"
0028 #include "RecoTracker/MeasurementDet/interface/MeasurementTrackerEvent.h"
0029 
0030 #include <memory>
0031 
0032 class TransientInitialStateEstimator;
0033 class NavigationSchoolRecord;
0034 class TrackerDigiGeometryRecord;
0035 
0036 namespace cms {
0037   class CkfTrackCandidateMakerBase {
0038   public:
0039     explicit CkfTrackCandidateMakerBase(const edm::ParameterSet& conf, edm::ConsumesCollector&& iC);
0040 
0041     virtual ~CkfTrackCandidateMakerBase() noexcept(false);
0042 
0043     virtual void beginRunBase(edm::Run const&, edm::EventSetup const& es);
0044 
0045     virtual void produceBase(edm::Event& e, const edm::EventSetup& es);
0046 
0047     static void fillPSetDescription(edm::ParameterSetDescription& desc);
0048 
0049   protected:
0050     bool theTrackCandidateOutput;
0051     bool theTrajectoryOutput;
0052     bool useSplitting;
0053     bool doSeedingRegionRebuilding;
0054     bool cleanTrajectoryAfterInOut;
0055     bool reverseTrajectories;
0056     bool produceSeedStopReasons_;
0057 
0058     unsigned int theMaxNSeeds;
0059 
0060     std::unique_ptr<BaseCkfTrajectoryBuilder> theTrajectoryBuilder;
0061 
0062     edm::ESGetToken<TrajectoryCleaner, TrajectoryCleaner::Record> theTrajectoryCleanerToken;
0063     const TrajectoryCleaner* theTrajectoryCleaner;
0064 
0065     std::unique_ptr<TransientInitialStateEstimator> theInitialState;
0066 
0067     edm::ESGetToken<NavigationSchool, NavigationSchoolRecord> theNavigationSchoolToken;
0068     const NavigationSchool* theNavigationSchool;
0069 
0070     edm::ESGetToken<Propagator, TrackingComponentsRecord> thePropagatorToken;
0071     edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> theTrackerToken;
0072 
0073     std::unique_ptr<RedundantSeedCleaner> theSeedCleaner;
0074 
0075     unsigned int maxSeedsBeforeCleaning_;
0076 
0077     edm::EDGetTokenT<edm::View<TrajectorySeed> > theSeedLabel;
0078     edm::EDGetTokenT<MeasurementTrackerEvent> theMTELabel;
0079 
0080     edm::InputTag const clustersToSkipTag_;
0081     bool const skipClusters_;
0082 
0083     edm::InputTag const phase2ClustersToSkipTag_;
0084     bool const skipPhase2Clusters_;
0085 
0086     typedef edm::ContainerMask<edmNew::DetSetVector<SiPixelCluster> > PixelClusterMask;
0087     typedef edm::ContainerMask<edmNew::DetSetVector<SiStripCluster> > StripClusterMask;
0088     typedef edm::ContainerMask<edmNew::DetSetVector<Phase2TrackerCluster1D> > Phase2OTClusterMask;
0089     edm::EDGetTokenT<PixelClusterMask> maskPixels_;
0090     edm::EDGetTokenT<StripClusterMask> maskStrips_;
0091     edm::EDGetTokenT<Phase2OTClusterMask> maskPhase2OTs_;
0092 
0093     // methods for debugging
0094     virtual TrajectorySeedCollection::const_iterator lastSeed(TrajectorySeedCollection const& theSeedColl) {
0095       return theSeedColl.end();
0096     }
0097     virtual void printHitsDebugger(edm::Event& e) { ; }
0098     virtual void countSeedsDebugger() { ; }
0099     virtual void deleteAssocDebugger() { ; }
0100 
0101   private:
0102     /// Initialize EventSetup objects at each event
0103     void setEventSetup(const edm::EventSetup& es);
0104   };
0105 }  // namespace cms
0106 
0107 #endif