MinervaSegmentationAlg.h
Go to the documentation of this file.
1 #ifndef MINERVASEGMENTATIONALG_H
2 #define MINERVASEGMENTATIONALG_H
3 
5 
8 
9 #include <string>
10 #include <vector>
11 #include <array>
12 
13 namespace fhicl{
14  class ParameterSet;
15 }
16 
17 namespace gar {
18  namespace geo {
19  namespace seg {
20 
22 
23  public:
25 
27 
29 
30  void reconfigure(fhicl::ParameterSet const& pset) override;
31 
32  void Initialize(const gar::geo::GeometryCore& geo) override;
33 
34  std::array<double, 3> GetPosition(const gar::geo::GeometryCore& geo, const gar::raw::CellID_t& cID) const override;
35 
36  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;
37 
38  const double& stripSizeX() const override { return _stripSizeX; }
39 
40  const double& stripSizeY() const { return _stripSizeY; }
41 
42  const double& layerDimX() const { return _layer_dim_X; }
43 
44  const double& layerDimY() const { return _layer_dim_Y; }
45 
46  const std::string& fieldNameX() const { return _xId; }
47 
48  const std::string& fieldNameY() const { return _yId; }
49 
50  const std::string& fieldNameZ() const { return _zId; }
51 
52  const std::string& fieldNameLayer() const { return _layerId; }
53 
54  const std::string& fieldNameSlice() const { return _sliceId; }
55 
56  const unsigned int& nPlanes() const override { return _nPlanes; }
57 
58  void setStripSizeX(double stripSize) { _stripSizeX = stripSize; }
59 
60  void setStripSizeY(double stripSize) { _stripSizeY = stripSize; }
61 
62  void setFieldNameX(const std::string& fieldName) { _xId = fieldName; }
63 
64  void setFieldNameY(const std::string& fieldName) { _yId = fieldName; }
65 
66  void setFieldNameLayer(const std::string& fieldName) { _layerId = fieldName; }
67 
68  void setFieldNameSlice(const std::string& fieldName) { _sliceId = fieldName; }
69 
70  bool isTile(const gar::raw::CellID_t& ) const override { /* no op */ return false; }
71 
72  bool isBarrel(const gar::raw::CellID_t& ) const override { /* no op */ return true; }
73 
74  void setLayerDimXY(const double& dimX, const double& dimY) const override { _layer_dim_X = dimX; _layer_dim_Y = dimY; }
75 
76  void setVariables(const double & , const double &) const override { /* no op */ }
77 
78  void AddHitsMinerva(std::map< gar::raw::CellID_t, std::vector<gar::sdp::CaloDeposit> > &m_Deposits, std::vector<gar::sdp::CaloDeposit> &fDeposits) const;
79 
80  protected:
81 
82  gar::raw::CellID_t GetComplementaryCellID(gar::raw::CellID_t cellID, unsigned int comp) const;
83 
84  void PrintParameters() const override;
85 
86  /// the field name used for X
88  /// the field name used for Y
90  /// the field name used for Z
92  /// the field name used for layer
94  /// the field name used for slice
96  /// the encoding string
98  /// the strip size in X
99  double _stripSizeX;
100  /// the strip size in Y
101  double _stripSizeY;
102  /// fraction of tiles to remove at the edge
103  double _frac;
104  /// number of planes
105  unsigned int _nPlanes;
106  /// layer dimension in X
107  mutable double _layer_dim_X;
108  /// layer dimension in Y
109  mutable double _layer_dim_Y;
110  };
111  }
112  }
113 }
114 
115 #endif
std::string _sliceId
the field name used for slice
const std::string & fieldNameLayer() const
std::string _encoding
the encoding string
std::string string
Definition: nybbler.cc:12
std::string _yId
the field name used for Y
double _frac
fraction of tiles to remove at the edge
void setFieldNameY(const std::string &fieldName)
const std::string & fieldNameZ() const
const double & stripSizeX() const override
Description of geometry of one entire detector.
Definition: GeometryCore.h:436
void setVariables(const double &, const double &) const override
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 setLayerDimXY(const double &dimX, const double &dimY) const override
const std::string & fieldNameX() const
void Initialize(void)
Definition of basic calo raw digits.
bool isTile(const gar::raw::CellID_t &) const override
const unsigned int & nPlanes() const override
const std::string & fieldNameSlice() const
long long int CellID_t
Definition: CaloRawDigit.h:24
std::string _zId
the field name used for Z
General GArSoft Utilities.
void setFieldNameLayer(const std::string &fieldName)
bool isBarrel(const gar::raw::CellID_t &) const override
std::string _xId
the field name used for X
void setFieldNameSlice(const std::string &fieldName)
const std::string & fieldNameY() const
LArSoft geometry interface.
Definition: ChannelGeo.h:16
std::string _layerId
the field name used for layer
void setFieldNameX(const std::string &fieldName)
unsigned int _nPlanes
number of planes