28 double missingET_ET = met->MET;
29 double missingET_Phi = met->Phi;
30 double missingET_Ex = missingET_ET*cos(missingET_Phi);
31 double missingET_Ey = missingET_ET*sin(missingET_Phi);
34 double deltaPT = 20.0;
36 double x = rand() /(RAND_MAX+1.);
37 double y = rand() /(RAND_MAX+1.);
38 double uni_gauss = sqrt(-2.*log(x))*cos(2.*3.1415*y);
39 double uni_normal = rand() / (RAND_MAX+1.);
41 double smear_x = deltaPT*uni_gauss*cos(2.*3.1415*uni_normal);
42 double smear_y = deltaPT*uni_gauss*sin(2.*3.1415*uni_normal);
44 double new_ET = sqrt(pow(missingET_Ex+smear_x, 2)+pow(missingET_Ey+smear_y, 2));
45 content.SetPxPyPzE(missingET_Ex+smear_x, missingET_Ey+smear_y, 0, new_ET);
59 TLorentzVector sum = TLorentzVector(0,0,0,0);
60 for(
int i = 0; i < muons.size(); i++)
61 sum += muons[i]->
P4();
63 double new_ET = sqrt(pow(content.Px()-sum.Px(), 2)+pow(content.Py()-sum.Py(), 2));
64 content.SetPxPyPzE(content.Px()-sum.Px(), content.Py()-sum.Py(), 0, new_ET);
73 TLorentzVector
P4() {
return content; }
76 TLorentzVector content;
ETMiss(MissingET *met)
Constructor.
TLorentzVector P4()
Returns a TLorentzVector object to the full 4 momentum.
Float_t PT
Transverse momentum.
Float_t Eta
Pseudorapidity.
void addMuons(std::vector< Muon * > muons)
Add muons to missingET calculation.
A class to parametrise missingET.