7 #include "Geometry/GeometryCore.h" 24 _description =
"Muon system segmentation with cross-strips depending on the slice";
26 std::cout <<
"######### gar::geo::seg::SegmentationMuIDAlg() " <<
std::endl ;
37 _description =
"Muon system segmentation with cross-strips depending on the slice";
39 std::cout <<
"######### gar::geo::seg::SegmentationMuIDAlg() " <<
std::endl ;
79 std::array<double, 3> cellPosition;
92 cellPosition[1] = ( cellIndexY + 0.5 ) *
_stripSizeY;
101 cellPosition[0] = ( cellIndexX + 0.5 ) *
_stripSizeX;
103 cellPosition[2] = 0.;
121 double localX = localPosition[0];
122 double localY = localPosition[1];
180 double stripLength = 0.;
183 if(layer == 1 || layer == 3) stripLength =
_layer_dim_X;
194 TVector3 stripEnd1(0., 0., 0.);
195 TVector3 stripEnd2(0., 0., 0.);
197 if(layer == 1 || layer == 3) {
200 stripEnd1.SetY(local[1]);
201 stripEnd2.SetY(local[1]);
202 stripEnd1.SetZ(local[2]);
203 stripEnd2.SetZ(local[2]);
209 stripEnd1.SetX(local[0]);
210 stripEnd2.SetX(local[0]);
211 stripEnd1.SetZ(local[2]);
212 stripEnd2.SetZ(local[2]);
216 return std::make_pair(stripEnd1, stripEnd2);
230 if(layer == 1 || layer == 3) {
240 return std::make_pair(time1, time2);
248 std::array<double, 3> newlocal;
254 if(
std::abs(pos) > stripLength / 2. ) pos = (pos > 0) ? stripLength / 2. : -stripLength / 2.;
256 if(layer == 1 || layer == 3) {
257 newlocal = {
pos, local[1], local[2]};
261 newlocal = {local[0],
pos, local[2]};
static constexpr double cm
double _stripSizeY
the strip size in Y
const BitFieldCoder * _decoder
double _layer_dim_Y
layer dimension in Y
std::pair< float, float > CalculateLightPropagation(const gar::geo::GeometryCore &geo, const std::array< double, 3 > &local, const gar::raw::CellID_t &cID) const override
void set(long64 &bitfield, size_t index, ulong64 value) const
void Initialize(const gar::geo::GeometryCore &geo) override
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
std::array< double, 3 > GetPosition(const gar::geo::GeometryCore &geo, const gar::raw::CellID_t &cID) const override
double _stripSizeX
the strip size in X
bool isBarrel(const gar::raw::CellID_t &cID) const override
Description of geometry of one entire detector.
SegmentationMuIDAlg(fhicl::ParameterSet const &pset)
Default constructor used by derived classes passing the encoding string.
bool isTile(const gar::raw::CellID_t &cID) const override
std::string _yId
the field name used for Y
std::string _sliceId
the field name used for slice
Helper class for decoding and encoding a bit field of 64bits for convenient declaration.
T get(std::string const &key) const
std::string _layerId
the field name used for layer
std::pair< TVector3, TVector3 > getStripEnds(const gar::geo::GeometryCore &geo, const std::array< double, 3 > &local, const gar::raw::CellID_t &cID) const override
std::string _xId
the field name used for X
std::string _encoding
the encoding string
General GArSoft Utilities.
long64 get(long64 bitfield, size_t index) const
void PrintParameters() const override
double _frac
fraction of tiles to remove at the edge
double getStripLength(const gar::geo::GeometryCore &geo, const std::array< double, 3 > &local, const gar::raw::CellID_t &cID) const override
static constexpr double mm
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
determine the cell ID based on the position
unsigned int _nLayers
number of layers
void decode(std::any const &a, Hep2Vector &result)
LArSoft geometry interface.
double _layer_dim_X
layer dimension in X
QTextStream & endl(QTextStream &s)
void reconfigure(fhicl::ParameterSet const &pset) override