42 absZ_(config.getParameter<double>(
"absZ")),
43 sigmaZ_(config.getParameter<double>(
"sigmaZ")),
44 maxRecoZ_(config.getParameter<double>(
"maxRecoZ")),
45 absT_(config.getParameter<double>(
"absT")),
46 sigmaT_(config.getParameter<double>(
"sigmaT")),
47 maxRecoT_(config.getParameter<double>(
"maxRecoT")),
52 produces<reco::VertexToTrackingVertexAssociator>();
61 desc.
add<
double>(
"absZ", 0.1);
62 desc.
add<
double>(
"sigmaZ", 3.0);
63 desc.
add<
double>(
"maxRecoZ", 1000.0);
64 desc.
add<
double>(
"absT", -1.0);
65 desc.
add<
double>(
"sigmaT", -1.0);
66 desc.
add<
double>(
"maxRecoT", -1.0);
67 desc.
add<
double>(
"sharedTrackFraction", -1.0);
72 descriptions.
add(
"VertexAssociatorByPositionAndTracks", desc);
82 std::unique_ptr<VertexAssociatorByPositionAndTracks>
impl;
84 if (!recotosimCollectionH.
isValid() || !simtorecoCollectionH.
isValid()) {
85 if (!recotosimCollectionH.
isValid())
87 <<
"trackRecoToSimAssociation is not available in the event";
88 if (!simtorecoCollectionH.
isValid())
90 <<
"trackSimToRecoAssociation is not available in the event";
94 impl = std::make_unique<VertexAssociatorByPositionAndTracks>(&(iEvent.
productGetter()),
100 simtorecoCollectionH.
product());
102 impl = std::make_unique<VertexAssociatorByPositionAndTracks>(&(iEvent.
productGetter()),
110 recotosimCollectionH.
product(),
111 simtorecoCollectionH.
product());
114 auto toPut = std::make_unique<reco::VertexToTrackingVertexAssociator>(
std::move(impl));
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< reco::RecoToSimCollection > trackRecoToSimAssociationToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
EDProductGetter const & productGetter() const
VertexAssociatorByPositionAndTracksProducer(const edm::ParameterSet &)
const double sharedTrackFraction_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
~VertexAssociatorByPositionAndTracksProducer() override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< reco::SimToRecoCollection > trackSimToRecoAssociationToken_
T const * product() const
edm::AssociationMap< edm::OneToManyWithQualityGeneric< edm::View< reco::Track >, TrackingParticleCollection, double > > RecoToSimCollection
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
edm::AssociationMap< edm::OneToManyWithQualityGeneric< TrackingParticleCollection, edm::View< reco::Track >, double > > SimToRecoCollection
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)