ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FGolf/tcmet/selections.h
Revision: 1.1
Committed: Sat Dec 5 02:59:03 2009 UTC (15 years, 5 months ago) by fgolf
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Error occurred while calculating annotation data.
Log Message:
looper for studying tcMET in CMSSW_3_1_2

File Contents

# Content
1 #ifndef SELECTION_H
2 #define SELECTION_H
3 #include "TLorentzVector.h"
4 #include "Math/LorentzVector.h"
5 #include <vector>
6 #include <iostream>
7 #include <utility>
8
9 typedef ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<float> > LorentzVector;
10
11 enum TrackAlgorithm { undefAlgorithm=0, ctf=1, rs=2, cosmics=3, iter0=4,
12 iter1=5, iter2=6, iter3=7, iter4=8, iter5=9, iter6=10, iter7=11, iter8=12, iter9=13,iter10=14,
13 outInEcalSeededConv=15, inOutEcalSeededConv=16,
14 nuclInter=17,
15 standAloneMuon=18,globalMuon=19,cosmicStandAloneMuon=20,cosmicGlobalMuon=21,
16 iter1LargeD0=22,iter2LargeD0=23,iter3LargeD0=24,iter4LargeD0=25,iter5LargeD0=26,
17 bTagGhostTracks=27,
18 beamhalo=28,
19 gsf=29,
20 algoSize=30 };
21
22 enum TrackQuality { undefQuality=-1, loose=0, tight=1, highPurity=2, confirmed=3, goodIterative=4, qualitySize=5};
23
24 bool isTrackQuality( int index, int cuts);
25
26 bool inZmassWindow (float mass);
27 bool supertightElectron (int index);
28 bool deltaPhiInElectron (int index);
29 bool goodElectronWithoutIsolation(int index);
30 bool goodElectronWithoutIsolationWithoutd0(int index);
31 bool goodMuonWithoutIsolation(int index);
32 bool passElectronIsolation(int index, bool use_calo_iso);
33 bool passElectronIsolationLoose(int index, bool use_calo_iso);
34 bool passElectronIsolationLoose2(int index, bool use_calo_iso);
35 bool passElectronIsolation_1_6(int index, bool use_calo_iso);
36 bool passElectronIsolationLoose_1_6(int index, bool use_calo_iso);
37 bool passElectronIsolationLoose2_1_6(int index, bool use_calo_iso);
38 bool passMuonIsolation(int index);
39 bool passMuonIsolationLoose(int index);
40 bool goodMuonIsolated(int index);
41 bool goodElectronIsolated(int index, bool use_calo_iso = false);
42 bool goodLooseElectronWithoutIsolation(int index);
43 bool pass2Met(int index, const class TVector3& corr);
44 double nearestDeltaPhi(double Phi, int index);
45 double MetSpecial(double MET, double MetPhi, int index);
46 bool pass4Met(int index, const class TVector3& corr);
47 bool met10(int index, const class TVector3& corr);
48 bool met1(int index, const class TVector3& corr);
49 bool sumEt10(double sumEt);
50 bool sumEt1(double sumEt);
51
52 bool isChargeFlip(int elIndex);
53 //old cuts on conversions
54 bool conversionElectron(int electron);
55 //new conversion stuff...cut on shared fraction of hits implemented
56 //when looking for electron's ctf track
57 bool isconversionElectron09(int elIdx);
58 std::pair<float, float> getConversionInfo(LorentzVector trk1_p4,
59 int trk1_q, float trk1_d0,
60 LorentzVector trk2_p4,
61 int trk2_q, float trk2_d0,
62 float bField);
63
64
65 int numberOfExtraMuons(int i_hyp, bool nonisolated);
66 bool passMuonBVeto_1_6 (int i_dilep, bool soft_nonisolated);
67
68 bool passTriLepVeto (int i_dilep);
69 int tagMuonIdx (int i_dilep);
70 double tagMuonPt (int i_dilep);
71 double tagMuonRelIso (int i_dilep);
72 int additionalZcounter();
73 bool additionalZveto();
74 bool isDYee();
75 bool isDYmm();
76 bool isDYtt();
77 bool isWe();
78 bool isWm();
79 bool isWt();
80 int nTrkJets(int i_hyp);
81 bool passTrkJetVeto(int i_hyp);
82 std::vector<LorentzVector> JPTs(int i_hyp, double etThreshold);
83 unsigned int nJPTs(int i_hyp, double etThreshod);
84 unsigned int nJPTs(int i_hyp); // with default threshold = 20
85 // bool passCaloTrkjetCombo ();
86
87 double mu_rel_iso (int index);
88 double el_rel_iso (int index, bool use_calo_iso);
89 double reliso_lt (int i_hyp, bool use_calo_iso = false);
90 double reliso_ll (int i_hyp, bool use_calo_iso = false);
91
92 int conversionPartner (int i_el);
93 double conversionDeltaPhi (int i_conv, int i_el);
94
95 bool passTrackIsolation(int index);
96 int passTrackZVeto(int hyp_index);
97
98 int getDrellYanType();
99 int getZZType ();
100 void dumpDocLines();
101 int NjetVeto(std::vector<TLorentzVector>& Jet, double min_et);
102 bool trueElectron(int index);
103 bool trueMuon(int index);
104 bool trueMuonFromW(int index);
105 bool trueMuonFromW_WJets(int index);
106 bool trueElectronFromW(int index);
107 bool trueElectronFromW_WJets(int index);
108 //bool isFakeDenominatorElectron(int index);
109 //bool isFakeNumeratorElectron(int index, int type);
110
111 // muon cleaning by ratio of track and global Pt
112 bool muonReconstructionCleaning(int i_hyp, float threshold);
113
114 // new MET factorization
115 bool metSimple (float threshold, const TVector3& corr);
116 bool metBalance (int i_hyp, const TVector3& corr);
117 bool metProjected (int i_hyp, const TVector3& corr);
118 bool pass5Met (int i_hyp, const TVector3& corr);
119 //
120
121
122 bool passLeptonIsolation(int id, int index, bool use_ele_calo_iso);
123 void leptonGenpCount(int& nele, int& nmuon, int& ntau) ;
124 double muonTrkIsolationPAT(int index);
125 double muonCalIsolationPAT(int index);
126 bool electron20Eta2p4(int index);
127 bool looseElectronSelectionNoIsoTTDil08(int index) ;
128 double electronTrkIsolationPAT(int index);
129 double electronCalIsolationPAT(int index);
130 float electronTrkIsolationTTDil08(int index);
131 float electronCalIsolationTTDil08(int index);
132 bool looseElectronSelectionTTDil08(int index) ;
133 bool passElectronIsolationTTDil08(int index);
134 bool muon20Eta2p4(int index);
135 bool looseMuonSelectionNoIsoTTDil08(int index) ;
136 bool lepton20Eta2p4(int id, int index);
137 float muonTrkIsolationTTDil08(int index);
138 float muonCalIsolationTTDil08(int index);
139 float leptonTrkIsolationTTDil08(int id, int index);
140 float leptonCalIsolationTTDil08(int id, int index);
141 bool looseMuonSelectionTTDil08(int index) ;
142 bool passMuonIsolationTTDil08(int index) ;
143 bool passLeptonIsolationTTDil08(int id, int index);
144 bool looseLeptonSelectionNoIsoTTDil08(int id, int index);
145 bool looseLeptonSelectionTTDil08(int id, int index);
146 bool additionalZvetoTTDil08() ;
147 bool haveExtraMuon(int hypIdx);
148 bool haveExtraMuon5(int hypIdx);
149 bool passTriggersMu9orLisoE15(int dilType) ;
150 bool passTriggersTTDil08JanTrial(int dilType) ;
151 int genpCountPDGId(int id0, int id1=-1, int id2=-1);
152 int genpCountPDGId_Pt20h24(int id0, int id1=-1, int id2=-1);
153 int genpDileptonType();
154 int eventDilIndexByWeightTTDil08(const std::vector<unsigned int>& goodHyps, int& strasbourgDilType, bool printDebug = false,
155 bool usePtOnlyForWeighting = false);
156
157 // SUSY Dilepton group cuts (VJets09)
158
159 double inv_mu_rel_iso(int index);
160 double inv_el_rel_iso(int index, bool use_calo_iso);
161 bool passMuonIsolationVJets09(int index);
162 bool passElectronIsolationVJets09(int index, bool use_calo_iso);
163 bool passLeptonIsolationVJets09(int id, int index);
164 bool looseElectronSelectionVJets09(int index);
165 bool looseMuonSelectionVJets09(int index);
166 bool passLeptonIDVJets09(int id, int index);
167 bool passMetVJets09(float value, bool useTcMet);
168 int numberOfExtraMuonsVJets09(int i_hyp);
169 int numberOfExtraElectronsVJets09(int i_hyp);
170
171 //SUSY dilepton selection TAS group
172
173 bool comparePt(const LorentzVector &lv1,
174 const LorentzVector &lv2);
175 bool GoodSusyElectronWithoutIsolation(int index);
176 bool GoodSusyElectronWithoutIsolationNoD0(int index);
177 bool GoodSusyElectronWithIsolationLoose(int index, bool use_calo_iso);
178 bool PassSusyElectronIsolationLoose(int index, bool use_calo_iso);
179 bool GoodSusyMuonWithIsolation(int index);
180 bool GoodSusyMuonWithoutIsolation(int index);
181 double inv_mu_relsusy_iso(int index);
182 double inv_el_relsusy_iso(int index, bool use_calo_iso);
183 bool GoodSusyElectronWithIsolation(int index, bool use_calo_iso);
184 bool GoodSusyLeptonWithIsolation(int id, int index);
185 bool GoodSusyLeptonID(int id, int index);
186 bool PassSusyMuonIsolation(int index);
187 bool PassSusyElectronIsolation(int index, bool use_calo_iso);
188 bool PassSusyLeptonIsolation(int id, int index);
189 bool GoodSusyLeptonID(int id, int index);
190 bool GoodSusyTrigger(int dilType);
191 int numberOfExtraElectronsSUSY(int i_hyp);
192 int numberOfExtraMuonsSUSY(int i_hyp);
193 std::vector<LorentzVector> getCaloJets(int i_hyp);
194 std::vector<LorentzVector> getJPTJets(int i_hyp);
195 int ttbarconstituents(int i_hyp);
196 bool additionalZvetoSUSY09(int i_hyp);
197 bool idIsBeauty(int id);
198 bool idIsCharm(int id);
199 int leptonIsFromW(int idx, int id, LorentzVector v);
200 bool isFakeableElSUSY09(int iEl);
201 bool isFakeableMuSUSY09(int iMu);
202 bool isNumElSUSY09(int iEl);
203 bool isNumMuSUSY09(int iMu);
204
205 //TTDil08 fake rate functions
206 bool isNumElTTDil08(int iEl);
207 bool isFakeableElTTDil08(int iEl);
208 bool isNumMuTTDil08(int iMu);
209 bool isFakeableMuTTDil08(int iMu);
210
211 bool trueGammaFromMuon(int electron);
212
213 int findPrimTrilepZ(int i_hyp, double &mass);
214 bool vetoAddZ(int i_hyp, int unusedLepton, double &mass);
215 std::vector<LorentzVector> JPTsTrilep(int i_hyp, double etThreshold);
216 unsigned int nJPTsTrilep(int i_hyp, double etThreshold);
217 double nearestDeltaPhiTrilep(double Phi, int i_hyp);
218 double nearestDeltaPhiJet(double Phi, int i_hyp);
219 double MetSpecialTrilep(double MET, double MetPhi, int index);
220 #endif