CMS 3D CMS Logo

V0Producer Class Reference

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

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

Inheritance diagram for V0Producer:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 V0Producer (const edm::ParameterSet &)
 ~V0Producer ()

Private Member Functions

virtual void beginJob (const edm::EventSetup &)
virtual void endJob ()
virtual void produce (edm::Event &, const edm::EventSetup &)

Private Attributes

edm::ParameterSet theParams


Detailed Description

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

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

Definition at line 43 of file V0Producer.h.


Constructor & Destructor Documentation

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

Definition at line 27 of file V0Producer.cc.

00027                                                      :
00028   theParams(iConfig) {
00029 
00030    // Registering V0 Collections
00031   //produces<reco::VertexCollection>("Kshort");
00032   //produces<reco::VertexCollection>("Lambda");
00033   //produces<reco::VertexCollection>("LambdaBar");
00034 
00035   // Trying this with Candidates instead of the simple reco::Vertex
00036   produces< reco::VertexCompositeCandidateCollection >("Kshort");
00037   produces< reco::VertexCompositeCandidateCollection >("Lambda");
00038   produces< reco::VertexCompositeCandidateCollection >("LambdaBar");
00039 
00040 }

V0Producer::~V0Producer (  ) 

Definition at line 43 of file V0Producer.cc.

00043                         {
00044 
00045 }


Member Function Documentation

void V0Producer::beginJob ( const edm::EventSetup  )  [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 102 of file V0Producer.cc.

00102                                               {
00103 }

void V0Producer::endJob ( void   )  [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 106 of file V0Producer.cc.

00106                         {
00107 }

void V0Producer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDProducer.

Definition at line 53 of file V0Producer.cc.

References edmNew::copy(), V0Fitter::getKshorts(), V0Fitter::getLambdaBars(), V0Fitter::getLambdas(), edm::Event::put(), and theParams.

00053                                                                       {
00054    using namespace edm;
00055 
00056    // Create V0Fitter object which reconstructs the vertices and creates
00057    //  (and contains) collections of Kshorts, Lambda0s, and Lambda0Bars
00058    V0Fitter theVees(theParams, iEvent, iSetup);
00059 
00060    // Create auto_ptr for each collection to be stored in the Event
00061    /*std::auto_ptr<reco::VertexCollection> k0sOut(new
00062                reco::VertexCollection( theVees.getKshortCollection() ));
00063    std::auto_ptr<reco::VertexCollection> L0Out(new
00064                reco::VertexCollection( theVees.getLambdaCollection() ));
00065    std::auto_ptr<reco::VertexCollection> L0BarOut(new
00066    reco::VertexCollection( theVees.getLambdaBarCollection() ));*/
00067 
00068    std::auto_ptr< reco::VertexCompositeCandidateCollection > 
00069      kShortCandidates( new reco::VertexCompositeCandidateCollection );
00070    kShortCandidates->reserve( theVees.getKshorts().size() ); 
00071                                                                     //                 theVees.getKshorts()) );
00072    std::auto_ptr< reco::VertexCompositeCandidateCollection >
00073    lambdaCandidates( new reco::VertexCompositeCandidateCollection );
00074    lambdaCandidates->reserve( theVees.getLambdas().size() );
00075                                                                     //                 theVees.getLambdas()) );
00076    std::auto_ptr< reco::VertexCompositeCandidateCollection >
00077    lambdaBarCandidates( new reco::VertexCompositeCandidateCollection );
00078    lambdaBarCandidates->reserve( theVees.getLambdaBars().size() );
00079                                                                        //                           theVees.getLambdaBars()) );
00080    std::copy( theVees.getKshorts().begin(),
00081               theVees.getKshorts().end(),
00082               std::back_inserter(*kShortCandidates) );
00083    std::copy( theVees.getLambdas().begin(),
00084               theVees.getLambdas().end(),
00085               std::back_inserter(*lambdaCandidates) );
00086    std::copy( theVees.getLambdaBars().begin(),
00087               theVees.getLambdaBars().end(),
00088               std::back_inserter(*lambdaBarCandidates) );
00089 
00090    // Write the collections to the Event
00091    //iEvent.put( k0sOut, std::string("Kshort") );
00092    //iEvent.put( L0Out, std::string("Lambda") );
00093    //iEvent.put( L0BarOut, std::string("LambdaBar") );
00094 
00095    iEvent.put( kShortCandidates, std::string("Kshort") );
00096    iEvent.put( lambdaCandidates, std::string("Lambda") );
00097    iEvent.put( lambdaBarCandidates, std::string("LambdaBar") );
00098 
00099 }


Member Data Documentation

edm::ParameterSet V0Producer::theParams [private]

Definition at line 53 of file V0Producer.h.

Referenced by produce().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:34:54 2009 for CMSSW by  doxygen 1.5.4