ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Met.h
Revision: 1.12
Committed: Wed Mar 18 15:44:32 2009 UTC (16 years, 1 month ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_008
Changes since 1.11: +5 -5 lines
Log Message:
Introduced Double32_t [0,0,14] consistently. Updated class descriptions.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.12 // $Id: Met.h,v 1.11 2009/03/12 15:56:50 bendavid Exp $
3 loizides 1.1 //
4     // Met
5     //
6 loizides 1.9 // Class to store missing transverse energy information.
7 bendavid 1.11 // This is the base class for various specific kinds of met (CaloMet, PFMet, etc.),
8     // but can also be used directly.
9 loizides 1.1 //
10     // Authors: C.Loizides
11     //--------------------------------------------------------------------------------------------------
12    
13 loizides 1.4 #ifndef MITANA_DATATREE_MET_H
14     #define MITANA_DATATREE_MET_H
15 loizides 1.1
16 loizides 1.10 #include "MitAna/DataTree/interface/Types.h"
17 loizides 1.1 #include "MitAna/DataTree/interface/Track.h"
18    
19     namespace mithep
20     {
21     class Met : public Particle
22     {
23     public:
24 loizides 1.9 Met() :
25 bendavid 1.11 fMex(0), fMey(0), fSumEt(0), fElongit(0) { }
26 loizides 1.7 Met(Double_t mex, Double_t mey) :
27 bendavid 1.11 fMex(mex), fMey(mey), fSumEt(0), fElongit(0) { }
28    
29 loizides 1.10 const FArrDouble32 &Dmex() const { return fDmex; }
30     const FArrDouble32 &Dmey() const { return fDmey; }
31     const FArrDouble32 &DSumEt() const { return fDSumEt; }
32     Double_t Elongitudinal() const { return fElongit; }
33 bendavid 1.11 Double_t MetSig() const;
34 loizides 1.10 EObjType ObjType() const { return kMet; }
35     Double_t SumEt() const { return fSumEt; }
36     void PushCorrectionX(Double_t x) { fDmex.Add(x); }
37     void PushCorrectionY(Double_t x) { fDmey.Add(x); }
38     void PushCorrectionSumEt(Double_t x) { fDSumEt.Add(x); }
39     void SetElongitudinal(Double_t x) { fElongit = x; }
40     void SetSumEt(Double_t x) { fSumEt = x; }
41 ksung 1.5
42 loizides 1.2 protected:
43 loizides 1.7 void Clear(Option_t * /*option*/ ="");
44 loizides 1.9 void GetMom() const;
45 loizides 1.7
46 loizides 1.12 Double32_t fMex; //[0,0,14]x-component
47     Double32_t fMey; //[0,0,14]y-component
48     Double32_t fSumEt; //[0,0,14]scalar sum of ET over all objects
49     Double32_t fElongit; //[0,0,14]z-comp. of vector E sum
50 loizides 1.10 FArrDouble32 fDmex; //array of all corr. applied to MEx
51     FArrDouble32 fDmey; //array of all corr. applied to MEy
52     FArrDouble32 fDSumEt; //array of all corr. applied to SumET
53 ksung 1.6
54 loizides 1.9 ClassDef(Met, 1) // Missing transverse energy class
55 loizides 1.1 };
56     }
57 loizides 1.7
58 loizides 1.9 //--------------------------------------------------------------------------------------------------
59 loizides 1.7 inline void mithep::Met::Clear(Option_t *)
60     {
61     // Clear by deleting the std::vectors.
62    
63 loizides 1.10 fDmex.Clear();
64     fDmey.Clear();
65     fDSumEt.Clear();
66 loizides 1.7 }
67    
68 loizides 1.9 //--------------------------------------------------------------------------------------------------
69     inline void mithep::Met::GetMom() const
70     {
71     // Get momentum values from stored values.
72    
73     Double_t pt = TMath::Sqrt(fMex*fMex+fMey*fMey);
74     Double_t phi = TMath::ATan2(fMey,fMex);
75     fCachedMom.SetCoordinates(pt,0,phi,0);
76     }
77 bendavid 1.11
78     //--------------------------------------------------------------------------------------------------
79     inline Double_t mithep::Met::MetSig() const
80     {
81     // Calculate Met Significance
82    
83     if (fSumEt>0.0)
84     return (Et()/TMath::Sqrt(fSumEt));
85     else
86     return -1.0;
87     }
88 loizides 1.1 #endif