25#include "GaudiKernel/GaudiException.h"
60 using elParams = std::pair<egammaParameters::ParamDef, double>;
63 std::vector<elParams>::const_iterator p =
m_parameters.begin();
66 if ( (*p).first == key ) {
82 using elParams = std::pair<egammaParameters::ParamDef, double>;
84 std::vector<elParams>::iterator p =
m_parameters.begin();
87 if ( (*p).first == key )
break;
98 throw GaudiException(
"parameter not saved",
"EMTrackFit::set_parameter(...)", StatusCode::FAILURE);
107 using elParams = std::pair<egammaParameters::ParamDef, int>;
113 if ( (*p).first == key ){
125 using elParams = std::pair<egammaParameters::ParamDef, int>;
130 if ( (*p).first == key )
break;
141 throw GaudiException(
"parameter not saved",
"EMTrackFit::set_parameter(...)", StatusCode::FAILURE);
155 throw GaudiException(
"Parameters not saved, no track",
"EMTrackFit::fillDetails(...)", StatusCode::FAILURE);
163 std::vector<const Trk::EstimatedBremOnTrack*> estimatedBremOnTrack;
164 std::vector<const Trk::TrackStateOnSurface* > trkStateOnSurfaceWithBrem;
168 for (;trackStateOnSurface < track->trackStateOnSurfaces()->end(); ++trackStateOnSurface){
171 estimatedBremOnTrack.push_back ( brem );
172 trkStateOnSurfaceWithBrem.push_back( (*trackStateOnSurface) );
176 if (estimatedBremOnTrack.empty()){
183 std::vector<const Trk::EstimatedBremOnTrack*>::iterator brems = estimatedBremOnTrack.begin();
184 std::vector<const Trk::TrackStateOnSurface*>::iterator tsos = trkStateOnSurfaceWithBrem.begin();
188 double fractionELost(0.);
189 double sigmaRetainedEnFraction(0);
190 for (; brems!=estimatedBremOnTrack.end(); ++brems, ++tsos) {
192 fractionELost += 1-(*brems)->retainedEnFraction();
194 Z *= (*brems)->retainedEnFraction();
196 R += (1-(*brems)->retainedEnFraction()) * (*tsos)->trackParameters()->position().perp();
197 sigmaRetainedEnFraction += (1-(*brems)->retainedEnFraction()) * (*brems)->sigmaRetainedEnFraction();
199 if (Z>0 && fractionELost>0.){
201 sigmaRetainedEnFraction/=fractionELost;
203 hasBrem(estimatedBremOnTrack.size());
214 if (track ==
nullptr ){
241 if (oldTrackStates ==
nullptr)
264 if (trackParameters){
312 hepSymMatrix.setIdentity();
314 hepSymMatrix.fillSymmetric(0,0, track_perigee_Covd0d0());
315 hepSymMatrix.fillSymmetric(0,1, track_perigee_Covd0z0());
316 hepSymMatrix.fillSymmetric(0,2, track_perigee_Covd0phi());
317 hepSymMatrix.fillSymmetric(0,3, track_perigee_Covd0theta());
318 hepSymMatrix.fillSymmetric(0,4, track_perigee_Covd0qOverP());
319 hepSymMatrix.fillSymmetric(1,1, track_perigee_Covz0z0());
320 hepSymMatrix.fillSymmetric(1,2, track_perigee_Covz0phi());
321 hepSymMatrix.fillSymmetric(1,3, track_perigee_Covz0theta());
322 hepSymMatrix.fillSymmetric(1,4, track_perigee_Covz0qOverP());
323 hepSymMatrix.fillSymmetric(2,2, track_perigee_Covphiphi());
324 hepSymMatrix.fillSymmetric(2,3, track_perigee_Covphitheta());
325 hepSymMatrix.fillSymmetric(2,4, track_perigee_CovphiqOverP());
326 hepSymMatrix.fillSymmetric(3,3, track_perigee_Covthetatheta());
327 hepSymMatrix.fillSymmetric(3,4, track_perigee_CovthetaqOverP());
328 hepSymMatrix.fillSymmetric(4,4, track_perigee_CovqOverPqOverP());
340 const Trk::PerigeeSurface surface;
352 return measuredPerigee;
An interface for getting the name of a class as a string.
Provide an interface for finding inheritance information at run time.
#define SG_ADD_BASE(D, B)
Add a new base class B to class D.
#define AmgSymMatrix(dim)
static std::string name()
Return the name of class T as a string.
DataModel_detail::const_iterator< DataVector > const_iterator
const_reverse_iterator rend() const noexcept
Return a const_reverse_iterator pointing at the beginning of the collection.
const_reverse_iterator rbegin() const noexcept
Return a const_reverse_iterator pointing past the end of the collection.
std::reverse_iterator< const_iterator > const_reverse_iterator
Contains the fit result with addtional brem information EMTrackFit is made by EMTrkRefitter.
double track_perigee_phi0() const
azimuth angle of the momentum at the point of closest approach after Track Refit
double track_LastM_theta() const
Last Measurment Surface theta after Track Refit.
const Trk::Perigee * getMeasuredPerigee() const
returns the MeasuredPerigee from the stored egammaParameters
double track_LastM_phi() const
Last Measurment Surface azimuth angle after Track Refit.
double track_perigee_Covphiphi() const
Covariance matrix item (phi,phi)
double bremMaterialTraversed() const
Amount of Material seen by the particle according to the track fitter (in X0)
int linkIndex() const
Index of track this EMTrackFit is associated with.
double track_perigee_Covz0theta() const
Covariance matrix item (z0,theta)
double track_perigee_z0() const
the z value at the point of closest approach after Track Refit
double track_perigee_CovthetaqOverP() const
Covariance matrix item (theta,q/P)
bool fillPerigeeParamters(const Trk::Perigee *trackParameters)
Fill the perigree parameter details.
void set_parameterInt(egammaParameters::ParamDef, int, bool overwrite=false)
std::vector< std::pair< egammaParameters::ParamDef, double > > m_parameters
void fillDetails(Trk::Track *track)
Fill the details of the object from a Trk::Track.
double track_LastM_loc2() const
Last Measurment Surface Local Position 2 after Track Refit.
int bremTrackAuthor() const
Track Author enum as Defined in Track/Track.h.
bool fillPerigeeErrors(const AmgSymMatrix(5) *)
Fill the perigree error details.
double track_perigee_theta() const
theta of the track after EMTrackFit
double track_perigee_Covthetatheta() const
Covariance matrix item (theta,theta)
void set_linkIndex(int)
Index of track this EMTrackFit is associated with.
std::vector< std::pair< egammaParameters::ParamDef, int > > m_parametersInt
double bremDeltaZ() const
Fraction of the measured perigee momentum retained after brem.
double track_perigee_qOverP() const
1/pT estimate according to Track Refit
virtual bool hasParameter(egammaParameters::ParamDef) const
void set_parameter(egammaParameters::ParamDef, double, bool overwrite=false)
general set method for parameters
double bremRadius() const
estimated brem radius from EMTrackFit (mm) [x-y plane] (weighted average if more than one brem)
double track_LastM_loc1() const
Last Measurment Surface Local Position 1 after Track Refit.
virtual double parameter(egammaParameters::ParamDef) const
virtual const std::string & className() const
double track_perigee_d0() const
transverse impact parameter (distance of closest approach) after Track Refit
double track_perigee_Covz0qOverP() const
Covariance matrix item (z0,q/p)
static const std::string s_className
double track_perigee_Covz0phi() const
Covariance matrix item (z0,phi)
double track_perigee_Covd0z0() const
Covariance matrix item ( )
double bremRadiusErr() const
estimated brem radius uncertainty
virtual bool hasIntParameter(egammaParameters::ParamDef) const
checks if the parameter is integer
void fillBrems(Trk::Track *track)
Fill in brem information from a Trk::Track.
double track_perigee_Covd0phi() const
Covariance matrix item ( )
EMTrackFit()
Default constructor.
double track_perigee_Covd0qOverP() const
Covariance matrix item (d0,q/p)
int hasBrem() const
The Number of brems identified by the track fitter.
double track_LastM_qOverP() const
Last Measurment Surface q/pT estimate according to Track Refit.
double track_perigee_CovqOverPqOverP() const
Covariance matrix item (q/P,q/P)
double track_perigee_Covphitheta() const
Covariance matrix item (phi,theta)
virtual int intParameter(egammaParameters::ParamDef) const
double track_perigee_Covz0z0() const
Covariance matrix item (z0,z0)
double bremFitChi2() const
Fit Chi2/nDoF.
double track_perigee_CovphiqOverP() const
Covariance matrix item (phi,q/P)
int bremFitStatus() const
Bremfit Status 1 Reached Iteration Limit, 0 Converged, -1 recheached iteration limit,...
double track_perigee_Covd0d0() const
Covariance matrix item ( )
double track_perigee_Covd0theta() const
Covariance matrix item (d0,theta)
void fillLastMeasurement(Trk::Track *track)
Obtains the last measurment on the Track and fills details into the object.
double bremDeltaZerr() const
Error on the fraction of the energy lost after the brem.
class holding information about momentum reduction and an additional noise term due to significant en...
std::unique_ptr< ParametersT< DIM, T, PerigeeSurface > > createUniqueParameters(double l1, double l2, double phi, double theta, double qop, std::optional< AmgSymMatrix(DIM)> cov=std::nullopt) const
Use the Surface as a ParametersBase constructor, from local parameters.
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Base class for detailed egamma information.
egDetail()=default
Default constructor.
static std::string release
DataVector< const Trk::TrackStateOnSurface > TrackStates
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
@ loc2
generic first and second local coordinate
ParametersBase< TrackParametersDim, Charged > TrackParameters
@ refittedTrackLastM_loc2
Last Measurment Surface Local Position 2 after Track Refit.
@ bremFitStatus
Minuit EMBremFit fit status.
@ refittedTrack_Covd0z0
Refitted track perigee covariance matrix item ( )
@ bremDeltaQoverPErr
Error on the fraction of energy lost.
@ refittedTrack_Covz0qOverP
Refitted track perigee covariance matrix item (z0,q/p)
@ refittedTrack_Covz0z0
Refitted track perigee covariance matrix item (z0,z0)
@ bremRadius
estimated brem radius from EMBremFit (mm) [x-y plane]
@ refittedTrack_Covphiphi
Refitted track perigee covariance matrix item (phi,phi)
@ refittedTrack_Covphitheta
Refitted track perigee covariance matrix item (phi,theta)
@ refittedTrack_CovqOverPqOverP
Refitted track perigee covariance matrix item (q/P,q/P)
@ refittedTrack_phi0
azimuth angle of the momentum at the point of closest approach after Track Refit
@ refittedTrack_qOverP
1/pT estimate according to Track Refit
@ refittedTrack_Covd0qOverP
Refitted track perigee covariance matrix item (d0,q/p)
@ refittedTrack_Covthetatheta
Refitted track perigee covariance matrix item (theta,theta)
@ refittedTrackLastM_qOverP
Last Measurment Surface q/pT estimate according to Track Refit.
@ bremDeltaQoverP
Fraction of the measured perigee momentum lost.
@ bremMaterialTraversed
The amount of material traversed as seen by the track (in X0)
@ bremTrackAuthor
The author of the Refitted track.
@ refittedTrackLastM_phi
Last Measurment Surface azimuth angle after Track Refit.
@ refittedTrack_Covz0phi
Refitted track perigee covariance matrix item (z0,phi)
@ refittedTrack_theta
theta of the track after EMTrackFit
@ refittedTrackLastM_theta
Last Measurment Surface theta after Track Refit.
@ linkIndex
link index for multiple track and vertex matches
@ refittedTrack_CovthetaqOverP
Refitted track perigee covariance matrix item (theta,q/P)
@ refittedTrack_d0
transverse impact parameter (distance of closest approach) after Track Refit
@ bremClusterRadius
cluster radius (mm) [x-y plane] from EMBremFit (depth)
@ refittedTrack_Covd0phi
Refitted track perigee covariance matrix item ( )
@ refittedTrack_z0
the z value at the point of closest approach after Track Refit
@ refittedTrack_CovphiqOverP
Refitted track perigee covariance matrix item (phi,q/P)
@ refittedTrack_Covd0d0
Refitted track perigee covariance matrix item ( )
@ hasBrem
The Number of brems identified by the track fitter.
@ bremFitChi2
chi2 of EMBremFit
@ refittedTrack_Covz0theta
Refitted track perigee covariance matrix item (z0,theta)
@ refittedTrackLastM_loc1
Last Measurment Surface Local Position 1 after Track Refit.
@ refittedTrack_Covd0theta
Refitted track perigee covariance matrix item (d0,theta)
const double EgParamUndefined