6 #include "HitDistributor.h"
14 #include <EVENT/SimTrackerHit.h>
15 #include <IMPL/LCCollectionVec.h>
18 #include <gear/PadRowLayout2D.h>
19 #include <gearimpl/RectangularPadRowLayout.h>
20 #include <gearimpl/FixedPadSizeDiskLayout.h>
23 #include <marlin/Global.h>
47 VoxelTPC( gear::TPCParameters
const * tpcParameters ,
double lengthOfTimeBin,
double inductionFactor=0 );
58 VoxelIndex(
int _padIndex,
int _zBin,
int _moduleID) : zBin(_zBin), padIndex(_padIndex), moduleID(_moduleID){}
72 if ( zBin == vi.zBin )
74 if ( moduleID == vi.moduleID )
76 return padIndex < vi.padIndex;
80 return moduleID < vi.moduleID;
85 return zBin < vi.zBin;
111 std::list< std::pair< VoxelIndex, int > > *
getVoxelList(
double outputLength = -1 ,
bool erase =
false );
115 std::list< std::pair< VoxelIndex, int > > *
fetchVoxelList(
double outputLength = -1 );
127 void putChargeInVoxels( SimTrackerHit *hit,
double sigmaTrans,
double sigmaLong = 0 );
141 void putChargeInVoxel(
int padIndex,
double zLength,
int charge,
int moduleID=0 );
150 std::vector<TPCVoxel>
getVoxelsOnPad(
int padIndex,
int moduleID=0);
169 void removeVoxel(
int padIndex,
int zBin,
int moduleID=0);
175 void removeVoxels(std::vector<TPCVoxel>
const &voxelVec);
LCCollectionVec * fetchVoxelCollection(double outputLength=-1)
Does the same as getVoxelCollection() but erases the voxels from the map.
Definition: VoxelTPC.cc:27
void removeVoxels(std::vector< TPCVoxel > const &voxelVec)
Removes voxels in vector from the set.
Definition: VoxelTPC.cc:303
int getZBin(double zLength)
Takes a length in z and returns the number of the corresponding zBin.
Definition: VoxelTPC.cc:340
void putChargeInVoxels(SimTrackerHit *hit, double sigmaTrans, double sigmaLong=0)
Distributes the charge onto the pads assuming a 2D Gaussian distribution with the width sigmaTrans...
Definition: VoxelTPC.cc:168
The VoxelTPC is a helper class containing a std::map of all TPCVoxels which contain charge...
Definition: VoxelTPC.h:42
std::list< std::pair< VoxelIndex, int > > * getVoxelList(double outputLength=-1, bool erase=false)
This function works like getVoxelCollection, but the output format is different.
Definition: VoxelTPC.cc:119
double _lengthOfZBin
Instantiation parameters.
Definition: VoxelTPC.h:213
HitDistributor * _distributeHitPtr
Pointer on HitSmearer for the distribution of the hits.
Definition: VoxelTPC.h:209
~VoxelTPC()
Destructor of VoxelTPC.
Definition: VoxelTPC.cc:22
void removeVoxelsWithZBin(int zBin)
Removes all voxels with given time index.
Definition: VoxelTPC.cc:321
std::vector< TPCVoxel > getVoxelsWithZBin(int zBin)
Returns a vector of all non-empty voxels with a specific time index.
Definition: VoxelTPC.cc:266
void removeVoxel(TPCVoxel const &voxel)
Removes a voxel from the set.
Definition: VoxelTPC.cc:291
void putChargeInVoxel(TPCVoxel const &voxel)
Puts the charge into the voxel.
Definition: VoxelTPC.cc:181
size_t getSize()
For debugging: get the size of the map.
Definition: VoxelTPC.cc:347
LCCollectionVec * getVoxelCollection(double outputLength=-1)
Returns an LCCollectionVec of the stored TPCVoxels.
Definition: VoxelTPC.cc:79
Definition: HitDistributor.h:41
An LCFixedObject class to store charge in voxels of a TPC.
Definition: TPCVoxel.h:23
void addCollection(LCCollection *voxelCol)
Adds the given collection of TPCVoxels to the map.
Definition: VoxelTPC.cc:277
void removeVoxelsOnPad(int padIndex, int moduleID=0)
Removes all voxels with given pad index.
Definition: VoxelTPC.cc:309
VoxelTPC(gear::TPCParameters const *tpcParameters, double lengthOfTimeBin, double inductionFactor=0)
Constructor of VoxelTPC.
Definition: VoxelTPC.cc:12
std::list< std::pair< VoxelIndex, int > > * fetchVoxelList(double outputLength=-1)
Convenience function: calls getVoxelMap with erase = true.
Definition: VoxelTPC.cc:160
gear::TPCParameters const * _tpcParameters
Pointer on the gear pad layout.
Definition: VoxelTPC.h:205
std::vector< TPCVoxel > getVoxelsOnPad(int padIndex, int moduleID=0)
Returns a vector with all voxels with a specific pad (and module) index.
Definition: VoxelTPC.cc:227
std::map< VoxelIndex, int > _voxelMap
Map to store the information contained in the voxels.
Definition: VoxelTPC.h:201
This structure is for the sorting of the voxels.
Definition: VoxelTPC.h:56
TPCVoxel getVoxel(int padIndex, int timeIndex, int moduleID=0)
Get the voxel with a given index.
Definition: VoxelTPC.cc:211