ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/LJMet/MultivariateAnalysis/interface/LJetsTopoVars.h
Revision: 1.2
Committed: Tue Feb 24 23:33:21 2009 UTC (16 years, 2 months ago) by kukartse
Content type: text/plain
Branch: MAIN
CVS Tags: gak011410, gak010310, ejterm2010_25nov2009, V00-02-01, V00-02-00, gak112409, CMSSW_22X_branch_base, segala101609, V00-01-15, V00-01-14, V00-01-13, V00-01-12, V00-01-11, V00-01-10, gak031009, gak030509
Branch point for: CMSSW_22X_branch
Changes since 1.1: +3 -2 lines
Log Message:
*** empty log message ***

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