|
| VertexFitter (Parameters const &p) |
|
| VertexFitter (VertexFitter const &)=delete |
|
| VertexFitter (VertexFitter &&)=delete |
|
VertexFitter & | operator= (VertexFitter const &)=delete |
|
VertexFitter & | operator= (VertexFitter &&)=delete |
|
void | produce (art::Event &e) override |
|
template<typename PROD , BranchType B = InEvent> |
ProductID | getProductID (std::string const &instanceName={}) const |
|
template<typename PROD , BranchType B> |
ProductID | getProductID (ModuleDescription const &moduleDescription, std::string const &instanceName) const |
|
bool | modifiesEvent () const |
|
template<typename T , BranchType = InEvent> |
ProductToken< T > | consumes (InputTag const &) |
|
template<typename T , art::BranchType BT> |
art::ProductToken< T > | consumes (InputTag const &it) |
|
template<typename T , BranchType = InEvent> |
void | consumesMany () |
|
template<typename Element , BranchType = InEvent> |
ViewToken< Element > | consumesView (InputTag const &) |
|
template<typename T , art::BranchType BT> |
art::ViewToken< T > | consumesView (InputTag const &it) |
|
template<typename T , BranchType = InEvent> |
ProductToken< T > | mayConsume (InputTag const &) |
|
template<typename T , art::BranchType BT> |
art::ProductToken< T > | mayConsume (InputTag const &it) |
|
template<typename T , BranchType = InEvent> |
void | mayConsumeMany () |
|
template<typename Element , BranchType = InEvent> |
ViewToken< Element > | mayConsumeView (InputTag const &) |
|
template<typename T , art::BranchType BT> |
art::ViewToken< T > | mayConsumeView (InputTag const &it) |
|
base_engine_t & | createEngine (seed_t seed) |
|
base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make) |
|
base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label) |
|
seed_t | get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1) |
|
Module for fitting a vertex using the Geometric3DVertexFitter.
It selects primary PFParticles, and then collects all tracks associated to its daughters; if at least 2 tracks are found, they are passed to the vertex fitter.
Inputs are: a PFParticle collection, and the associated tracks.
Outputs are: vector of recob::Vertex, Assns of (neutrino) recob::PFParticle to recob::Vertex, Assns of recob::Vertex and recob::Track with recob::VertexAssnMeta.
For configuration options see Geometric3DVertexFitter::Parameters
- Author
- G. Cerati (FNAL, MicroBooNE)
- Date
- 2017
- Version
- 1.0
Definition at line 46 of file VertexFitter_module.cc.
void trkf::VertexFitter::produce |
( |
art::Event & |
e | ) |
|
|
overridevirtual |
Implements art::EDProducer.
Definition at line 103 of file VertexFitter_module.cc.
References trkf::Geometric3DVertexFitter::computeMeta(), recob::PFParticle::Daughters(), DEFINE_ART_MODULE, e, fitter, trkf::Geometric3DVertexFitter::fitTracks(), art::DataViewImpl::getValidHandle(), recob::PFParticle::IsPrimary(), trkf::VertexWrapper::isValid(), recob::PFParticle::NumDaughters(), pfParticleInputTag, trkf::VertexWrapper::setVertexId(), trackInputTag, and trkf::VertexWrapper::vertex().
108 auto outputVertices = make_unique<vector<recob::Vertex> >();
109 auto outputPFVxAssn = make_unique<art::Assns<recob::PFParticle, recob::Vertex> >();
110 auto outputVxTkMtAssn = make_unique<art::Assns<recob::Vertex, recob::Track, recob::VertexAssnMeta> >();
118 for (
size_t iPF = 0; iPF < inputPFParticle->size(); ++iPF) {
121 if (pfp->IsPrimary()==
false || pfp->NumDaughters()<2)
continue;
122 vector< art::Ptr<recob::Track> > tracks;
123 auto& pfd = pfp->Daughters();
124 for (
auto ipfd : pfd) {
125 vector< art::Ptr<recob::Track> > pftracks = assocTracks->at(ipfd);
126 for (
auto t : pftracks) {
130 if (tracks.size()<2)
continue;
133 if (vtx.isValid()==
false)
continue;
140 outputVertices->emplace_back(vtx.vertex());
145 for (
auto t : tracks) {
146 outputVxTkMtAssn->addSingle(aptr, t, meta[itt]);
151 e.
put(std::move(outputVertices));
152 e.
put(std::move(outputPFVxAssn));
153 e.
put(std::move(outputVxTkMtAssn));
art::InputTag pfParticleInputTag
std::vector< recob::VertexAssnMeta > computeMeta(const VertexWrapper &vtx)
ProductID put(std::unique_ptr< PROD > &&product)
VertexWrapper fitTracks(const std::vector< art::Ptr< recob::Track > > &arttracks) const
art::InputTag trackInputTag
void setVertexId(int newID)
Geometric3DVertexFitter fitter
ValidHandle< PROD > getValidHandle(InputTag const &tag) const