10 #include "UTIL/LCFixedObject.h"
12 #define TPCVoxelNINTVals 4
13 #define TPCVoxelNFLOATVals 0
14 #define TPCVoxelNDOUBLEVals 0
23 class TPCVoxel :
public UTIL::LCFixedObject<TPCVoxelNINTVals,
24 TPCVoxelNFLOATVals,TPCVoxelNDOUBLEVals> {
28 TPCVoxel(
int padIndex,
int timeIndex,
int charge,
int moduleID=0);
30 TPCVoxel(EVENT::LCObject* obj) : UTIL::LCFixedObject<TPCVoxelNINTVals,
32 TPCVoxelNDOUBLEVals>(obj) { }
35 : UTIL::LCFixedObject<TPCVoxelNINTVals,
37 TPCVoxelNDOUBLEVals>(original)
39 if( _createdObject ) _obj =
new LCGenericObjectImpl(*(original._obj));
76 void print ( std::ostream& os = std::cout )
const;
81 return std::string(
"TPCVoxel");
87 return std::string(
"i:PadIndex,i:TimeIndex,i:Charge,i:ModuleID");
104 std::ostream &
operator<<(std::ostream &os,
const TPCVoxel &tv);
107 #endif // TPC_VOXEL2_H
bool operator==(const TPCVoxel &right) const
Two voxels are equal if their pad index and time index are equal.
Definition: TPCVoxel.cc:36
void print(std::ostream &os=std::cout) const
Print the voxel information.
Definition: TPCVoxel.cc:72
int getCharge() const
Returns the charge in the voxel (in electrons/ions)
Definition: TPCVoxel.cc:26
virtual const std::string getTypeName() const
Implementation of the getTypeName method of LCGenericObject.
Definition: TPCVoxel.h:80
int getPadIndex() const
Returns the GEAR pad index.
Definition: TPCVoxel.cc:16
bool operator<(const TPCVoxel &right) const
< operator for e.g. sorting in STL containers.
Definition: TPCVoxel.cc:44
int getTimeIndex() const
Returns the time index of the voxel.
Definition: TPCVoxel.cc:21
static std::string getRevision()
returns the svn revision of the code
Definition: TPCVoxel.cc:101
virtual const std::string getDataDescription() const
Implementation of the getDataDescripton method of LCGenericObject PadIndex, TimeIndex and Charge are ...
Definition: TPCVoxel.h:86
std::ostream & operator<<(std::ostream &os, const EFieldVector &efv)
Operator to stream the vector information to an outstream:
Definition: EFieldVector.cc:101
int getModuleID() const
Returns the GEAR ModuleID.
Definition: TPCVoxel.cc:31
void setCharge(int charge)
Set the charge if the voxel (in electrons/ions)
Definition: TPCVoxel.cc:93
An LCFixedObject class to store charge in voxels of a TPC.
Definition: TPCVoxel.h:23
void setModuleID(int moduleID)
Set the module, only called from the constructor.
Definition: TPCVoxel.cc:97
void setPadIndex(int padIndex)
Set the pad index, only called from the constructor.
Definition: TPCVoxel.cc:85
void setTimeIndex(int timeIndex)
Set the time index, only called from the constructor.
Definition: TPCVoxel.cc:89