SegmentationGridXYAlg.h
Go to the documentation of this file.
1 #ifndef SEGMENTATIONGRIDXYALG_H
2 #define SEGMENTATIONGRIDXYALG_H
3 
5 #include "Geometry/GeometryCore.h"
6 
7 #include <string>
8 #include <vector>
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& ) const override { return true; }
36 
37  bool isBarrel(const gar::raw::CellID_t& cID) const override;
38 
39  const double& gridSizeX() const override { return _gridSizeX; }
40 
41  const double& gridSizeY() const { return _gridSizeY; }
42 
43  const double& offsetX() const { return _offsetX; }
44 
45  const double& offsetY() const { return _offsetY; }
46 
47  const std::string& fieldNameX() const { return _xId; }
48 
49  const std::string& fieldNameY() const { return _yId; }
50 
51  const unsigned int& nLayers() const override { return _nLayers; }
52 
53  void setGridSizeX(double cellSize) { _gridSizeX = cellSize; }
54 
55  void setGridSizeY(double cellSize) { _gridSizeY = cellSize; }
56 
57  void setOffsetX(double offset) { _offsetX = offset; }
58 
59  void setOffsetY(double offset) { _offsetY = offset; }
60 
61  void setFieldNameX(const std::string& fieldName) { _xId = fieldName; }
62 
63  void setFieldNameY(const std::string& fieldName) { _yId = fieldName; }
64 
65  void setLayerDimXY(const double& dimX, const double& dimY) const override { _layer_dim_X = dimX; _layer_dim_Y = dimY; }
66 
67  // unused variables inneragle and endcapsidelength
68  void setVariables(const double& , const double & ) const override { /* no op */ }
69 
70  protected:
71 
72  void PrintParameters() const override;
73 
74  /// the grid size in X
75  double _gridSizeX;
76  /// the coordinate offset in X
77  double _offsetX;
78  /// the grid size in Y
79  double _gridSizeY;
80  /// the coordinate offset in Y
81  double _offsetY;
82  /// the field name used for X
84  /// the field name used for Y
86  /// the encoding string
88  /// number of layers
89  unsigned int _nLayers;
90  /// layer dimension in X
91  mutable double _layer_dim_X;
92  /// layer dimension in Y
93  mutable double _layer_dim_Y;
94  };
95  }
96  }
97 }
98 
99 #endif
double _offsetY
the coordinate offset in Y
std::string string
Definition: nybbler.cc:12
void setFieldNameX(const std::string &fieldName)
std::string _encoding
the encoding string
Description of geometry of one entire detector.
Definition: GeometryCore.h:436
double _layer_dim_Y
layer dimension in Y
const unsigned int & nLayers() const override
std::string _xId
the field name used for X
double _offsetX
the coordinate offset in X
bool isTile(const gar::raw::CellID_t &) const override
static QFile::DecoderFn decoder
Definition: qfile.cpp:522
const double & gridSizeX() const override
virtual void reconfigure(fhicl::ParameterSet const &pset)
const std::string & fieldNameX() const
Helper class for decoding and encoding a bit field of 64bits for convenient declaration.
void setLayerDimXY(const double &dimX, const double &dimY) const override
const std::string & fieldNameY() const
void Initialize(void)
void setFieldNameY(const std::string &fieldName)
long long int CellID_t
Definition: CaloRawDigit.h:24
void setVariables(const double &, const double &) const override
General GArSoft Utilities.
std::string _yId
the field name used for Y
double _layer_dim_X
layer dimension in X
unsigned int _nLayers
number of layers
LArSoft geometry interface.
Definition: ChannelGeo.h:16