45 if(input.GetNrows()==2 && input.GetNcols()==2) {
56 if(input.GetNrows()==2 && input.GetNcols()==2) {
59 xmet_=met_r*
cos(met_phi);
60 ymet_=met_r*
sin(met_phi);
79 r(0,0) =
cos(theta);
r(0,1) =
sin(theta);
r(1,0) = -
sin(theta);
r(1,1) =
cos(theta);
91 TMatrixD v_tot = signifmatrix_;
94 for(std::vector<SigInputObj>::const_iterator
obj = eventVec.begin();
obj!= eventVec.end(); ++
obj){
95 double et_tmp =
obj->get_energy();
96 double phi_tmp =
obj->get_phi();
97 double sigma_et =
obj->get_sigma_e();
98 double sigma_tan =
obj->get_sigma_tan();
100 double cosphi=
cos(phi_tmp);
101 double sinphi=
sin(phi_tmp);
102 double xval = et_tmp * cosphi;
103 double yval = et_tmp * sinphi;
106 set_worker_ -= et_tmp;
108 double sigma0_2=sigma_et*sigma_et;
109 double sigma1_2=sigma_tan*sigma_tan;
111 v_tot(0,0)-= sigma0_2*cosphi*cosphi + sigma1_2*sinphi*sinphi;
112 v_tot(0,1)-= cosphi*sinphi*(sigma0_2 - sigma1_2);
113 v_tot(1,0)-= cosphi*sinphi*(sigma0_2 - sigma1_2);
114 v_tot(1,1)-= sigma1_2*cosphi*cosphi + sigma0_2*sinphi*sinphi;
125 TMatrixD v_tot = signifmatrix_;
128 for(std::vector<SigInputObj>::const_iterator
obj = eventVec.begin();
obj!= eventVec.end(); ++
obj){
129 double et_tmp =
obj->get_energy();
130 double phi_tmp =
obj->get_phi();
131 double sigma_et =
obj->get_sigma_e();
132 double sigma_tan =
obj->get_sigma_tan();
134 double cosphi=
cos(phi_tmp);
135 double sinphi=
sin(phi_tmp);
136 double xval = et_tmp * cosphi;
137 double yval = et_tmp * sinphi;
140 set_worker_ += et_tmp;
142 double sigma0_2=sigma_et*sigma_et;
143 double sigma1_2=sigma_tan*sigma_tan;
145 v_tot(0,0)+= sigma0_2*cosphi*cosphi + sigma1_2*sinphi*sinphi;
146 v_tot(0,1)+= cosphi*sinphi*(sigma0_2 - sigma1_2);
147 v_tot(1,0)+= cosphi*sinphi*(sigma0_2 - sigma1_2);
148 v_tot(1,1)+= sigma1_2*cosphi*cosphi + sigma0_2*sinphi*sinphi;
159 if(signifmatrix_(0,0)==0 && signifmatrix_(1,1)==0 && signifmatrix_(1,0)==0 && signifmatrix_(0,1)==0){
176 met_r =
sqrt(xmet_*xmet_ + ymet_*ymet_);
177 met_set = set_worker_;
178 met_phi= TMath::ATan2(ymet_, xmet_);
182 if(fabs(v_tot.Determinant())<0.000001)
193 metvec(0) = xmet_; metvec(1) = ymet_;
194 double lnSignificance = metvec * (v_tot * metvec);
198 return lnSignificance;
const void addObjects(const std::vector< metsig::SigInputObj > &EventVec)
void rotateMatrix(Double_t theta, TMatrixD &v)
const double significance(double &met_r, double &met_phi, double &met_set)
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
const void subtractObjects(const std::vector< metsig::SigInputObj > &EventVec)
Cos< T >::type cos(const T &t)
const void addSignifMatrix(const TMatrixD &input)
const void setSignifMatrix(const TMatrixD &input, const double &met_r, const double &met_phi, const double &met_set)
reset the signficance matrix (this is the most likely case), so that the vector sum can be continued ...