Public Member Functions | Private Member Functions | Private Attributes | List of all members
gar::geo::StandardGeometryHelperGAr Class Reference

Simple implementation of channel mapping. More...

#include <StandardGeometryHelperGAr.h>

Inheritance diagram for gar::geo::StandardGeometryHelperGAr:
gar::geo::ExptGeoHelperInterface

Public Member Functions

 StandardGeometryHelperGAr (fhicl::ParameterSet const &pset,::art::ActivityRegistry &reg)
 Constructor; follows the standard art service signature. More...
 
- Public Member Functions inherited from gar::geo::ExptGeoHelperInterface
virtual ~ExptGeoHelperInterface ()=default
 Virtual destructor; does nothing. More...
 
void ConfigureChannelMapAlg (fhicl::ParameterSet const &sortingParameters, geo::GeometryCore *geom)
 Configure and initialize the channel map. More...
 
ChannelMapAlgPtr_t GetChannelMapAlg () const
 
void ConfigureECALSegmentationAlg (fhicl::ParameterSet const &segParameters, geo::GeometryCore *geom)
 
SegmentationAlgPtr_t GetECALSegmentationAlg () const
 
void ConfigureMinervaSegmentationAlg (fhicl::ParameterSet const &segParameters, geo::GeometryCore *geom)
 
SegmentationAlgPtr_t GetMinervaSegmentationAlg () const
 
void ConfigureMuIDSegmentationAlg (fhicl::ParameterSet const &segParameters, geo::GeometryCore *geom)
 
SegmentationAlgPtr_t GetMuIDSegmentationAlg () const
 

Private Member Functions

virtual void doConfigureChannelMapAlg (fhicl::ParameterSet const &sortingParameters, geo::GeometryCore *geom) override
 Implementation of ConfigureChannelMapAlg (pure virtual) More...
 
virtual ChannelMapAlgPtr_t doGetChannelMapAlg () const override
 Returns the ChannelMapAlg. More...
 
virtual void doConfigureECALSegmentationAlg (fhicl::ParameterSet const &segParameters, geo::GeometryCore *geom) override
 Implementation of ConfigureECALSegmentationAlg (pure virtual) More...
 
virtual SegmentationAlgPtr_t doGetECALSegmentationAlg () const override
 Returns the ECAL SegmentationAlg. More...
 
virtual void doConfigureMinervaSegmentationAlg (fhicl::ParameterSet const &segParameters, geo::GeometryCore *geom) override
 Implementation of ConfigureECALSegmentationAlg (pure virtual) More...
 
virtual SegmentationAlgPtr_t doGetMinervaSegmentationAlg () const override
 Returns the Tracker Sc SegmentationAlg. More...
 
virtual void doConfigureMuIDSegmentationAlg (fhicl::ParameterSet const &segParameters, geo::GeometryCore *geom) override
 Implementation of ConfigureECALSegmentationAlg (pure virtual) More...
 
virtual SegmentationAlgPtr_t doGetMuIDSegmentationAlg () const override
 Returns the MuID SegmentationAlg. More...
 

Private Attributes

fhicl::ParameterSet fPset
 copy of configuration parameter set More...
 
std::shared_ptr< geo::seg::ChannelMapAlgfChannelMap
 channel map algorithm More...
 
std::shared_ptr< geo::seg::SegmentationAlgfECALSegmentationAlg
 ECAL Segmentation Alg. More...
 
std::shared_ptr< geo::seg::SegmentationAlgfMinervaSegmentationAlg
 Tracker Sc Segmentation Alg. More...
 
std::shared_ptr< geo::seg::SegmentationAlgfMuIDSegmentationAlg
 MuID Segmentation Alg. More...
 

Additional Inherited Members

- Public Types inherited from gar::geo::ExptGeoHelperInterface
using ChannelMapAlgPtr_t = std::shared_ptr< const seg::ChannelMapAlg >
 
using SegmentationAlgPtr_t = std::shared_ptr< const seg::SegmentationAlg >
 

Detailed Description

Simple implementation of channel mapping.

This ExptGeoHelperInterface implementation serves a ChannelMapStandardAlg for experiments that are known to work well with it.

Definition at line 32 of file StandardGeometryHelperGAr.h.

Constructor & Destructor Documentation

gar::geo::StandardGeometryHelperGAr::StandardGeometryHelperGAr ( fhicl::ParameterSet const &  pset,
::art::ActivityRegistry reg 
)

Constructor; follows the standard art service signature.

Definition at line 29 of file StandardGeometryHelperGAr_service.cc.

31  : fPset( pset )
32  , fChannelMap()
36  {}
fhicl::ParameterSet fPset
copy of configuration parameter set
std::shared_ptr< geo::seg::SegmentationAlg > fECALSegmentationAlg
ECAL Segmentation Alg.
std::shared_ptr< geo::seg::SegmentationAlg > fMinervaSegmentationAlg
Tracker Sc Segmentation Alg.
std::shared_ptr< geo::seg::SegmentationAlg > fMuIDSegmentationAlg
MuID Segmentation Alg.
std::shared_ptr< geo::seg::ChannelMapAlg > fChannelMap
channel map algorithm

Member Function Documentation

void gar::geo::StandardGeometryHelperGAr::doConfigureChannelMapAlg ( fhicl::ParameterSet const &  sortingParameters,
geo::GeometryCore geom 
)
overrideprivatevirtual

Implementation of ConfigureChannelMapAlg (pure virtual)

Implements gar::geo::ExptGeoHelperInterface.

Definition at line 39 of file StandardGeometryHelperGAr_service.cc.

41  {
42  fChannelMap.reset();
43 
44  fChannelMap = std::make_shared<gar::geo::seg::ChannelMapStandardAlg>(sortingParameters);
45 
47 
48  return;
49 
50  } // StandardGeometryHelperGAr::doConfigureChannelMapAlg()
void ApplyChannelMap(std::unique_ptr< geo::ChannelMapAlg > pChannelMap)
Initializes the geometry to work with this channel map.
std::shared_ptr< geo::seg::ChannelMapAlg > fChannelMap
channel map algorithm
void gar::geo::StandardGeometryHelperGAr::doConfigureECALSegmentationAlg ( fhicl::ParameterSet const &  segParameters,
geo::GeometryCore geom 
)
overrideprivatevirtual

Implementation of ConfigureECALSegmentationAlg (pure virtual)

Implements gar::geo::ExptGeoHelperInterface.

Definition at line 60 of file StandardGeometryHelperGAr_service.cc.

62  {
63  fECALSegmentationAlg.reset();
64  auto SegmentationAlgName = segParameters.get<std::string>("SegmentationAlgName");
65 
66  if(SegmentationAlgName.compare("GridXY") == 0)
67  fECALSegmentationAlg = std::make_shared<gar::geo::seg::SegmentationGridXYAlg>(segParameters);
68  else if(SegmentationAlgName.compare("MultiGridStripXY") == 0)
69  fECALSegmentationAlg = std::make_shared<gar::geo::seg::SegmentationMultiGridStripXYAlg>(segParameters);
70  else{
71  throw cet::exception("StandardGeometryHelperGAr::doConfigureECALSegmentationAlg")
72  << "Unable to determine which ECAL Segmentation algorithm to use, bail";
73  }
74 
75  if(fECALSegmentationAlg) geom->ApplyECALSegmentationAlg(fECALSegmentationAlg);
76 
77  return;
78 
79  } // StandardGeometryHelperGAr::doConfigureECALSegmentationAlg()
std::string string
Definition: nybbler.cc:12
std::shared_ptr< geo::seg::SegmentationAlg > fECALSegmentationAlg
ECAL Segmentation Alg.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void gar::geo::StandardGeometryHelperGAr::doConfigureMinervaSegmentationAlg ( fhicl::ParameterSet const &  segParameters,
geo::GeometryCore geom 
)
overrideprivatevirtual

Implementation of ConfigureECALSegmentationAlg (pure virtual)

Implements gar::geo::ExptGeoHelperInterface.

Definition at line 82 of file StandardGeometryHelperGAr_service.cc.

84  {
86 
87  auto SegmentationAlgName = segParameters.get<std::string>("SegmentationAlgName");
88 
89  if(SegmentationAlgName.compare("Minerva") == 0)
90  fMinervaSegmentationAlg = std::make_shared<gar::geo::seg::MinervaSegmentationAlg>(segParameters);
91  else{
92  throw cet::exception("StandardGeometryHelperGAr::doConfigureMinervaSegmentationAlg")
93  << "Unable to determine which Tracker Sc Segmentation algorithm to use, bail";
94  }
95 
96  if(fMinervaSegmentationAlg) geom->ApplyMinervaSegmentationAlg(fMinervaSegmentationAlg);
97 
98  return;
99 
100  } // StandardGeometryHelperGAr::doConfigureMinervaSegmentationAlg()
std::string string
Definition: nybbler.cc:12
std::shared_ptr< geo::seg::SegmentationAlg > fMinervaSegmentationAlg
Tracker Sc Segmentation Alg.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void gar::geo::StandardGeometryHelperGAr::doConfigureMuIDSegmentationAlg ( fhicl::ParameterSet const &  segParameters,
geo::GeometryCore geom 
)
overrideprivatevirtual

Implementation of ConfigureECALSegmentationAlg (pure virtual)

Implements gar::geo::ExptGeoHelperInterface.

Definition at line 103 of file StandardGeometryHelperGAr_service.cc.

