44 if(input.GetNrows()==2 && input.GetNcols()==2) {
55 if(input.GetNrows()==2 && input.GetNcols()==2) {
58 xmet_=met_r*
cos(met_phi);
59 ymet_=met_r*
sin(met_phi);
78 r(0,0) =
cos(theta);
r(0,1) =
sin(theta);
r(1,0) = -
sin(theta);
r(1,1) =
cos(theta);
90 TMatrixD v_tot = signifmatrix_;
93 for(std::vector<SigInputObj>::const_iterator
obj = eventVec.begin();
obj!= eventVec.end(); ++
obj){
94 double et_tmp =
obj->get_energy();
95 double phi_tmp =
obj->get_phi();
96 double sigma_et =
obj->get_sigma_e();
97 double sigma_tan =
obj->get_sigma_tan();
99 double cosphi=
cos(phi_tmp);
100 double sinphi=
sin(phi_tmp);
101 double xval = et_tmp * cosphi;
102 double yval = et_tmp * sinphi;
105 set_worker_ -= et_tmp;
107 double sigma0_2=sigma_et*sigma_et;
108 double sigma1_2=sigma_tan*sigma_tan;
110 v_tot(0,0)-= sigma0_2*cosphi*cosphi + sigma1_2*sinphi*sinphi;
111 v_tot(0,1)-= cosphi*sinphi*(sigma0_2 - sigma1_2);
112 v_tot(1,0)-= cosphi*sinphi*(sigma0_2 - sigma1_2);
113 v_tot(1,1)-= sigma1_2*cosphi*cosphi + sigma0_2*sinphi*sinphi;
124 TMatrixD v_tot = signifmatrix_;
127 for(std::vector<SigInputObj>::const_iterator
obj = eventVec.begin();
obj!= eventVec.end(); ++
obj){
128 double et_tmp =
obj->get_energy();
129 double phi_tmp =
obj->get_phi();
130 double sigma_et =
obj->get_sigma_e();
131 double sigma_tan =
obj->get_sigma_tan();
133 double cosphi=
cos(phi_tmp);
134 double sinphi=
sin(phi_tmp);
135 double xval = et_tmp * cosphi;
136 double yval = et_tmp * sinphi;
139 set_worker_ += et_tmp;
141 double sigma0_2=sigma_et*sigma_et;
142 double sigma1_2=sigma_tan*sigma_tan;
144 v_tot(0,0)+= sigma0_2*cosphi*cosphi + sigma1_2*sinphi*sinphi;
145 v_tot(0,1)+= cosphi*sinphi*(sigma0_2 - sigma1_2);
146 v_tot(1,0)+= cosphi*sinphi*(sigma0_2 - sigma1_2);
147 v_tot(1,1)+= sigma1_2*cosphi*cosphi + sigma0_2*sinphi*sinphi;
158 if(signifmatrix_(0,0)==0 && signifmatrix_(1,1)==0 && signifmatrix_(1,0)==0 && signifmatrix_(0,1)==0){
175 met_r =
sqrt(xmet_*xmet_ + ymet_*ymet_);
176 met_set = set_worker_;
177 met_phi= TMath::ATan2(ymet_, xmet_);
181 if(fabs(v_tot.Determinant())<0.000001)
192 metvec(0) = xmet_; metvec(1) = ymet_;
193 double lnSignificance = metvec * (v_tot * metvec);
197 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)
static std::string const input
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 ...