CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
VertexAssociatorByPositionAndTracksProducer Class Reference
Inheritance diagram for VertexAssociatorByPositionAndTracksProducer:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 VertexAssociatorByPositionAndTracksProducer (const edm::ParameterSet &)
 
 ~VertexAssociatorByPositionAndTracksProducer ()
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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

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

Private Attributes

const double absZ_
 
const double maxRecoZ_
 
const double sharedTrackFraction_
 
const double sigmaZ_
 
edm::EDGetTokenT
< reco::RecoToSimCollection
trackRecoToSimAssociationToken_
 
edm::EDGetTokenT
< reco::SimToRecoCollection
trackSimToRecoAssociationToken_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
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 ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 16 of file VertexAssociatorByPositionAndTracksProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 36 of file VertexAssociatorByPositionAndTracksProducer.cc.

36  :
37  absZ_(config.getParameter<double>("absZ")),
38  sigmaZ_(config.getParameter<double>("sigmaZ")),
39  maxRecoZ_(config.getParameter<double>("maxRecoZ")),
40  sharedTrackFraction_(config.getParameter<double>("sharedTrackFraction")),
41  trackRecoToSimAssociationToken_(consumes<reco::RecoToSimCollection>(config.getParameter<edm::InputTag>("trackAssociation"))),
42  trackSimToRecoAssociationToken_(consumes<reco::SimToRecoCollection>(config.getParameter<edm::InputTag>("trackAssociation")))
43 {
44  produces<reco::VertexToTrackingVertexAssociator>();
45 }
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::RecoToSimCollection > trackRecoToSimAssociationToken_
edm::EDGetTokenT< reco::SimToRecoCollection > trackSimToRecoAssociationToken_
VertexAssociatorByPositionAndTracksProducer::~VertexAssociatorByPositionAndTracksProducer ( )

Definition at line 47 of file VertexAssociatorByPositionAndTracksProducer.cc.

47 {}

Member Function Documentation

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

Definition at line 49 of file VertexAssociatorByPositionAndTracksProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), and HLT_25ns14e33_v1_cff::InputTag.

49  {
51 
52  // Matching conditions
53  desc.add<double>("absZ", 0.1);
54  desc.add<double>("sigmaZ", 3.0);
55  desc.add<double>("maxRecoZ", 1000.0);
56  desc.add<double>("sharedTrackFraction", -1.0);
57 
58  // Track-TrackingParticle association
59  desc.add<edm::InputTag>("trackAssociation", edm::InputTag("trackingParticleRecoTrackAsssociation"));
60 
61  descriptions.add("VertexAssociatorByPositionAndTracks", desc);
62 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void VertexAssociatorByPositionAndTracksProducer::produce ( edm::StreamID  ,
edm::Event iEvent,
const edm::EventSetup  
) const
overrideprivatevirtual

Implements edm::global::EDProducerBase.

Definition at line 64 of file VertexAssociatorByPositionAndTracksProducer.cc.

References absZ_, edm::Event::getByToken(), maxRecoZ_, eostools::move(), edm::Handle< T >::product(), edm::Event::productGetter(), edm::Event::put(), sharedTrackFraction_, sigmaZ_, convertXMLtoSQLite_cfg::toPut, trackRecoToSimAssociationToken_, and trackSimToRecoAssociationToken_.

64  {
65  edm::Handle<reco::RecoToSimCollection > recotosimCollectionH;
66  iEvent.getByToken(trackRecoToSimAssociationToken_, recotosimCollectionH);
67 
68  edm::Handle<reco::SimToRecoCollection > simtorecoCollectionH;
69  iEvent.getByToken(trackSimToRecoAssociationToken_, simtorecoCollectionH);
70 
71  auto impl = std::make_unique<VertexAssociatorByPositionAndTracks>(&(iEvent.productGetter()),
72  absZ_,
73  sigmaZ_,
74  maxRecoZ_,
76  recotosimCollectionH.product(),
77  simtorecoCollectionH.product());
78 
79  auto toPut = std::make_unique<reco::VertexToTrackingVertexAssociator>(std::move(impl));
80  iEvent.put(std::move(toPut));
81 }
edm::EDGetTokenT< reco::RecoToSimCollection > trackRecoToSimAssociationToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
EDProductGetter const & productGetter() const
Definition: Event.cc:60
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:120
def move
Definition: eostools.py:510
edm::EDGetTokenT< reco::SimToRecoCollection > trackSimToRecoAssociationToken_
T const * product() const
Definition: Handle.h:81

Member Data Documentation

const double VertexAssociatorByPositionAndTracksProducer::absZ_
private

Definition at line 27 of file VertexAssociatorByPositionAndTracksProducer.cc.

Referenced by produce().

const double VertexAssociatorByPositionAndTracksProducer::maxRecoZ_
private

Definition at line 29 of file VertexAssociatorByPositionAndTracksProducer.cc.

Referenced by produce().

const double VertexAssociatorByPositionAndTracksProducer::sharedTrackFraction_
private

Definition at line 30 of file VertexAssociatorByPositionAndTracksProducer.cc.

Referenced by produce().

const double VertexAssociatorByPositionAndTracksProducer::sigmaZ_
private

Definition at line 28 of file VertexAssociatorByPositionAndTracksProducer.cc.

Referenced by produce().

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

Definition at line 32 of file VertexAssociatorByPositionAndTracksProducer.cc.

Referenced by produce().

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

Definition at line 33 of file VertexAssociatorByPositionAndTracksProducer.cc.

Referenced by produce().