SegmentationMuIDAlg.h
Go to the documentation of this file.
1 #ifndef SEGMENTATIONMUIDALG_H
2 #define SEGMENTATIONMUIDALG_H
3 
5 
6 #include <string>
7 #include <vector>
8 #include <array>
9 
10 namespace fhicl{
11  class ParameterSet;
12 }
13 
14 namespace gar {
15  namespace geo {
16  namespace seg {
17 
19 
20  public:
22 
24 
26 
27  void reconfigure(fhicl::ParameterSet const& pset) override;
28 
29  void Initialize(const gar::geo::GeometryCore& geo) override;
30 
31  std::array<double, 3> GetPosition(const gar::geo::GeometryCore& geo, const gar::raw::CellID_t& cID) const override;
32 
33  gar::raw::CellID_t GetCellID(const gar::geo::GeometryCore& geo, const unsigned int& det_id, const unsigned int& stave, const unsigned int& module, const unsigned int& layer, const unsigned int& slice, const std::array<double, 3>& localPosition) const override;
34 
35  bool isTile(const gar::raw::CellID_t& cID) const override;
36 
37  bool isBarrel(const gar::raw::CellID_t& cID) const override;
38 
39  double getStripLength(const gar::geo::GeometryCore& geo, const std::array<double, 3> &local, const gar::raw::CellID_t& cID) const override;
40 
41  std::pair<TVector3, TVector3> getStripEnds(const gar::geo::GeometryCore& geo, const std::array<double, 3> &local, const gar::raw::CellID_t& cID) const override;
42 
43  std::pair<float, float> CalculateLightPropagation(const gar::geo::GeometryCore& geo, const std::array<double, 3> &local, const gar::raw::CellID_t& cID) const override;
44 
45  std::array<double, 3> ReconstructStripHitPosition(const gar::geo::GeometryCore& geo, const std::array<double, 3> &local, const float &xlocal, const gar::raw::CellID_t& cID) const override;
46 
47  const double& stripSizeX() const override { return _stripSizeX; }
48 
49  const double& stripSizeY() const { return _stripSizeY; }
50 
51  const double& layerDimX() const { return _layer_dim_X; }
52 
53  const double& layerDimY() const { return _layer_dim_Y; }
54 
55  const std::string& fieldNameX() const { return _xId; }
56 
57  const std::string& fieldNameY() const { return _yId; }
58 
59  const std::string& fieldNameLayer() const { return _layerId; }
60 
61  const std::string& fieldNameSlice() const { return _sliceId; }
62 
63  const unsigned int& nLayers() const override { return _nLayers; }
64 
65  void setStripSizeY(double stripSize) { _stripSizeY = stripSize; _stripSizeX = stripSize; }
66 
67  void setFieldNameX(const std::string& fieldName) { _xId = fieldName; }
68 
69  void setFieldNameY(const std::string& fieldName) { _yId = fieldName; }
70 
71  void setFieldNameLayer(const std::string& fieldName) { _layerId = fieldName; }
72 
73  void setFieldNameSlice(const std::string& fieldName) { _sliceId = fieldName; }
74 
75  void setLayerDimXY(const double& dimX, const double& dimY) const override { _layer_dim_X = dimX; _layer_dim_Y = dimY; }
76 
77  // unused variables innerangle, endcapsidelength
78  void setVariables(const double& , const double & ) const override { /* no op */ }
79 
80  protected:
81 
82  void PrintParameters() const override;
83 
84  /// the field name used for X
86  /// the field name used for Y
88  /// the field name used for layer
90  /// the field name used for slice
92  /// the encoding string
94  /// the strip size in X
95  double _stripSizeX;
96  /// the strip size in Y
97  double _stripSizeY;
98  /// fraction of tiles to remove at the edge
99  double _frac;
100  /// number of layers
101  unsigned int _nLayers;
102  /// layer dimension in X
103  mutable double _layer_dim_X;
104  /// layer dimension in Y
105  mutable double _layer_dim_Y;
106  };
107  }
108  }
109 }
110 
111 #endif
void setLayerDimXY(const double &dimX, const double &dimY) const override
const std::string & fieldNameX() const
double _stripSizeY
the strip size in Y
void setFieldNameX(const std::string &fieldName)
double _layer_dim_Y
layer dimension in Y
std::string string
Definition: nybbler.cc:12
const std::string & fieldNameY() const
double _stripSizeX
the strip size in X
const std::string & fieldNameLayer() const
void setFieldNameLayer(const std::string &fieldName)
Description of geometry of one entire detector.
Definition: GeometryCore.h:436
void setVariables(const double &, const double &) const override
std::string _yId
the field name used for Y
void setFieldNameSlice(const std::string &fieldName)
static QFile::DecoderFn decoder
Definition: qfile.cpp:522
std::string _sliceId
the field name used for slice
virtual void reconfigure(fhicl::ParameterSet const &pset)
Helper class for decoding and encoding a bit field of 64bits for convenient declaration.
std::string _layerId
the field name used for layer
void Initialize(void)
long long int CellID_t
Definition: CaloRawDigit.h:24
std::string _xId
the field name used for X
const unsigned int & nLayers() const override
std::string _encoding
the encoding string
General GArSoft Utilities.
double _frac
fraction of tiles to remove at the edge
const double & stripSizeX() const override
void setFieldNameY(const std::string &fieldName)
unsigned int _nLayers
number of layers
const std::string & fieldNameSlice() const
LArSoft geometry interface.
Definition: ChannelGeo.h:16
double _layer_dim_X
layer dimension in X