26 StatusCode AsgLeptonTrackSelectionAlg ::
33 return StatusCode::FAILURE;
38 return StatusCode::FAILURE;
41 m_accept.addCut (
"trackRetrieval",
"whether the track retrieval failed");
43 m_accept.addCut (
"maxD0Significance",
"maximum D0 significance cut");
45 m_accept.addCut (
"maxDeltaZ0SinTheta",
"maximum Delta z0 sin theta cut");
47 m_accept.addCut (
"numPixelHits",
"Minimum and/or maxiumum Pixel hits");
49 m_accept.addCut (
"numSCTHits",
"Minimum and/or maxiumum SCT hits");
66 return StatusCode::SUCCESS;
71 StatusCode AsgLeptonTrackSelectionAlg ::
72 execute (
const EventContext &ctx)
const
90 if (primaryVertex ==
nullptr)
92 primaryVertex = vertex;
106 float deltaZ0SinTheta = -999;
110 std::size_t cutIndex {0};
119 return StatusCode::FAILURE;
124 if (
track !=
nullptr) {
129 }
catch (
const std::runtime_error &) {
133 const double vertex_z = primaryVertex ? primaryVertex->
z() : 0;
134 deltaZ0SinTheta = (
track->z0() +
track->vz() - vertex_z) * sin (particle->p4().Theta());
168 return StatusCode::SUCCESS;
SysListHandle m_systematicsList
the systematics list we run
ServiceHandle< ISelectionNameSvc > m_nameSvc
the ISelectionNameSvc
Gaudi::Property< int > m_nMinPixelHits
Gaudi::Property< float > m_maxDeltaZ0SinTheta
SysWriteSelectionHandle m_selectionHandle
the accessor for m_selectionDecoration
Gaudi::Property< int > m_nMaxPixelHits
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
the EventInfo key
SG::ReadHandleKey< xAOD::VertexContainer > m_primaryVerticesKey
the PrimaryVertex key
Gaudi::Property< int > m_nMaxSCTHits
Gaudi::Property< int > m_nMinSCTHits
SysReadHandle< xAOD::IParticleContainer > m_particlesHandle
the particle container we run on
Gaudi::Property< float > m_maxD0Significance
algorithm properties
SysReadSelectionHandle m_preselection
the preselection we apply to our input
asg::AcceptInfo m_accept
the asg::AcceptInfo we are using
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
Class providing the definition of the 4-vector interface.
float z() const
Returns the z position.
Select isolated Photons, Electrons and Muons.
SelectionType selectionFromAccept(const asg::AcceptData &accept)
the selection decoration made from the given AcceptData object
double d0significance(const xAOD::TrackParticle *tp, double d0_uncert_beam_spot_2)
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
Muon_v1 Muon
Reference the current persistent version:
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Electron_v1 Electron
Definition of the current "egamma version".
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.