1 #ifndef GEAR_TPCParametersImpl_H
2 #define GEAR_TPCParametersImpl_H 1
4 #include "gear/TPCParameters.h"
6 #include "gearimpl/GearParametersImpl.h"
7 #include "gearimpl/GlobalPadIndex.h"
87 virtual bool isInsidePad(
double c0,
double c1)
const;
93 virtual bool isInsidePad(
double c0,
double c1,
double z)
const;
123 virtual const std::vector<TPCModule *> &
getModules()
const;
175 std::vector<TPCModule *> _TPCModules{}, _modulesPositiveHalfTPC{}, _modulesNegativeHalfTPC{};
179 std::vector<TPCModule *>
const & modulesVector)
const;
182 bool isInsideModule(
double c0,
double c1, std::vector<TPCModule *>
const & modulesVector)
const;
185 bool isInsidePad(
double c0,
double c1, std::vector<TPCModule *>
const & modulesVector )
const;
189 std::vector<TPCModule *>
const & modulesVector )
const;
192 double _maxDriftLength {};
194 int _coordinateType{};
208 std::vector<double> _planeExtent {};
228 void setCathodePosition();
virtual ~TPCParametersImpl()
Copy constructor for base parameters.
double _driftVelocity
Drift velocity is deprecated, should come from conditions data.
Implementation of GearParameters - a set off parameters that can be used to describe the geometrical ...
virtual void setDriftVelocity(double driftVelocity)
Abstract description of a planar subdetector with pads (cells) that are positioned in rows (circular ...
Proposal for an abstract interface that defines the geometry properties of a TPC like detector needed...
virtual double getReadoutFrequency() const
Kept for backward compatibility.
virtual bool isInsideModule(double c0, double c1) const
True if coordinate (c0,c1) is within any module.
virtual const PadRowLayout2D & getPadLayout() const
Kept for backward compatibility.
virtual void setPadLayout(PadRowLayout2D *padLayout)
Global pad index implimentation .
virtual const std::vector< double > & getPlaneExtent() const
Extent of the sensitive plane - [xmin,xmax,ymin,ymax] CARTESIAN or [rmin,rmax,phimin,phimax] POLAR.
virtual int getNModules() const
Returns the number of modules in the TPC (endplate)
virtual double getMaxDriftLength() const
The maximum drift length in the TPC in mm.
virtual int getCoordinateType() const
Returns coordinate type as an int (see PadRowLayout2D::CARTESIAN, PadRowLayout2D::POLAR) ...
virtual const TPCModule & getModule(int moduleID) const
Returns module with the given module ID.
virtual void setMaxDriftLength(double maxDriftLength)
std::map< int, int > _moduleIDMap
A map with the moduleID as key and the index in the _TPCModules vector as value.
virtual void setReadoutFrequency(double readoutFrequency)
virtual const std::vector< TPCModule * > & getModules() const
Returns vector of all modules in this TPC (endplate).
A Container for TPCModules which describe the geometry properties of a given TPC. ...
void cleanup()
function to delete all the objects pointed to and owned by the GearMgr.
TPCParametersImpl(double maxDriftLength=-1., int coordinateType=-1)
virtual GlobalPadIndex getNearestPad(double c0, double c1) const
Returns globalPadindex Object for nearest pad to given coordinates (2D).
virtual double getDriftVelocity() const
The electron drift velocity in the TPC in mm/s.
virtual void addModule(TPCModule *TPCModule)
Adds a Module to the vector of modules, or throws an exception.
TPCParametersImpl & operator=(const TPCParametersImpl &)
Assignment operator.
virtual const TPCModule & getNearestModule(double c0, double c1) const
Returns nearest module to given coordinates (2D).
double _cathodePosition
The cathode position is needed internally to distinguish the half TPCs.
void copy_and_assign(const TPCParametersImpl &)
function to copy all internal variables, incl.
A wrapper Class for PadRowLayout2D which converts between the actual pad layouts local coodinate syst...
virtual bool isInsidePad(double c0, double c1) const
True if coordinate (c0,c1) is within any pad, on any module.