#include <AuxDetChannelMapAlg.h>
|
virtual | ~AuxDetChannelMapAlg ()=default |
|
virtual void | Initialize (AuxDetGeometryData_t &geodata)=0 |
|
virtual void | Uninitialize ()=0 |
|
virtual size_t | NearestAuxDet (const double *point, std::vector< geo::AuxDetGeo > const &auxDets, double tolerance=0) const |
|
virtual size_t | NearestSensitiveAuxDet (const double *point, std::vector< geo::AuxDetGeo > const &auxDets, size_t &ad, double tolerance=0) const |
|
virtual size_t | ChannelToAuxDet (std::vector< geo::AuxDetGeo > const &auxDets, std::string const &detName, uint32_t const &channel) const |
|
virtual std::pair< size_t, size_t > | ChannelToSensitiveAuxDet (std::vector< geo::AuxDetGeo > const &auxDets, std::string const &detName, uint32_t const &channel) const |
|
virtual uint32_t | PositionToAuxDetChannel (double const worldLoc[3], std::vector< geo::AuxDetGeo > const &auxDets, size_t &ad, size_t &sv) const =0 |
|
virtual const TVector3 | AuxDetChannelToPosition (uint32_t const &channel, std::string const &auxDetName, std::vector< geo::AuxDetGeo > const &auxDets) const =0 |
|
|
typedef std::pair< uint32_t, size_t > | chanAndSV |
|
Definition at line 28 of file AuxDetChannelMapAlg.h.
virtual geo::AuxDetChannelMapAlg::~AuxDetChannelMapAlg |
( |
| ) |
|
|
virtualdefault |
virtual const TVector3 geo::AuxDetChannelMapAlg::AuxDetChannelToPosition |
( |
uint32_t const & |
channel, |
|
|
std::string const & |
auxDetName, |
|
|
std::vector< geo::AuxDetGeo > const & |
auxDets |
|
) |
| const |
|
pure virtual |
Definition at line 94 of file AuxDetChannelMapAlg.cxx.
103 if( itr.second.compare(detName) == 0 )
return itr.first;
106 throw cet::exception(
"Geometry") <<
"No AuxDetGeo matching name: " << detName;
std::map< size_t, std::string > fADGeoToName
map the AuxDetGeo index to the name
cet::coded_exception< error, detail::translate > exception
std::pair< size_t, size_t > geo::AuxDetChannelMapAlg::ChannelToSensitiveAuxDet |
( |
std::vector< geo::AuxDetGeo > const & |
auxDets, |
|
|
std::string const & |
detName, |
|
|
uint32_t const & |
channel |
|
) |
| const |
|
virtual |
Definition at line 114 of file AuxDetChannelMapAlg.cxx.
126 if( channel < itr->
second.size() )
127 return std::make_pair(adGeoIdx, itr->second[
channel].second);
130 <<
", cannot be found in vector associated to AuxDetGeo index: " 131 << adGeoIdx <<
". Vector has size " << itr->second.size();
134 throw cet::exception(
"Geometry") <<
"Given AuxDetGeo with index " << adGeoIdx
135 <<
" does not correspond to any vector of sensitive volumes";
137 return std::make_pair(adGeoIdx, UINT_MAX);
virtual size_t ChannelToAuxDet(std::vector< geo::AuxDetGeo > const &auxDets, std::string const &detName, uint32_t const &channel) const
std::map< size_t, std::vector< chanAndSV > > fADGeoToChannelAndSV
second_as<> second
Type of time stored in seconds, in double precision.
cet::coded_exception< error, detail::translate > exception
size_t geo::AuxDetChannelMapAlg::NearestAuxDet |
( |
const double * |
point, |
|
|
std::vector< geo::AuxDetGeo > const & |
auxDets, |
|
|
double |
tolerance = 0 |
|
) |
| const |
|
virtual |
Definition at line 20 of file AuxDetChannelMapAlg.cxx.
23 double HalfCenterWidth = 0.;
24 double localPoint[3] = {0.};
26 for(
size_t a = 0;
a < auxDets.size(); ++
a) {
28 auxDets[
a].WorldToLocal(point, localPoint);
30 HalfCenterWidth = 0.5 * (auxDets[
a].HalfWidth1() + auxDets[
a].HalfWidth2());
33 localPoint[2] <= ( auxDets[
a].Length()/2 +
tolerance) &&
34 localPoint[1] >= (- auxDets[
a].HalfHeight() -
tolerance) &&
35 localPoint[1] <= (auxDets[
a].HalfHeight() +
tolerance) &&
37 localPoint[0] >= (- HalfCenterWidth + localPoint[2]*(HalfCenterWidth - auxDets[
a].HalfWidth2())/(0.5 * auxDets[
a].Length()) -
tolerance) &&
38 localPoint[0] <= ( HalfCenterWidth - localPoint[2]*(HalfCenterWidth - auxDets[
a].HalfWidth2())/(0.5 * auxDets[
a].
Length()) +
tolerance)
44 throw cet::exception(
"AuxDetChannelMapAlg") <<
"Can't find AuxDet for position (" float Length(const PFPStruct &pfp)
cet::coded_exception< error, detail::translate > exception
size_t geo::AuxDetChannelMapAlg::NearestSensitiveAuxDet |
( |
const double * |
point, |
|
|
std::vector< geo::AuxDetGeo > const & |
auxDets, |
|
|
size_t & |
ad, |
|
|
double |
tolerance = 0 |
|
) |
| const |
|
virtual |
Definition at line 54 of file AuxDetChannelMapAlg.cxx.
59 double HalfCenterWidth = 0.;
60 double localPoint[3] = {0.};
79 localPoint[0] >= - HalfCenterWidth + localPoint[2]*(HalfCenterWidth - adsg.
HalfWidth2())/(0.5 * adsg.
Length()) -
tolerance &&
85 throw cet::exception(
"Geometry") <<
"Can't find AuxDetSensitive for position (" double HalfWidth2() const
AuxDetSensitiveGeo const & SensitiveVolume(size_t sv) const
double HalfWidth1() const
virtual size_t NearestAuxDet(const double *point, std::vector< geo::AuxDetGeo > const &auxDets, double tolerance=0) const
double HalfHeight() const
size_t NSensitiveVolume() const
void WorldToLocal(const double *world, double *auxdet) const
Transform point from world frame to local auxiliary detector frame.
cet::coded_exception< error, detail::translate > exception
virtual uint32_t geo::AuxDetChannelMapAlg::PositionToAuxDetChannel |
( |
double const |
worldLoc[3], |
|
|
std::vector< geo::AuxDetGeo > const & |
auxDets, |
|
|
size_t & |
ad, |
|
|
size_t & |
sv |
|
) |
| const |
|
pure virtual |
virtual void geo::AuxDetChannelMapAlg::Uninitialize |
( |
| ) |
|
|
pure virtual |
std::map<size_t, std::string> geo::AuxDetChannelMapAlg::fADGeoToName |
|
protected |
std::map<std::string, size_t> geo::AuxDetChannelMapAlg::fNameToADGeo |
|
protected |
The documentation for this class was generated from the following files: