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