Class NuVertexMaker

Inheritance Relationships

Base Type

  • public larcv_base

Class Documentation

class NuVertexMaker : public larcv_base

Form Neutrino Vertex Candidates.

Approach is to use Keypoints and rank candidates based on number of track and shower segments that point back to it.

Goal is to form seeds that will be used to build particle hypothesis graphs.

Public Functions

NuVertexMaker()

default constructor

calls default parameter method.

virtual ~NuVertexMaker()
void process(larcv::IOManager &ioman, larlite::storage_manager &ioll)

process event data

goal of module is to form vertex candidates. start by seeding possible vertices using

  • keypoints
  • intersections of particle clusters (not yet implemented)
  • vertex activity near ends of partice clusters (not yet implemented)

event data inputs expected by algorthm:

  • keypoint candidates, representd as larflow3dhit, used as vertex seeds. Use add_keypoint_producer(…) to provide tree name before calling.
  • particle cluster candidates, represented as larflowcluster, to associate to vertex seeds. Use add_cluster_producer(…) to provide tree name before calling.
  • particle cluster candidate containers need to be labeled with a certain ClusterType_t.
  • the cluster type affects how it is added to the vertex and how the vertex candidates are scored

output:

  • vertex candidates stored in _vertex_v
  • need to figure out way to store in larcv or larlite iomanagers

Parameters
  • iolcv: Instance of LArCV IOManager with event data
  • ioll: Instance of larlite storage_manager containing event data

void add_keypoint_producer(std::string name)

add tree name to the list of vectors to get keypoint data

void add_cluster_producer(std::string name, NuVertexCandidate::ClusterType_t ctype)

add name and type to the list clusterat

const std::vector<NuVertexCandidate> &get_nu_candidates() const

get initial candidates

const std::vector<NuVertexCandidate> &get_vetoed_candidates() const

get candidates after vetoing using cosmics

const std::vector<NuVertexCandidate> &get_merged_candidates() const

get candidates after merging nearby candidates (in 3D space)

const std::vector<NuVertexCandidate> &get_fitted_candidates() const

get candidates after optimizing vertex position

void clear()

clear all data containers

void make_ana_tree()

create a TTree into which we will save the vertex container

void add_nuvertex_branch(TTree *tree)

add branch to tree that will save container of vertex candidates

Parameters
  • tree: ROOT tree to add branches to

void fill_ana_tree()

Fill the _ana_tree with data from current event.

void write_ana_tree()

Write data saved in _ana_tree to file.

void apply_cosmic_veto(bool applyveto)

set flag that if true, filters keypoint using proximity to boundary cosmic muon

Protected Functions

void _createCandidates()

create vertex candidates by associating clusters to vertex seeds

inputs

  • uses _keypoint_producers map to get vertex candidates
  • uses _cluster_producers map to get cluster candidates

outputs

  • fills _vertex_v container

void _set_defaults()

set parameter defaults

  • _cluster_type_max_impact_radius: per cluster type, maximum radius to accept candidate into vertex
  • _cluster_type_max_gap: per cluster type, maximum gap to accept candidate into vertex

void _score_vertex(NuVertexCandidate &vtx)

provide score to vertex seeds

Scores used to rank vertex candidates. Scores not used to cut at this stage.

attempting to rank by number of quality cluster associations cluster association quality based on how well cluster points back to vertex

Parameters
  • vtx: A candidate neutrino vertex

void _merge_candidates()

merge nearby vertices

merge if close. the “winning vertex” has the best score when we take the union of prongs. the winning vertex also gets the union of prongs assigned to it.

we fill the _merged_v vector using _vertex_v candidates.

bool _attachClusterToCandidate(NuVertexCandidate &vertex, const larlite::larflowcluster &lfcluster, const larlite::pcaxis &lfpca, NuVertexCandidate::ClusterType_t ctype, std::string producer, int icluster, bool apply_cut)

add cluster to a neutrino vertex candidate

Parameters
  • vertex: NuVertexCandidate instance to add to
  • lfcluster: cluster in the form of a larflowcluster instance
  • lfpca: cluster pca info for lfcluster
  • ctype: type of cluster
  • producer: tree name that held the cluster being passed in
  • icluster: cluster index
  • apply_cut: if true, clusters only attached if satisfies limits on impact parameter and gap distance

void _cosmic_veto_candidates(larlite::storage_manager &ioll)

apply cosmic track veto to candidate vertices

Get tracks from tree, boudarycosmicnoshift. Vertices close to these are removed from consideration.

Parameters
  • ioll: larlite storage_manager containing event data.

void _refine_position(larcv::IOManager &iolcv, larlite::storage_manager &ioll)

Use NuVertexFitter to refine vertex position.

Also, provide refined prong direction and dQ/dx measure

Parameters
  • iolcv: LArCV IO manager with current event data
  • ioll: larlite storage_manager with current event data

Protected Attributes

std::vector<NuVertexCandidate> _vertex_v

initial vertex candidates

std::vector<NuVertexCandidate> _merged_v

after merging nearby vertices

std::vector<NuVertexCandidate> _vetoed_v

after filtering out candidates based on proximity to uncontained cosmic tracks

std::vector<NuVertexCandidate> _fitted_v

after prong fitting

std::map<std::string, larlite::event_larflow3dhit *> _keypoint_producers

map from tree name to event container for keypoints

std::map<std::string, larlite::event_pcaxis *> _keypoint_pca_producers

map from tree name to pca info for keypoints

std::map<std::string, larlite::event_larflowcluster *> _cluster_producers

map from tree name to event container for larflowcluster

std::map<std::string, larlite::event_pcaxis *> _cluster_pca_producers

map from tree name to pca info for clusters

std::map<std::string, NuVertexCandidate::ClusterType_t> _cluster_type

cluster type

std::map<NuVertexCandidate::ClusterType_t, float> _cluster_type_max_impact_radius

max distance from cluster pca to vertex allowed, per class type

std::map<NuVertexCandidate::ClusterType_t, float> _cluster_type_max_gap

maximum gap between vertex and start of cluster, per class type

bool _own_tree

own output tree, i.e. _ana_tree is not null.

int _ana_run

[ana tree variable] run number

int _ana_subrun

[ana tree variable] subrun number

int _ana_event

[ana tree variable] event number

TTree *_ana_tree

ROOT tree to save output of algorithm.

bool _apply_cosmic_veto

apply wirecell filter to reduce number of possible keypoints