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
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 ()
 
- 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 R2SMatchedRecoRatio_
 
const double R2SMatchedSimRatio_
 
const double S2RMatchedRecoRatio_
 
const double S2RMatchedSimRatio_
 
const TrackingParticleSelector selector_
 
const reco::TrackBase::TrackQuality trackQuality_
 
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 VertexAssociatorByTracksProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 57 of file VertexAssociatorByTracksProducer.cc.

57  :
58  R2SMatchedSimRatio_(config.getParameter<double>("R2SMatchedSimRatio")),
59  R2SMatchedRecoRatio_(config.getParameter<double>("R2SMatchedRecoRatio")),
60  S2RMatchedSimRatio_(config.getParameter<double>("S2RMatchedSimRatio")),
61  S2RMatchedRecoRatio_(config.getParameter<double>("S2RMatchedRecoRatio")),
62  selector_(makeSelector(config.getParameter<edm::ParameterSet>("trackingParticleSelector"))),
64  trackRecoToSimAssociationToken_(consumes<reco::RecoToSimCollection>(config.getParameter<edm::InputTag>("trackAssociation"))),
65  trackSimToRecoAssociationToken_(consumes<reco::SimToRecoCollection>(config.getParameter<edm::InputTag>("trackAssociation")))
66 {
67  produces<reco::VertexToTrackingVertexAssociator>();
68 }
T getParameter(std::string const &) const
const reco::TrackBase::TrackQuality trackQuality_
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:123
edm::EDGetTokenT< reco::SimToRecoCollection > trackSimToRecoAssociationToken_
edm::EDGetTokenT< reco::RecoToSimCollection > trackRecoToSimAssociationToken_
VertexAssociatorByTracksProducer::~VertexAssociatorByTracksProducer ( )

Definition at line 70 of file VertexAssociatorByTracksProducer.cc.

70 {}

Member Function Documentation

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

Definition at line 72 of file VertexAssociatorByTracksProducer.cc.

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

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>("maxRapidityTP", 2.4);
95  descTp.add<double>("tipTP", 3.5);
96  desc.add<edm::ParameterSetDescription>("trackingParticleSelector", descTp);
97 
98  // Track-TrackingParticle association
99  desc.add<edm::InputTag>("trackAssociation", edm::InputTag("trackingParticleRecoTrackAsssociation"));
100 
101  descriptions.add("VertexAssociatorByTracks", desc);
102 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void VertexAssociatorByTracksProducer::produce ( edm::StreamID  ,
edm::Event iEvent,
const edm::EventSetup  
) const
overrideprivatevirtual

Implements edm::global::EDProducerBase.

Definition at line 104 of file VertexAssociatorByTracksProducer.cc.

References edm::Event::getByToken(), eostools::move(), edm::Handle< T >::product(), edm::Event::productGetter(), edm::Event::put(), R2SMatchedRecoRatio_, R2SMatchedSimRatio_, S2RMatchedRecoRatio_, S2RMatchedSimRatio_, selector_, convertXMLtoSQLite_cfg::toPut, trackQuality_, trackRecoToSimAssociationToken_, and trackSimToRecoAssociationToken_.

104  {
105  edm::Handle<reco::RecoToSimCollection > recotosimCollectionH;
106  iEvent.getByToken(trackRecoToSimAssociationToken_, recotosimCollectionH);
107 
108  edm::Handle<reco::SimToRecoCollection > simtorecoCollectionH;
109  iEvent.getByToken(trackSimToRecoAssociationToken_, simtorecoCollectionH);
110 
111  auto impl = std::make_unique<VertexAssociatorByTracks>(&(iEvent.productGetter()),
116  &selector_,
118  recotosimCollectionH.product(),
119  simtorecoCollectionH.product());
120 
121  auto toPut = std::make_unique<reco::VertexToTrackingVertexAssociator>(std::move(impl));
122  iEvent.put(std::move(toPut));
123 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
EDProductGetter const & productGetter() const
Definition: Event.cc:60
const reco::TrackBase::TrackQuality trackQuality_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:120
def move
Definition: eostools.py:510
T const * product() const
Definition: Handle.h:81
edm::EDGetTokenT< reco::SimToRecoCollection > trackSimToRecoAssociationToken_
edm::EDGetTokenT< reco::RecoToSimCollection > trackRecoToSimAssociationToken_

Member Data Documentation

const double VertexAssociatorByTracksProducer::R2SMatchedRecoRatio_
private

Definition at line 28 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().

const double VertexAssociatorByTracksProducer::R2SMatchedSimRatio_
private

Definition at line 27 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().

const double VertexAssociatorByTracksProducer::S2RMatchedRecoRatio_
private

Definition at line 30 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().

const double VertexAssociatorByTracksProducer::S2RMatchedSimRatio_
private

Definition at line 29 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().

const TrackingParticleSelector VertexAssociatorByTracksProducer::selector_
private

Definition at line 32 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().

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

Definition at line 33 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().

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

Definition at line 35 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().

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

Definition at line 36 of file VertexAssociatorByTracksProducer.cc.

Referenced by produce().