105  {
106  fMuIDSegmentationAlg.reset();
107 
108  auto SegmentationAlgName = segParameters.get<std::string>("SegmentationAlgName");
109 
110  if(SegmentationAlgName.compare("SegmentationStripXAlg") == 0)
111  fMuIDSegmentationAlg = std::make_shared<gar::geo::seg::SegmentationStripXAlg>(segParameters);
112  else if(SegmentationAlgName.compare("SegmentationStripYAlg") == 0)
113  fMuIDSegmentationAlg = std::make_shared<gar::geo::seg::SegmentationStripYAlg>(segParameters);
114  else if(SegmentationAlgName.compare("SegmentationMuIDAlg") == 0)
115  fMuIDSegmentationAlg = std::make_shared<gar::geo::seg::SegmentationMuIDAlg>(segParameters);
116  else{
117  throw cet::exception("StandardGeometryHelperGAr::doConfigureMuIDSegmentationAlg")
118  << "Unable to determine which MuID Segmentation algorithm to use, bail";
119  }
120 
121  if(fMuIDSegmentationAlg) geom->ApplyMuIDSegmentationAlg(fMuIDSegmentationAlg);
122 
123  return;
124 
125  } // StandardGeometryHelperGAr::doConfigureMuIDSegmentationAlg()
std::string string
Definition: nybbler.cc:12
std::shared_ptr< geo::seg::SegmentationAlg > fMuIDSegmentationAlg
MuID Segmentation Alg.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
StandardGeometryHelperGAr::ChannelMapAlgPtr_t gar::geo::StandardGeometryHelperGAr::doGetChannelMapAlg ( ) const
overrideprivatevirtual

Returns the ChannelMapAlg.

Implements gar::geo::ExptGeoHelperInterface.

Definition at line 54 of file StandardGeometryHelperGAr_service.cc.

55  {
56  return fChannelMap;
57  }
std::shared_ptr< geo::seg::ChannelMapAlg > fChannelMap
channel map algorithm
StandardGeometryHelperGAr::SegmentationAlgPtr_t gar::geo::StandardGeometryHelperGAr::doGetECALSegmentationAlg ( ) const
overrideprivatevirtual

Returns the ECAL SegmentationAlg.

Implements gar::geo::ExptGeoHelperInterface.

Definition at line 128 of file StandardGeometryHelperGAr_service.cc.

129  {
130  return fECALSegmentationAlg;
131  }
std::shared_ptr< geo::seg::SegmentationAlg > fECALSegmentationAlg
ECAL Segmentation Alg.
StandardGeometryHelperGAr::SegmentationAlgPtr_t gar::geo::StandardGeometryHelperGAr::doGetMinervaSegmentationAlg ( ) const
overrideprivatevirtual

Returns the Tracker Sc SegmentationAlg.

Implements gar::geo::ExptGeoHelperInterface.

Definition at line 134 of file StandardGeometryHelperGAr_service.cc.

135  {
137  }
std::shared_ptr< geo::seg::SegmentationAlg > fMinervaSegmentationAlg
Tracker Sc Segmentation Alg.
StandardGeometryHelperGAr::SegmentationAlgPtr_t gar::geo::StandardGeometryHelperGAr::doGetMuIDSegmentationAlg ( ) const
overrideprivatevirtual

Returns the MuID SegmentationAlg.

Implements gar::geo::ExptGeoHelperInterface.

Definition at line 140 of file StandardGeometryHelperGAr_service.cc.

141  {
142  return fMuIDSegmentationAlg;
143  }
std::shared_ptr< geo::seg::SegmentationAlg > fMuIDSegmentationAlg
MuID Segmentation Alg.

Member Data Documentation

std::shared_ptr<geo::seg::ChannelMapAlg> gar::geo::StandardGeometryHelperGAr::fChannelMap
private

channel map algorithm

Definition at line 76 of file StandardGeometryHelperGAr.h.

std::shared_ptr<geo::seg::SegmentationAlg> gar::geo::StandardGeometryHelperGAr::fECALSegmentationAlg
private

ECAL Segmentation Alg.

Definition at line 77 of file StandardGeometryHelperGAr.h.

std::shared_ptr<geo::seg::SegmentationAlg> gar::geo::StandardGeometryHelperGAr::fMinervaSegmentationAlg
private

Tracker Sc Segmentation Alg.

Definition at line 78 of file StandardGeometryHelperGAr.h.

std::shared_ptr<geo::seg::SegmentationAlg> gar::geo::StandardGeometryHelperGAr::fMuIDSegmentationAlg
private

MuID Segmentation Alg.

Definition at line 79 of file StandardGeometryHelperGAr.h.

fhicl::ParameterSet gar::geo::StandardGeometryHelperGAr::fPset
private

copy of configuration parameter set

Definition at line 75 of file StandardGeometryHelperGAr.h.


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