MarlinTPC  1.2.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
marlintpc::TPCHitMap Class Reference

Public Member Functions

 TPCHitMap (gear::TPCParameters const *tpcParameters, kaldet::GearTPCKalDetector const *det, std::string modulesNotUsed=std::string("-1"))
 
void fillEventHits (EVENT::LCCollection const *inputHits)
 Fill hits to this data container and arrange them by module and row. More...
 
void removeHits (std::vector< ModuleRowHit > &hitlist)
 Remove hits from the container and empties the input hit list as the ModuleRowHits in it are invalidated.
 
void removeHit (ModuleRowHit hit)
 Remove a hit from the container.
 
void clear ()
 Clear all hits.
 
size_t size () const
 Get hit size of container.
 
ModuleRowHit getFirstHit (int mode=0)
 Get the first hit from the container.
 
bool isEmpty () const
 Check if the container is empty.
 
std::list< ModuleRowHitgetHitsInDomain (std::set< ModuleRow > const &moduleRowsInDomain)
 Get Hits from a TPC domain.
 
ModuleRowHit getHitInDomain (std::set< ModuleRow > const &moduleRowsInDomain, ModuleRowHit hit)
 
std::list< ModuleRow > getActiveModuleRows ()
 Get a list of all the module/rows pairs which have at least one hit.
 
std::set< MarlinTPCHit > const & getHitsInModuleRow (int module, int row)
 Get all hits in one moduleRow. More...
 
void setHitUsed (const ModuleRowHit &hit, bool used=true)
 Set the used flag in the hits container.
 
int getLayerIndex (int module, int row)
 

Static Public Member Functions

static double getHitsDistance (ModuleRowHit &hit1, ModuleRowHit &hit2)
 

Protected Attributes

HitContainer _hitContainer
 The hits container.
 
std::map< int, std::set
< ModuleRow > > 
_indexModuleRow
 
gear::TPCParameters const * _tpcParameters
 
size_t _nHits
 The total number of hits currently stored in the container.
 
kaldet::GearTPCKalDetector const * _kalDetector
 
std::set< int > _modulesNotUsedSet
 

Member Function Documentation

void marlintpc::TPCHitMap::fillEventHits ( EVENT::LCCollection const *  inputHits)

Fill hits to this data container and arrange them by module and row.

In case a hit is not inside a module or on a pad it is ignored, but a warning is printed. For reconstructed data this should never happen, but when directly simulating 3D hit they might be in an insensitive area. We just filter them here. If we would throw and excetion (the better way for reconstructed data, because this should not happen) we would force simulations to filter the hits in insensitive areas before filling the hit map, which would break current code.

std::set< MarlinTPCHit > const& marlintpc::TPCHitMap::getHitsInModuleRow ( int  module,
int  row 
)

Get all hits in one moduleRow.

Throws an exception if there are no hits on the modleRow.


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