Class Reference for E1039 Core & Analysis Software
|
A set of utility functions about SQHit. More...
Functions | |
SQHitVector * | FindHits (const SQHitVector *vec_in, const std::string det_name, const bool in_time=false) |
Extract a set of hits that are of the given detector (det_name). More... | |
SQHitVector * | FindHits (const SQHitVector *vec_in, const int det_id, const bool in_time=false) |
SQHitVector * | FindFirstHits (const SQHitVector *vec_in, const std::string det_name, const bool in_time=false) |
Extract a set of first hits that are of the given detector (det_name), where "first" means the earliest (i.e. largest TDC time) hit per element. More... | |
SQHitVector * | FindFirstHits (const SQHitVector *vec_in, const int det_id, const bool in_time=false) |
std::vector< SQHit * > * | FindHitsFast (const SQEvent *evt, const SQHitVector *hit_vec, const std::string det_name) |
Fast-extract a set of hits that are of the given detector (det_name). More... | |
std::vector< SQHit * > * | FindHitsFast (const SQEvent *evt, const SQHitVector *hit_vec, const int det_id) |
Fast-extract a set of hits that are of the given detector (det_id). More... | |
std::vector< SQHit * > * | FindTriggerHitsFast (const SQEvent *evt, const SQHitVector *hit_vec, const std::string det_name) |
Fast-extract a set of trigger hits that are of the given detector (det_name). More... | |
std::vector< SQHit * > * | FindTriggerHitsFast (const SQEvent *evt, const SQHitVector *hit_vec, const int det_id) |
Fast-extract a set of trigger hits that are of the given detector (det_id). More... | |
A set of utility functions about SQHit.
SQHitVector * UtilSQHit::FindFirstHits | ( | const SQHitVector * | vec_in, |
const int | det_id, | ||
const bool | in_time = false |
||
) |
See FindHits() to find how to handle the returned object.
Definition at line 49 of file UtilSQHit.cc.
References SQHitVector::at(), SQHitVector::clear(), SQHitVector::Clone(), SQHit::get_detector_id(), SQHit::get_element_id(), SQHit::get_tdc_time(), SQHit::is_in_time(), SQHitVector::push_back(), and SQHitVector::size().
SQHitVector * UtilSQHit::FindFirstHits | ( | const SQHitVector * | vec_in, |
const std::string | det_name, | ||
const bool | in_time = false |
||
) |
Extract a set of first hits that are of the given detector (det_name), where "first" means the earliest (i.e. largest TDC time) hit per element.
See FindHits() to find how to handle the returned object.
Definition at line 40 of file UtilSQHit.cc.
References GeomSvc::getDetectorID(), and GeomSvc::instance().
Referenced by SubsysRecoBG::ExtractHits(), AnaEffCham::process_event(), and AnaEffHodo::process_event().
SQHitVector * UtilSQHit::FindHits | ( | const SQHitVector * | vec_in, |
const int | det_id, | ||
const bool | in_time = false |
||
) |
See the other FindHits() function to find how to handle the returned object.
Definition at line 25 of file UtilSQHit.cc.
References SQHitVector::begin(), SQHitVector::clear(), SQHitVector::Clone(), SQHitVector::end(), SQHit::get_detector_id(), SQHit::is_in_time(), and SQHitVector::push_back().
SQHitVector * UtilSQHit::FindHits | ( | const SQHitVector * | vec_in, |
const std::string | det_name, | ||
const bool | in_time = false |
||
) |
Extract a set of hits that are of the given detector (det_name).
The SQHitVector object returned has to be deleted outside this function. The recommended way is to use "shared_ptr", which auto-deletes the object.
Definition at line 16 of file UtilSQHit.cc.
References GeomSvc::getDetectorID(), and GeomSvc::instance().
Referenced by AnaEffCham::process_event(), AnaHodoHit::process_event(), AnaTriggerHit::process_event(), AnaTrigSignal::process_event(), AnaSimHit::process_event(), AnaChamPlane::process_event(), and ExtractTdcDist::process_event().
std::vector< SQHit * > * UtilSQHit::FindHitsFast | ( | const SQEvent * | evt, |
const SQHitVector * | hit_vec, | ||
const int | det_id | ||
) |
Fast-extract a set of hits that are of the given detector (det_id).
Useful for speed when many SubsysReco modules are registered and accessing the hit vector repeatedly. The returned variable is vector<SQHit*>
(not SQHitVector
), which can be used as follows for example:
Caller must not delete the vector nor the SQHit objects.
This function has an internal static variable that holds one hit vector per detector. The variable is filled only on the 1st call per event, and used by all SubsysReco modules. The reason of using vector<SQHit*>
is to avoid multiple creations+deletions of SQHitVector
.
Definition at line 99 of file UtilSQHit.cc.
References SQHitVector::begin(), SQHitVector::end(), SQHit::get_detector_id(), SQEvent::get_event_id(), and SQEvent::get_run_id().
std::vector< SQHit * > * UtilSQHit::FindHitsFast | ( | const SQEvent * | evt, |
const SQHitVector * | hit_vec, | ||
const std::string | det_name | ||
) |
Fast-extract a set of hits that are of the given detector (det_name).
See FindHitsFast(evt, hit_vec, det_id)
for details.
Definition at line 76 of file UtilSQHit.cc.
References GeomSvc::getDetectorID(), and GeomSvc::instance().
std::vector< SQHit * > * UtilSQHit::FindTriggerHitsFast | ( | const SQEvent * | evt, |
const SQHitVector * | hit_vec, | ||
const int | det_id | ||
) |
Fast-extract a set of trigger hits that are of the given detector (det_id).
See FindHitsFast()
for usage.
Definition at line 133 of file UtilSQHit.cc.
References SQHitVector::begin(), SQHitVector::end(), SQHit::get_detector_id(), SQEvent::get_event_id(), and SQEvent::get_run_id().
std::vector< SQHit * > * UtilSQHit::FindTriggerHitsFast | ( | const SQEvent * | evt, |
const SQHitVector * | hit_vec, | ||
const std::string | det_name | ||
) |
Fast-extract a set of trigger hits that are of the given detector (det_name).
See FindTriggerHitsFast(evt, hit_vec, det_id)
for details.
Definition at line 123 of file UtilSQHit.cc.
References GeomSvc::getDetectorID(), and GeomSvc::instance().