All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/FiducialVolumeCosmicIdAlg.h
Go to the documentation of this file.
1 #ifndef FIDUCIALVOLUMECOSMICIDALG_H_SEEN
2 #define FIDUCIALVOLUMECOSMICIDALG_H_SEEN
3 
4 
5 ///////////////////////////////////////////////
6 // FiducialVolumeCosmicIdAlg.h
7 //
8 // Functions for fiducial volume cosmic tagger
9 // T Brooks (tbrooks@fnal.gov), November 2018
10 ///////////////////////////////////////////////
11 
12 // framework
13 #include "fhiclcpp/ParameterSet.h"
14 #include "fhiclcpp/types/Table.h"
15 #include "fhiclcpp/types/Atom.h"
16 
17 // LArSoft
21 
22 // sbncode
23 #include "core/ProviderManager.hh"
24 
25 // c++
26 #include <vector>
27 
28 
29 namespace ana{
30 
32  public:
33 
34  struct Fiducial {
35  using Name = fhicl::Name;
36 
37  fhicl::Atom<double> MinX { Name("MinX") };
38  fhicl::Atom<double> MinY { Name("MinY") };
39  fhicl::Atom<double> MinZ { Name("MinZ") };
40  fhicl::Atom<double> MaxX { Name("MaxX") };
41  fhicl::Atom<double> MaxY { Name("MaxY") };
42  fhicl::Atom<double> MaxZ { Name("MaxZ") };
43 
44  };
45 
46  struct Config {
47  using Name = fhicl::Name;
48  using Comment = fhicl::Comment;
49 
50  fhicl::Table<Fiducial> FiducialCuts {
51  Name("FiducialCuts"),
52  Comment("Fiducial volume cuts (cm)")
53  };
54 
55  };
56 
57  FiducialVolumeCosmicIdAlg(const core::ProviderManager &manager, const Config& config);
58 
59  FiducialVolumeCosmicIdAlg(const core::ProviderManager &manager, const fhicl::ParameterSet& pset) :
60  FiducialVolumeCosmicIdAlg(manager, fhicl::Table<Config>(pset, {})()) {}
61 
63 
65 
66  void reconfigure(const core::ProviderManager &manager, const Config& config);
67 
68  // Check if point in fiducial volume used by this algorithm
69  bool InFiducial(geo::Point_t point);
70 
71  // Check both start and end points of track are in fiducial volume
73 
74  private:
75  std::vector<geo::BoxBoundedGeo> fFiducialVolumes;
76 
77  double fMinX;
78  double fMinY;
79  double fMinZ;
80  double fMaxX;
81  double fMaxY;
82  double fMaxZ;
83  };
84 
85 }
86 
87 #endif
FiducialVolumeCosmicIdAlg(const core::ProviderManager &manager, const Config &config)
void reconfigure(const core::ProviderManager &manager, const Config &config)
process_name use argoneut_mc_hitfinder track
process_name opflashCryoW ana
Access the description of detector geometry.
Interface to LArSoft services.
BEGIN_PROLOG vertical distance to the surface Name
Provides recob::Track data product.
Provides a base class aware of world box coordinates.
FiducialVolumeCosmicIdAlg(const core::ProviderManager &manager, const fhicl::ParameterSet &pset)
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:184
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a &quot;fitted&quot; track: