ATLAS_2014_I1319490.cc
Go to the documentation of this file.
00001 #include "Rivet/Analysis.hh" 00002 #include "Rivet/Projections/FinalState.hh" 00003 #include "Rivet/Projections/WFinder.hh" 00004 #include "Rivet/Projections/FastJets.hh" 00005 #include "Rivet/Projections/VetoedFinalState.hh" 00006 00007 namespace Rivet { 00008 00009 00010 class ATLAS_2014_I1319490 : public Analysis { 00011 public: 00012 00013 ATLAS_2014_I1319490(string name = "ATLAS_2014_I1319490") 00014 : Analysis(name) 00015 { 00016 _mode = 0; // using electron channel for combined data by default 00017 setNeedsCrossSection(true); 00018 } 00019 00020 00021 // Book histograms and initialise projections before the run 00022 void init() { 00023 00024 FinalState fs; 00025 00026 Cut cuts; 00027 if (_mode == 2) { // muon channel 00028 cuts = (Cuts::pT > 25.0*GeV) & Cuts::etaIn(-2.4, 2.4); 00029 } else if (_mode) { // electron channel 00030 cuts = (Cuts::pT > 25.0*GeV) & ( Cuts::etaIn(-2.47, -1.52) | Cuts::etaIn(-1.37, 1.37) | Cuts::etaIn(1.52, 2.47) ); 00031 } else { // combined data extrapolated to common phase space 00032 cuts = (Cuts::pT > 25.0*GeV) & Cuts::etaIn(-2.5, 2.5); 00033 } 00034 00035 // bosons 00036 WFinder wfinder(fs, cuts, _mode > 1? PID::MUON : PID::ELECTRON, 40.0*GeV, MAXDOUBLE, 0.0*GeV, 0.1, 00037 WFinder::CLUSTERNODECAY, WFinder::NOTRACK, WFinder::TRANSMASS); 00038 addProjection(wfinder, "WF"); 00039 00040 // jets 00041 VetoedFinalState jet_fs(fs); 00042 jet_fs.addVetoOnThisFinalState(getProjection<WFinder>("WF")); 00043 FastJets jets(jet_fs, FastJets::ANTIKT, 0.4); 00044 jets.useInvisibles(true); 00045 addProjection(jets, "Jets"); 00046 00047 // book histograms 00048 histos["h_N_incl"] = bookHisto1D(1,1,1); 00049 histos["h_N"] = bookHisto1D(4,1,1); 00050 histos["h_pt_jet1_1jet"] = bookHisto1D(5,1,1); 00051 histos["h_pt_jet1_1jet_excl"] = bookHisto1D(6,1,1); 00052 histos["h_pt_jet1_2jet"] = bookHisto1D(7,1,1); 00053 histos["h_pt_jet1_3jet"] = bookHisto1D(8,1,1); 00054 histos["h_pt_jet2_2jet"] = bookHisto1D(9,1,1); 00055 histos["h_pt_jet3_3jet"] = bookHisto1D(10,1,1); 00056 histos["h_pt_jet4_4jet"] = bookHisto1D(11,1,1); 00057 histos["h_pt_jet5_5jet"] = bookHisto1D(12,1,1); 00058 histos["h_y_jet1_1jet"] = bookHisto1D(13,1,1); 00059 histos["h_y_jet2_2jet"] = bookHisto1D(14,1,1); 00060 histos["h_HT_1jet"] = bookHisto1D(15,1,1); 00061 histos["h_HT_1jet_excl"] = bookHisto1D(16,1,1); 00062 histos["h_HT_2jet"] = bookHisto1D(17,1,1); 00063 histos["h_HT_2jet_excl"] = bookHisto1D(18,1,1); 00064 histos["h_HT_3jet"] = bookHisto1D(19,1,1); 00065 histos["h_HT_3jet_excl"] = bookHisto1D(20,1,1); 00066 histos["h_HT_4jet"] = bookHisto1D(21,1,1); 00067 histos["h_HT_5jet"] = bookHisto1D(22,1,1); 00068 histos["h_deltaPhi_jet12"] = bookHisto1D(23,1,1); 00069 histos["h_deltaRap_jet12"] = bookHisto1D(24,1,1); 00070 histos["h_deltaR_jet12"] = bookHisto1D(25,1,1); 00071 histos["h_M_Jet12_2jet"] = bookHisto1D(26,1,1); 00072 histos["h_y_jet3_3jet"] = bookHisto1D(27,1,1); 00073 histos["h_y_jet4_4jet"] = bookHisto1D(28,1,1); 00074 histos["h_y_jet5_5jet"] = bookHisto1D(29,1,1); 00075 histos["h_ST_1jet"] = bookHisto1D(30,1,1); 00076 histos["h_ST_2jet"] = bookHisto1D(31,1,1); 00077 histos["h_ST_2jet_excl"] = bookHisto1D(32,1,1); 00078 histos["h_ST_3jet"] = bookHisto1D(33,1,1); 00079 histos["h_ST_3jet_excl"] = bookHisto1D(34,1,1); 00080 histos["h_ST_4jet"] = bookHisto1D(35,1,1); 00081 histos["h_ST_5jet"] = bookHisto1D(36,1,1); 00082 } 00083 00084 00085 void fillPlots(const Particle& lepton, const double& missET, Jets& all_jets, const double& weight) { 00086 // do jet-lepton overlap removal 00087 Jets jets; 00088 double ST = 0.0; // scalar pT sum of all selected jets 00089 foreach (const Jet &j, all_jets) { 00090 if (deltaR(j, lepton) > 0.5) { 00091 jets += j; 00092 ST += j.pT() / GeV; 00093 } 00094 } 00095 00096 const size_t njets = jets.size(); 00097 00098 const double HT = ST + lepton.pT() / GeV + missET; 00099 00100 histos["h_N"]->fill(njets + 0.5, weight); 00101 for (size_t i = 0; i <= njets; ++i) { 00102 histos["h_N_incl"]->fill(i + 0.5, weight); 00103 } 00104 00105 if (njets) { 00106 const double pT1 = jets[0].pT() / GeV; 00107 const double rap1 = jets[0].absrap(); 00108 histos["h_pt_jet1_1jet" ]->fill(pT1, weight); 00109 histos["h_y_jet1_1jet"]->fill(rap1, weight); 00110 histos["h_HT_1jet"]->fill(HT, weight); 00111 histos["h_ST_1jet"]->fill(ST, weight); 00112 if (njets == 1) { 00113 histos["h_pt_jet1_1jet_excl"]->fill(pT1, weight); 00114 histos["h_HT_1jet_excl"]->fill(HT, weight); 00115 } else { 00116 const double pT2 = jets[1].pT() / GeV; 00117 const double rap2 = jets[1].absrap(); 00118 const double dR = deltaR(jets[0], jets[1]); 00119 const double dRap = deltaRap(jets[0], jets[1]); 00120 const double dPhi = deltaPhi(jets[0], jets[1]); 00121 const double mjj = (jets[0].momentum() + jets[1].momentum()).mass() / GeV; 00122 histos["h_pt_jet1_2jet"]->fill(pT1, weight); 00123 histos["h_pt_jet2_2jet"]->fill(pT2, weight); 00124 histos["h_y_jet2_2jet"]->fill(rap2, weight); 00125 histos["h_M_Jet12_2jet"]->fill(mjj, weight); 00126 histos["h_HT_2jet"]->fill(HT, weight); 00127 histos["h_ST_2jet"]->fill(ST, weight); 00128 histos["h_deltaPhi_jet12"]->fill(dPhi, weight); 00129 histos["h_deltaRap_jet12"]->fill(dRap, weight); 00130 histos["h_deltaR_jet12"]->fill(dR, weight); 00131 if (njets == 2) { 00132 histos["h_ST_2jet_excl"]->fill(ST, weight); 00133 histos["h_HT_2jet_excl"]->fill(HT, weight); 00134 } else { 00135 const double pT3 = jets[2].pT() / GeV; 00136 const double rap3 = jets[2].absrap(); 00137 histos["h_pt_jet1_3jet"]->fill(pT1, weight); 00138 histos["h_pt_jet3_3jet"]->fill(pT3, weight); 00139 histos["h_y_jet3_3jet"]->fill(rap3, weight); 00140 histos["h_HT_3jet"]->fill(HT, weight); 00141 histos["h_ST_3jet"]->fill(ST, weight); 00142 if(njets == 3) { 00143 histos["h_ST_3jet_excl"]->fill(ST, weight); 00144 histos["h_HT_3jet_excl"]->fill(HT, weight); 00145 } else { 00146 const double pT4 = jets[3].pT() / GeV; 00147 const double rap4 = jets[3].absrap(); 00148 histos["h_pt_jet4_4jet"]->fill(pT4, weight); 00149 histos["h_y_jet4_4jet"]->fill(rap4, weight); 00150 histos["h_HT_4jet"]->fill(HT, weight); 00151 histos["h_ST_4jet"]->fill(ST, weight); 00152 if (njets > 4) { 00153 const double pT5 = jets[4].pT() / GeV; 00154 const double rap5 = jets[4].absrap(); 00155 histos["h_pt_jet5_5jet"]->fill(pT5, weight); 00156 histos["h_y_jet5_5jet"]->fill(rap5, weight); 00157 histos["h_HT_5jet"]->fill(HT, weight); 00158 histos["h_ST_5jet"]->fill(ST, weight); 00159 } 00160 } 00161 } 00162 } 00163 } 00164 } 00165 00166 00167 // Perform the per-event analysis 00168 void analyze(const Event& event) { 00169 // Retrieve boson candidate 00170 const WFinder& wf = applyProjection<WFinder>(event, "WF"); 00171 if (wf.empty()) vetoEvent; 00172 00173 // Retrieve jets 00174 const JetAlg& jetfs = applyProjection<JetAlg>(event, "Jets"); 00175 Jets all_jets = jetfs.jetsByPt(Cuts::pT > 30.0*GeV && Cuts::absrap < 4.4); 00176 00177 const Particles& leptons = wf.constituentLeptons(); 00178 const double missET = wf.constituentNeutrino().pT() / GeV; 00179 if (leptons.size() == 1 && missET > 25.0 && wf.mT() > 40.0*GeV) { 00180 const Particle& lep = leptons[0]; 00181 fillPlots(lep, missET, all_jets, event.weight()); 00182 } 00183 } 00184 00185 00186 void finalize() { 00187 const double scalefactor(crossSection() / sumOfWeights()); 00188 /// @todo Update to use C++11 range-for 00189 for (map<string, Histo1DPtr>::iterator hit = histos.begin(); hit != histos.end(); ++hit) { 00190 scale(hit->second, scalefactor); 00191 } 00192 } 00193 00194 00195 protected: 00196 00197 size_t _mode; 00198 00199 00200 private: 00201 00202 map<string, Histo1DPtr> histos; 00203 00204 }; 00205 00206 00207 class ATLAS_2014_I1319490_EL : public ATLAS_2014_I1319490 { 00208 public: 00209 ATLAS_2014_I1319490_EL() 00210 : ATLAS_2014_I1319490("ATLAS_2014_I1319490_EL") 00211 { 00212 _mode = 1; 00213 } 00214 }; 00215 00216 00217 class ATLAS_2014_I1319490_MU : public ATLAS_2014_I1319490 { 00218 public: 00219 ATLAS_2014_I1319490_MU() 00220 : ATLAS_2014_I1319490("ATLAS_2014_I1319490_MU") 00221 { 00222 _mode = 2; 00223 } 00224 }; 00225 00226 00227 // The hooks for the plugin system 00228 DECLARE_RIVET_PLUGIN(ATLAS_2014_I1319490); 00229 DECLARE_RIVET_PLUGIN(ATLAS_2014_I1319490_EL); 00230 DECLARE_RIVET_PLUGIN(ATLAS_2014_I1319490_MU); 00231 00232 } Generated on Thu Mar 10 2016 08:29:47 for The Rivet MC analysis system by ![]() |