Skip to content

Commit

Permalink
Deliver TkCloner to TransientInitialStateEstimator
Browse files Browse the repository at this point in the history
Requested by @VinInn to ease resolution of future merge conflicts.
  • Loading branch information
makortel committed Apr 14, 2014
1 parent 6ddd56b commit 1d19c6e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion RecoEgamma/EgammaPhotonAlgos/src/ConversionTrackFinder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//
#include "RecoTracker/Record/interface/CkfComponentsRecord.h"
#include "RecoTracker/CkfPattern/interface/TransientInitialStateEstimator.h"
#include "RecoTracker/TransientTrackingRecHit/interface/TkTransientTrackingRecHitBuilder.h"
//

#include "TrackingTools/KalmanUpdators/interface/KFUpdator.h"
Expand Down Expand Up @@ -44,5 +45,5 @@ void ConversionTrackFinder::setEventSetup(const edm::EventSetup& es ) {
es.get<TrackingComponentsRecord>().get("AnyDirectionAnalyticalPropagator",
thePropagator_);

theInitialState_->setEventSetup( es );
theInitialState_->setEventSetup( es, static_cast<TkTransientTrackingRecHitBuilder const *>(theCkfTrajectoryBuilder_->hitBuilder())->cloner() );
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
#include "RecoTracker/TransientTrackingRecHit/interface/TkClonerImpl.h"

#include <utility>

Expand All @@ -23,7 +24,7 @@ class TransientInitialStateEstimator {
typedef TrajectoryStateOnSurface TSOS;

TransientInitialStateEstimator(const edm::ParameterSet& conf);
void setEventSetup( const edm::EventSetup& es );
void setEventSetup( const edm::EventSetup& es, const TkClonerImpl& hc );

std::pair<TrajectoryStateOnSurface, const GeomDet*>
innerState( const Trajectory& traj, bool doBackFit=true) const;
Expand All @@ -34,6 +35,7 @@ class TransientInitialStateEstimator {
const std::string thePropagatorOppositeName;
const Propagator *thePropagatorAlong;
const Propagator *thePropagatorOpposite; // not used? can we remove it?
TkClonerImpl theHitCloner;
const int theNumberMeasurementsForFit;
};

Expand Down
6 changes: 3 additions & 3 deletions RecoTracker/CkfPattern/src/CkfTrackCandidateMakerBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ namespace cms{
// edm::ESInputTag mfESInputTag(mfName);
// es.get<IdealMagneticFieldRecord>().get(mfESInputTag,theMagField );

theInitialState->setEventSetup( es );

edm::ESHandle<TrajectoryCleaner> trajectoryCleanerH;
es.get<TrajectoryCleaner::Record>().get(theTrajectoryCleanerName, trajectoryCleanerH);
theTrajectoryCleaner= trajectoryCleanerH.product();
Expand Down Expand Up @@ -174,7 +172,9 @@ namespace cms{
//std::cout << "Trajectory builder " << conf_.getParameter<std::string>("@module_label") << " created without masks, " << std::endl;
theTrajectoryBuilder->setEvent(e, es, &*data);
}

// TISE ES must be set here due to dependence on theTrajectoryBuilder
theInitialState->setEventSetup( es, static_cast<TkTransientTrackingRecHitBuilder const *>(theTrajectoryBuilder->hitBuilder())->cloner() );

// Step B: Retrieve seeds

edm::Handle<View<TrajectorySeed> > collseed;
Expand Down
4 changes: 3 additions & 1 deletion RecoTracker/CkfPattern/src/TransientInitialStateEstimator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ TransientInitialStateEstimator::TransientInitialStateEstimator(const edm::Parame
theNumberMeasurementsForFit(conf.getParameter<int>("numberMeasurementsForFit"))
{}

void TransientInitialStateEstimator::setEventSetup( const edm::EventSetup& es ) {
void TransientInitialStateEstimator::setEventSetup( const edm::EventSetup& es, const TkClonerImpl& hc ) {
theHitCloner = hc;

edm::ESHandle<Propagator> halong;
edm::ESHandle<Propagator> hopposite;

Expand Down

0 comments on commit 1d19c6e

Please sign in to comment.