1 #ifndef WeightedPoints3D_h
2 #define WeightedPoints3D_h
41 const std::vector<double> &cov,
const std::vector<double> &mayor_axis_error = std::vector<double>() ,
42 int npnt = 0 ,
double wgtsum =0.0 ,
double wgt2sum=0.0 ,
double wgt4sum=0.0 );
52 void setErrors(
double *ex,
double* ey,
double *ez);
128 double* getEigenVecPolarErrors();
144 inline double radius() {
return _radius; }
163 int _ifNotPointsGiven;
167 double _wgt_sqr_sum ;
174 double _COGCov[3][3];
175 double _COGCovCov[6][6];
182 int _ifNotEigenSolved;
183 int _ifNotEigenToPolarDone ;
185 int _ifNotVecErrorsPolarPropagated;
186 int _ifNotVecErrorsCartesianPropagated;
187 int _ifNotValErrorsPropagated;
188 int _ifNot_dVec_dCov;
189 int _ifNot_fourthmom;
190 int _last_evec_to_error_propagate;
192 double _EigenValCov[3][3];
193 double _EigenVec[3][3];
194 double _EigenVecAngle[2][3];
195 double _EigenVecCov[9][9];
196 double _theta_phi_cov[2][2][3];
197 double _xyz_cov[3][3][3];
203 double _fourth_mom[3][3][3][3];
204 double dang[6][2][3];
209 void findCOGErrors();
210 double findDistance(
int i);
211 void solveEigenValEq();
212 void findCovErrors();
214 void propagateVecErrorsPolar();
215 void propagateVecErrorsCartesian();
216 void propagateValErrors();
217 void find_dVec_dCov();
double getTotalWeight()
returns the summed weight for the whole set of points.
Definition: WeightedPoints3D.cc:193
double * getEigenValErrors()
Retuns a vector containing the variances of the three eigen-values.
Definition: WeightedPoints3D.cc:229
double getTotalSquaredWeight()
returns the sum of weight^2 for the whole set of points.
Definition: WeightedPoints3D.cc:200
double * getEigenVecPolar()
The same in polar.
Definition: WeightedPoints3D.cc:240
~WeightedPoints3D()
Destructor.
Definition: WeightedPoints3D.cc:146
double * getEigenVecCartesian()
array of the three main axes of the covariance matrix, starting with the axis corresponding to the sm...
Definition: WeightedPoints3D.cc:236
double * getEigenVal()
array of the eigen-values of the covariance matrix, sorted in ascending size.
Definition: WeightedPoints3D.cc:225
int getNumberOfPoints()
returns the number of elements of the set of points
Definition: WeightedPoints3D.cc:187
double radius()
distance to the centre of gravity measured from IP (absolut value of the vector to the centre of grav...
Definition: WeightedPoints3D.h:144
double * getCenterOfGravity()
US spelling of getCentreOfGravity.
Definition: WeightedPoints3D.h:91
WeightedPoints3D(int nhits, double *a, double *x, double *y, double *z)
Constructor.
Definition: WeightedPoints3D.cc:96
double getTotalQuarticWeight()
returns the sum of weight^4 for the whole set of points.
Definition: WeightedPoints3D.cc:206
double getWidth()
'mean' width of the cluster perpendicular to the main principal axis, defined as: width := sqrt( 1/Su...
Definition: WeightedPoints3D.cc:263
double * getEigenVecCartesianErrors()
The covariance matrix of the eigen-vectors, one matrix/eigen-vector, so it is a (2/3) x (2/3) x 3 mat...
Definition: WeightedPoints3D.cc:252
void setErrors(double *ex, double *ey, double *ez)
Defining position errors.
Definition: WeightedPoints3D.cc:165
Utility class to derive properties of a set od weighted points in 3D, such as centre of gravity...
Definition: WeightedPoints3D.h:24
double * getCentreOfGravity()
returns an array, which represents a vector from the origin of the coordiante system, i. e. IP, to average (aka the centre of gravity) of the set of points, with the weighs of each point taken into account.
Definition: WeightedPoints3D.cc:213
double * getCentreOfGravityErrors()
returns the covarinace matrix between the three coordinates of the centre of gravity.
Definition: WeightedPoints3D.cc:217