CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
V0Producer Class Referencefinal

#include <MyProducers/V0Producer/src/V0Producer.cc>

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

Public Member Functions

 V0Producer (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Member Functions

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

Private Attributes

V0Fitter theVees
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 38 of file V0Producer.cc.

Constructor & Destructor Documentation

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

Definition at line 49 of file V0Producer.cc.

49  : theVees(iConfig, consumesCollector()) {
50  produces<reco::VertexCompositeCandidateCollection>("Kshort");
51  produces<reco::VertexCompositeCandidateCollection>("Lambda");
52  //produces< reco::VertexCompositeCandidateCollection >("LambdaBar");
53 }
V0Fitter theVees
Definition: V0Producer.cc:45

Member Function Documentation

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

Definition at line 60 of file V0Producer.cc.

References DEFINE_FWK_MODULE, V0Fitter::fitAll(), eostools::move(), edm::Event::put(), AlCaHLTBitMon_QueryRunRegistry::string, and theVees.

60  {
61  using namespace edm;
62 
63  // Create auto_ptr for each collection to be stored in the Event
64  auto kShortCandidates = std::make_unique<reco::VertexCompositeCandidateCollection>();
65 
66  auto lambdaCandidates = std::make_unique<reco::VertexCompositeCandidateCollection>();
67 
68  // invoke the fitter which reconstructs the vertices and fills,
69  // collections of Kshorts, Lambda0s
70  theVees.fitAll(iEvent, iSetup, *kShortCandidates, *lambdaCandidates);
71 
72  // Write the collections to the Event
73  kShortCandidates->shrink_to_fit();
74  iEvent.put(std::move(kShortCandidates), std::string("Kshort"));
75  lambdaCandidates->shrink_to_fit();
76  iEvent.put(std::move(lambdaCandidates), std::string("Lambda"));
77 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
void fitAll(const edm::Event &iEvent, const edm::EventSetup &iSetup, reco::VertexCompositeCandidateCollection &k, reco::VertexCompositeCandidateCollection &l)
Definition: V0Fitter.cc:86
V0Fitter theVees
Definition: V0Producer.cc:45
HLT enums.
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

V0Fitter V0Producer::theVees
private

Definition at line 45 of file V0Producer.cc.

Referenced by produce().