#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-26/Monopole/Track3D.h"
Definition at line 21 of file Track3D.h.
mono::Track3D::Track3D |
( |
| ) |
|
mono::Track3D::Track3D |
( |
Track2D const & |
xz_track, |
|
|
Track2D const & |
yz_track |
|
) |
| |
Definition at line 24 of file Track3D.cxx.
References abs(), rb::Cluster::Add(), rb::Cluster::AllCells(), beta_, mono::Track2D::cluster, cluster_, dxdt_, dxdz_, dydt_, dydz_, dzdt_, dzdt_x_track_, dzdt_y_track_, mono::Track2D::intercept, max_time_gap_xz_, max_time_gap_yz_, util::pythag(), r2_xt_, r2_yt_, r2_zt_x_track_, r2_zt_y_track_, mono::Track2D::slope, mono::Constants::SPEED_OF_LIGHT, time_fit(), time_gap(), velocity(), x0_, rb::Cluster::XCells(), y0_, rb::Cluster::YCells(), and z0_.
41 x0_ = x_track.intercept;
42 y0_ = y_track.intercept;
45 dxdz_ = x_track.slope;
46 dydz_ = y_track.slope;
53 if (xt_fit_valid && yt_fit_valid)
68 for (
auto const& x_hit : x_track.cluster.AllCells())
70 bool has_match =
false;
71 for (
auto const& y_hit : y_track.cluster.AllCells())
72 if (
abs(
int(x_hit->Plane()) -
int(y_hit->Plane())) <= 1)
79 for (
auto const& y_hit : y_track.cluster.AllCells())
81 bool has_match =
false;
82 for (
auto const& x_hit : x_track.cluster.AllCells())
83 if (
abs(
int(x_hit->Plane()) -
int(y_hit->Plane())) <= 1)
double time_gap(art::PtrVector< rb::CellHit > const &hits) const
const art::PtrVector< rb::CellHit > & XCells() const
Get all cells from the x-view.
const double SPEED_OF_LIGHT
bool time_fit(Track2D const &track, double &dvdt, double &dzdt, double &r2_vt, double &r2_zt) const
virtual void Add(const art::Ptr< rb::CellHit > &cell, double weight=1)
const art::PtrVector< rb::CellHit > & YCells() const
Get all cells from the x-view.
TVector3 velocity() const
double pythag(double x, double y)
2D Euclidean distance
double mono::Track3D::beta |
( |
| ) |
const |
double mono::Track3D::dxdz |
( |
| ) |
const |
double mono::Track3D::dydz |
( |
| ) |
const |
double mono::Track3D::get_covariance |
( |
double const & |
a, |
|
|
double const & |
mean_a, |
|
|
double const & |
b, |
|
|
double const & |
mean_b |
|
) |
| const |
|
private |
double mono::Track3D::get_variance |
( |
double const & |
a, |
|
|
double const & |
mean_a |
|
) |
| const |
|
private |
double mono::Track3D::max_time_gap_xz |
( |
| ) |
const |
double mono::Track3D::max_time_gap_yz |
( |
| ) |
const |
double mono::Track3D::r2_xt |
( |
| ) |
const |
double mono::Track3D::r2_yt |
( |
| ) |
const |
TVector3 mono::Track3D::start |
( |
| ) |
const |
bool mono::Track3D::time_fit |
( |
Track2D const & |
track, |
|
|
double & |
dvdt, |
|
|
double & |
dzdt, |
|
|
double & |
r2_vt, |
|
|
double & |
r2_zt |
|
) |
| const |
|
private |
Definition at line 193 of file Track3D.cxx.
References rb::Cluster::AllCells(), geo::GeometryBase::CellInfo(), geo::GeometryBase::CellTpos(), mono::Track2D::cluster, default_value_, get_covariance(), get_variance(), extractScale::mean, rb::Cluster::NCell(), cet::pow(), confusionMatrixTree::t, registry_explorer::v, variance(), and test::z.
Referenced by cluster(), and Track3D().
199 double N =
track.cluster.NCell();
206 std::map<std::string, double>
mean = { {
"v", 0.0}, {
"z", 0.0}, {
"t", 0.0} };
207 for (
auto const&
hit :
track.cluster.AllCells())
211 TVector3 hit_vector(xyz);
213 mean.at(
"v") += geometry->
CellTpos(
hit->Plane(),
hit->Cell()) / N;
214 mean.at(
"z") += hit_vector.z() / N;
215 mean.at(
"t") +=
hit->TNS() / N;
218 std::map<std::string, double>
variance =
219 { {
"t", 0.0}, {
"v", 0.0}, {
"z", 0.0}, {
"vt", 0.0}, {
"zt", 0.0} };
220 for (
auto const&
hit :
track.cluster.AllCells())
224 TVector3 hit_vector(xyz);
226 double z = hit_vector.z();
227 double t =
hit->TNS();
229 variance.at(
"t") +=
get_variance(t, mean.at(
"t")) / (N - 1);
230 variance.at(
"v") +=
get_variance(v, mean.at(
"v")) / (N - 1);
231 variance.at(
"z") +=
get_variance(z, mean.at(
"z")) / (N - 1);
238 if (variance.at(
"t") == 0 || variance.at(
"v") == 0 || variance.at(
"z") == 0)
248 dvdt = variance.at(
"vt") / variance.at(
"t");
249 dzdt = variance.at(
"zt") / variance.at(
"t");
257 std::pow(variance.at(
"vt"), 2) / (variance.at(
"v") * variance.at(
"t"));
259 std::pow(variance.at(
"zt"), 2) / (variance.at(
"z") * variance.at(
"t"));
double CellTpos(unsigned int ip, unsigned int ic, double w=0.0) const
double get_variance(double const &a, double const &mean_a) const
void CellInfo(unsigned int ip, unsigned int ic, View_t *view=0, double *pos=0, double *dpos=0) const
double dzdt(geo::View_t view) const
double r2_zt(geo::View_t view) const
double get_covariance(double const &a, double const &mean_a, double const &b, double const &mean_b) const
double variance(Eigen::VectorXd x)
TVector3 mono::Track3D::velocity |
( |
| ) |
const |
double mono::Track3D::beta_ |
|
private |
double mono::Track3D::default_value_ |
|
private |
double mono::Track3D::dxdt_ |
|
private |
double mono::Track3D::dxdz_ |
|
private |
double mono::Track3D::dydt_ |
|
private |
double mono::Track3D::dydz_ |
|
private |
double mono::Track3D::dzdt_ |
|
private |
double mono::Track3D::dzdt_x_track_ |
|
private |
double mono::Track3D::dzdt_y_track_ |
|
private |
double mono::Track3D::max_time_gap_xz_ |
|
private |
double mono::Track3D::max_time_gap_yz_ |
|
private |
double mono::Track3D::r2_xt_ |
|
private |
double mono::Track3D::r2_yt_ |
|
private |
double mono::Track3D::r2_zt_x_track_ |
|
private |
double mono::Track3D::r2_zt_y_track_ |
|
private |
double mono::Track3D::x0_ |
|
private |
double mono::Track3D::y0_ |
|
private |
double mono::Track3D::z0_ |
|
private |
The documentation for this class was generated from the following files:
- /cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-26/Monopole/Track3D.h
- /cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-26/Monopole/Track3D.cxx