ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/interface/VHbbNameSpace.h
(Generate patch)

Comparing UserCode/VHbb/interface/VHbbNameSpace.h (file contents):
Revision 1.3 by bortigno, Thu Jan 10 14:21:00 2013 UTC vs.
Revision 1.4 by nmohr, Tue Jan 15 13:01:10 2013 UTC

# Line 71 | Line 71 | namespace VHbb {
71  
72  
73    }
74 +  
75 +  double ANGLELZ(double pt, double eta, double phi, double mass, double pt2, double eta2, double phi2, double mass2){
76 +  TLorentzVector m1, m2, msum;
77 +  m1.SetPtEtaPhiM(pt, eta, phi, mass);
78 +  m2.SetPtEtaPhiM(pt2, eta2, phi2, mass2);
79 +  msum = m1 + m2;
80 +
81 +  TVector3 bZ =  msum.BoostVector();
82 +
83 +  m1.Boost(-bZ);  
84 +  m2.Boost(-bZ);  
85 +
86 +  TVector3 b1;
87 +
88 +
89 +  if((int) (pt) % 2 == 0)
90 +    b1 =  m1.BoostVector();
91 +  else
92 +    b1 =  m2.BoostVector();
93 +
94 + float cosTheta = b1.Dot(msum.BoostVector()) / (b1.Mag()*msum.BoostVector().Mag());
95 + return(cosTheta);
96 +  }
97 +
98 +
99 +   double ANGLEHB(double pt, double eta, double phi, double e, double pt2, double eta2, double phi2, double e2){
100 + TLorentzVector m1, m2, msum;
101 + m1.SetPtEtaPhiE(pt, eta, phi, e);
102 + m2.SetPtEtaPhiE(pt2, eta2, phi2, e2);
103 + msum = m1 + m2;
104 +
105 + TVector3 bZ =  msum.BoostVector();
106 +
107 + m1.Boost(-bZ);
108 + m2.Boost(-bZ);  
109 +
110 + TVector3 b1;
111 +
112 +  if((int) (pt) % 2 == 0)
113 +    b1 =  m1.BoostVector();
114 +  else
115 +    b1 =  m2.BoostVector();
116 +
117 + float cosTheta = b1.Dot(msum.BoostVector()) / (b1.Mag()*msum.BoostVector().Mag());
118 + return(cosTheta);
119 +   }
120 +
121  
122  
123   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines