ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigMonitoring
TrigIDR4Monitoring
src
ITrackSelector.h
Go to the documentation of this file.
1
10
11
#ifndef IDTPM2_ITRACKSELECTOR_H
12
#define IDTPM2_ITRACKSELECTOR_H
13
14
16
#include "
AsgTools/IAsgTool.h
"
17
18
#include "
TrackView.h
"
19
#include "
TagNProbe.h
"
20
21
22
namespace
IDTPM2
{
23
24
class
ITrackSelector
:
virtual
public
asg::IAsgTool
{
25
26
public
:
27
28
ASG_TOOL_INTERFACE
(
IDTPM2::ITrackSelector
)
29
30
virtual
std
::
vector
<
const
TrackView
*>
selectTracks
(
const
std
::
vector
<
const
TrackView
*>& tv,
TagNProbe
* tnp=0 )
const
{
31
std::vector<const TrackView*> out;
32
if
( !
highestPTonly
() ) {
33
for
(
size_t
i=0 ; i<tv.size() ; i++ ) {
34
if
( tnp && !tnp->select(tv[i]) )
continue
;
35
if
(
selectTrack
(*tv[i]) ) out.push_back(tv[i]);
36
}
37
}
38
else
{
42
const
TrackView
* best = 0;
43
for
(
size_t
i=0 ; i<tv.size() ; i++ ) {
44
if
( tnp && !tnp->select(tv[i]) )
continue
;
45
if
( !
selectTrack
(*tv[i]) )
continue
;
46
if
( !best || std::fabs(tv[i]->pt())>std::fabs(best->pt()) ) best = tv[i];
47
}
48
if
( best ) out.push_back(best);
49
}
50
return
out;
51
}
52
53
virtual
bool
selectTrack
(
const
TrackView
& t )
const
= 0;
54
56
virtual
bool
highestPTonly
()
const
{
return
false
; }
57
58
};
59
60
}
// namespace IDTPM2
61
62
#endif
// > ! IDTPM2_ITRACKSELECTOR_H
ASG_TOOL_INTERFACE
#define ASG_TOOL_INTERFACE(CLASSNAME)
Definition
AsgToolMacros.h:40
IAsgTool.h
TrackView.h
TagNProbe.h
emacs: this is -*- c++ -*-
IDTPM2::ITrackSelector
Definition
ITrackSelector.h:24
IDTPM2::ITrackSelector::selectTracks
virtual std::vector< const TrackView * > selectTracks(const std::vector< const TrackView * > &tv, TagNProbe *tnp=0) const
Definition
ITrackSelector.h:30
IDTPM2::ITrackSelector::selectTrack
virtual bool selectTrack(const TrackView &t) const =0
IDTPM2::ITrackSelector::highestPTonly
virtual bool highestPTonly() const
select the highest PT track only
Definition
ITrackSelector.h:56
IDTPM2::TagNProbe
Definition
TrigMonitoring/TrigIDR4Monitoring/src/TagNProbe.h:38
TrackView
forward declaration required for function prototype
Definition
TrackView.h:43
asg::IAsgTool
Base class for the dual-use tool interface classes.
Definition
IAsgTool.h:41
vector
Definition
MultiHisto.h:13
const
IDTPM2
Search the ancestor history, looking for an ancestor that satifies the predicate ....
Definition
AnalysisR4.h:31
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0