ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/LJMet/MultivariateAnalysis/interface/LJetsTopoVars.h
Revision: 1.1
Committed: Tue Nov 11 23:01:21 2008 UTC (16 years, 5 months ago) by kukartse
Content type: text/plain
Branch: MAIN
CVS Tags: gak022309, gak021209, gak040209, gak012809, V00-01-09, V00-01-08, V00-01-07, V00-01-06, V00-01-05, V00-01-04, V00-00-07, V00-00-06, V00-00-05, V00-00-04, V00-01-03, V00-00-02, V00-00-01
Log Message:
initial creation of a package for LJMET multivariate analysis

File Contents

# User Rev Content
1 kukartse 1.1 /***
2    
3     Adopted from the D0 framework,
4     used to use event.get("caf_util::MET", met), etc, so needs something like METSelector to run upstream
5    
6     ***/
7    
8     #ifndef LJETSTOPOVARS
9     #define LJETSTOPOVARS
10    
11     #include <string>
12     #include <vector>
13     #include "FWCore/Framework/interface/Event.h"
14     #include "LJMet/MultivariateAnalysis/interface/TMBLorentzVector.h"
15     //#include "cafe/Event.hpp"
16     #include "TVectorD.h"
17    
18    
19     class LJetsTopoVars
20     {
21     public:
22     LJetsTopoVars(std::string jets, std::string met, std::string lepton, bool isMuon)
23     :m_jetBranch(jets),
24     m_metBranch(met),
25     m_leptonBranch(lepton),
26     m_isMuon(isMuon),
27    
28    
29     //_electron(NULL),
30     //_muon( NULL),
31    
32     _ht( std::vector<double>(22, 0.) ),
33     _htOK( false),
34     _evtTopo( std::vector<double>( 3, 0.) ),
35     _evtTopoOK( false),
36     _kt( std::vector<double>( 3, 0.) ),
37     _ktOK( false),
38     _mt( std::vector<double>( 2, 0.) ),
39     _mtOK( false)
40     {};
41    
42     //void setEvent(const cafe::Event& event);
43     void setEvent(const edm::Event& event);
44    
45     double aplanarity() const;
46     double centrality() const;
47     double sphericity() const;
48     double ht() const;
49     double htpluslepton() const;
50     double methtpluslepton() const;
51     double h() const;
52     double ktMinPrime() const;
53     double dphiLepMet() const;
54     double minDijetMass() const;
55     double maxJetEta() const;
56     double Et3() const;
57     double minDijetDeltaR() const;
58     double LeptonJet_DeltaR(); //btw lepton and leading 2 jet, minimum
59     double Jet1Jet2_DeltaR();
60     double Jet1Jet2_DeltaPhi();
61     double Jet1Jet2_M();
62     double Jet1Jet2_Pt();
63     double Jet1Jet2W_M();
64     double Jet1Jet2W_Pt();
65    
66     double Hz(); //scalar sum of longitudinal energies of first four jets, the muon, and the neutrino
67     double HT2(); //scalar sum of transverse energies of the 2nd, 3rd, and 4th jets
68     double HT2prime(); //HT2/Hz
69     double W_MT(); //W transverse mass
70     double W_M(); //W mass
71     double W_Pt(); //W
72     double DphiJMET(); //Delta phi btw leading jet and MET
73    
74     //muon only (throws exception if not)
75     double Muon_DeltaR(); //btw muon and jet, minimum
76     double Muon_etHaloScaled(); //TMBMuon::etHalo()/pT
77     double Muon_etTrkConeScaled(); //TMBMuon::etTrkCone()/pT
78    
79     //electron only (throws exception if not)
80     double Electron_iso(); //TMBEMCluster::iso()
81     double Electron_lhood(); //TMBEMCluster::Lhood8(); is this right?
82    
83     // Ht
84     double getHt() {if(!_htOK) calcHt(); return _ht[ 0];}
85     double getHtp() {if(!_htOK) calcHt(); return _ht[ 1];}
86     double getHtpp() {if(!_htOK) calcHt(); return _ht[ 2];}
87     double getHt2() {if(!_htOK) calcHt(); return _ht[ 3];}
88     double getHt2p() {if(!_htOK) calcHt(); return _ht[ 4];}
89     double getHt2pp() {if(!_htOK) calcHt(); return _ht[ 5];}
90     double getHt3() {if(!_htOK) calcHt(); return _ht[ 6];}
91     double getHt3p() {if(!_htOK) calcHt(); return _ht[ 7];}
92     double getHt3pp() {if(!_htOK) calcHt(); return _ht[ 8];}
93     double getCen() {if(!_htOK) calcHt(); return _ht[ 9];}
94     double getNJW() {if(!_htOK) calcHt(); return _ht[10];}
95     double getJetEtaMax() {if(!_htOK) calcHt(); return _ht[11];}
96     double getMdijetMin() {if(!_htOK) calcHt(); return _ht[12];}
97     double getMtjets() {if(!_htOK) calcHt(); return _ht[13];}
98     double getSqrtsT() {if(!_htOK) calcHt(); return _ht[14];}
99     double getMtAurelio() {if(!_htOK) calcHt(); return _ht[15];}
100     double getPzOverHT() {if(!_htOK) calcHt(); return _ht[16];}
101     double getMevent() {if(!_htOK) calcHt(); return _ht[17];}
102     double getM123inv() {if(!_htOK) calcHt(); return _ht[18];}
103     double getEta2Sum() {if(!_htOK) calcHt(); return _ht[19];}
104     double getMwRec() {if(!_htOK) calcHt(); return _ht[20];}
105     double getH() {if(!_htOK) calcHt(); return _ht[21];}
106    
107     // event topo
108     double getSph() {if(!_evtTopoOK) calcEvtTopo(); return _evtTopo[0];}
109     double getApl() {if(!_evtTopoOK) calcEvtTopo(); return _evtTopo[1];}
110     double getAplMu() {if(!_evtTopoOK) calcEvtTopo(); return _evtTopo[2];}
111    
112     // Kt
113     double getKtminp() {if(!_ktOK) calcKt(); return _kt[0];}
114     double getKtminpReduced() {if(!_ktOK) calcKt(); return _kt[1];}
115     double getDrMinJetJet() {if(!_ktOK) calcKt(); return _kt[2];}
116    
117     // mT
118     double getDphiMuMet() {if(!_mtOK) calcMt(); return _mt[0];}
119     double getMt() {if(!_mtOK) calcMt(); return _mt[1];}
120    
121     // Momentum tensor eigenvalues
122     TVectorD getEigen() {if(!_evtTopoOK) calcEvtTopo(); return eigenval;}
123    
124     // Neutrino
125     TMBLorentzVector GetNeutrino() {return _neutrino;}
126    
127     private:
128     std::string m_jetBranch, m_metBranch, m_leptonBranch;
129     std::vector<TMBLorentzVector> m_jets;
130     TMBLorentzVector m_met;
131     TMBLorentzVector m_lepton;
132    
133     TVectorD eigenval;
134    
135     bool m_isMuon;
136    
137     /***** removed temporarily
138     const TMBEMCluster* _electron;
139     const TMBMuon* _muon;
140     *****/
141    
142     //std::vector<TheJetClass*> _jetRAW;
143     //std::vector<TLorentzVector> _jet;
144     //TLorentzVector _lepton;
145     //TLorentzVector _neutrino;
146     TMBLorentzVector _neutrino;
147    
148     void calcHt();
149     std::vector<double> _ht;
150     bool _htOK;
151    
152     void calcEvtTopo();
153     std::vector<double> _evtTopo;
154     bool _evtTopoOK;
155    
156     void calcKt();
157     std::vector<double> _kt;
158     bool _ktOK;
159    
160     void calcMt();
161     std::vector<double> _mt;
162     bool _mtOK;
163     };
164    
165     #endif //LJETSTOPOVARS