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")),
48 sharedTrackFraction_(
config.getParameter<double>(
"sharedTrackFraction")),
49 trackRecoToSimAssociationToken_(
51 trackSimToRecoAssociationToken_(
53 produces<reco::VertexToTrackingVertexAssociator>();
62 desc.add<
double>(
"absZ", 0.1);
63 desc.add<
double>(
"sigmaZ", 3.0);
64 desc.add<
double>(
"maxRecoZ", 1000.0);
65 desc.add<
double>(
"absT", -1.0);
66 desc.add<
double>(
"sigmaT", -1.0);
67 desc.add<
double>(
"maxRecoT", -1.0);
68 desc.add<
double>(
"sharedTrackFraction", -1.0);
73 descriptions.
add(
"VertexAssociatorByPositionAndTracks",
desc);
85 std::unique_ptr<VertexAssociatorByPositionAndTracks>
impl;
87 if (!recotosimCollectionH.
isValid() || !simtorecoCollectionH.
isValid()) {
88 if (!recotosimCollectionH.
isValid())
89 edm::LogWarning(
"PrimaryVertexAnalyzer4PUSlimmed") <<
"trackRecoToSimAssociation is not available in the event";
90 if (!simtorecoCollectionH.
isValid())
91 edm::LogWarning(
"PrimaryVertexAnalyzer4PUSlimmed") <<
"trackSimToRecoAssociation is not available in the event";
95 impl = std::make_unique<VertexAssociatorByPositionAndTracks>(&(
iEvent.productGetter()),
100 recotosimCollectionH.
product(),
101 simtorecoCollectionH.
product());
103 impl = std::make_unique<VertexAssociatorByPositionAndTracks>(&(
iEvent.productGetter()),
111 recotosimCollectionH.
product(),
112 simtorecoCollectionH.
product());
115 auto toPut = std::make_unique<reco::VertexToTrackingVertexAssociator>(
std::move(
impl));
edm::EDGetTokenT< reco::RecoToSimCollection > trackRecoToSimAssociationToken_
T const * product() const
edm::AssociationMap< edm::OneToManyWithQualityGeneric< CaloParticleCollection, reco::CaloClusterCollection, std::pair< float, float > > > SimToRecoCollection
VertexAssociatorByPositionAndTracksProducer(const edm::ParameterSet &)
const double sharedTrackFraction_
edm::AssociationMap< edm::OneToManyWithQualityGeneric< reco::CaloClusterCollection, CaloParticleCollection, float > > RecoToSimCollection
~VertexAssociatorByPositionAndTracksProducer() override
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::SimToRecoCollection > trackSimToRecoAssociationToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)