CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes
reco::ForwardProton Class Reference

#include <ForwardProton.h>

Public Types

enum  { dimension = 5 }
 parameter dimension More...
 
typedef math::ErrorF< dimension >::type CovarianceMatrix
 dimension-parameter covariance matrix More...
 
enum  Index {
  Index::xi, Index::th_x, Index::vtx_x, Index::th_y,
  Index::vtx_y, Index::num_indices = dimension
}
 indices to the covariance matrix More...
 
enum  LHCSector { LHCSector::invalid = -1, LHCSector::sector45, LHCSector::sector56 }
 LHC sector. More...
 
typedef math::XYZPointF Point
 point in the space More...
 
enum  ReconstructionMethod { ReconstructionMethod::invalid = -1, ReconstructionMethod::singleRP, ReconstructionMethod::multiRP }
 type of reconstruction applied for this track More...
 
typedef math::XYZVectorF Vector
 spatial vector More...
 

Public Member Functions

float chi2 () const
 chi-squared of the fit More...
 
const CTPPSLocalTrackLiteRefVectorcontributingLocalTracks () const
 list of RP tracks that contributed to this global track More...
 
double error (Index i) const
 return the uncertainty on a given component More...
 
 ForwardProton ()
 default constructor More...
 
 ForwardProton (double chi2, double ndof, const Point &vtx, const Vector &momentum, float xi, const CovarianceMatrix &cov, ReconstructionMethod method, const CTPPSLocalTrackLiteRefVector &local_tracks, bool valid, const float time=0., const float time_err=0.)
 constructor from refit parameters, fitted vertex and momentum, and longitudinal fractional momentum loss More...
 
LHCSector lhcSector () const
 
ReconstructionMethod method () const
 reconstruction method for this track More...
 
const Vectormomentum () const
 fitted track direction More...
 
unsigned int ndof () const
 number of degrees of freedom for the track fit More...
 
float normalizedChi2 () const
 chi-squared divided by ndof (or chi-squared * 1e6 if ndof is zero) More...
 
float p () const
 scalar norm of fitted track momentum More...
 
float pt () const
 scalar fitted track transverse momentum More...
 
float px () const
 fitted track momentum horizontal component More...
 
float py () const
 fitted track momentum vertical component More...
 
float pz () const
 fitted track momentum longitudinal component More...
 
void setContributingLocalTracks (const CTPPSLocalTrackLiteRefVector &v)
 store the list of RP tracks that contributed to this global track More...
 
void setMethod (const ReconstructionMethod &method)
 set the reconstruction method for this track More...
 
void setTime (float time)
 
void setTimeError (float time_err)
 
void setValidFit (bool valid=true)
 set the flag for the fit validity More...
 
float t () const
 four-momentum transfer squared, in GeV^2 More...
 
float thetaX () const
 vertical scattering angle, in rad More...
 
float thetaXError () const
 uncertainty on fitted momentum horizontal angle opening More...
 
float thetaY () const
 horizontal scattering angle, in rad More...
 
float thetaYError () const
 uncertainty on fitted momentum vertical angle opening More...
 
float time () const
 time of proton arrival at forward stations More...
 
float timeError () const
 uncertainty on time of proton arrival at forward stations More...
 
bool validFit () const
 flag for the fit validity More...
 
const Pointvertex () const
 fitted vertex position More...
 
float vx () const
 fitted vertex horizontal position More...
 
float vxError () const
 uncertainty on fitted vertex horizontal position More...
 
float vy () const
 fitted vertex vertical position More...
 
float vyError () const
 uncertainty on fitted vertex vertical position More...
 
float vz () const
 vertex longitudinal position (conventionally set to 0) More...
 
float xi () const
 longitudinal fractional momentum loss More...
 
float xiError () const
 uncertainty on longitudinal fractional momentum loss More...
 

Static Public Member Functions

static float calculateT (double beam_mom, double proton_mom, double theta)
 compute the squared four-momentum transfer from incident and scattered momenta, and angular information More...
 
