ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/src/DiTauSystem.cc
Revision: 1.3
Committed: Fri Dec 5 09:35:01 2008 UTC (16 years, 5 months ago) by ceballos
Content type: text/plain
Branch: MAIN
Changes since 1.2: +3 -2 lines
Log Message:
Changes from Constantin broke everything, as expected :-)

File Contents

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