SegmentationStripXAlg.h
Go to the documentation of this file.
1 #ifndef SEGMENTATIONSTRIPXALG_H
2 #define SEGMENTATIONSTRIPXALG_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& 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 setStripSizeX(double stripSize) { _stripSizeX = 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  //unused variables: innerangle, endcapsidelength
75  void setVariables(const double& , const double & ) const override { /* no op */ }
76 
77  protected:
78 
79  void PrintParameters() const override;
80 
81  /// the field name used for X
83  /// the field name used for Y
85  /// the field name used for layer
87  /// the field name used for slice
89  /// the encoding string
91  /// the strip size in X
92  double _stripSizeX;
93  /// fraction of tiles to remove at the edge
94  double _frac;
95  /// number of layers
96  unsigned int _nLayers;
97  /// layer dimension in X
98  mutable double _layer_dim_X;
99  /// layer dimension in Y
100  mutable double _layer_dim_Y;
101  };
102  }
103  }
104 }
105 
106 #endif
void setLayerDimXY(const double &dimX, const double &dimY) const override
std::string string
Definition: nybbler.cc:12
double _stripSizeX
the strip size in X
const std::string & fieldNameLayer() const
void setFieldNameX(const std::string &fieldName)
double _layer_dim_X
layer dimension in X
Description of geometry of one entire detector.
Definition: GeometryCore.h:436
double _layer_dim_Y
layer dimension in Y
void setFieldNameSlice(const std::string &fieldName)
std::string _layerId
the field name used for layer
std::string _xId
the field name used for X
const std::string & fieldNameX() const
std::string _yId
the field name used for Y
const double & stripSizeX() const override
void setFieldNameLayer(const std::string &fieldName)
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)
std::string _sliceId
the field name used for slice
long long int CellID_t
Definition: CaloRawDigit.h:24
void setFieldNameY(const std::string &fieldName)
double _frac
fraction of tiles to remove at the edge
General GArSoft Utilities.
const std::string & fieldNameSlice() const
unsigned int _nLayers
number of layers
const unsigned int & nLayers() const override
std::string _encoding
the encoding string
LArSoft geometry interface.
Definition: ChannelGeo.h:16
void setVariables(const double &, const double &) const override
const std::string & fieldNameY() const