ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Met.h
Revision: 1.10
Committed: Mon Mar 2 14:58:17 2009 UTC (16 years, 2 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_008pre1
Changes since 1.9: +80 -80 lines
Log Message:
Met uses FastArray and Double32.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.10 // $Id: Met.h,v 1.9 2009/02/18 15:38:54 loizides Exp $
3 loizides 1.1 //
4     // Met
5     //
6 loizides 1.9 // Class to store missing transverse energy information.
7 loizides 1.1 //
8     // Authors: C.Loizides
9     //--------------------------------------------------------------------------------------------------
10    
11 loizides 1.4 #ifndef MITANA_DATATREE_MET_H
12     #define MITANA_DATATREE_MET_H
13 loizides 1.1
14 loizides 1.10 #include "MitAna/DataTree/interface/Types.h"
15 loizides 1.1 #include "MitAna/DataTree/interface/Track.h"
16    
17     namespace mithep
18     {
19     class Met : public Particle
20     {
21     public:
22 loizides 1.9 Met() :
23 loizides 1.10 fMex(0), fMey(0), fSumEt(0), fMetSig(0), fElongit(0),
24     fMaxEtInEmTowers(0), fMaxEtInHadTowers(0), fEtFractionHadronic(0),
25 loizides 1.9 fEmEtFraction(0), fHadEtInHB(0), fHadEtInHO(0), fHadEtInHE(0), fHadEtInHF(0),
26     fEmEtInEB(0), fEmEtInEE(0), fEmEtInHF(0), fCaloSumEtInpHF(0), fCaloSumEtInmHF(0),
27     fCaloMetInmHF(0), fCaloMetPhiInpHF(0), fCaloMetPhiInmHF(0) { SetClearBit(); }
28 loizides 1.7 Met(Double_t mex, Double_t mey) :
29 loizides 1.10 fMex(mex), fMey(mey), fSumEt(0), fMetSig(0), fElongit(0),
30     fMaxEtInEmTowers(0), fMaxEtInHadTowers(0), fEtFractionHadronic(0),
31 loizides 1.7 fEmEtFraction(0), fHadEtInHB(0), fHadEtInHO(0), fHadEtInHE(0), fHadEtInHF(0),
32     fEmEtInEB(0), fEmEtInEE(0), fEmEtInHF(0), fCaloSumEtInpHF(0), fCaloSumEtInmHF(0),
33     fCaloMetInmHF(0), fCaloMetPhiInpHF(0), fCaloMetPhiInmHF(0) { SetClearBit(); }
34 loizides 1.1
35 loizides 1.10 Double_t CaloSumEtInpHF() const { return fCaloSumEtInpHF; }
36     Double_t CaloSumEtInmHF() const { return fCaloSumEtInmHF; }
37     Double_t CaloMetInpHF() const { return fCaloMetInpHF; }
38     Double_t CaloMetInmHF() const { return fCaloMetInmHF; }
39     Double_t CaloMetPhiInpHF() const { return fCaloMetPhiInpHF; }
40     Double_t CaloMetPhiInmHF() const { return fCaloMetPhiInmHF; }
41     const FArrDouble32 &Dmex() const { return fDmex; }
42     const FArrDouble32 &Dmey() const { return fDmey; }
43     const FArrDouble32 &DSumEt() const { return fDSumEt; }
44     Double_t EmEtFraction() const { return fEmEtFraction; }
45     Double_t EmEtInEB() const { return fEmEtInEB; }
46     Double_t EmEtInEE() const { return fEmEtInEE; }
47     Double_t EmEtInHF() const { return fEmEtInHF; }
48     Double_t Elongitudinal() const { return fElongit; }
49     Double_t EtFractionHadronic() const { return fEtFractionHadronic; }
50     Double_t HadEtInHB() const { return fHadEtInHB; }
51     Double_t HadEtInHO() const { return fHadEtInHO; }
52     Double_t HadEtInHE() const { return fHadEtInHE; }
53     Double_t HadEtInHF() const { return fHadEtInHF; }
54     Double_t MaxEtInEmTowers() const { return fMaxEtInEmTowers; }
55     Double_t MaxEtInHadTowers() const { return fMaxEtInHadTowers; }
56     Double_t MetSig() const { return fMetSig; }
57     EObjType ObjType() const { return kMet; }
58     Double_t SumEt() const { return fSumEt; }
59     void PushCorrectionX(Double_t x) { fDmex.Add(x); }
60     void PushCorrectionY(Double_t x) { fDmey.Add(x); }
61     void PushCorrectionSumEt(Double_t x) { fDSumEt.Add(x); }
62     void SetCaloSumEtInpHF(Double_t x) { fCaloSumEtInpHF = x; }
63     void SetCaloSumEtInmHF(Double_t x) { fCaloSumEtInmHF = x; }
64     void SetCaloMetInpHF(Double_t x) { fCaloMetInpHF = x; }
65     void SetCaloMetInmHF(Double_t x) { fCaloMetInmHF = x; }
66     void SetCaloMetPhiInpHF(Double_t x) { fCaloMetPhiInpHF = x; }
67     void SetCaloMetPhiInmHF(Double_t x) { fCaloMetPhiInmHF = x; }
68     void SetEmEtFraction(Double_t x) { fEmEtFraction = x; }
69     void SetElongitudinal(Double_t x) { fElongit = x; }
70 loizides 1.7 void SetEtFractionHadronic(Double_t x) { fEtFractionHadronic = x; }
71 loizides 1.10 void SetHadEtInHB(Double_t x) { fHadEtInHB = x; }
72     void SetHadEtInHO(Double_t x) { fHadEtInHO = x; }
73     void SetHadEtInHE(Double_t x) { fHadEtInHE = x; }
74     void SetHadEtInHF(Double_t x) { fHadEtInHF = x; }
75     void SetEmEtInEB(Double_t x) { fEmEtInEB = x; }
76     void SetEmEtInEE(Double_t x) { fEmEtInEE = x; }
77     void SetEmEtInHF(Double_t x) { fEmEtInHF = x; }
78     void SetMaxEtInEmTowers(Double_t x) { fMaxEtInEmTowers = x; }
79     void SetMaxEtInHadTowers(Double_t x) { fMaxEtInHadTowers = x; }
80     void SetMetSig(Double_t x) { fMetSig = x; }
81     void SetSumEt(Double_t x) { fSumEt = x; }
82 ksung 1.5
83 loizides 1.2 protected:
84 loizides 1.7 void Clear(Option_t * /*option*/ ="");
85 loizides 1.9 void GetMom() const;
86 loizides 1.7
87 loizides 1.10 Double32_t fMex; //x-component
88     Double32_t fMey; //y-component
89     Double32_t fSumEt; //scalar sum of ET over all objects
90     Double32_t fMetSig; //MET Significance = MET / sqrt(SumET)
91     Double32_t fElongit; //z-comp. of vector E sum over all inputs
92     FArrDouble32 fDmex; //array of all corr. applied to MEx
93     FArrDouble32 fDmey; //array of all corr. applied to MEy
94     FArrDouble32 fDSumEt; //array of all corr. applied to SumET
95     Double32_t fMaxEtInEmTowers; //max ET deposited in ECAL towers
96     Double32_t fMaxEtInHadTowers; //max ET deposited in HCAL towers
97     Double32_t fEtFractionHadronic; //event hadronic scaler ET fraction
98     Double32_t fEmEtFraction; //event em scalar ET fraction
99     Double32_t fHadEtInHB; //event hadronic scalar ET in HB
100     Double32_t fHadEtInHO; //event hadronic scalar ET in HO
101     Double32_t fHadEtInHE; //event hadronic scalar ET in HE
102     Double32_t fHadEtInHF; //event hadronic scalar ET in HF
103     Double32_t fEmEtInEB; //event electromagnetic scalar ET in EB
104     Double32_t fEmEtInEE; //event electromagnetic scalar ET in EE
105     Double32_t fEmEtInHF; //event electromagnetic scalar ET from HF
106     Double32_t fCaloSumEtInpHF; //SumET in HF+
107     Double32_t fCaloSumEtInmHF; //SumET in HF-
108     Double32_t fCaloMetInpHF; //MET in HF+
109     Double32_t fCaloMetInmHF; //MET in HF-
110     Double32_t fCaloMetPhiInpHF; //MET-phi in HF+
111     Double32_t fCaloMetPhiInmHF; //MET-phi in HF-
112 ksung 1.6
113 loizides 1.9 ClassDef(Met, 1) // Missing transverse energy class
114 loizides 1.1 };
115     }
116 loizides 1.7
117 loizides 1.9 //--------------------------------------------------------------------------------------------------
118 loizides 1.7 inline void mithep::Met::Clear(Option_t *)
119     {
120     // Clear by deleting the std::vectors.
121    
122 loizides 1.10 fDmex.Clear();
123     fDmey.Clear();
124     fDSumEt.Clear();
125 loizides 1.7 }
126    
127 loizides 1.9 //--------------------------------------------------------------------------------------------------
128     inline void mithep::Met::GetMom() const
129     {
130     // Get momentum values from stored values.
131    
132     Double_t pt = TMath::Sqrt(fMex*fMex+fMey*fMey);
133     Double_t phi = TMath::ATan2(fMey,fMex);
134     fCachedMom.SetCoordinates(pt,0,phi,0);
135     }
136 loizides 1.1 #endif