All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
second_shower_search.h
Go to the documentation of this file.
4 #include "TGraph.h"
5 
8 
9 namespace single_photon
10 {
11 
12  struct sss_score{
13  int plane;
15  double point_score;
16  int n_hits;
17 
18  double mean_wire;
19  double max_wire;
20  double min_wire;
21  double mean_tick;
22  double max_tick;
23  double min_tick;
24 
25  double close_tick;
26  double close_wire; /* wire of hit that's closest to vertex */
27  double angle;//w.r.t shower primary
28 
30 
31  double max_dist_tick;
33  double min_dist_tick;
34  double max_dist_wire;
36  double min_dist_wire;
37 
38  double mean_dist;
39  double max_dist;
40  double min_dist;
41 
42  double pca_0;
43  double pca_1;
44  double pca_theta;
45 
46  int n_wires; /* number of wires hits correspond to */
47  int n_ticks;
48 
49  bool pass;
50 
51  sss_score(int ip, int cl): plane(ip), cluster_label(cl){};
52  }; //end of class sss_score
53 
54 
55  TGraph* GetNearestNpts(int p, int cl, std::vector<art::Ptr<recob::Hit>> &hitz, double vertex_wire, double vertex_tick, int Npts);
56 
57  sss_score ScoreCluster(int p, int cl, std::vector<art::Ptr<recob::Hit>> &hits, double vertex_wire, double vertex_tick, const art::Ptr<recob::Shower> &shower);
58 
59  int CompareToShowers(int p ,int cl, std::vector<art::Ptr<recob::Hit>>& hitz,double vertex_wire,double vertex_tick,
60  const std::vector<art::Ptr<recob::Shower>>& showers, std::map<art::Ptr<recob::Shower>, art::Ptr<recob::PFParticle>> & showerToPFParticleMap, const std::map<art::Ptr<recob::PFParticle>, std::vector<art::Ptr<recob::Hit>> > & pfParticleToHitsMap, double eps);
61 
62 
63 
64  std::vector<double>SecondShowerMatching(
65  std::vector<art::Ptr<recob::Hit>>& hitz,
66  art::FindManyP<simb::MCParticle,anab::BackTrackerHitMatchingData>& mcparticles_per_hit,
67  std::vector<art::Ptr<simb::MCParticle>>& mcParticleVector,
68  std::map< int ,art::Ptr<simb::MCParticle>> & MCParticleToTrackIdMap,
69  var_all& vars);
70 
71 
72  //************************************************ Shower Search Slice Second SSS3D ********** /
73 
75  std::vector<art::Ptr<recob::Shower>> & showers,
76  std::map<art::Ptr<recob::Shower>, art::Ptr<recob::PFParticle>> & NormalShowerToPFParticleMap,
77  std::vector<art::Ptr<recob::Track>> & tracks,
78  std::map<art::Ptr<recob::Track>,
79  art::Ptr<recob::PFParticle>> & NormalTrackToPFParticleMap,
80  art::Event const & evt ,
81  var_all& vars,
82  para_all& paras);
83 
84  void SimpleSecondShowerCluster(var_all& vars, para_all& paras);
85 
86  std::pair<bool, std::vector<double>> clusterCandidateOverlap(const std::vector<int> & candidate_indices, const std::vector<int>& cluster_planes, const std::vector<double>& cluster_max_ticks, const std::vector<double>& cluster_min_ticks);
87 
88 
89  std::pair<int, std::pair<std::vector<std::vector<double>>, std::vector<double>>> GroupClusterCandidate(int num_clusters, const std::vector<int>& cluster_planes, const std::vector<double>& cluster_max_ticks, const std::vector<double>& cluster_min_ticks);
90 
91  //isolation.h
92  bool map_max_fn(const std::pair<art::Ptr<recob::Hit>,double> p1, const std::pair<art::Ptr<recob::Hit>, double> p2){
93  return (p1.second < p2.second);
94  }
95 
96  // override function of sorts for min_element function comparison
97  bool map_min_fn(const std::pair<art::Ptr<recob::Hit>,double> p1, const std::pair<art::Ptr<recob::Hit>, double> p2){
98  return (p1.second > p2.second);
99  }
100 
101  void IsolationStudy(
102  std::vector<PandoraPFParticle> all_PPFPs,
103  const std::vector<art::Ptr<recob::Track>>& tracks,
104  const std::vector<art::Ptr<recob::Shower>>& showers,
105  detinfo::DetectorPropertiesData const & theDetector,
106  var_all& vars,
107  para_all& paras);
108 
109 
110 }
std::vector< double > SecondShowerMatching(std::vector< art::Ptr< recob::Hit >> &hitz, art::FindManyP< simb::MCParticle, anab::BackTrackerHitMatchingData > &mcparticles_per_hit, std::vector< art::Ptr< simb::MCParticle >> &mcParticleVector, std::map< int, art::Ptr< simb::MCParticle >> &MCParticleToTrackIdMap, var_all &vars)
ClusterModuleLabel join with tracks
pdgs p
Definition: selectors.fcl:22
std::pair< int, std::pair< std::vector< std::vector< double > >, std::vector< double > > > GroupClusterCandidate(int num_clusters, const std::vector< int > &cluster_planes, const std::vector< double > &cluster_max_ticks, const std::vector< double > &cluster_min_ticks)
process_name shower
Definition: cheaterreco.fcl:51
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
bool map_min_fn(const std::pair< art::Ptr< recob::Hit >, double > p1, const std::pair< art::Ptr< recob::Hit >, double > p2)
TGraph * GetNearestNpts(int p, int cl, std::vector< art::Ptr< recob::Hit >> &hitz, double vertex_wire, double vertex_tick, int Npts)
bool map_max_fn(const std::pair< art::Ptr< recob::Hit >, double > p1, const std::pair< art::Ptr< recob::Hit >, double > p2)
void IsolationStudy(std::vector< PandoraPFParticle > all_PPFPs, const std::vector< art::Ptr< recob::Track >> &tracks, const std::vector< art::Ptr< recob::Shower >> &showers, detinfo::DetectorPropertiesData const &theDetector, var_all &vars, para_all &paras)
sss_score ScoreCluster(int p, int cl, std::vector< art::Ptr< recob::Hit >> &hits, double vertex_wire, double vertex_tick, const art::Ptr< recob::Shower > &shower)
void SimpleSecondShowerCluster(var_all &vars, para_all &paras)
int CompareToShowers(int p, int cl, std::vector< art::Ptr< recob::Hit >> &hitz, double vertex_wire, double vertex_tick, const std::vector< art::Ptr< recob::Shower >> &showers, std::map< art::Ptr< recob::Shower >, art::Ptr< recob::PFParticle >> &showerToPFParticleMap, const std::map< art::Ptr< recob::PFParticle >, std::vector< art::Ptr< recob::Hit >> > &pfParticleToHitsMap, double eps)
TCEvent evt
Definition: DataStructs.cxx:8
std::pair< bool, std::vector< double > > clusterCandidateOverlap(const std::vector< int > &candidate_indices, const std::vector< int > &cluster_planes, const std::vector< double > &cluster_max_ticks, const std::vector< double > &cluster_min_ticks)
void SecondShowerSearch3D(std::vector< art::Ptr< recob::Shower >> &showers, std::map< art::Ptr< recob::Shower >, art::Ptr< recob::PFParticle >> &NormalShowerToPFParticleMap, std::vector< art::Ptr< recob::Track >> &tracks, std::map< art::Ptr< recob::Track >, art::Ptr< recob::PFParticle >> &NormalTrackToPFParticleMap, art::Event const &evt, var_all &vars, para_all &paras)
physics associatedGroupsWithLeft p1