CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
EmbeddingHltPixelVerticesProducer Class Reference

#include <tautrigger/EmbeddingHltPixelVerticesProducer/plugins/EmbeddingHltPixelVerticesProducer.cc>

Inheritance diagram for EmbeddingHltPixelVerticesProducer:
edm::stream::EDProducer<>

Public Member Functions

 EmbeddingHltPixelVerticesProducer (const edm::ParameterSet &)
 
 ~EmbeddingHltPixelVerticesProducer () override
 
- Public Member Functions inherited from edm::stream::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
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

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

Private Attributes

edm::InputTag vertexPositionLabel
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 43 of file EmbeddingHltPixelVerticesProducer.cc.

Constructor & Destructor Documentation

◆ EmbeddingHltPixelVerticesProducer()

EmbeddingHltPixelVerticesProducer::EmbeddingHltPixelVerticesProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 59 of file EmbeddingHltPixelVerticesProducer.cc.

References ProducerED_cfi::InputTag, and vertexPositionLabel.

59  {
60  vertexPositionLabel = edm::InputTag("externalLHEProducer", "vertexPosition");
61  consumes<math::XYZTLorentzVectorD>(vertexPositionLabel);
62  produces<reco::VertexCollection>();
63 }

◆ ~EmbeddingHltPixelVerticesProducer()

EmbeddingHltPixelVerticesProducer::~EmbeddingHltPixelVerticesProducer ( )
override

Definition at line 65 of file EmbeddingHltPixelVerticesProducer.cc.

65 {}

Member Function Documentation

◆ beginStream()

void EmbeddingHltPixelVerticesProducer::beginStream ( edm::StreamID  )
overrideprivate

Definition at line 84 of file EmbeddingHltPixelVerticesProducer.cc.

84 {}

◆ endStream()

void EmbeddingHltPixelVerticesProducer::endStream ( )
overrideprivate

Definition at line 87 of file EmbeddingHltPixelVerticesProducer.cc.

87 {}

◆ fillDescriptions()

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

Definition at line 89 of file EmbeddingHltPixelVerticesProducer.cc.

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

89  {
90  // The following says we do not know what parameters are allowed so do no validation
91  // Please change this to state exactly what you do use, even if it is no parameters
93  desc.setUnknown();
94  descriptions.addDefault(desc);
95 }
void addDefault(ParameterSetDescription const &psetDescription)

◆ produce()

void EmbeddingHltPixelVerticesProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 68 of file EmbeddingHltPixelVerticesProducer.cc.

References iEvent, eostools::move(), edm::Handle< T >::product(), HltBtagValidation_cff::Vertex, and vertexPositionLabel.

68  {
69  using namespace edm;
70  std::unique_ptr<reco::VertexCollection> embeddingVertex(new reco::VertexCollection);
71  Handle<math::XYZTLorentzVectorD> vertex_position;
72  iEvent.getByLabel(vertexPositionLabel, vertex_position);
73  math::XYZPoint genVertex =
74  math::XYZPoint(vertex_position.product()->x(), vertex_position.product()->y(), vertex_position.product()->z());
76  // Try to produce an nonfake Vertex
77  // Need at least 5 ndof so the vertex Quality is considered good
78  reco::Vertex saveVertex = reco::Vertex(genVertex, Error, 1.0, 6.0, 6);
79  embeddingVertex->push_back(saveVertex);
80  iEvent.put(std::move(embeddingVertex));
81 }
edm::ErrorSummaryEntry Error
T const * product() const
Definition: Handle.h:70
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
ErrorD< N >::type type
Definition: Error.h:32
int iEvent
Definition: GenABIO.cc:224
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
HLT enums.
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ vertexPositionLabel

edm::InputTag EmbeddingHltPixelVerticesProducer::vertexPositionLabel
private