ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/dhidas/OSUAnalysis/Tools/interface/TopPairEventCandidate.h
Revision: 1.1.1.1 (vendor branch)
Committed: Thu Dec 1 16:28:48 2011 UTC (13 years, 5 months ago) by dhidas
Content type: text/plain
Branch: dhidas, MAIN
CVS Tags: START, HEAD
Changes since 1.1: +0 -0 lines
Log Message:
osu copy modified

File Contents

# Content
1 /*
2 * TopPairEventCandidate.h
3 *
4 * Created on: 9 Jul 2010
5 * Author: kreczko
6 */
7
8 #ifndef TOPPAIREVENTCANDIDATE_H_
9 #define TOPPAIREVENTCANDIDATE_H_
10
11 #include <boost/shared_ptr.hpp>
12
13 #include "Event.h"
14 #include "ReconstructionRules/BasicRule.h"
15 #include "RecoObjects/Particle.h"
16 #include "RecoObjects/Lepton.h"
17 #include "RecoObjects/Jet.h"
18 #include "Taggers/ConversionTagger.h"
19 #include "TtbarHypothesis.h"
20
21 namespace BAT {
22
23 namespace NeutrinoSelectionCriterion {
24 enum value {
25 pzClosestToLepton,
26 mostCentral,
27 pzClosestToLeptonOrMostcentralIfAbove300,
28 largestValueOfCosine,
29 chi2,
30 TopMassDifference
31 };
32 }
33
34 namespace TTbarReconstructionCriterion {
35 enum value {
36 TopMassDifference,
37 chi2
38 };
39 }
40
41 namespace TTbarEPlusJetsSelection {
42 enum Step {
43 FilterOutScraping,
44 HighLevelTrigger,
45 GoodPrimaryvertex,
46 OneIsolatedElectron,
47 LooseMuonVeto,
48 Zveto,
49 ConversionRejection,
50 ConversionFinder,
51 AtLeastOneGoodJets,
52 AtLeastTwoGoodJets,
53 AtLeastThreeGoodJets,
54 AtLeastFourGoodJets,
55 MissingTransverseEnergy,
56 AsymmetricJetCuts,
57 AtLeastOneBtag,
58 AtLeastTwoBtags,
59 NUMBER_OF_SELECTION_STEPS
60 };
61
62 const std::string StringSteps[NUMBER_OF_SELECTION_STEPS] = {
63 "Scraping Filter",
64 "High Level Trigger",
65 "good primary vertex",
66 "exactly one isolated electron",
67 "loose muon veto",
68 "Z veto",
69 "Conversion veto (missing hits)",
70 "Conversion finder (partner track)",
71 ">= 1 jets",
72 ">= 2 jets",
73 ">= 3 jets",
74 ">= 4 jets",
75 "MET > 20GeV",
76 "jet pT: 1st > 70 GeV, 2nd > 50 GeV",
77 ">=1 SSV b-tag",
78 ">=2 SSV b-tag"
79
80 };
81 }
82
83 struct ReconstructionException: public std::exception {
84 TString msg;
85 ReconstructionException(TString message) :
86 msg(message) {
87 }
88 ~ReconstructionException() throw () {
89 }
90
91 const char* what() const throw () {
92 return msg;
93 }
94 };
95
96 class TopPairEventCandidate: public Event {
97
98 protected:
99 static const double pdgWmass;
100 static const double wMassWidth;
101 static const double pdgTopMass;
102 static const double topMassWidth;
103
104 // The following are obsolete and are only retained in
105 // case the old ttbar code might be useful during
106 // testing.
107 static const double W_mass;
108 static const double matched_leptonic_top_mass;
109 static const double matched_leptonic_top_mass_sigma;
110 static const double matched_hadronic_W_mass;
111 static const double matched_hadronic_W_mass_sigma;
112 static const double matched_hadronic_top_mass;
113 static const double matched_hadronic_top_mass_sigma;
114 static const double matched_angle;
115 static const double matched_angle_sigma;
116 static const double matched_ptratio;
117 static const double matched_ptratio_sigma;
118 static const double matched_pt_ttbarSystem;
119 static const double matched_pt_ttbarSystem_sigma;
120 static const double matched_HTSystem;
121 static const double matched_HTSystem_sigma;
122
123 // ElectronPointer electronFromW;
124 LeptonPointer leptonFromW;
125 JetPointer leptonicBJet, hadronicBJet, jet1FromW, jet2FromW;
126 ParticlePointer neutrino1, neutrino2, leptonicW1, leptonicW2, hadronicW, leptonicTop1, leptonicTop2, hadronicTop,
127 ttbarResonance;
128 public:
129 unsigned short selectedNeutrino, currentSelectedNeutrino, hadronicBIndex, leptonicBIndex, jet1FromWIndex,
130 jet2FromWIndex;
131 virtual bool isReconstructed(void) const { return doneReconstruction; }
132
133 protected:
134 bool doneReconstruction;
135 ConversionTaggerPointer conversionTagger;
136 bool doneConversionTagging;
137 std::vector<TtbarHypothesisPointer> solutions;
138 compare_totalChi2 compareSolutions;
139 public:
140 static NeutrinoSelectionCriterion::value usedNeutrinoSelection;
141 static TTbarReconstructionCriterion::value usedTTbarReconstruction;
142 TopPairEventCandidate();
143 TopPairEventCandidate(const Event& event);
144 virtual ~TopPairEventCandidate();
145
146 virtual const JetPointer getLeptonicBJet() const;
147 virtual const JetPointer getHadronicBJet() const;
148 virtual const JetPointer getJet1FromHadronicW() const;
149 virtual const JetPointer getJet2FromHadronicW() const;
150 virtual const LeptonPointer getLeptonFromWDecay() const;
151 virtual const ParticlePointer getNeutrinoFromWDecay() const;
152 virtual const ParticlePointer getLeptonicW() const;
153 virtual const ParticlePointer getHadronicW() const;
154 virtual const ParticlePointer getLeptonicTop() const;
155 virtual const ParticlePointer getHadronicTop() const;
156 virtual const ParticlePointer getResonance() const;
157
158 virtual bool passesSelectionStep(TTbarEPlusJetsSelection::Step step) const;
159 virtual bool passesSelectionStepUpTo(TTbarEPlusJetsSelection::Step upToStep) const;
160 virtual bool passesNMinus1(TTbarEPlusJetsSelection::Step omittedStep) const;
161 virtual bool passesRelIsoSelection() const;
162 virtual bool passesRelIsoControlSelection() const;
163 virtual bool passesPFIsoSelection() const;
164 virtual bool passesPFIsoControlSelection() const;
165 virtual bool passesAntiIsolationSelection() const;
166
167 virtual bool passesConversionSelection() const;
168
169 virtual bool passesScrapingFilter() const;
170 virtual bool passesHighLevelTrigger() const;
171 virtual bool hasOneGoodPrimaryVertex() const;
172 virtual bool hasOnlyOneGoodIsolatedElectron() const;
173 virtual bool isolatedElectronDoesNotComeFromConversion() const;
174 virtual bool isolatedElectronNotTaggedAsFromConversion() const;
175 virtual bool hasNoIsolatedMuon() const;
176
177 virtual bool hasAtLeastOneGoodJet() const;
178 virtual bool hasAtLeastTwoGoodJets() const;
179 virtual bool hasAtLeastThreeGoodJets() const;
180 virtual bool hasAtLeastFourGoodJets() const;
181
182 virtual bool isNotAZBosonEvent() const;
183 virtual bool passesFullTTbarEPlusJetSelection() const;
184 // virtual bool hasIsolatedElectronInBarrelRegion() const;
185
186 virtual bool passesMETCut() const;
187 virtual bool passesAsymmetricJetCuts() const;
188 virtual bool hasAtLeastOneBtag() const;
189 virtual bool hasAtLeastTwoBtags() const;
190
191 virtual void reconstructTTbar(LeptonPointer lepton);
192 // virtual void reconstructUsingSubjets();
193 // virtual void reconstructUsingMCTruth();
194 void reconstruct(const Rule rule, const LeptonPointer lepton);
195
196 virtual double calculateTopMassDifference(unsigned short neutrinoSolution) const;
197 virtual double getLeptonicChi2(unsigned short neutrinoSolution) const;
198 virtual double getLeptonicChi2(double topMass, double angle) const;
199 virtual double getHadronicChi2() const;
200 virtual double getGlobalChi2(unsigned short neutrinoSolution) const;
201 virtual double getTotalChi2(unsigned short neutrinoSolution) const;
202 virtual double getTotalChi2();
203
204 virtual double M3() const;
205 virtual double mttbar() const;
206 virtual double sumPt() const;
207 virtual double HT(unsigned short jetLimit) const;
208 virtual double fullHT() const;
209 virtual double transverseWmass(const LeptonPointer lepton) const;
210 virtual double HTSystem() const;
211 virtual double PtRatio() const;
212 virtual double PtTtbarSystem(unsigned short neutrinoSolution) const;
213 virtual const boost::array<double, 2> computeNeutrinoPz();
214 virtual void reconstructNeutrinos();
215 // virtual bool hasNextJetCombination();
216 // virtual void selectNextJetCombination();
217 virtual void inspectReconstructedEvent() const;
218 // virtual unsigned int NJet() const;
219 virtual const std::vector<TtbarHypothesisPointer>& Solutions() const;
220
221 protected:
222 void throwExpeptionIfNotReconstructed(TString location = "") const;
223 virtual void selectNeutrinoSolution();
224 virtual void fillHypotheses();
225 virtual const TtbarHypothesisPointer fillHypothesis(unsigned short int neutrinoSolution);
226
227 };
228
229 }
230
231 #endif /* TOPPAIREVENTCANDIDATE_H_ */