Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UtilSQHit Namespace Reference

A set of utility functions about SQHit. More...

Functions

SQHitVectorFindHits (const SQHitVector *vec_in, const std::string det_name)
 Extract a set of hits that are of the given detector (det_name). More...
 
SQHitVectorFindHits (const SQHitVector *vec_in, const int det_id)
 
SQHitVectorFindFirstHits (const SQHitVector *vec_in, const std::string det_name)
 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...
 
SQHitVectorFindFirstHits (const SQHitVector *vec_in, const int det_id)
 

Detailed Description

A set of utility functions about SQHit.

Function Documentation

SQHitVector * UtilSQHit::FindFirstHits ( const SQHitVector vec_in,
const std::string  det_name 
)

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 38 of file UtilSQHit.cc.

References GeomSvc::getDetectorID(), and GeomSvc::instance().

Referenced by AnaEffHodo::process_event(), and AnaEffCham::process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

SQHitVector * UtilSQHit::FindFirstHits ( const SQHitVector vec_in,
const int  det_id 
)

See FindHits() to find how to handle the returned object.

Definition at line 47 of file UtilSQHit.cc.

References SQHitVector::at(), SQHitVector::clear(), SQHitVector::Clone(), SQHit::get_detector_id(), SQHit::get_element_id(), SQHit::get_tdc_time(), SQHitVector::push_back(), and SQHitVector::size().

+ Here is the call graph for this function:

SQHitVector * UtilSQHit::FindHits ( const SQHitVector vec_in,
const std::string  det_name 
)

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.

shared_ptr<SQHitVector> hv_h1t(UtilSQHit::FindHits(hit_vec, "H1T"));
cout << "N = " << hv_h1t->size() << endl;

Definition at line 15 of file UtilSQHit.cc.

References GeomSvc::getDetectorID(), and GeomSvc::instance().

Referenced by AnaRealDst::process_event(), AnaEffCham::process_event(), and OnlMonH4::ProcessEventOnlMon().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

SQHitVector * UtilSQHit::FindHits ( const SQHitVector vec_in,
const int  det_id 
)

See the other FindHits() function to find how to handle the returned object.

Definition at line 24 of file UtilSQHit.cc.

References SQHitVector::begin(), SQHitVector::clear(), SQHitVector::Clone(), SQHitVector::end(), SQHit::get_detector_id(), and SQHitVector::push_back().

+ Here is the call graph for this function: