1 #include "StEEmcPointUtils.h"
5 StEEmcPointUtils::StEEmcPointUtils()
13 Float_t oangle_min = 2.0 * mass * frac / energy;
14 return (oangle>oangle_min);
24 if ( npoint > (Int_t)points.size() ) {
32 Float_t chi2_min=1.0E9;
33 StEEmcPointVec_t good_perm;
39 for ( Int_t ipoint=0; ipoint < npoint; ipoint++ ) {
40 Float_t edep_predict = 2.0 * kEEmcSmdSF * em_energy;
41 Float_t ediff1 = points[ipoint].energy() - edep_predict;
42 Float_t ediff2 = points[ipoint].cluster(0).energy() - points[ipoint].cluster(1).energy();
44 Float_t mychi2=ediff1*ediff1 + ediff2*ediff2;
45 if ( mychi2 < chi2_min ) {
52 go = std::next_permutation ( points.begin(), points.end() );
64 if ( npoint <= 1 )
return true;
66 for ( Int_t i = 0; i < npoint-1; i++ ) {
67 Float_t u1=points[i].cluster(0).mean();
68 Float_t v1=points[i].cluster(1).mean();
69 for ( Int_t j = i+1; j < npoint; j++ ) {
70 Float_t u2=points[j].cluster(0).mean();
71 Float_t v2=points[j].cluster(1).mean();
72 if ( u1==u2 )
return false;
73 if ( v1==v2 )
return false;
Base class for representing EEMC points.
Bool_t opening_angle_cut(StEEmcPoint &p1, StEEmcPoint &p2, Float_t energy, Float_t mass=0.135, Float_t frac=0.3)
Bool_t no_parallel_smd_clusters(StEEmcPointVec_t points, Int_t npoint)
StEEmcPointVec_t find_best_points(StEEmcPointVec_t points, Float_t em_energy, Bool_t &stat, Float_t &chi2, Int_t npoint=1)
void position(const TVector3 &p)
Set the position of this point at the SMD plane.