13#include "TrkReco/TMSelector.h"
14#include "TrkReco/TTrackBase.h"
15#include "TrkReco/TTrack.h"
16#include "TrkReco/TCircle.h"
17#include "TrkReco/TMLink.h"
20: _nLinksDefined(
false),
22 _nSuperLayersDefined(
false),
26 _maxImpactDefined(
false),
28 _nLinksStereoDefined(
false),
30 _maxDistanceDefined(
false),
35: _nLinksDefined(a._nLinksDefined),
37 _nSuperLayersDefined(a._nSuperLayersDefined),
38 _nSuperLayers(a._nSuperLayers),
39 _minPtDefined(a._minPtDefined),
41 _maxImpactDefined(a._maxImpactDefined),
42 _maxImpact(a._maxImpact),
43 _nLinksStereoDefined(a._nLinksStereoDefined),
44 _nLinksStereo(a._nLinksStereo),
45 _maxDistanceDefined(a._maxDistanceDefined),
46 _maxDistance(a._maxDistance) {
55#ifdef TRKRECO_DEBUG_DETAIL
57 std::cout <<
" TSelect::select !!! not fitted yet" << std::endl;
61 if (
b.objectType() ==
Track) {
65 if (a.
pt() < _minPt) {
66#ifdef TRKRECO_DEBUG_DETAIL
67 std::cout <<
" TSelect ... rejected by min. pt(";
68 std::cout << a.
pt() <<
") < ";
69 std::cout << _minPt << std::endl;
75 if (_maxImpactDefined) {
76 if (fabs(a.
impact()) > _maxImpact) {
77#ifdef TRKRECO_DEBUG_DETAIL
78 std::cout <<
" TSelect ... rejected by max. impact(";
79 std::cout << a.
impact() <<
") < ";
80 std::cout << _maxImpact << std::endl;
86 else if (
b.objectType() ==
Circle) {
90 if (a.
pt() < _minPt) {
91#ifdef TRKRECO_DEBUG_DETAIL
92 std::cout <<
" TSelect ... rejected by min. pt(";
93 std::cout << a.
pt() <<
") < ";
94 std::cout << _minPt << std::endl;
100 if (_maxImpactDefined) {
101 if (fabs(a.
impact()) > _maxImpact) {
102#ifdef TRKRECO_DEBUG_DETAIL
103 std::cout <<
" TSelect ... rejected by max. impact(";
104 std::cout << a.
impact() <<
") < ";
105 std::cout << _maxImpact << std::endl;
112 std::cout <<
"TMSelector !!! Unknown object type" << std::endl;
116#ifdef TRKRECO_DEBUG_DETAIL
117 std::cout <<
" TSelect::select ... accepted" << std::endl;
124 if (_nLinksDefined) {
125 if (a.
nLinks() < _nLinks) {
126#ifdef TRKRECO_DEBUG_DETAIL
127 std::cout <<
" TSelect ... rejected by nLinks(";
128 std::cout << a.
nLinks() <<
") < ";
129 std::cout << _nLinks << std::endl;
135 if (_nSuperLayersDefined) {
137#ifdef TRKRECO_DEBUG_DETAIL
138 std::cout <<
" TSelect ... rejected by nSuperLayers(";
140 std::cout << _nSuperLayers << std::endl;
146#ifdef TRKRECO_DEBUG_DETAIL
147 std::cout <<
" TSelect::preSelect ... accepted" << std::endl;
unsigned NSuperLayers(const AList< TMLink > &links)
returns # of layers.
A class to represent a circle in tracking.
double impact(void) const
returns impact parameter to the origin.
double pt(void) const
returns Pt.
A class to select a TTrackBase object.
virtual ~TMSelector()
Destructor.
bool preSelect(const TTrackBase &) const
returns true if given track satisfys criteria before fitting.
bool select(TTrackBase &) const
returns true if given track satisfys criteria after fitting.
A virtual class for a track class in tracking.
const AList< TMLink > & links(unsigned mask=0) const
returns a list of masked TMLinks assigned to this track. 'mask' will be applied if mask is not 0.
unsigned nLinks(unsigned mask=0) const
returns # of masked TMLinks assigned to this track object.
A class to represent a track in tracking.
double impact(void) const
returns signed impact parameter to the origin.
double pt(void) const
returns Pt.