static float mass ()
 proton mass in GeV More...
 

Private Attributes

float chi2_
 chi-squared More...
 
CTPPSLocalTrackLiteRefVector contributing_local_tracks_
 collection of references to tracks contributing to this object definition More...
 
CovarianceMatrix covariance_
 5x5 covariance matrix More...
 
ReconstructionMethod method_
 type of reconstruction applied More...
 
Vector momentum_
 reconstructed momentum vector More...
 
unsigned int ndof_
 number of degrees of freedom More...
 
float time_
 reconstructed time at forward detectors More...
 
float time_err_
 uncertainty on reconstructed time at forward detectors More...
 
bool valid_fit_
 fit validity flag More...
 
Point vertex_
 reconstructed vertex position at z/s = 0 More...
 
float xi_
 fractional momentum loss (positive for diffractive protons) More...
 

Static Private Attributes

static constexpr float mass_ = 0.938272046
 proton mass, GeV More...
 
static constexpr float massSquared_ = 0.88035443
 proton mass squared, GeV^2 More...
 

Detailed Description

Definition at line 22 of file ForwardProton.h.

Member Typedef Documentation

◆ CovarianceMatrix

dimension-parameter covariance matrix

Definition at line 32 of file ForwardProton.h.

◆ Point

point in the space

Definition at line 36 of file ForwardProton.h.

◆ Vector

spatial vector

Definition at line 34 of file ForwardProton.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

parameter dimension

Enumerator
dimension 

Definition at line 28 of file ForwardProton.h.

◆ Index

indices to the covariance matrix

Enumerator
xi 
th_x 
vtx_x 
th_y 
vtx_y 
num_indices 

Definition at line 30 of file ForwardProton.h.

32 { invalid = -1, singleRP, multiRP };

◆ LHCSector

LHC sector.

Enumerator
invalid 
sector45 
sector56 

Definition at line 140 of file ForwardProton.h.

143 :
144  static constexpr float mass_ = 0.938272046;

◆ ReconstructionMethod

type of reconstruction applied for this track

Enumerator
invalid 
singleRP 
multiRP 

Definition at line 38 of file ForwardProton.h.

51 { return vertex_; }

Constructor & Destructor Documentation

◆ ForwardProton() [1/2]

ForwardProton::ForwardProton ( )

default constructor

Definition at line 12 of file ForwardProton.cc.

14  : time_(0.),
15  time_err_(0.),
16  xi_(0.),
17  chi2_(0.),
18  ndof_(0),
19  valid_fit_(false),

◆ ForwardProton() [2/2]

ForwardProton::ForwardProton ( double  chi2,
double  ndof,
const Point vtx,
const Vector momentum,
float  xi,
const CovarianceMatrix cov,
ReconstructionMethod  method,
const CTPPSLocalTrackLiteRefVector local_tracks,
bool  valid,
const float  time = 0.,
const float  time_err = 0. 
)

constructor from refit parameters, fitted vertex and momentum, and longitudinal fractional momentum loss

Definition at line 21 of file ForwardProton.cc.

33  : vertex_(vtx),
35  time_(time),
36  time_err_(time_err),
37  xi_(xi),
38  covariance_(cov),
39  chi2_(chi2),
40  ndof_(ndof),
42  method_(method),

Member Function Documentation

◆ calculateT()

float ForwardProton::calculateT ( double  beam_mom,
double  proton_mom,
double  theta 
)
static

compute the squared four-momentum transfer from incident and scattered momenta, and angular information

Definition at line 44 of file ForwardProton.cc.

45  {
46  const double t0 = 2. * (massSquared_ + beam_mom * proton_mom -
47  sqrt((massSquared_ + beam_mom * beam_mom) * (massSquared_ + proton_mom * proton_mom)));
48  const double S = sin(theta / 2.);
49  return t0 - 4. * beam_mom * proton_mom * S * S;

References massSquared_, S(), funct::sin(), mathSSE::sqrt(), FrontierCondition_GT_autoExpress_cfi::t0, and theta().

Referenced by CTPPSProtonReconstructionSimulationValidator::fillPlots(), and t().

◆ chi2()

float reco::ForwardProton::chi2 ( void  ) const
inline

chi-squared of the fit

Definition at line 78 of file ForwardProton.h.

79 { return xi_; }

◆ contributingLocalTracks()

const CTPPSLocalTrackLiteRefVector& reco::ForwardProton::contributingLocalTracks ( ) const
inline

◆ error()

double reco::ForwardProton::error ( Index  i) const
inline

return the uncertainty on a given component

Definition at line 94 of file ForwardProton.h.

95 { return error(Index::th_y); }

Referenced by Page1Parser.Page1Parser::check_for_whole_start_tag(), thetaXError(), thetaY(), and xiError().

◆ lhcSector()

LHCSector reco::ForwardProton::lhcSector ( ) const
inline

Definition at line 141 of file ForwardProton.h.

143  :
144  static constexpr float mass_ = 0.938272046;
145  static constexpr float massSquared_ = 0.88035443;
146 

Referenced by CTPPSProtonReconstructionSimulationValidator::analyze().

◆ mass()

static float reco::ForwardProton::mass ( )
inlinestatic

proton mass in GeV

Definition at line 108 of file ForwardProton.h.

111 { return time_; }

Referenced by Particle.Particle::__str__(), and DiObject.DiMuon::__str__().

◆ method()

ReconstructionMethod reco::ForwardProton::method ( ) const
inline

reconstruction method for this track

Definition at line 132 of file ForwardProton.h.

134 { invalid = -1, sector45, sector56 };

References invalid, sector45, and sector56.

Referenced by CTPPSProtonReconstructionSimulationValidator::analyze(), and setTimeError().

◆ momentum()

const Vector& reco::ForwardProton::momentum ( ) const
inline

fitted track direction

Definition at line 65 of file ForwardProton.h.

65 { return momentum_.x(); }

References momentum_.

◆ ndof()

unsigned int reco::ForwardProton::ndof ( ) const
inline

number of degrees of freedom for the track fit

Definition at line 80 of file ForwardProton.h.

81 { return px() / p(); }

◆ normalizedChi2()

float reco::ForwardProton::normalizedChi2 ( ) const
inline

chi-squared divided by ndof (or chi-squared * 1e6 if ndof is zero)

Definition at line 82 of file ForwardProton.h.

83 { return py() / p(); }

◆ p()

float reco::ForwardProton::p ( ) const
inline

scalar norm of fitted track momentum

Definition at line 67 of file ForwardProton.h.

67 { return momentum_.y(); }

References momentum_.

Referenced by Electron.Electron::ptErr(), and t().

◆ pt()

float reco::ForwardProton::pt ( ) const
inline

◆ px()

float reco::ForwardProton::px ( ) const
inline

fitted track momentum horizontal component

Definition at line 71 of file ForwardProton.h.

72 { return chi2_; }

◆ py()

float reco::ForwardProton::py ( ) const
inline

fitted track momentum vertical component

Definition at line 73 of file ForwardProton.h.

74 { return ndof_; }

◆ pz()

float reco::ForwardProton::pz ( ) const
inline

fitted track momentum longitudinal component

Definition at line 75 of file ForwardProton.h.

76 { return (ndof_ != 0) ? chi2_ / ndof_ : chi2_ * 1.e6; }

Referenced by setContributingLocalTracks().

◆ setContributingLocalTracks()

void reco::ForwardProton::setContributingLocalTracks ( const CTPPSLocalTrackLiteRefVector v)
inline

store the list of RP tracks that contributed to this global track

Definition at line 135 of file ForwardProton.h.

135 {

References pz().

Referenced by CTPPSProtonProducer::produce().

◆ setMethod()

void reco::ForwardProton::setMethod ( const ReconstructionMethod method)
inline

set the reconstruction method for this track

Definition at line 130 of file ForwardProton.h.

131 { return contributing_local_tracks_; }

◆ setTime()

void reco::ForwardProton::setTime ( float  time)
inline

Definition at line 118 of file ForwardProton.h.

119 { valid_fit_ = valid; }

Referenced by CTPPSProtonProducer::produce().

◆ setTimeError()

void reco::ForwardProton::setTimeError ( float  time_err)
inline

Definition at line 122 of file ForwardProton.h.

124 { method_ = method; }

References method(), and method_.

Referenced by CTPPSProtonProducer::produce().

◆ setValidFit()

void reco::ForwardProton::setValidFit ( bool  valid = true)
inline

set the flag for the fit validity

Definition at line 125 of file ForwardProton.h.

126 { return method_; }

◆ t()

float ForwardProton::t ( ) const

four-momentum transfer squared, in GeV^2

Definition at line 51 of file ForwardProton.cc.

52  {
53  const double beam_mom = p() / (1. - xi());
54  const double theta = std::hypot(thetaX(), thetaY());
55  return calculateT(beam_mom, p(), theta);

References calculateT(), p(), theta(), thetaX(), thetaY(), and xi().

Referenced by CTPPSProtonReconstructionSimulationValidator::fillPlots().

◆ thetaX()

float reco::ForwardProton::thetaX ( ) const
inline

vertical scattering angle, in rad

Definition at line 87 of file ForwardProton.h.

88 { return sqrt(covariance_((unsigned int)i, (unsigned int)i)); }

Referenced by CTPPSProtonReconstructionSimulationValidator::fillPlots(), and t().

◆ thetaXError()

float reco::ForwardProton::thetaXError ( ) const
inline

uncertainty on fitted momentum horizontal angle opening

Definition at line 99 of file ForwardProton.h.

99 { return error(Index::vtx_y); }

References error(), and vtx_y.

◆ thetaY()

float reco::ForwardProton::thetaY ( ) const
inline

horizontal scattering angle, in rad

Definition at line 89 of file ForwardProton.h.

91 { return error(Index::xi); }

References error(), and xi.

Referenced by CTPPSProtonReconstructionPlotter::SingleMultiCorrelationPlots::fill(), CTPPSProtonReconstructionSimulationValidator::fillPlots(), and t().

◆ thetaYError()

float reco::ForwardProton::thetaYError ( ) const
inline

uncertainty on fitted momentum vertical angle opening

Definition at line 101 of file ForwardProton.h.

102 { return mass_; }

◆ time()

float reco::ForwardProton::time ( ) const
inline

time of proton arrival at forward stations

Definition at line 117 of file ForwardProton.h.

119 { valid_fit_ = valid; }

References validateGeometry_cfg::valid, and valid_fit_.

◆ timeError()

float reco::ForwardProton::timeError ( ) const
inline

uncertainty on time of proton arrival at forward stations

Definition at line 121 of file ForwardProton.h.

121 { return valid_fit_; }

References valid_fit_.

◆ validFit()

bool reco::ForwardProton::validFit ( ) const
inline

flag for the fit validity

Definition at line 127 of file ForwardProton.h.

References contributing_local_tracks_, and findQualityFiles::v.

Referenced by CTPPSProtonReconstructionSimulationValidator::analyze().

◆ vertex()

const Point& reco::ForwardProton::vertex ( ) const
inline

fitted vertex position

Definition at line 57 of file ForwardProton.h.

57 { return vertex_.z(); }

References vertex_.

Referenced by Tau.Tau::dxy(), and CTPPSProtonReconstructionSimulationValidator::fillPlots().

◆ vx()

float reco::ForwardProton::vx ( ) const
inline

fitted vertex horizontal position

Definition at line 59 of file ForwardProton.h.

59 { return momentum_; }

References momentum_.

◆ vxError()

float reco::ForwardProton::vxError ( ) const
inline

uncertainty on fitted vertex horizontal position

Definition at line 103 of file ForwardProton.h.

111 { return time_; }

◆ vy()

float reco::ForwardProton::vy ( ) const
inline

fitted vertex vertical position

Definition at line 61 of file ForwardProton.h.

61 { return momentum_.r(); }

References momentum_.

◆ vyError()

float reco::ForwardProton::vyError ( ) const
inline

uncertainty on fitted vertex vertical position

Definition at line 105 of file ForwardProton.h.

111 { return time_; }

◆ vz()

float reco::ForwardProton::vz ( ) const
inline

vertex longitudinal position (conventionally set to 0)

Definition at line 63 of file ForwardProton.h.

63 { return momentum_.rho(); }

References momentum_.

◆ xi()

float reco::ForwardProton::xi ( ) const
inline

longitudinal fractional momentum loss

Definition at line 85 of file ForwardProton.h.

88 { return sqrt(covariance_((unsigned int)i, (unsigned int)i)); }

References covariance_, mps_fire::i, and mathSSE::sqrt().

Referenced by CTPPSProtonReconstructionPlotter::SingleMultiCorrelationPlots::fill(), CTPPSProtonReconstructionSimulationValidator::fillPlots(), and t().

◆ xiError()

float reco::ForwardProton::xiError ( ) const
inline

uncertainty on longitudinal fractional momentum loss

Definition at line 97 of file ForwardProton.h.

97 { return error(Index::vtx_x); }

References error(), and vtx_x.

Member Data Documentation

◆ chi2_

float reco::ForwardProton::chi2_
private

chi-squared

Definition at line 166 of file ForwardProton.h.

◆ contributing_local_tracks_

CTPPSLocalTrackLiteRefVector reco::ForwardProton::contributing_local_tracks_
private

collection of references to tracks contributing to this object definition

Definition at line 174 of file ForwardProton.h.

Referenced by validFit().

◆ covariance_

CovarianceMatrix reco::ForwardProton::covariance_
private

5x5 covariance matrix

Definition at line 164 of file ForwardProton.h.

Referenced by xi().

◆ mass_

constexpr float reco::ForwardProton::mass_ = 0.938272046
staticconstexprprivate

proton mass, GeV

Definition at line 150 of file ForwardProton.h.

◆ massSquared_

constexpr float reco::ForwardProton::massSquared_ = 0.88035443
staticconstexprprivate

proton mass squared, GeV^2

Definition at line 151 of file ForwardProton.h.

Referenced by calculateT().

◆ method_

ReconstructionMethod reco::ForwardProton::method_
private

type of reconstruction applied

Definition at line 172 of file ForwardProton.h.

Referenced by setTimeError().

◆ momentum_

Vector reco::ForwardProton::momentum_
private

reconstructed momentum vector

Definition at line 156 of file ForwardProton.h.

Referenced by momentum(), p(), pt(), vx(), vy(), and vz().

◆ ndof_

unsigned int reco::ForwardProton::ndof_
private

number of degrees of freedom

Definition at line 168 of file ForwardProton.h.

◆ time_

float reco::ForwardProton::time_
private

reconstructed time at forward detectors

Definition at line 158 of file ForwardProton.h.

◆ time_err_

float reco::ForwardProton::time_err_
private

uncertainty on reconstructed time at forward detectors

Definition at line 160 of file ForwardProton.h.

◆ valid_fit_

bool reco::ForwardProton::valid_fit_
private

fit validity flag

Definition at line 170 of file ForwardProton.h.

Referenced by time(), and timeError().

◆ vertex_

Point reco::ForwardProton::vertex_
private

reconstructed vertex position at z/s = 0

Definition at line 154 of file ForwardProton.h.

Referenced by vertex().

◆ xi_

float reco::ForwardProton::xi_
private

fractional momentum loss (positive for diffractive protons)

Definition at line 162 of file ForwardProton.h.

mps_fire.i
i
Definition: mps_fire.py:355
reco::ForwardProton::momentum_
Vector momentum_
reconstructed momentum vector
Definition: ForwardProton.h:156
reco::ForwardProton::time_
float time_
reconstructed time at forward detectors
Definition: ForwardProton.h:158
reco::ForwardProton::thetaY
float thetaY() const
horizontal scattering angle, in rad
Definition: ForwardProton.h:89
findQualityFiles.v
v
Definition: findQualityFiles.py:179
reco::ForwardProton::error
double error(Index i) const
return the uncertainty on a given component
Definition: ForwardProton.h:94
CTPPSpixelLocalTrackReconstructionInfo::invalid
validateGeometry_cfg.valid
valid
Definition: validateGeometry_cfg.py:21
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
reco::ForwardProton::chi2
float chi2() const
chi-squared of the fit
Definition: ForwardProton.h:78
reco::ForwardProton::valid_fit_
bool valid_fit_
fit validity flag
Definition: ForwardProton.h:170
FrontierCondition_GT_autoExpress_cfi.t0
t0
Definition: FrontierCondition_GT_autoExpress_cfi.py:148
reco::ForwardProton::chi2_
float chi2_
chi-squared
Definition: ForwardProton.h:166
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::ForwardProton::time
float time() const
time of proton arrival at forward stations
Definition: ForwardProton.h:117
reco::ForwardProton::px
float px() const
fitted track momentum horizontal component
Definition: ForwardProton.h:71
reco::ForwardProton::vertex_
Point vertex_
reconstructed vertex position at z/s = 0
Definition: ForwardProton.h:154
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
reco::ForwardProton::momentum
const Vector & momentum() const
fitted track direction
Definition: ForwardProton.h:65
reco::ForwardProton::mass_
static constexpr float mass_
proton mass, GeV
Definition: ForwardProton.h:150
reco::ForwardProton::Index::vtx_y
badGlobalMuonTaggersAOD_cff.vtx
vtx
Definition: badGlobalMuonTaggersAOD_cff.py:5
reco::ForwardProton::ndof_
unsigned int ndof_
number of degrees of freedom
Definition: ForwardProton.h:168
S
double S(const TLorentzVector &, const TLorentzVector &)
Definition: Particle.cc:97
reco::ForwardProton::time_err_
float time_err_
uncertainty on reconstructed time at forward detectors
Definition: ForwardProton.h:160
reco::ForwardProton::Index::vtx_x
reco::ForwardProton::py
float py() const
fitted track momentum vertical component
Definition: ForwardProton.h:73
reco::ForwardProton::xi
float xi() const
longitudinal fractional momentum loss
Definition: ForwardProton.h:85
reco::ForwardProton::ndof
unsigned int ndof() const
number of degrees of freedom for the track fit
Definition: ForwardProton.h:80
reco::ForwardProton::Index::th_y
reco::ForwardProton::calculateT
static float calculateT(double beam_mom, double proton_mom, double theta)
compute the squared four-momentum transfer from incident and scattered momenta, and angular informati...
Definition: ForwardProton.cc:44
reco::ForwardProton::method_
ReconstructionMethod method_
type of reconstruction applied
Definition: ForwardProton.h:172
reco::ForwardProton::Index::xi
reco::ForwardProton::method
ReconstructionMethod method() const
reconstruction method for this track
Definition: ForwardProton.h:132
reco::ForwardProton::thetaX
float thetaX() const
vertical scattering angle, in rad
Definition: ForwardProton.h:87
reco::ForwardProton::covariance_
CovarianceMatrix covariance_
5x5 covariance matrix
Definition: ForwardProton.h:164
S
Definition: CSCDBL1TPParametersExtended.h:16
reco::ForwardProton::p
float p() const
scalar norm of fitted track momentum
Definition: ForwardProton.h:67
reco::ForwardProton::contributing_local_tracks_
CTPPSLocalTrackLiteRefVector contributing_local_tracks_
collection of references to tracks contributing to this object definition
Definition: ForwardProton.h:174
reco::ForwardProton::xi_
float xi_
fractional momentum loss (positive for diffractive protons)
Definition: ForwardProton.h:162
reco::ForwardProton::massSquared_
static constexpr float massSquared_
proton mass squared, GeV^2
Definition: ForwardProton.h:151