Public Member Functions | Private Attributes | List of all members
vf::DOCAInfo Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-28/VertexFinder/DOCAInfo.h"

Public Member Functions

 DOCAInfo (rb::Track track1, rb::Track track2)
 
void DoCalculation (TVector3 I1, TVector3 I2, TVector3 F1, TVector3 F2)
 
TVector3 VertexReco () const
 
double AngleReco () const
 
double Doca () const
 

Private Attributes

TVector3 vertex_reco_
 
TVector3 delta1_
 
TVector3 delta2_
 
double doca_
 

Detailed Description

Definition at line 15 of file DOCAInfo.h.

Constructor & Destructor Documentation

vf::DOCAInfo::DOCAInfo ( rb::Track  track1,
rb::Track  track2 
)

Definition at line 15 of file DOCAInfo.cxx.

References rb::Prong::Dir(), DoCalculation(), and rb::Prong::Start().

16  {
17  TVector3 end1 = track1.Start() + track1.Dir();
18  TVector3 end2 = track2.Start() + track2.Dir();
19 
20  DoCalculation(track1.Start(), track2.Start(), end1, end2);
21  }
void DoCalculation(TVector3 I1, TVector3 I2, TVector3 F1, TVector3 F2)
Definition: DOCAInfo.cxx:24
virtual TVector3 Start() const
Definition: Prong.h:73
virtual TVector3 Dir() const
Unit vector describing prong direction.
Definition: Prong.h:77

Member Function Documentation

double vf::DOCAInfo::AngleReco ( ) const

Definition at line 65 of file DOCAInfo.cxx.

References delta1_, and delta2_.

Referenced by vf::VertexFinder::produce().

66  {
67  return (delta1_ * delta2_) / (delta1_.Mag() * delta2_.Mag());
68  }
TVector3 delta2_
Definition: DOCAInfo.h:35
TVector3 delta1_
Definition: DOCAInfo.h:35
double vf::DOCAInfo::Doca ( ) const

Definition at line 59 of file DOCAInfo.cxx.

References doca_.

Referenced by vf::VertexFinder::produce().

60  {
61  return doca_;
62  }
double doca_
Definition: DOCAInfo.h:36
void vf::DOCAInfo::DoCalculation ( TVector3  I1,
TVector3  I2,
TVector3  F1,
TVector3  F2 
)

Definition at line 24 of file DOCAInfo.cxx.

References genie::units::A, beta, delta1_, delta2_, doca_, stan::math::fabs(), ratio(), Unit(), and vertex_reco_.

Referenced by DOCAInfo().

26  {
27  TVector3 anyV, A, B, alpha, beta, ratio;
28  double sigma1, sigma2;
29 
30  delta1_ = F1 - I1;
31  delta2_ = F2 - I2;
32  anyV = I2 - I1;
33 
34  ratio = (delta1_.Cross(delta2_)).Unit();
35 
36  // Distance of closest approach:
37  doca_ = fabs(anyV * ratio);
38 
39  alpha = delta1_.Cross(ratio);
40  beta = delta2_.Cross(ratio);
41 
42  sigma1 = -(alpha * anyV) / (alpha * delta2_);
43  sigma2 = (beta * anyV) / (beta * delta1_);
44 
45  A = I1 + sigma2 * delta1_;
46  B = I2 + sigma1 * delta2_;
47 
48  // Reconstructed Vertex:
49  vertex_reco_ = (A + B) * 0.5;
50  }
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
TVector3 delta2_
Definition: DOCAInfo.h:35
TH1 * ratio(TH1 *h1, TH1 *h2)
TVector3 delta1_
Definition: DOCAInfo.h:35
Double_t beta
TVector3 Unit() const
static const double A
Definition: Units.h:82
TVector3 vertex_reco_
Definition: DOCAInfo.h:34
double doca_
Definition: DOCAInfo.h:36
TVector3 vf::DOCAInfo::VertexReco ( ) const

Definition at line 53 of file DOCAInfo.cxx.

References vertex_reco_.

Referenced by vf::VertexFinder::produce().

54  {
55  return vertex_reco_;
56  }
TVector3 vertex_reco_
Definition: DOCAInfo.h:34

Member Data Documentation

TVector3 vf::DOCAInfo::delta1_
private

Definition at line 35 of file DOCAInfo.h.

Referenced by AngleReco(), and DoCalculation().

TVector3 vf::DOCAInfo::delta2_
private

Definition at line 35 of file DOCAInfo.h.

Referenced by AngleReco(), and DoCalculation().

double vf::DOCAInfo::doca_
private

Definition at line 36 of file DOCAInfo.h.

Referenced by Doca(), and DoCalculation().

TVector3 vf::DOCAInfo::vertex_reco_
private

Definition at line 34 of file DOCAInfo.h.

Referenced by DoCalculation(), and VertexReco().


The documentation for this class was generated from the following files: