52 xmet_=met_r*
cos(met_phi);
53 ymet_=met_r*
sin(met_phi);
72 r(0,0) =
cos(theta);
r(0,1) =
sin(theta);
r(1,0) = -
sin(theta);
r(1,1) =
cos(theta);
87 for(std::vector<SigInputObj>::const_iterator
obj = eventVec.begin();
obj!= eventVec.end(); ++
obj){
88 double et_tmp =
obj->get_energy();
89 double phi_tmp =
obj->get_phi();
90 double sigma_et =
obj->get_sigma_e();
91 double sigma_tan =
obj->get_sigma_tan();
93 double cosphi=
cos(phi_tmp);
94 double sinphi=
sin(phi_tmp);
95 double xval = et_tmp * cosphi;
96 double yval = et_tmp * sinphi;
99 set_worker_ -= et_tmp;
101 double sigma0_2=sigma_et*sigma_et;
102 double sigma1_2=sigma_tan*sigma_tan;
104 v_tot(0,0)-= sigma0_2*cosphi*cosphi + sigma1_2*sinphi*sinphi;
105 v_tot(0,1)-= cosphi*sinphi*(sigma0_2 - sigma1_2);
106 v_tot(1,0)-= cosphi*sinphi*(sigma0_2 - sigma1_2);
107 v_tot(1,1)-= sigma1_2*cosphi*cosphi + sigma0_2*sinphi*sinphi;
121 for(std::vector<SigInputObj>::const_iterator
obj = eventVec.begin();
obj!= eventVec.end(); ++
obj){
122 double et_tmp =
obj->get_energy();
123 double phi_tmp =
obj->get_phi();
124 double sigma_et =
obj->get_sigma_e();
125 double sigma_tan =
obj->get_sigma_tan();
127 double cosphi=
cos(phi_tmp);
128 double sinphi=
sin(phi_tmp);
129 double xval = et_tmp * cosphi;
130 double yval = et_tmp * sinphi;
133 set_worker_ += et_tmp;
135 double sigma0_2=sigma_et*sigma_et;
136 double sigma1_2=sigma_tan*sigma_tan;
138 v_tot(0,0)+= sigma0_2*cosphi*cosphi + sigma1_2*sinphi*sinphi;
139 v_tot(0,1)+= cosphi*sinphi*(sigma0_2 - sigma1_2);
140 v_tot(1,0)+= cosphi*sinphi*(sigma0_2 - sigma1_2);
141 v_tot(1,1)+= sigma1_2*cosphi*cosphi + sigma0_2*sinphi*sinphi;
152 if(signifmatrix_(0,0)==0 && signifmatrix_(1,1)==0 && signifmatrix_(1,0)==0 && signifmatrix_(0,1)==0){
160 ROOT::Math::SVector<double, 2> metvec;
169 met_r =
sqrt(xmet_*xmet_ + ymet_*ymet_);
170 met_set = set_worker_;
171 met_phi= TMath::ATan2(ymet_, xmet_);
177 if(fabs(det)<0.000001)
188 metvec(0) = xmet_; metvec(1) = ymet_;
189 double lnSignificance = ROOT::Math::Dot(metvec, (v_tot * metvec) );
193 return lnSignificance;
const void addObjects(const std::vector< metsig::SigInputObj > &EventVec)
const double significance(double &met_r, double &met_phi, double &met_set)
void rotateMatrix(Double_t theta, reco::METCovMatrix &v)
Sin< T >::type sin(const T &t)
const void setSignifMatrix(const reco::METCovMatrix &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 ...
Geom::Theta< T > theta() const
ROOT::Math::SMatrix< double, 2 > METCovMatrix
reco::METCovMatrix signifmatrix_
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 reco::METCovMatrix &input)