11 bool cosmics,
bool field,
double* trackParameters,
double*
hit,
double* phit,
bool onDisk) {
33 #ifndef TIF_COSMIC_SETUP 34 const double Rmu = 385;
35 const double zmu = 560;
38 TVector3
pr(phit[0], phit[1], phit[2]);
39 TVector2 r0_xy = r0.XYvector();
40 TVector2 pr_xy =
pr.Unit().XYvector();
42 ((r0_xy * pr_xy) +
sqrt((r0_xy * pr_xy) * (r0_xy * pr_xy) - r0_xy.Mod2() + Rmu * Rmu)) /
c *
pr.Mag() /
pr.Perp();
44 double t_endcap = fabs(((phit[2] / fabs(phit[2]) * zmu) +
hit[2]) /
c *
pr.Mag() /
pr.Pz());
48 const double y_trigger = 100;
49 double p =
sqrt(phit[0] * phit[0] + phit[1] * phit[1] + phit[2] * phit[2]);
53 return fabs((y_trigger -
hit[1]) * (
p / phit[1]) /
c);
59 const double Rmu = 385;
60 const double zmu = 560;
68 double invkappa = 1 /
kappa;
74 double phi_mu_b = (
kappa > 0 ? -1 : 1) * acos((Rmu * Rmu - d_0 * d_0 - 2 * invkappa * invkappa + 2 * invkappa * d_0) /
75 (2 * invkappa * d_0 - 2 * invkappa * invkappa));
76 double phi_mu_e =
kappa *
tan(
theta) * ((phit[2] < 0 ? 1 : -1) * zmu - z_0);
80 double t_endcap = fabs(invkappa / (
c *
sin(
theta)) * (
phi - phi_mu_e));
144 LogDebug(
"trackParameters") <<
"outer momentum: " << momentum.x() <<
" " << momentum.y() <<
" " << momentum.z();
165 LogDebug(
"trackParameters") <<
"phi_0: " << phi_0;
static double timeOfFlightBeamB(double *trackParameters, double *hit, double *phit, bool onDisk)
static double x(double *trackParameters, double phi)
const math::XYZPoint & outerPosition() const
position of the outermost hit
const math::XYZVector & outerMomentum() const
momentum vector at the outermost hit position
Sin< T >::type sin(const T &t)
static double timeOfFlight(bool cosmics, bool field, double *trackParameters, double *hit, double *phit, bool onDisk)
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
static double timeOfFlightCosmicB(double *trackParameters, double *hit, double *phit, bool onDisk)
static void trackParameters(const reco::Track &tk, double *trackParameters)
static double getPhi(double *trackParameters, double *hit, bool onDisk)
static double timeOfFlightCosmic(double *hit, double *phit)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
static double y(double *trackParameters, double phi)
static double timeOfFlightBeam(double *hit, double *phit)
static double z(double *trackParameters, double phi)
static int position[264][3]
const math::XYZPoint & innerPosition() const
position of the innermost hit