4 #ifndef TrackMomentumCalculator_H 5 #define TrackMomentumCalculator_H 49 const bool checkValidPoints =
false,
50 const int maxMomentum_MeV = 7500);
65 const bool checkValidPoints =
false,
66 const int maxMomentum_MeV = 7500,
67 const int MomentumStep_MeV = 10,
68 const int max_resolution = 0);
74 std::vector<float>
const& yyy,
75 std::vector<float>
const& zzz);
85 const std::vector<float> segy,
86 const std::vector<float> segz,
87 std::vector<float>& segnx,
88 std::vector<float>& segny,
89 std::vector<float>& segnz,
90 std::vector<float>& vx,
91 std::vector<float>& vy,
92 std::vector<float>& vz);
105 std::vector<float>
L;
120 std::optional<Segments>
getSegTracks_(std::vector<float>
const& xxx,
121 std::vector<float>
const& yyy,
122 std::vector<float>
const& zzz,
150 std::vector<float>& ej,
151 std::vector<float>& th,
152 std::vector<float>& ind,
165 double my_g(
double xx,
double Q,
double s)
const;
182 std::vector<float>
const& dEj,
183 std::vector<float>
const& dthij,
184 std::vector<float>
const& ind,
203 double find_angle(
double vz,
double vy)
const;
236 #endif // TrackMomentumCalculator_H
double my_g(double xx, double Q, double s) const
chi square minizer using Minuit2, it will minize (xx-Q)/s
int getDeltaThetaij_(std::vector< float > &ei, std::vector< float > &ej, std::vector< float > &th, std::vector< float > &ind, Segments const &segments, double thick) const
Gets the scatterd angle for all the segments.
Float_t x1[n_points_granero]
void compute_max_fluctuation_vector(const std::vector< float > segx, const std::vector< float > segy, const std::vector< float > segz, std::vector< float > &segnx, std::vector< float > &segny, std::vector< float > &segnz, std::vector< float > &vx, std::vector< float > &vy, std::vector< float > &vz)
Computes the vector with most scattering inside a segment with size steps_size.
double GetMomentumMultiScatterLLHD(art::Ptr< recob::Track > const &trk, const bool checkValidPoints=false, const int maxMomentum_MeV=7500, const int MomentumStep_MeV=10, const int max_resolution=0)
Calculate muon momentum (GeV) using multiple coulomb scattering by log likelihood.
TrackMomentumCalculator(double minLength=100.0, double maxLength=1350.0, double steps_size=10.)
Constructor.
std::optional< Segments > getSegTracks_(std::vector< float > const &xxx, std::vector< float > const &yyy, std::vector< float > const &zzz, double seg_size)
Split tracks into segments to calculate the scattered angle later. Check DOI 10.1088/1748-0221/12/10/...
double GetMomentumMultiScatterChi2(art::Ptr< recob::Track > const &trk, const bool checkValidPoints=false, const int maxMomentum_MeV=7500)
Calculate muon momentum (GeV) using multiple coulomb scattering. Chi2 minimization of the Highland fo...
double find_angle(double vz, double vy) const
Gets angle between two vy and vz.
Struct to store segments. x, y and z are the 3D points of the segment nx, ny, nz forms the vector tha...
Provides recob::Track data product.
std::tuple< double, double, double > getDeltaThetaRMS_(Segments const &segments, double thick) const
Gets the scattered angle RMS for a all segments.
std::vector< float > steps
double GetMuMultiScatterLLHD3(art::Ptr< recob::Track > const &trk, bool dir)
double my_mcs_llhd(std::vector< float > const &dEi, std::vector< float > const &dEj, std::vector< float > const &dthij, std::vector< float > const &ind, double x0, double x1) const
Minimizer of log likelihood for scattered angle.
TVector3 GetMultiScatterStartingPoint(art::Ptr< recob::Track > const &trk)
TPolyLine3D * gr_reco_xyz
double GetTrackMomentum(double trkrange, int pdg) const
bool plotRecoTracks_(std::vector< float > const &xxx, std::vector< float > const &yyy, std::vector< float > const &zzz)