LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Factory object to create RecoHits from digitized and clustered data. More...
#include "GFRecoHitFactory.h"
Public Member Functions | |
GFRecoHitFactory () | |
virtual | ~GFRecoHitFactory () |
void | addProducer (int detID, GFAbsRecoHitProducer *hitProd) |
Register a producer module to the factory. More... | |
void | clear () |
Clear all hit producers. More... | |
GFAbsRecoHit * | createOne (int detID, int index) |
Create a RecoHit. More... | |
std::vector< GFAbsRecoHit * > | createMany (const GFTrackCand &cand) |
Creat a collection of RecoHits. More... | |
Private Attributes | |
std::map< int, GFAbsRecoHitProducer * > | fHitProdMap |
Factory object to create RecoHits from digitized and clustered data.
The GFRecoHitFactory is used to automatically fill Track objects with hit data. For each detector type that is used, one GFRecoHitProducer has to be registered in the factory. The factory can the use the index information from a GFTrackCand object to load the indexed hits into the Track.
Definition at line 52 of file GFRecoHitFactory.h.
genf::GFRecoHitFactory::GFRecoHitFactory | ( | ) |
Definition at line 24 of file GFRecoHitFactory.cxx.
|
virtual |
Definition at line 26 of file GFRecoHitFactory.cxx.
References clear().
void genf::GFRecoHitFactory::addProducer | ( | int | detID, |
GFAbsRecoHitProducer * | hitProd | ||
) |
Register a producer module to the factory.
For each type of hit a separate producer is needed. The type of hit is identified by the detector ID (detID). This index corresponds to the detector ID that is stored in the GFTrackCand object
Definition at line 31 of file GFRecoHitFactory.cxx.
References fHitProdMap, GFException::setFatal(), and GFException::setNumbers().
void genf::GFRecoHitFactory::clear | ( | ) |
Clear all hit producers.
Definition at line 46 of file GFRecoHitFactory.cxx.
References fHitProdMap.
Referenced by ~GFRecoHitFactory().
std::vector< genf::GFAbsRecoHit * > genf::GFRecoHitFactory::createMany | ( | const GFTrackCand & | cand | ) |
Creat a collection of RecoHits.
This is the standard way to prepare the hit collection for a Track. The resulting collection can contain hits from several detectors. The order of the hits is the same as in the GFTrackCand. It is assumed that this order is already along the track.
RecoHits have to implement a constructor which takes the cluster object from which the RecoHit is build as the only parameter. See GFAbsRecoHitProducer for details
Definition at line 73 of file GFRecoHitFactory.cxx.
References createOne(), genf::GFTrackCand::getHit(), and genf::GFTrackCand::getNHits().
genf::GFAbsRecoHit * genf::GFRecoHitFactory::createOne | ( | int | detID, |
int | index | ||
) |
Create a RecoHit.
RecoHits have to implement a Constructor which takes the cluster object from which the RecoHit is build as the only parameter. See GFAbsRecoHitProducer for details
Definition at line 56 of file GFRecoHitFactory.cxx.
References fHitProdMap, GFException::setFatal(), and GFException::setNumbers().
Referenced by createMany().
|
private |
Definition at line 54 of file GFRecoHitFactory.h.
Referenced by addProducer(), clear(), and createOne().