#include <MyProducers/V0Producer/src/V0Producer.cc>
Public Member Functions | |
V0Producer (const edm::ParameterSet &) | |
~V0Producer () | |
Private Member Functions | |
virtual void | beginJob () |
virtual void | endJob () |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
edm::ParameterSet | theParams |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 43 of file V0Producer.h.
V0Producer::V0Producer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 27 of file V0Producer.cc.
: theParams(iConfig) { // Registering V0 Collections //produces<reco::VertexCollection>("Kshort"); //produces<reco::VertexCollection>("Lambda"); //produces<reco::VertexCollection>("LambdaBar"); // Trying this with Candidates instead of the simple reco::Vertex produces< reco::VertexCompositeCandidateCollection >("Kshort"); produces< reco::VertexCompositeCandidateCollection >("Lambda"); //produces< reco::VertexCompositeCandidateCollection >("LambdaBar"); }
V0Producer::~V0Producer | ( | ) |
Definition at line 43 of file V0Producer.cc.
{ }
void V0Producer::beginJob | ( | void | ) | [private, virtual] |
void V0Producer::endJob | ( | void | ) | [private, virtual] |
void V0Producer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDProducer.
Definition at line 53 of file V0Producer.cc.
References filterCSVwithJSON::copy, V0Fitter::getKshorts(), V0Fitter::getLambdas(), edm::Event::put(), and theParams.
{ using namespace edm; // Create V0Fitter object which reconstructs the vertices and creates // (and contains) collections of Kshorts, Lambda0s V0Fitter theVees(theParams, iEvent, iSetup); // Create auto_ptr for each collection to be stored in the Event std::auto_ptr< reco::VertexCompositeCandidateCollection > kShortCandidates( new reco::VertexCompositeCandidateCollection ); kShortCandidates->reserve( theVees.getKshorts().size() ); std::auto_ptr< reco::VertexCompositeCandidateCollection > lambdaCandidates( new reco::VertexCompositeCandidateCollection ); lambdaCandidates->reserve( theVees.getLambdas().size() ); std::copy( theVees.getKshorts().begin(), theVees.getKshorts().end(), std::back_inserter(*kShortCandidates) ); std::copy( theVees.getLambdas().begin(), theVees.getLambdas().end(), std::back_inserter(*lambdaCandidates) ); // Write the collections to the Event iEvent.put( kShortCandidates, std::string("Kshort") ); iEvent.put( lambdaCandidates, std::string("Lambda") ); }
edm::ParameterSet V0Producer::theParams [private] |
Definition at line 54 of file V0Producer.h.
Referenced by produce().