SegmentationStripYAlg.h
Go to the documentation of this file.
1 #ifndef SEGMENTATIONSTRIPYALG_H
2 #define SEGMENTATIONSTRIPYALG_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& stripSizeY() const { return _stripSizeY; }
48 
49  const double& layerDimX() const { return _layer_dim_X; }
50 
51  const double& layerDimY() const { return _layer_dim_Y; }
52 
53  const std::string& fieldNameX() const { return _xId; }
54 
55  const std::string& fieldNameY() const { return _yId; }
56 
57  const std::string& fieldNameLayer() const { return _layerId; }
58 
59  const std::string& fieldNameSlice() const { return _sliceId; }
60 
61  const unsigned int& nLayers() const override { return _nLayers; }
62 
63  void setStripSizeY(double stripSize) { _stripSizeY = stripSize; }
64 
65  void setFieldNameX(const std::string& fieldName) { _xId = fieldName; }
66 
67  void setFieldNameY(const std::string& fieldName) { _yId = fieldName; }
68 
69  void setFieldNameLayer(const std::string& fieldName) { _layerId = fieldName; }
70 
71  void setFieldNameSlice(const std::string& fieldName) { _sliceId = fieldName; }
72 
73  void setLayerDimXY(const double& dimX, const double& dimY) const override { _layer_dim_X = dimX; _layer_dim_Y = dimY; }
74 
75  // unused variables innerangle, endcapsidelength
76  void setVariables(const double& , const double & ) const override { /* no op */ }
77 
78  protected:
79 
80  void PrintParameters() const override;
81 
82  /// the field name used for X
84  /// the field name used for Y
86  /// the field name used for layer
88  /// the field name used for slice
90  /// the encoding string
92  /// the strip size in Y
93  double _stripSizeY;
94  /// fraction of tiles to remove at the edge
95  double _frac;
96  /// number of layers
97  unsigned int _nLayers;
98  /// layer dimension in X
99  mutable double _layer_dim_X;
100  /// layer dimension in Y
101  mutable double _layer_dim_Y;
102  };
103  }
104  }
105 }
106 
107 #endif
const std::string & fieldNameX() const
double _frac
fraction of tiles to remove at the edge
std::string string
Definition: nybbler.cc:12
void setFieldNameX(const std::string &fieldName)
void setFieldNameY(const std::string &fieldName)
Description of geometry of one entire detector.
Definition: GeometryCore.h:436
double _layer_dim_X
layer dimension in X
void setVariables(const double &, const double &) const override
const std::string & fieldNameY() const
const unsigned int & nLayers() const override
double _layer_dim_Y
layer dimension in Y
static QFile::DecoderFn decoder
Definition: qfile.cpp:522
virtual void reconfigure(fhicl::ParameterSet const &pset)
Helper class for decoding and encoding a bit field of 64bits for convenient declaration.
void Initialize(void)
const std::string & fieldNameLayer() const
long long int CellID_t
Definition: CaloRawDigit.h:24
unsigned int _nLayers
number of layers
void setFieldNameSlice(const std::string &fieldName)
double _stripSizeY
the strip size in Y
General GArSoft Utilities.
std::string _sliceId
the field name used for slice
std::string _yId
the field name used for Y
const std::string & fieldNameSlice() const
void setLayerDimXY(const double &dimX, const double &dimY) const override
std::string _encoding
the encoding string
LArSoft geometry interface.
Definition: ChannelGeo.h:16
std::string _xId
the field name used for X
std::string _layerId
the field name used for layer
void setFieldNameLayer(const std::string &fieldName)