Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-27 04:04:48

0001 //
0002 #include "RecoEgamma/EgammaPhotonAlgos/interface/ConversionTrackFinder.h"
0003 //
0004 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0005 #include "RecoTracker/Record/interface/CkfComponentsRecord.h"
0006 #include "RecoTracker/CkfPattern/interface/TransientInitialStateEstimator.h"
0007 #include "RecoTracker/TransientTrackingRecHit/interface/TkTransientTrackingRecHitBuilder.h"
0008 //
0009 
0010 #include "TrackingTools/KalmanUpdators/interface/KFUpdator.h"
0011 //
0012 //
0013 
0014 #include <sstream>
0015 
0016 ConversionTrackFinder::ConversionTrackFinder(const edm::ParameterSet& conf,
0017                                              const BaseCkfTrajectoryBuilder* trajectoryBuilder,
0018                                              edm::ConsumesCollector iC)
0019     : theCkfTrajectoryBuilder_(trajectoryBuilder),
0020       theInitialState_(new TransientInitialStateEstimator(
0021           conf.getParameter<edm::ParameterSet>("TransientInitialStateEstimatorParameters"), iC)),
0022       theTrackerGeom_(nullptr),
0023       theUpdator_(nullptr),
0024       thePropagator_(nullptr),
0025       theMeasurementTrackerToken_(iC.esConsumes(edm::ESInputTag("", theMeasurementTrackerName_))),
0026       theTrackerGeomToken_(iC.esConsumes()),
0027       thePropagatorToken_(iC.esConsumes(edm::ESInputTag("", "AnyDirectionAnalyticalPropagator")))
0028 
0029 {
0030   //  std::cout << " ConversionTrackFinder base CTOR " << std::endl;
0031   useSplitHits_ = conf.getParameter<bool>("useHitsSplitting");
0032   theMeasurementTrackerName_ = conf.getParameter<std::string>("MeasurementTrackerName");
0033 }
0034 
0035 ConversionTrackFinder::~ConversionTrackFinder() {}
0036 
0037 void ConversionTrackFinder::setEventSetup(const edm::EventSetup& es) {
0038   theMeasurementTracker_ = &es.getData(theMeasurementTrackerToken_);
0039 
0040   theTrackerGeom_ = &es.getData(theTrackerGeomToken_);
0041 
0042   thePropagator_ = es.getHandle(thePropagatorToken_);
0043   theInitialState_->setEventSetup(
0044       es, static_cast<TkTransientTrackingRecHitBuilder const*>(theCkfTrajectoryBuilder_->hitBuilder())->cloner());
0045 }