5#ifndef AFP_GLOBRECO_AFP_PROTONRECOBASE_H
6#define AFP_GLOBRECO_AFP_PROTONRECOBASE_H
12#include "GaudiKernel/ServiceHandle.h"
13#include "Gaudi/Property.h"
44 StatusCode
doProtonReco(std::unique_ptr<xAOD::AFPProtonContainer>& outputContainer,
const EventContext& ctx)
const override;
55 Measurement(
double xNear,
double yNear,
double xFar,
double yFar)
56 :
xN {xNear * 1e-3},
yN {yNear * 1e-3},
xF {xFar * 1e-3},
yF {yFar * 1e-3} {}
70 Gaudi::Property<std::vector<double> >
m_detectorPositions{
this,
"detectorPositions", {},
"absolute values of detector positions for each station on one side"};
72 Gaudi::Property<int>
m_side{
this,
"side", 0,
"side id, A=0, C=1"};
74 Gaudi::Property<double>
m_trackDistance{
this,
"trackDistance", 2.0,
"Maximum distance between tracks in the near and the far station on xy-plane"};
76 Gaudi::Property<bool>
m_allowSingleStationReco{
this,
"allowSingleStationReco",
false,
"Switch for allowing proton reconstruction using only far station"};
80 Gaudi::Property<std::string>
m_protonsContainerName{
this,
"protonsContainerName",
"AFPProtonContainer",
"Name of the container in which protons are saved"};
110 ATH_MSG_ERROR(
"this is reco(trkNear, trkFar, outputContainer) in AFP_ProtonRecoBase, shall not be used, returning 0");
115 ATH_MSG_ERROR(
"this is reco(trkFar, outputContainer) in AFP_ProtonRecoBase, shall not be used, returning 0");
122 ATH_MSG_ERROR(
"this is chi2(energy, sx, sy, sz, my_measAFP) in AFP_ProtonRecoBase, shall not be used, returning 0");
Definitions of identification numbers of AFP proton reconstruction algorithms.
Property holding a SG store/key/clid from which a ReadHandle is made.
double m_detectorPositionFar
Default position of AFP far station.
const std::string & outputContainerName() const override
std::array< double, 3 > Momentum
3-momentum of reconstructed proton
Gaudi::Property< std::string > m_protonsContainerName
StatusCode doProtonReco(std::unique_ptr< xAOD::AFPProtonContainer > &outputContainer, const EventContext &ctx) const override
double m_detectorPositionNear
Default position of AFP near station.
void linkTracksToProton(const xAOD::AFPTrack *track, SG::ReadHandle< xAOD::AFPTrackContainer > &trackContainer, xAOD::AFPProton *proton) const
Links track pair to reconstructed proton.
Gaudi::Property< double > m_trackDistance
Gaudi::Property< bool > m_allowSingleStationReco
const std::vector< double > m_vertexIP
Vertex position.
virtual xAOD::AFPProton * reco(const xAOD::AFPTrack *, const xAOD::AFPTrack *, std::unique_ptr< xAOD::AFPProtonContainer > &) const
Gaudi::Property< int > m_side
AFP_ProtonRecoBase(const std::string &type, const std::string &name, const IInterface *parent)
Default constructor.
static constexpr double m_ySigma
y-Sigma value
virtual double chi2(double, double, double, const Measurement &) const
SG::ReadHandleKey< xAOD::AFPTrackContainer > m_trackContainerKey
Gaudi::Property< std::vector< double > > m_detectorPositions
virtual xAOD::AFPProton * reco(const xAOD::AFPTrack *, std::unique_ptr< xAOD::AFPProtonContainer > &) const
static constexpr double m_xSigma
x-Sigma value
xAOD::AFPProton * createProton(const Momentum &momentum, const Measurement &my_measAFP, const int algID, std::unique_ptr< xAOD::AFPProtonContainer > &outputContainer) const
Creates and sets up a proton.
Property holding a SG store/key/clid from which a ReadHandle is made.
Local class for storing tracks positions.
Measurement(double xNear, double yNear, double xFar, double yFar)
Takes xy positions of two tracks in [mm] and stores them in [m].
Measurement()
Default constructor - sets everything to zero.