ATLAS_2015_I1364361.cc
Go to the documentation of this file.
00001 /* 00002 * Rivet routine for the Higgs differential cross sections combination 00003 * between the ATLAS measurements in the yy and 4l channels for 00004 * Higgs transverse momentum, rapidity, jet multiplicity and leading jet pT 00005 * 00006 * Author: Michaela Queitsch-Maitland (ATLAS Collaboration) 00007 * Contact: Michaela Queitsch-Maitland <michaela.queitsch-maitland@cern.ch>, 00008 * Dag Gillberg <dag.gillberg@cern.ch>, 00009 * Florian Bernlochner <florian.bernlochner@cern.ch>, 00010 * Sarah Heim <sarah.heim@cern.ch> 00011 */ 00012 00013 // -*- C++ -*- 00014 #include "Rivet/Analysis.hh" 00015 #include "Rivet/Tools/Logging.hh" 00016 #include "Rivet/Projections/FinalState.hh" 00017 #include "Rivet/Projections/FastJets.hh" 00018 #include "Rivet/Tools/ParticleIdUtils.hh" 00019 #include "Rivet/Math/MathUtils.hh" 00020 #include "Rivet/Math/Vector4.hh" 00021 #include "Rivet/Particle.hh" 00022 #include "HepMC/GenEvent.h" 00023 00024 namespace Rivet { 00025 00026 00027 class ATLAS_2015_I1364361 : public Analysis { 00028 public: 00029 00030 /// Constructor 00031 ATLAS_2015_I1364361() 00032 : Analysis("ATLAS_2015_I1364361") 00033 { } 00034 00035 00036 00037 /// Book histograms and initialise projections before the run 00038 void init() { 00039 00040 // All final state particles 00041 const FinalState FS; 00042 addProjection(FS,"FS"); 00043 00044 // Histograms with data bins 00045 _h_pTH_incl = bookHisto1D(1,1,1); 00046 _h_yH_incl = bookHisto1D(2,1,1); 00047 _h_Njets_incl = bookHisto1D(3,1,1); 00048 _h_pTj1_incl = bookHisto1D(4,1,1); 00049 } 00050 00051 /// Perform the per-event analysis 00052 void analyze(const Event& event) { 00053 00054 // Get event weight 00055 const double weight = event.weight(); 00056 00057 // Get the final state particles ordered by pT 00058 const ParticleVector& FS = applyProjection<FinalState>(event, "FS").particlesByPt(); 00059 00060 // Find the Higgs 00061 bool stable_higgs = false; 00062 const Particle* higgs=0; 00063 foreach ( const Particle& p, FS ) { 00064 if ( p.pid()==25 ) { 00065 stable_higgs = true; 00066 higgs = &p; 00067 break; 00068 } 00069 } 00070 00071 // If no stable Higgs found in event record, can't do anything 00072 if ( !stable_higgs ) { 00073 MSG_WARNING("FATAL: No stable Higgs found in event record.\n"); 00074 vetoEvent; 00075 } 00076 00077 ParticleVector leptons; 00078 ParticleVector photons; // for dressing 00079 ParticleVector jet_ptcls; 00080 00081 // Loop over final state particles and fill jet particles vector 00082 foreach ( const Particle& ptcl, FS ) { 00083 // Do not include the Higgs in jet finding! 00084 if ( ptcl.pid()==25 ) continue; 00085 // Neutrinos not from hadronisation 00086 if ( ptcl.isNeutrino() && !ptcl.fromHadron() ) continue; 00087 // Electrons and muons not from hadronisation 00088 if ( ( ptcl.abspid() == 11 || ptcl.abspid() == 13 ) && !ptcl.fromHadron() ) { 00089 leptons.push_back(ptcl); 00090 continue; 00091 } 00092 // Photons not from hadronisation 00093 if ( ptcl.abspid() == 22 && !ptcl.fromHadron() ) { 00094 photons.push_back(ptcl); 00095 continue; 00096 } 00097 // Add particle to jet inputs 00098 jet_ptcls.push_back(ptcl); 00099 } 00100 00101 // Match FS photons to leptons within cone R=0.1 00102 // If they are not 'dressing' photons, add to jet particle vector 00103 foreach ( const Particle& ph, photons ) { 00104 bool fsr_photon = false; 00105 foreach ( const Particle& lep, leptons ) { 00106 if ( deltaR(ph.momentum(),lep.momentum()) < 0.1 ){ 00107 fsr_photon=true; 00108 continue; 00109 } 00110 } 00111 if ( !fsr_photon ) jet_ptcls.push_back(ph); 00112 } 00113 00114 // Let's build the jets! 00115 FastJets jet_pro(FastJets::ANTIKT, 0.4); 00116 jet_pro.calc(jet_ptcls); 00117 Jets jets = jet_pro.jetsByPt(Cuts::pT>30*GeV && Cuts::absrap<4.4); 00118 00119 _pTH = higgs->momentum().pT(); 00120 _yH = higgs->momentum().rapidity(); 00121 _Njets = jets.size() > 3 ? 3 : jets.size(); 00122 _pTj1 = jets.size() > 0 ? jets[0].momentum().pT() : 0.; 00123 00124 _h_pTH_incl->fill(_pTH,weight); 00125 _h_yH_incl->fill( fabs(_yH),weight); 00126 _h_Njets_incl->fill(_Njets,weight); 00127 _h_pTj1_incl->fill(_pTj1,weight); 00128 } 00129 00130 00131 /// Normalise histograms etc., after the run 00132 void finalize() { 00133 00134 double xs = crossSectionPerEvent(); 00135 scale( _h_pTH_incl, xs ); 00136 scale( _h_yH_incl, xs ); 00137 scale( _h_Njets_incl, xs ); 00138 scale( _h_pTj1_incl, xs ); 00139 } 00140 00141 00142 00143 private: 00144 00145 double _pTH; 00146 double _yH; 00147 double _Njets; 00148 double _pTj1; 00149 00150 00151 Histo1DPtr _h_pTH_incl; 00152 Histo1DPtr _h_yH_incl; 00153 Histo1DPtr _h_Njets_incl; 00154 Histo1DPtr _h_pTj1_incl; 00155 00156 }; 00157 00158 // The hook for the plugin system 00159 DECLARE_RIVET_PLUGIN(ATLAS_2015_I1364361); 00160 00161 } Generated on Wed Oct 7 2015 12:09:11 for The Rivet MC analysis system by ![]() |