Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
gar::geo::seg::SegmentationAlg Class Referenceabstract

#include <SegmentationAlg.h>

Inheritance diagram for gar::geo::seg::SegmentationAlg:
gar::geo::seg::MinervaSegmentationAlg gar::geo::seg::SegmentationGridXYAlg gar::geo::seg::SegmentationMuIDAlg gar::geo::seg::SegmentationMultiGridStripXYAlg gar::geo::seg::SegmentationStripXAlg gar::geo::seg::SegmentationStripYAlg

Public Member Functions

virtual ~SegmentationAlg ()
 
virtual const std::stringname () const
 
virtual void setName (const std::string &value)
 
virtual const std::stringtype () const
 
virtual const std::stringdescription () const
 
virtual const BitFieldCoderdecoder () const
 
virtual const double & gridSizeX () const
 
virtual const double & stripSizeX () const
 
virtual const unsigned int & nLayers () const
 
virtual const unsigned int & nPlanes () const
 
virtual const std::stringcellEncoding () const
 
virtual void setDecoder (const BitFieldCoder *decoder)
 
virtual void reconfigure (fhicl::ParameterSet const &pset)=0
 
virtual void Initialize (const gar::geo::GeometryCore &geo)=0
 
virtual std::array< double, 3 > GetPosition (const gar::geo::GeometryCore &geo, const gar::raw::CellID_t &cID) const =0
 
virtual 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 =0
 
virtual void PrintParameters () const =0
 
virtual bool isTile (const gar::raw::CellID_t &cID) const =0
 
virtual bool isBarrel (const gar::raw::CellID_t &cID) const =0
 
virtual void setLayerDimXY (const double &dimX, const double &dimY) const =0
 
virtual void setVariables (const double &innerangle, const double &endcapsidelength) const =0
 
virtual double getStripLength (const gar::geo::GeometryCore &geo, const std::array< double, 3 > &local, const gar::raw::CellID_t &cID) const
 
virtual std::pair< TVector3, TVector3 > getStripEnds (const gar::geo::GeometryCore &geo, const std::array< double, 3 > &local, const gar::raw::CellID_t &cID) const
 
virtual std::pair< float, float > CalculateLightPropagation (const gar::geo::GeometryCore &geo, const std::array< double, 3 > &local, const gar::raw::CellID_t &cID) const
 
virtual 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
 

Protected Member Functions

 SegmentationAlg (fhicl::ParameterSet const &pset)
 
 SegmentationAlg (const BitFieldCoder *decoder, fhicl::ParameterSet const &pset)
 

Static Protected Member Functions

static double binToPosition (gar::raw::CellID_t bin, double cellSize, double offset=0)
 
static int positionToBin (double position, double cellSize, double offset=0)
 

Protected Attributes

std::string _name
 
std::string _type
 
std::string _description
 
std::string _encoding
 
double _gridSizeX
 
double _stripSizeX
 
unsigned int _nLayers
 
unsigned int _nPlanes
 
const BitFieldCoder_decoder = 0
 

Private Member Functions

 SegmentationAlg (const SegmentationAlg &)
 

Detailed Description

Definition at line 25 of file SegmentationAlg.h.

Constructor & Destructor Documentation

gar::geo::seg::SegmentationAlg::~SegmentationAlg ( )
virtual

Definition at line 26 of file SegmentationAlg.cxx.

26  {
27  if (_decoder != 0) {
28  delete _decoder;
29  }
30  }
const BitFieldCoder * _decoder
gar::geo::seg::SegmentationAlg::SegmentationAlg ( fhicl::ParameterSet const &  pset)
protected

Definition at line 16 of file SegmentationAlg.cxx.

16  :
17  _name("Segmentation"), _type("Segmentation"), _encoding(pset.get<std::string>("cellEncoding")), _decoder(new BitFieldCoder(pset.get<std::string>("cellEncoding"))) {
18  }
const BitFieldCoder * _decoder
std::string string
Definition: nybbler.cc:12
gar::geo::seg::SegmentationAlg::SegmentationAlg ( const BitFieldCoder decoder,
fhicl::ParameterSet const &  pset 
)
protected

