00001
00002
00003
00004
00005
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <memory>
00023
00024 #include "RecoVertex/V0Producer/interface/V0Producer.h"
00025
00026
00027 V0Producer::V0Producer(const edm::ParameterSet& iConfig) :
00028 theParams(iConfig) {
00029
00030
00031
00032
00033
00034
00035
00036 produces< reco::VertexCompositeCandidateCollection >("Kshort");
00037 produces< reco::VertexCompositeCandidateCollection >("Lambda");
00038 produces< reco::VertexCompositeCandidateCollection >("LambdaBar");
00039
00040 }
00041
00042
00043 V0Producer::~V0Producer() {
00044
00045 }
00046
00047
00048
00049
00050
00051
00052
00053 void V0Producer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) {
00054 using namespace edm;
00055
00056
00057
00058 V0Fitter theVees(theParams, iEvent, iSetup);
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 std::auto_ptr< reco::VertexCompositeCandidateCollection >
00069 kShortCandidates( new reco::VertexCompositeCandidateCollection );
00070 kShortCandidates->reserve( theVees.getKshorts().size() );
00071
00072 std::auto_ptr< reco::VertexCompositeCandidateCollection >
00073 lambdaCandidates( new reco::VertexCompositeCandidateCollection );
00074 lambdaCandidates->reserve( theVees.getLambdas().size() );
00075
00076 std::auto_ptr< reco::VertexCompositeCandidateCollection >
00077 lambdaBarCandidates( new reco::VertexCompositeCandidateCollection );
00078 lambdaBarCandidates->reserve( theVees.getLambdaBars().size() );
00079
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
00091
00092
00093
00094
00095 iEvent.put( kShortCandidates, std::string("Kshort") );
00096 iEvent.put( lambdaCandidates, std::string("Lambda") );
00097 iEvent.put( lambdaBarCandidates, std::string("LambdaBar") );
00098
00099 }
00100
00101
00102 void V0Producer::beginJob(const edm::EventSetup&) {
00103 }
00104
00105
00106 void V0Producer::endJob() {
00107 }
00108
00109
00110 #include "FWCore/PluginManager/interface/ModuleDef.h"
00111 DEFINE_SEAL_MODULE();
00112 DEFINE_ANOTHER_FWK_MODULE(V0Producer);
00113