ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Utils/src/DiTauSystem.cc
Revision: 1.1
Committed: Tue Oct 14 06:13:55 2008 UTC (16 years, 6 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Error occurred while calculating annotation data.
Log Message:
Start of MitPhysics

File Contents

# Content
1 // $Id: DiTauSystem.cc,v 1.1 2008/10/06 15:57:45 ceballos Exp $
2
3 #include "MitPhysics/Utils/interface/DiTauSystem.h"
4
5 using namespace mithep;
6
7 //--------------------------------------------------------------------------------------------------
8 DiTauSystem::DiTauSystem(ChargedParticle *t1, ChargedParticle *t2, Met *met):
9 fT1(t1),
10 fT2(t2),
11 fMet(met)
12 {
13 init();
14 }
15
16 //--------------------------------------------------------------------------------------------------
17 void DiTauSystem::init()
18 {
19 CompositeParticle *tt = new CompositeParticle();
20 tt->AddDaughter(fT1);
21 tt->AddDaughter(fT2);
22
23 CompositeParticle *higgs = new CompositeParticle();
24 higgs->AddDaughter(fT1);
25 higgs->AddDaughter(fT2);
26 higgs->AddDaughter(fMet);
27
28 double xvar[3];
29 xvar[0] = higgs->Px()*fT2->Py()-higgs->Py()*fT2->Px();
30 xvar[1] = higgs->Py()*fT1->Px()-higgs->Px()*fT1->Py();
31 xvar[2] = fT1->Px()*fT2->Py()-fT1->Py()*fT2->Px();
32
33 for(int i=0; i<2; ++i)
34 xvar[i]==0 ? fXTau[i]=0 : fXTau[i]=xvar[2]/xvar[i];
35
36 fVisMass = tt->Mass();
37 if (fXTau[0] > 0 && fXTau[1] > 0)
38 fRecoMass = fVisMass / sqrt(fXTau[0]*fXTau[1]);
39 else
40 fRecoMass = 0;
41
42 fETll = 0; fETnn = 0; fMT = 0;
43 double visMassS = fVisMass*fVisMass;
44 double ptll = tt->Pt();
45 double ptmis = fMet->Pt();
46
47 if (visMassS>0)
48 {
49 fETll = sqrt( ptll*ptll + visMassS);
50 fETnn = sqrt( ptmis*ptmis + visMassS);
51 fMT = (fETll+fETnn)*(fETll+fETnn)-(ptll+ptmis)*(ptll+ptmis);
52 (fMT > 0) ? fMT=sqrt(fMT) : fMT=0;
53 }
54 }