ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/src/DiTauSystem.cc
Revision: 1.7
Committed: Mon Jul 20 04:55:33 2009 UTC (15 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a, Mit_011, Mit_010a, Mit_010
Changes since 1.6: +3 -1 lines
Log Message:
Changes for docu

File Contents

# Content
1 // $Id: DiTauSystem.cc,v 1.6 2009/01/20 10:28:36 loizides Exp $
2
3 #include "MitPhysics/Utils/interface/DiTauSystem.h"
4 #include "MitAna/DataTree/interface/CompositeParticle.h"
5 #include "MitAna/DataTree/interface/Met.h"
6 #include "MitAna/DataTree/interface/Particle.h"
7
8 ClassImp(mithep::DiTauSystem)
9
10 using namespace mithep;
11
12 //--------------------------------------------------------------------------------------------------
13 DiTauSystem::DiTauSystem(const Particle *t1, const Particle *t2, const Met *met) :
14 fT1(t1),
15 fT2(t2),
16 fMet(met),
17 fRecoMass(0),
18 fVisMass(0),
19 fMT(0),
20 fETll(0),
21 fETnn(0)
22 {
23 // Constructor.
24
25 Init();
26 }
27
28 //--------------------------------------------------------------------------------------------------
29 void DiTauSystem::Init()
30 {
31 // Calculate the kinematical variables.
32
33 CompositeParticle tt;
34 tt.AddDaughter(fT1);
35 tt.AddDaughter(fT2);
36
37 CompositeParticle higgs;
38 higgs.AddDaughter(fT1);
39 higgs.AddDaughter(fT2);
40 higgs.AddDaughter(fMet);
41
42 Double_t xvar[3];
43 xvar[0] = higgs.Px()*fT2->Py()-higgs.Py()*fT2->Px();
44 xvar[1] = higgs.Py()*fT1->Px()-higgs.Px()*fT1->Py();
45 xvar[2] = fT1->Px()*fT2->Py()-fT1->Py()*fT2->Px();
46
47 for (Int_t i=0; i<2; ++i)
48 xvar[i]==0 ? fXTau[i]=0 : fXTau[i]=xvar[2]/xvar[i];
49
50 fVisMass = tt.Mass();
51 if (fXTau[0] > 0 && fXTau[1] > 0)
52 fRecoMass = fVisMass / TMath::Sqrt(fXTau[0]*fXTau[1]);
53 else
54 fRecoMass = 0;
55
56 Double_t visMassS = fVisMass*fVisMass;
57 Double_t ptll = tt.Pt();
58 Double_t ptmis = fMet->Pt();
59 if (visMassS > 0) {
60 fETll = TMath::Sqrt(ptll*ptll + visMassS);
61 fETnn = TMath::Sqrt(ptmis*ptmis + visMassS);
62 fMT = (fETll+fETnn)*(fETll+fETnn)-(ptll+ptmis)*(ptll+ptmis);
63 (fMT > 0) ? fMT=TMath::Sqrt(fMT) : fMT=0;
64 }
65 }