1 |
klute |
1.8 |
// $Id: DiTauSystem.cc,v 1.7 2009/07/20 04:55:33 loizides Exp $
|
2 |
loizides |
1.1 |
|
3 |
|
|
#include "MitPhysics/Utils/interface/DiTauSystem.h"
|
4 |
klute |
1.8 |
#include "MitCommon/MathTools/interface/MathUtils.h"
|
5 |
loizides |
1.2 |
#include "MitAna/DataTree/interface/CompositeParticle.h"
|
6 |
|
|
#include "MitAna/DataTree/interface/Met.h"
|
7 |
ceballos |
1.5 |
#include "MitAna/DataTree/interface/Particle.h"
|
8 |
loizides |
1.1 |
|
9 |
loizides |
1.7 |
ClassImp(mithep::DiTauSystem)
|
10 |
|
|
|
11 |
loizides |
1.1 |
using namespace mithep;
|
12 |
|
|
|
13 |
|
|
//--------------------------------------------------------------------------------------------------
|
14 |
loizides |
1.6 |
DiTauSystem::DiTauSystem(const Particle *t1, const Particle *t2, const Met *met) :
|
15 |
loizides |
1.1 |
fT1(t1),
|
16 |
|
|
fT2(t2),
|
17 |
loizides |
1.2 |
fMet(met),
|
18 |
|
|
fRecoMass(0),
|
19 |
|
|
fVisMass(0),
|
20 |
|
|
fMT(0),
|
21 |
|
|
fETll(0),
|
22 |
|
|
fETnn(0)
|
23 |
loizides |
1.1 |
{
|
24 |
loizides |
1.2 |
// Constructor.
|
25 |
|
|
|
26 |
|
|
Init();
|
27 |
loizides |
1.1 |
}
|
28 |
|
|
|
29 |
|
|
//--------------------------------------------------------------------------------------------------
|
30 |
loizides |
1.2 |
void DiTauSystem::Init()
|
31 |
loizides |
1.1 |
{
|
32 |
loizides |
1.2 |
// Calculate the kinematical variables.
|
33 |
|
|
|
34 |
|
|
CompositeParticle tt;
|
35 |
|
|
tt.AddDaughter(fT1);
|
36 |
|
|
tt.AddDaughter(fT2);
|
37 |
|
|
|
38 |
|
|
CompositeParticle higgs;
|
39 |
|
|
higgs.AddDaughter(fT1);
|
40 |
|
|
higgs.AddDaughter(fT2);
|
41 |
|
|
higgs.AddDaughter(fMet);
|
42 |
|
|
|
43 |
|
|
Double_t xvar[3];
|
44 |
|
|
xvar[0] = higgs.Px()*fT2->Py()-higgs.Py()*fT2->Px();
|
45 |
|
|
xvar[1] = higgs.Py()*fT1->Px()-higgs.Px()*fT1->Py();
|
46 |
loizides |
1.1 |
xvar[2] = fT1->Px()*fT2->Py()-fT1->Py()*fT2->Px();
|
47 |
|
|
|
48 |
loizides |
1.2 |
for (Int_t i=0; i<2; ++i)
|
49 |
loizides |
1.1 |
xvar[i]==0 ? fXTau[i]=0 : fXTau[i]=xvar[2]/xvar[i];
|
50 |
|
|
|
51 |
loizides |
1.2 |
fVisMass = tt.Mass();
|
52 |
loizides |
1.1 |
if (fXTau[0] > 0 && fXTau[1] > 0)
|
53 |
loizides |
1.2 |
fRecoMass = fVisMass / TMath::Sqrt(fXTau[0]*fXTau[1]);
|
54 |
loizides |
1.1 |
else
|
55 |
|
|
fRecoMass = 0;
|
56 |
|
|
|
57 |
loizides |
1.2 |
Double_t visMassS = fVisMass*fVisMass;
|
58 |
|
|
Double_t ptll = tt.Pt();
|
59 |
|
|
Double_t ptmis = fMet->Pt();
|
60 |
|
|
if (visMassS > 0) {
|
61 |
|
|
fETll = TMath::Sqrt(ptll*ptll + visMassS);
|
62 |
|
|
fETnn = TMath::Sqrt(ptmis*ptmis + visMassS);
|
63 |
|
|
fMT = (fETll+fETnn)*(fETll+fETnn)-(ptll+ptmis)*(ptll+ptmis);
|
64 |
|
|
(fMT > 0) ? fMT=TMath::Sqrt(fMT) : fMT=0;
|
65 |
|
|
}
|
66 |
klute |
1.8 |
|
67 |
|
|
Double_t phi1 = fT1->Phi();
|
68 |
|
|
Double_t phi2 = fT2->Phi();
|
69 |
|
|
Double_t dphi = MathUtils::DeltaPhi(phi1, phi2);
|
70 |
|
|
Double_t dphiHalf = dphi/2.;
|
71 |
|
|
Double_t projPhi = 0;
|
72 |
|
|
if ( phi1 > phi2 )
|
73 |
|
|
if ( phi1 - phi2 < TMath::Pi() )
|
74 |
|
|
projPhi = phi1 - dphiHalf;
|
75 |
|
|
else
|
76 |
|
|
projPhi = phi1 + dphiHalf;
|
77 |
|
|
else
|
78 |
|
|
if ( phi2 - phi1 < TMath::Pi() )
|
79 |
|
|
projPhi = phi2 - dphiHalf;
|
80 |
|
|
else
|
81 |
|
|
projPhi = phi2 + dphiHalf;
|
82 |
|
|
|
83 |
|
|
Double_t projX = cos(projPhi);
|
84 |
|
|
Double_t projY = sin(projPhi);
|
85 |
|
|
|
86 |
|
|
fProj = higgs.Px()*projX + higgs.Py()*projY;
|
87 |
|
|
fProjVis = tt.Px()*projX + tt.Py()*projY;
|
88 |
|
|
fProjMet = fMet->Px()*projX + fMet->Py()*projY;
|
89 |
|
|
fProjPhi = projPhi;
|
90 |
|
|
fHt = fMet->Pt()+ fT1->Pt() + fT2->Pt();
|
91 |
|
|
|
92 |
loizides |
1.1 |
}
|