CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
VertexAssociatorByTracksProducer Class Reference
Inheritance diagram for VertexAssociatorByTracksProducer:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 VertexAssociatorByTracksProducer (const edm::ParameterSet &)
 
 ~VertexAssociatorByTracksProducer () override
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override
 

Private Attributes

const double R2SMatchedRecoRatio_
 
const double R2SMatchedSimRatio_
 
const double S2RMatchedRecoRatio_
 
const double S2RMatchedSimRatio_
 
const TrackingParticleSelector selector_
 
const reco::TrackBase::TrackQuality trackQuality_
 
edm::EDGetTokenT< reco::RecoToSimCollectiontrackRecoToSimAssociationToken_
 
edm::EDGetTokenT< reco::SimToRecoCollectiontrackSimToRecoAssociationToken_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 16 of file VertexAssociatorByTracksProducer.cc.

Constructor & Destructor Documentation

◆ VertexAssociatorByTracksProducer()

VertexAssociatorByTracksProducer::VertexAssociatorByTracksProducer ( const edm::ParameterSet config)
explicit

Definition at line 56 of file VertexAssociatorByTracksProducer.cc.

57  : R2SMatchedSimRatio_(config.getParameter<double>("R2SMatchedSimRatio")),
58  R2SMatchedRecoRatio_(config.getParameter<double>("R2SMatchedRecoRatio")),
59  S2RMatchedSimRatio_(config.getParameter<double>("S2RMatchedSimRatio")),
60  S2RMatchedRecoRatio_(config.getParameter<double>("S2RMatchedRecoRatio")),
61  selector_(makeSelector(config.getParameter<edm::ParameterSet>("trackingParticleSelector"))),
62  trackQuality_(reco::TrackBase::qualityByName(config.getParameter<std::string>("trackQuality"))),
64  consumes<reco::RecoToSimCollection>(config.getParameter<edm::InputTag>("trackAssociation"))),
66  consumes<reco::SimToRecoCollection>(config.getParameter<edm::InputTag>("trackAssociation"))) {
67  produces<reco::VertexToTrackingVertexAssociator>();
68 }

◆ ~VertexAssociatorByTracksProducer()

VertexAssociatorByTracksProducer::~VertexAssociatorByTracksProducer ( )
override

Definition at line 70 of file VertexAssociatorByTracksProducer.cc.

70 {}

Member Function Documentation

◆ fillDescriptions()

void VertexAssociatorByTracksProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 72 of file VertexAssociatorByTracksProducer.cc.

72  {
74 
75  // Matching conditions
76  desc.add<double>("R2SMatchedSimRatio", 0.3);
77  desc.add<double>("R2SMatchedRecoRatio", 0.0);
78  desc.add<double>("S2RMatchedSimRatio", 0.0);
79  desc.add<double>("S2RMatchedRecoRatio", 0.3);
80 
81  // RecoTrack selection
82  desc.add<std::string>("trackQuality", "highPurity");
83 
84  // TrackingParticle selection
86 
87  descTp.add<double>("lipTP", 30.0);
88  descTp.add<bool>("chargedOnlyTP", true);
89  descTp.add<std::vector<int>>("pdgIdTP", std::vector<int>());
90  descTp.add<bool>("signalOnlyTP", true);
91  descTp.add<double>("minRapidityTP", -2.4);
92  descTp.add<int>("minHitTP", 0);
93  descTp.add<double>("ptMinTP", 0.9);
94  descTp.add<double>("ptMaxTP", 1e100);
95  descTp.add<double>("maxRapidityTP", 2.4);
96  descTp.add<double>("tipTP", 3.5);
97  desc.add<edm::ParameterSetDescription>("trackingParticleSelector", descTp);
98 
99  // Track-TrackingParticle association
100  desc.add<edm::InputTag>("trackAssociation", edm::InputTag("trackingParticleRecoTrackAsssociation"));
101 
102  descriptions.add("VertexAssociatorByTracks", desc);
103 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ produce()

void VertexAssociatorByTracksProducer::produce ( edm::StreamID  ,
edm::Event iEvent,
const edm::EventSetup  
) const
overrideprivatevirtual

Implements edm::global::EDProducerBase.

Definition at line 105 of file VertexAssociatorByTracksProducer.cc.

105  {
106  edm::Handle<reco::RecoToSimCollection> recotosimCollectionH;
107  iEvent.getByToken(trackRecoToSimAssociationToken_, recotosimCollectionH);
108 
109  edm::Handle<reco::SimToRecoCollection> simtorecoCollectionH;
110  iEvent.getByToken(trackSimToRecoAssociationToken_, simtorecoCollectionH);
111 
112  auto impl = std::make_unique<VertexAssociatorByTracks>(&(iEvent.productGetter()),
117  &selector_,
119  recotosimCollectionH.product(),
120  simtorecoCollectionH.product());
121 
122  auto toPut = std::make_unique<reco::VertexToTrackingVertexAssociator>(std::move(impl));
123  iEvent.put(std::move(toPut));
124 }

References iEvent, eostools::move(), edm::Handle< T >::product(), R2SMatchedRecoRatio_, R2SMatchedSimRatio_, S2RMatchedRecoRatio_, S2RMatchedSimRatio_, selector_, DBConfiguration_cff::toPut, trackQuality_, trackRecoToSimAssociationToken_, and trackSimToRecoAssociationToken_.

Member Data Documentation

◆ R2SMatchedRecoRatio_

const double VertexAssociatorByTracksProducer::R2SMatchedRecoRatio_
private

Definition at line 28 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().

◆ R2SMatchedSimRatio_

const double VertexAssociatorByTracksProducer::R2SMatchedSimRatio_
private

Definition at line 27 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().

◆ S2RMatchedRecoRatio_

const double VertexAssociatorByTracksProducer::S2RMatchedRecoRatio_
private

Definition at line 30 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().

◆ S2RMatchedSimRatio_

const double VertexAssociatorByTracksProducer::S2RMatchedSimRatio_
private

Definition at line 29 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().

◆ selector_

const TrackingParticleSelector VertexAssociatorByTracksProducer::selector_
private

Definition at line 32 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().

◆ trackQuality_

const reco::TrackBase::TrackQuality VertexAssociatorByTracksProducer::trackQuality_
private

Definition at line 33 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().

◆ trackRecoToSimAssociationToken_

edm::EDGetTokenT<reco::RecoToSimCollection> VertexAssociatorByTracksProducer::trackRecoToSimAssociationToken_
private

Definition at line 35 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().

◆ trackSimToRecoAssociationToken_

edm::EDGetTokenT<reco::SimToRecoCollection> VertexAssociatorByTracksProducer::trackSimToRecoAssociationToken_
private

Definition at line 36 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().

VertexAssociatorByTracksProducer::S2RMatchedRecoRatio_
const double S2RMatchedRecoRatio_
Definition: VertexAssociatorByTracksProducer.cc:30
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
edm::Handle::product
T const * product() const
Definition: Handle.h:70
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::Handle
Definition: AssociativeIterator.h:50
VertexAssociatorByTracksProducer::R2SMatchedSimRatio_
const double R2SMatchedSimRatio_
Definition: VertexAssociatorByTracksProducer.cc:27
config
Definition: config.py:1
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
VertexAssociatorByTracksProducer::S2RMatchedSimRatio_
const double S2RMatchedSimRatio_
Definition: VertexAssociatorByTracksProducer.cc:29
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
iEvent
int iEvent
Definition: GenABIO.cc:224
DBConfiguration_cff.toPut
toPut
Definition: DBConfiguration_cff.py:25
VertexAssociatorByTracksProducer::trackQuality_
const reco::TrackBase::TrackQuality trackQuality_
Definition: VertexAssociatorByTracksProducer.cc:33
reco::TrackBase::qualityByName
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
impl
Definition: trackAlgoPriorityOrder.h:18
eostools.move
def move(src, dest)
Definition: eostools.py:511
VertexAssociatorByTracksProducer::trackSimToRecoAssociationToken_
edm::EDGetTokenT< reco::SimToRecoCollection > trackSimToRecoAssociationToken_
Definition: VertexAssociatorByTracksProducer.cc:36
VertexAssociatorByTracksProducer::R2SMatchedRecoRatio_
const double R2SMatchedRecoRatio_
Definition: VertexAssociatorByTracksProducer.cc:28
edm::InputTag
Definition: InputTag.h:15
VertexAssociatorByTracksProducer::selector_
const TrackingParticleSelector selector_
Definition: VertexAssociatorByTracksProducer.cc:32
VertexAssociatorByTracksProducer::trackRecoToSimAssociationToken_
edm::EDGetTokenT< reco::RecoToSimCollection > trackRecoToSimAssociationToken_
Definition: VertexAssociatorByTracksProducer.cc:35