00001
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/RivetAIDA.hh"
00004 #include "Rivet/Tools/Logging.hh"
00005 #include "Rivet/Projections/FinalState.hh"
00006 #include "Rivet/Tools/ParticleIdUtils.hh"
00007 #include "Rivet/Projections/ZFinder.hh"
00008 #include "Rivet/Projections/WFinder.hh"
00009 #include "Rivet/Projections/UnstableFinalState.hh"
00010 #include "Rivet/Projections/FastJets.hh"
00011 #include "Rivet/Math/LorentzTrans.hh"
00012 #include "Rivet/Math/Constants.hh"
00013 #include <cmath>
00014 #include <vector>
00015
00016 namespace Rivet {
00017
00018
00019 class MC_VH2BB : public Analysis {
00020 public:
00021
00022
00023
00024
00025
00026 MC_VH2BB()
00027 : Analysis("MC_VH2BB")
00028 { }
00029
00030
00031
00032
00033 public:
00034
00035
00036
00037
00038 vector<double> boostAngles(const FourMomentum& b1, const FourMomentum& b2, const FourMomentum& vb){
00039
00040
00041
00042
00043
00044 FourMomentum higgsMomentum = b1 + b2;
00045 FourMomentum virtualVBMomentum = higgsMomentum + vb;
00046
00047 LorentzTransform lt( -higgsMomentum.boostVector() );
00048
00049 FourMomentum virtualVBMomentumBOOSTED = lt.transform(virtualVBMomentum);
00050 FourMomentum b1BOOSTED = lt.transform(b1);
00051 FourMomentum b2BOOSTED = lt.transform(b2);
00052
00053 double angle1 = b1BOOSTED.angle(virtualVBMomentumBOOSTED);
00054 double angle2 = b2BOOSTED.angle(virtualVBMomentumBOOSTED);
00055
00056 double anglebb = b1BOOSTED.angle(b2BOOSTED);
00057
00058 vector<double> toReturn;
00059 toReturn.push_back(angle1 < angle2 ? angle1 : angle2);
00060 toReturn.push_back(anglebb);
00061
00062 return toReturn;
00063 }
00064
00065
00066
00067 void init() {
00068
00069 ZFinder zeefinder(-3.5, 3.5, 25.0*GeV, ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
00070 addProjection(zeefinder, "ZeeFinder");
00071 ZFinder zmmfinder(-3.5, 3.5, 25.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true);
00072 addProjection(zmmfinder, "ZmmFinder");
00073
00074 WFinder wefinder(-3.5, 3.5, 25.0*GeV, ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
00075 addProjection(wefinder, "WeFinder");
00076 WFinder wmfinder(-3.5, 3.5, 25.0*GeV, MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
00077 addProjection(wmfinder, "WmFinder");
00078
00079 FinalState fs;
00080 addProjection(fs, "FinalState");
00081 addProjection(FastJets(fs, FastJets::ANTIKT, 0.4), "AntiKT04");
00082 addProjection(FastJets(fs, FastJets::ANTIKT, 0.5), "AntiKT05");
00083 addProjection(FastJets(fs, FastJets::ANTIKT, 0.6), "AntiKT06");
00084
00085
00086 _h_jet_bb_Delta_eta = bookHistogram1D("jet_bb_Delta_eta", 50, 0, 4);
00087 _h_jet_bb_Delta_phi = bookHistogram1D("jet_bb_Delta_phi", 50, 0, M_PI);
00088 _h_jet_bb_Delta_pT = bookHistogram1D("jet_bb_Delta_pT", 50,0, 500);
00089 _h_jet_bb_Delta_R = bookHistogram1D("jet_bb_Delta_R", 50, 0, 5);
00090 _h_jet_b_jet_eta = bookHistogram1D("jet_b_jet_eta", 50, -4, 4);
00091 _h_jet_b_jet_multiplicity = bookHistogram1D("jet_b_jet_multiplicity", 11, -0.5, 10.5);
00092 _h_jet_b_jet_phi = bookHistogram1D("jet_b_jet_phi", 50, -M_PI, M_PI);
00093 _h_jet_b_jet_pT = bookHistogram1D("jet_b_jet_pT", 50, 0, 500);
00094 _h_jet_H_eta_using_bb = bookHistogram1D("jet_H_eta_using_bb", 50, -4, 4);
00095 _h_jet_H_mass_using_bb = bookHistogram1D("jet_H_mass_using_bb", 50, 50, 200);
00096 _h_jet_H_phi_using_bb = bookHistogram1D("jet_H_phi_using_bb", 50, -M_PI, M_PI);
00097 _h_jet_H_pT_using_bb = bookHistogram1D("jet_H_pT_using_bb", 50, 0, 500);
00098 _h_jet_eta = bookHistogram1D("jet_eta", 50, -4, 4);
00099 _h_jet_multiplicity = bookHistogram1D("jet_multiplicity", 11, -0.5, 10.5);
00100 _h_jet_phi = bookHistogram1D("jet_phi", 50, -M_PI, M_PI);
00101 _h_jet_pT = bookHistogram1D("jet_pT", 50, 0, 500);
00102 _h_jet_VBbb_Delta_eta = bookHistogram1D("jet_VBbb_Delta_eta", 50, 0, 4);
00103 _h_jet_VBbb_Delta_phi = bookHistogram1D("jet_VBbb_Delta_phi", 50, 0, M_PI);
00104 _h_jet_VBbb_Delta_pT = bookHistogram1D("jet_VBbb_Delta_pT", 50, 0, 500);
00105 _h_jet_VBbb_Delta_R = bookHistogram1D("jet_VBbb_Delta_R", 50, 0, 8);
00106
00107 _h_VB_eta = bookHistogram1D("VB_eta", 50, -4, 4);
00108 _h_VB_mass = bookHistogram1D("VB_mass", 50, 60, 110);
00109 _h_Z_multiplicity = bookHistogram1D("Z_multiplicity", 11, -0.5, 10.5);
00110 _h_W_multiplicity = bookHistogram1D("W_multiplicity", 11, -0.5, 10.5);
00111 _h_VB_phi = bookHistogram1D("VB_phi", 50, -M_PI, M_PI);
00112 _h_VB_pT = bookHistogram1D("VB_pT", 50, 0, 500);
00113
00114 _h_jet_bVB_angle_Hframe = bookHistogram1D("jet_bVB_angle_Hframe", 50, 0, M_PI);
00115 _h_jet_bVB_cosangle_Hframe = bookHistogram1D("jet_bVB_cosangle_Hframe", 50, -1, 1);
00116 _h_jet_bb_angle_Hframe = bookHistogram1D("jet_bb_angle_Hframe", 50, 0, M_PI);
00117 _h_jet_bb_cosangle_Hframe = bookHistogram1D("jet_bb_cosangle_Hframe", 50, -1, 1);
00118 }
00119
00120
00121
00122 void analyze(const Event& event) {
00123 const double weight = event.weight();
00124
00125 const double JETPTCUT = 30*GeV;
00126
00127 const ZFinder& zeefinder = applyProjection<ZFinder>(event, "ZeeFinder");
00128 const ZFinder& zmmfinder = applyProjection<ZFinder>(event, "ZmmFinder");
00129
00130 const WFinder& wefinder = applyProjection<WFinder>(event, "WeFinder");
00131 const WFinder& wmfinder = applyProjection<WFinder>(event, "WmFinder");
00132
00133 Jets jets = applyProjection<FastJets>(event, "AntiKTJets").jetsByPt(JETPTCUT);
00134
00135 ParticleVector vectorBosons = zeefinder.particles();
00136
00137 vectorBosons.insert(vectorBosons.end(), zeefinder.particles().begin(), zeefinder.particles().end());
00138 vectorBosons.insert(vectorBosons.end(), wefinder.particles().begin(), wefinder.particles().end());
00139 vectorBosons.insert(vectorBosons.end(), wmfinder.particles().begin(), wmfinder.particles().end());
00140
00141 _h_Z_multiplicity->fill(zeefinder.particles().size() + zmmfinder.particles().size(), weight);
00142 _h_W_multiplicity->fill(wefinder.particles().size() + wmfinder.particles().size(), weight);
00143 _h_jet_multiplicity->fill(jets.size(), weight);
00144
00145
00146 Jets bjets;
00147 foreach (const Jet& jet, jets) {
00148 const double jetEta = jet.momentum().eta();
00149 const double jetPhi = jet.momentum().phi();
00150 const double jetPt = jet.momentum().pT();
00151 _h_jet_eta->fill(jetEta, weight);
00152 _h_jet_phi->fill(jetPhi, weight);
00153 _h_jet_pT->fill(jetPt/GeV, weight);
00154
00155 if (jet.containsBottom() && jet.momentum().pT() > JETPTCUT) {
00156 bjets.push_back(jet);
00157 _h_jet_b_jet_eta->fill( jetEta , weight );
00158 _h_jet_b_jet_phi->fill( jetPhi , weight );
00159 _h_jet_b_jet_pT->fill( jetPt , weight );
00160 }
00161 }
00162 _h_jet_b_jet_multiplicity->fill(bjets.size(), weight);
00163
00164
00165 foreach (const Particle& v, vectorBosons) {
00166 _h_VB_phi->fill(v.momentum().phi(), weight);
00167 _h_VB_pT->fill(v.momentum().pT(), weight);
00168 _h_VB_eta->fill(v.momentum().eta(), weight);
00169 _h_VB_mass->fill(v.momentum().mass(), weight);
00170 }
00171
00172
00173 for (size_t i = 0; i < bjets.size()-1; ++i) {
00174 for (size_t j = i+1; j < bjets.size(); ++j) {
00175 const Jet& jet1 = bjets[i];
00176 const Jet& jet2 = bjets[j];
00177
00178 const double deltaEtaJJ = fabs(jet1.momentum().eta() - jet2.momentum().eta());
00179 const double deltaPhiJJ = deltaPhi(jet1.momentum(), jet2.momentum());
00180 const double deltaRJJ = deltaR(jet1.momentum(), jet2.momentum());
00181 const double deltaPtJJ = fabs(jet1.momentum().pT() - jet2.momentum().pT());
00182 _h_jet_bb_Delta_eta->fill(deltaEtaJJ, weight);
00183 _h_jet_bb_Delta_phi->fill(deltaPhiJJ, weight);
00184 _h_jet_bb_Delta_pT->fill(deltaPtJJ, weight);
00185 _h_jet_bb_Delta_R->fill(deltaRJJ, weight);
00186
00187 const FourMomentum phiggs = jet1.momentum() + jet2.momentum();
00188 _h_jet_H_eta_using_bb->fill(phiggs.eta(), weight);
00189 _h_jet_H_mass_using_bb->fill(phiggs.mass(), weight);
00190 _h_jet_H_phi_using_bb->fill(phiggs.phi(), weight);
00191 _h_jet_H_pT_using_bb->fill(phiggs.pT(), weight);
00192
00193 foreach (const Particle& v, vectorBosons) {
00194 const double deltaEtaVH = fabs(phiggs.eta() - v.momentum().eta());
00195 const double deltaPhiVH = deltaPhi(phiggs, v.momentum());
00196 const double deltaRVH = deltaR(phiggs, v.momentum());
00197 const double deltaPtVH = fabs(phiggs.pT() - v.momentum().pT());
00198 _h_jet_VBbb_Delta_eta->fill(deltaEtaVH, weight);
00199 _h_jet_VBbb_Delta_phi->fill(deltaPhiVH, weight);
00200 _h_jet_VBbb_Delta_pT->fill(deltaPtVH, weight);
00201 _h_jet_VBbb_Delta_R->fill(deltaRVH, weight);
00202
00203
00204 const vector<double> angles = boostAngles(jet1.momentum(), jet2.momentum(), v.momentum());
00205 _h_jet_bVB_angle_Hframe->fill(angles[0], weight);
00206 _h_jet_bb_angle_Hframe->fill(angles[1], weight);
00207 _h_jet_bVB_cosangle_Hframe->fill(cos(angles[0]), weight);
00208 _h_jet_bb_cosangle_Hframe->fill(cos(angles[1]), weight);
00209 }
00210
00211 }
00212 }
00213 }
00214
00215
00216
00217 void finalize() {
00218 scale(_h_jet_bb_Delta_eta, crossSection()/sumOfWeights());
00219 scale(_h_jet_bb_Delta_phi, crossSection()/sumOfWeights());
00220 scale(_h_jet_bb_Delta_pT, crossSection()/sumOfWeights());
00221 scale(_h_jet_bb_Delta_R, crossSection()/sumOfWeights());
00222 scale(_h_jet_b_jet_eta, crossSection()/sumOfWeights());
00223 scale(_h_jet_b_jet_multiplicity, crossSection()/sumOfWeights());
00224 scale(_h_jet_b_jet_phi, crossSection()/sumOfWeights());
00225 scale(_h_jet_b_jet_pT, crossSection()/sumOfWeights());
00226 scale(_h_jet_H_eta_using_bb, crossSection()/sumOfWeights());
00227 scale(_h_jet_H_mass_using_bb, crossSection()/sumOfWeights());
00228 scale(_h_jet_H_phi_using_bb, crossSection()/sumOfWeights());
00229 scale(_h_jet_H_pT_using_bb, crossSection()/sumOfWeights());
00230 scale(_h_jet_eta, crossSection()/sumOfWeights());
00231 scale(_h_jet_multiplicity, crossSection()/sumOfWeights());
00232 scale(_h_jet_phi, crossSection()/sumOfWeights());
00233 scale(_h_jet_pT, crossSection()/sumOfWeights());
00234 scale(_h_jet_VBbb_Delta_eta, crossSection()/sumOfWeights());
00235 scale(_h_jet_VBbb_Delta_phi, crossSection()/sumOfWeights());
00236 scale(_h_jet_VBbb_Delta_pT, crossSection()/sumOfWeights());
00237 scale(_h_jet_VBbb_Delta_R, crossSection()/sumOfWeights());
00238
00239 scale(_h_VB_eta, crossSection()/sumOfWeights());
00240 scale(_h_VB_mass, crossSection()/sumOfWeights());
00241 scale(_h_Z_multiplicity, crossSection()/sumOfWeights());
00242 scale(_h_W_multiplicity, crossSection()/sumOfWeights());
00243 scale(_h_VB_phi, crossSection()/sumOfWeights());
00244 scale(_h_VB_pT, crossSection()/sumOfWeights());
00245
00246 scale(_h_jet_bVB_angle_Hframe, crossSection()/sumOfWeights());
00247 scale(_h_jet_bb_angle_Hframe, crossSection()/sumOfWeights());
00248 scale(_h_jet_bVB_cosangle_Hframe, crossSection()/sumOfWeights());
00249 scale(_h_jet_bb_cosangle_Hframe, crossSection()/sumOfWeights());
00250 }
00251
00252
00253
00254
00255 private:
00256
00257
00258
00259
00260 AIDA::IHistogram1D *_h_Z_multiplicity, *_h_W_multiplicity;
00261 AIDA::IHistogram1D *_h_jet_bb_Delta_eta, *_h_jet_bb_Delta_phi, *_h_jet_bb_Delta_pT, *_h_jet_bb_Delta_R;
00262 AIDA::IHistogram1D *_h_jet_b_jet_eta, *_h_jet_b_jet_multiplicity, *_h_jet_b_jet_phi, *_h_jet_b_jet_pT;
00263 AIDA::IHistogram1D *_h_jet_H_eta_using_bb, *_h_jet_H_mass_using_bb, *_h_jet_H_phi_using_bb, *_h_jet_H_pT_using_bb;
00264 AIDA::IHistogram1D *_h_jet_eta, *_h_jet_multiplicity, *_h_jet_phi, *_h_jet_pT;
00265 AIDA::IHistogram1D *_h_jet_VBbb_Delta_eta, *_h_jet_VBbb_Delta_phi, *_h_jet_VBbb_Delta_pT, *_h_jet_VBbb_Delta_R;
00266 AIDA::IHistogram1D *_h_VB_eta, *_h_VB_mass, *_h_VB_phi, *_h_VB_pT;
00267 AIDA::IHistogram1D *_h_jet_bVB_angle_Hframe, *_h_jet_bb_angle_Hframe, *_h_jet_bVB_cosangle_Hframe, *_h_jet_bb_cosangle_Hframe;
00268
00269
00270
00271
00272 };
00273
00274
00275
00276 DECLARE_RIVET_PLUGIN(MC_VH2BB);
00277
00278 }