ATLAS Offline Software
TrackSelection.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3  */
4 
7 
9 #include "xAODTracking/Vertex.h"
10 
11 #include "TopEvent/EventTools.h"
12 
13 #include "AsgTools/AsgTool.h"
14 #include "AsgTools/ToolHandle.h"
15 
17 using namespace TopObjectSelectionTools;
18 
19 namespace top {
20 
21  TrackSelection::TrackSelection(const double ptcut, const double etamax) :
22  m_ptcut(ptcut),
23  m_etamax(etamax),
24  m_trkseltool("TrkSelTool")
25  {
26 
27  top::check(m_trkseltool.retrieve(), "Failed to retrieve InDetTrackSelectionTool");
28 
29  }
30 
32  }
33 
34 // bool TrackSelection::passSelection(const xAOD::TrackParticle& track, const xAOD::Vertex& primaryVertex) {
35 // if (track.pt() < m_ptcut) return false;
36 //
37 // if (std::fabs(track.eta()) > m_etamax) return false;
38 //
39 //
40 // if (track.isAvailable<char>("passTruthFilter")) {
41 // if (!track.auxdecor<char>("passTruthFilter")) return false;
42 // }
43 //
44 // if ( !m_trkseltool->accept(track, &primaryVertex ) ) return false;
45 //
46 // return true;
47 // }
48 
49  void TrackSelection::print(std::ostream& os) const {
50  os << "Track \n"
51  << " * pT > " << m_ptcut << "\n"
52  << " * |eta| < " << m_etamax;
53  }
54 }
top::TrackSelection::m_etamax
double m_etamax
Definition: TrackSelection.h:24
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
top::TrackSelection::~TrackSelection
virtual ~TrackSelection()
Definition: TrackSelection.cxx:31
Pythia8_A14_NNPDF23LO_forMGHT_EvtGen.ptcut
float ptcut
Definition: Pythia8_A14_NNPDF23LO_forMGHT_EvtGen.py:9
MsgCategory.h
EventTools.h
A few functions for doing operations on particles / events. Currently holds code for dR,...
top::TrackSelection::m_ptcut
double m_ptcut
Definition: TrackSelection.h:23
InDetTrackSelectionTool.h
top::check
void check(bool thingToCheck, const std::string &usefulFailureMessage)
Print an error message and terminate if thingToCheck is false.
Definition: EventTools.cxx:15
TrackSelection.h
top::TrackSelection::print
virtual void print(std::ostream &os) const override
For the main analysis object selection.
Definition: TrackSelection.cxx:49
Vertex.h
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
TrackParticle.h
top::TrackSelection::m_trkseltool
ToolHandle< InDet::IInDetTrackSelectionTool > m_trkseltool
Definition: TrackSelection.h:26
ToolHandle.h
AsgTool.h