6 #include <TFitResult.h>
15 #include <Math/Functor.h>
16 #include <TPolyLine3D.h>
17 #include <Math/Vector3D.h>
18 #include <Fit/Fitter.h>
20 using namespace ROOT::Math;
37 for (
int ix = 1; ix <=
gHistogram->GetNbinsX(); ++ix) {
38 for (
int iy = 1; iy <=
gHistogram->GetNbinsY(); ++iy) {
39 for (
int iz = 1; iz <=
gHistogram->GetNbinsZ(); ++iz) {
43 coords[0] =
gHistogram->GetXaxis()->GetBinCenter(ix);
44 coords[1] =
gHistogram->GetYaxis()->GetBinCenter(iy);
45 coords[2] =
gHistogram->GetZaxis()->GetBinCenter(iz);
60 TH3D * histogram = AMSTrdMCTrack::setClustersInTH3D(track);
67 minuit.DefineParameter(0,
"px", 0, 0.1, -100, 100);
68 minuit.DefineParameter(1,
"py", 0, 0.1, -100, 100);
69 minuit.DefineParameter(2,
"pz", 100, 0.1, 90, 140);
70 minuit.DefineParameter(3,
"vx", 1, 0.1, -1000, 1000);
71 minuit.DefineParameter(4,
"vy", 0, 0.1, -1000, 1000);
72 minuit.DefineParameter(5,
"vz", 0, 0.1, -1000, 1000);
78 for (
int i = 0; i < 6; i++) {
79 double paramValue, paramError;
80 minuit.GetParameter(i, paramValue, paramError);
92 printf(
"\n\nFor track.trkID = %d and g3PID: %d: minuit.GetStatus() = %d\n\n\n", track.
trkID, track.
g3PID, minuit.GetStatus());
97 histogram->Write(Form(
"graph2D_%d_%d_%d_%d", eventID, track.
trkID, track.
g3PID, track.
clusters.size()));
TH3D * gHistogram
Definition: ClusterFitter3DMinuit.h:27
Definition: ClusterFitter3DMinuit.h:31
Line::FitLine3DMinuit fitClustersToLine3D(const AMSTrdMCTrack::Track &track, const int &eventID, TFile *file)
Definition: ClusterFitter3DMinuit.h:54
void objectiveFunction(int &nDim, double *gout, double &result, double params[], int flag)
Definition: ClusterFitter3DMinuit.h:34
double distanceFromLine3D(double *coords, double *params)
Definition: Line.h:122
Definition: AMSTrdMCTrack.h:49
int trkID
Definition: AMSTrdMCTrack.h:50
std::vector< Cluster > clusters
Definition: AMSTrdMCTrack.h:52
int g3PID
Definition: AMSTrdMCTrack.h:51
bool fitSuccess
Definition: Line.h:36
int trkID
Definition: Line.h:33
int g3PID
Definition: Line.h:34
std::vector< double > fitErrors
Definition: Line.h:38
std::vector< double > fitParameters
Definition: Line.h:37