ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Met.h
Revision: 1.8
Committed: Tue Dec 9 17:47:00 2008 UTC (16 years, 4 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_006b, Mit_006a
Changes since 1.7: +38 -37 lines
Log Message:
Added ObjType to retrieve type of object.

File Contents

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