53 virtual void endJob()
override;
82 trackerHitAssociatorConfig_(makeHitAssociatorParameters(iConfig), consumesCollector()),
83 qualitySimToReco_( iConfig.getParameter<double>(
"Quality_SimToReco" ) ),
84 puritySimToReco_( iConfig.getParameter<double>(
"Purity_SimToReco" ) ),
85 cutRecoToSim_( iConfig.getParameter<double>(
"Cut_RecoToSim" ) ),
86 threeHitTracksAreSpecial_( iConfig.getParameter<bool>(
"ThreeHitTracksAreSpecial" ) ),
87 useClusterTPAssociation_( iConfig.getParameter<bool>(
"useClusterTPAssociation" ) ),
88 absoluteNumberOfHits_( iConfig.getParameter<bool>(
"AbsoluteNumberOfHits" ) )
98 else throw cms::Exception(
"QuickTrackAssociatorByHitsImpl" ) <<
"SimToRecoDenominator not specified as sim or reco";
104 bool useGrouped, useSplitting;
105 if( iConfig.
exists(
"UseGrouped") ) useGrouped=iConfig.
getParameter<
bool>(
"UseGrouped");
106 else useGrouped=
true;
108 if( iConfig.
exists(
"UseSplitting") ) useSplitting=iConfig.
getParameter<
bool>(
"UseSplitting");
109 else useSplitting=
true;
113 if( !(useGrouped && useSplitting) )
115 LogDebug(
"QuickTrackAssociatorByHitsImpl") <<
"UseGrouped and/or UseSplitting has been set to false, but this associator ignores that setting.";
119 produces<reco::TrackToTrackingParticleAssociator>();
150 hitAssociatorParameters.
addParameter<
bool>(
"associateRecoTracks",
true);
155 return hitAssociatorParameters;
165 std::unique_ptr<TrackerHitAssociator> trackAssoc;
170 if(clusterAssocHandle.
isValid()) {
171 clusterAssoc = clusterAssocHandle.
product();
173 edm::LogInfo(
"TrackAssociator" ) <<
"ClusterTPAssociationList not found. Using DigiSimLink based associator";
176 if(not clusterAssoc) {
182 auto impl = std::make_unique<QuickTrackAssociatorByHitsImpl>(iEvent.
productGetter(),
192 auto toPut = std::make_unique<reco::TrackToTrackingParticleAssociator>(
std::move(impl));
T getParameter(std::string const &) const
bool absoluteNumberOfHits_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
EDProductGetter const & productGetter() const
bool threeHitTracksAreSpecial_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::ParameterSet makeHitAssociatorParameters(const edm::ParameterSet &)
QuickTrackAssociatorByHitsProducer(const edm::ParameterSet &)
void addDefault(ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void addParameter(std::string const &name, T const &value)
edm::EDGetTokenT< ClusterTPAssociationList > cluster2TPToken_
~QuickTrackAssociatorByHitsProducer()
virtual void beginJob() override
virtual void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
virtual void endJob() override
QuickTrackAssociatorByHitsImpl::SimToRecoDenomType simToRecoDenominator_
TrackerHitAssociator::Config trackerHitAssociatorConfig_
std::vector< std::pair< OmniClusterRef, TrackingParticleRef > > ClusterTPAssociationList
T const * product() const
bool useClusterTPAssociation_