|
| VertexFitter (Parameters const &p) |
|
| VertexFitter (VertexFitter const &)=delete |
|
| VertexFitter (VertexFitter &&)=delete |
|
VertexFitter & | operator= (VertexFitter const &)=delete |
|
VertexFitter & | operator= (VertexFitter &&)=delete |
|
void | doBeginJob (SharedResources const &resources) |
|
void | doEndJob () |
|
void | doRespondToOpenInputFile (FileBlock const &fb) |
|
void | doRespondToCloseInputFile (FileBlock const &fb) |
|
void | doRespondToOpenOutputFiles (FileBlock const &fb) |
|
void | doRespondToCloseOutputFiles (FileBlock const &fb) |
|
bool | doBeginRun (RunPrincipal &rp, ModuleContext const &mc) |
|
bool | doEndRun (RunPrincipal &rp, ModuleContext const &mc) |
|
bool | doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc) |
|
bool | doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc) |
|
bool | doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed) |
|
void | fillProductDescriptions () |
|
void | registerProducts (ProductDescriptions &productsToRegister) |
|
ModuleDescription const & | moduleDescription () const |
|
void | setModuleDescription (ModuleDescription const &) |
|
std::array< std::vector< ProductInfo >, NumBranchTypes > const & | getConsumables () const |
|
void | sortConsumables (std::string const ¤t_process_name) |
|
std::unique_ptr< Worker > | makeWorker (WorkerParams const &wp) |
|
template<typename T , BranchType BT> |
ViewToken< T > | consumesView (InputTag const &tag) |
|
template<typename T , BranchType BT> |
ViewToken< T > | mayConsumeView (InputTag const &tag) |
|
|
ConsumesCollector & | consumesCollector () |
|
template<typename T , BranchType = InEvent> |
ProductToken< T > | consumes (InputTag const &) |
|
template<typename Element , BranchType = InEvent> |
ViewToken< Element > | consumesView (InputTag const &) |
|
template<typename T , BranchType = InEvent> |
void | consumesMany () |
|
template<typename T , BranchType = InEvent> |
ProductToken< T > | mayConsume (InputTag const &) |
|
template<typename Element , BranchType = InEvent> |
ViewToken< Element > | mayConsumeView (InputTag const &) |
|
template<typename T , BranchType = InEvent> |
void | mayConsumeMany () |
|
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 42 of file VertexFitter_module.cc.
void trkf::VertexFitter::produce |
( |
art::Event & |
e | ) |
|
|
overrideprivatevirtual |
Implements art::EDProducer.
Definition at line 93 of file VertexFitter_module.cc.
References trkf::Geometric3DVertexFitter::computeMeta(), recob::PFParticle::Daughters(), DEFINE_ART_MODULE, e, fitter, trkf::Geometric3DVertexFitter::fitTracks(), art::ProductRetriever::getValidHandle(), recob::PFParticle::IsPrimary(), trkf::VertexWrapper::isValid(), recob::PFParticle::NumDaughters(), pfParticleInputTag, art::Event::put(), recob::PFParticle::Self(), trkf::VertexWrapper::setVertexId(), trackInputTag, and trkf::VertexWrapper::vertex().
97 auto outputVertices = make_unique<vector<recob::Vertex>>();
98 auto outputPFVxAssn = make_unique<art::Assns<recob::PFParticle, recob::Vertex>>();
99 auto outputVxTkMtAssn =
100 make_unique<art::Assns<recob::Vertex, recob::Track, recob::VertexAssnMeta>>();
110 for (
size_t iPF = 0; iPF < inputPFParticle->size(); ++iPF) {
113 if (pfp->IsPrimary() ==
false || pfp->NumDaughters() < 2)
continue;
114 vector<art::Ptr<recob::Track>> tracks;
115 auto& pfd = pfp->Daughters();
116 for (
auto ipfd : pfd) {
119 for (
size_t jPF = 0; jPF < inputPFParticle->size(); ++jPF) {
121 if (pfpd->Self() != ipfd)
continue;
122 vector<art::Ptr<recob::Track>> pftracks = assocTracks.at(jPF);
123 for (
auto t : pftracks) {
129 if (tracks.size() < 2)
continue;
132 if (vtx.isValid() ==
false)
continue;
139 outputVertices->emplace_back(vtx.vertex());
144 for (
auto t : tracks) {
145 outputVxTkMtAssn->addSingle(aptr, t, meta[itt]);
150 e.
put(std::move(outputVertices));
151 e.
put(std::move(outputPFVxAssn));
152 e.
put(std::move(outputVxTkMtAssn));
art::InputTag pfParticleInputTag
std::vector< recob::VertexAssnMeta > computeMeta(detinfo::DetectorPropertiesData const &detProp, const VertexWrapper &vtx)
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
art::InputTag trackInputTag
VertexWrapper fitTracks(detinfo::DetectorPropertiesData const &detProp, const std::vector< art::Ptr< recob::Track >> &arttracks) const
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
void setVertexId(int newID)
Geometric3DVertexFitter fitter