Definition at line 21 of file SegmentationAlg.cxx.

21  :
22  _name("Segmentation"), _type("Segmentation"), _encoding(pset.get<std::string>("cellEncoding")), _decoder(newDecoder) {
23  }
const BitFieldCoder * _decoder
std::string string
Definition: nybbler.cc:12
gar::geo::seg::SegmentationAlg::SegmentationAlg ( const SegmentationAlg )
private

Member Function Documentation

double gar::geo::seg::SegmentationAlg::binToPosition ( gar::raw::CellID_t  bin,
double  cellSize,
double  offset = 0 
)
staticprotected

Definition at line 43 of file SegmentationAlg.cxx.

43  {
44  return bin * cellSize + offset;
45  }
QTextStream & bin(QTextStream &s)
std::pair< float, float > gar::geo::seg::SegmentationAlg::CalculateLightPropagation ( const gar::geo::GeometryCore geo,
const std::array< double, 3 > &  local,
const gar::raw::CellID_t cID 
) const
virtual
virtual const std::string& gar::geo::seg::SegmentationAlg::cellEncoding ( ) const
inlinevirtual

Definition at line 67 of file SegmentationAlg.h.

67  {
68  return _encoding;
69  }
virtual const BitFieldCoder* gar::geo::seg::SegmentationAlg::decoder ( ) const
inlinevirtual

Definition at line 46 of file SegmentationAlg.h.

46  {
47  return _decoder;
48  }
const BitFieldCoder * _decoder
virtual const std::string& gar::geo::seg::SegmentationAlg::description ( ) const
inlinevirtual

Definition at line 42 of file SegmentationAlg.h.

42  {
43  return _description;
44  }
virtual gar::raw::CellID_t gar::geo::seg::SegmentationAlg::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
pure virtual
virtual std::array<double, 3> gar::geo::seg::SegmentationAlg::GetPosition ( const gar::geo::GeometryCore geo,
const gar::raw::CellID_t cID 
) const
pure virtual
std::pair< TVector3, TVector3 > gar::geo::seg::SegmentationAlg::getStripEnds ( const gar::geo::GeometryCore geo,
const std::array< double, 3 > &  local,
const gar::raw::CellID_t cID 
) const
virtual

Reimplemented in gar::geo::seg::SegmentationMuIDAlg, gar::geo::seg::SegmentationMultiGridStripXYAlg, gar::geo::seg::SegmentationStripXAlg, and gar::geo::seg::SegmentationStripYAlg.

Definition at line 58 of file SegmentationAlg.cxx.

58  {
59  return std::make_pair( TVector3(0, 0, 0), TVector3(0, 0, 0) );
60  }
double gar::geo::seg::SegmentationAlg::getStripLength ( const gar::geo::GeometryCore geo,
const std::array< double, 3 > &  local,
const gar::raw::CellID_t cID 
) const
virtual
virtual const double& gar::geo::seg::SegmentationAlg::gridSizeX ( ) const
inlinevirtual
virtual void gar::geo::seg::SegmentationAlg::Initialize ( const gar::geo::GeometryCore geo)
pure virtual
virtual bool gar::geo::seg::SegmentationAlg::isBarrel ( const gar::raw::CellID_t cID) const
pure virtual
virtual bool gar::geo::seg::SegmentationAlg::isTile ( const gar::raw::CellID_t cID) const
pure virtual
virtual const std::string& gar::geo::seg::SegmentationAlg::name ( ) const
inlinevirtual

Definition at line 30 of file SegmentationAlg.h.

30  {
31  return _name;
32  }
virtual const unsigned int& gar::geo::seg::SegmentationAlg::nLayers ( ) const
inlinevirtual
virtual const unsigned int& gar::geo::seg::SegmentationAlg::nPlanes ( ) const
inlinevirtual

Reimplemented in gar::geo::seg::MinervaSegmentationAlg.

Definition at line 63 of file SegmentationAlg.h.

63  {
64  return _nPlanes;
65  }
int gar::geo::seg::SegmentationAlg::positionToBin ( double  position,
double  cellSize,
double  offset = 0 
)
staticprotected

Definition at line 48 of file SegmentationAlg.cxx.

48  {
49  return int( floor((position + 0.5 * cellSize - offset) / cellSize) );
50  }
virtual void gar::geo::seg::SegmentationAlg::PrintParameters ( ) const
pure virtual
virtual void gar::geo::seg::SegmentationAlg::reconfigure ( fhicl::ParameterSet const &  pset)
pure virtual
std::array< double, 3 > gar::geo::seg::SegmentationAlg::ReconstructStripHitPosition ( const gar::geo::GeometryCore geo,
const std::array< double, 3 > &  local,
const float &  xlocal,
const gar::raw::CellID_t cID 
) const
virtual

Reimplemented in gar::geo::seg::SegmentationMuIDAlg, gar::geo::seg::SegmentationMultiGridStripXYAlg, gar::geo::seg::SegmentationStripXAlg, and gar::geo::seg::SegmentationStripYAlg.

Definition at line 68 of file SegmentationAlg.cxx.

68  {
69  return std::array<double, 3>{ {0., 0., 0.} };
70  }
void gar::geo::seg::SegmentationAlg::setDecoder ( const BitFieldCoder decoder)
virtual

Definition at line 33 of file SegmentationAlg.cxx.

33  {
34  if ( _decoder == newDecoder )
35  return; //self assignment
36  else {
37  delete _decoder;
38  }
39  _decoder = newDecoder;
40  }
const BitFieldCoder * _decoder
virtual void gar::geo::seg::SegmentationAlg::setLayerDimXY ( const double &  dimX,
const double &  dimY 
) const
pure virtual
virtual void gar::geo::seg::SegmentationAlg::setName ( const std::string value)
inlinevirtual

Definition at line 34 of file SegmentationAlg.h.

34  {
35  _name = value;
36  }
virtual void gar::geo::seg::SegmentationAlg::setVariables ( const double &  innerangle,
const double &  endcapsidelength 
) const
pure virtual
virtual const double& gar::geo::seg::SegmentationAlg::stripSizeX ( ) const
inlinevirtual
virtual const std::string& gar::geo::seg::SegmentationAlg::type ( ) const
inlinevirtual

Definition at line 38 of file SegmentationAlg.h.

38  {
39  return _type;
40  }

Member Data Documentation

const BitFieldCoder* gar::geo::seg::SegmentationAlg::_decoder = 0
protected

Definition at line 126 of file SegmentationAlg.h.

std::string gar::geo::seg::SegmentationAlg::_description
protected

Definition at line 114 of file SegmentationAlg.h.

std::string gar::geo::seg::SegmentationAlg::_encoding
protected

Definition at line 116 of file SegmentationAlg.h.

double gar::geo::seg::SegmentationAlg::_gridSizeX
protected

Definition at line 118 of file SegmentationAlg.h.

std::string gar::geo::seg::SegmentationAlg::_name
protected

Definition at line 110 of file SegmentationAlg.h.

unsigned int gar::geo::seg::SegmentationAlg::_nLayers
protected

Definition at line 122 of file SegmentationAlg.h.

unsigned int gar::geo::seg::SegmentationAlg::_nPlanes
protected

Definition at line 124 of file SegmentationAlg.h.

double gar::geo::seg::SegmentationAlg::_stripSizeX
protected

Definition at line 120 of file SegmentationAlg.h.

std::string gar::geo::seg::SegmentationAlg::_type
protected

Definition at line 112 of file SegmentationAlg.h.


The documentation for this class was generated from the following files: