ATLAS_2012_I946427.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Tools/BinnedHistogram.hh" 00004 #include "Rivet/RivetYODA.hh" 00005 #include "Rivet/Tools/Logging.hh" 00006 #include "Rivet/Projections/FinalState.hh" 00007 #include "Rivet/Projections/ChargedFinalState.hh" 00008 #include "Rivet/Projections/VisibleFinalState.hh" 00009 #include "Rivet/Projections/VetoedFinalState.hh" 00010 #include "Rivet/Projections/IdentifiedFinalState.hh" 00011 #include "Rivet/Projections/FastJets.hh" 00012 #include "Rivet/Tools/ParticleIdUtils.hh" 00013 00014 namespace Rivet { 00015 00016 /// @author Peter Richardson 00017 class ATLAS_2012_I946427 : public Analysis { 00018 public: 00019 00020 /// @name Constructors etc. 00021 //@{ 00022 00023 /// Constructor 00024 ATLAS_2012_I946427() 00025 : Analysis("ATLAS_2012_I946427") 00026 { } 00027 00028 //@} 00029 00030 00031 public: 00032 00033 /// @name Analysis methods 00034 //@{ 00035 00036 /// Book histograms and initialise projections before the run 00037 void init() { 00038 00039 // photons 00040 IdentifiedFinalState photonfs(-1.81, 1.81, 25.0*GeV); 00041 photonfs.acceptId(PHOTON); 00042 addProjection(photonfs, "Photon"); 00043 00044 // 00045 FinalState fs; 00046 addProjection(fs, "FS"); 00047 00048 // Used for pTmiss 00049 addProjection(VisibleFinalState(-4.9,4.9),"vfs"); 00050 00051 // Book histograms 00052 _count_SR = bookHisto1D("count_SR", 1, 0., 1.); 00053 00054 _hist_ET_photon = bookHisto1D("hist_ET_photon", 48 , 20., 500.); 00055 _hist_met = bookHisto1D("hist_met" , 100, 0., 500.); 00056 00057 } 00058 00059 00060 /// Perform the per-event analysis 00061 void analyze(const Event& event) { 00062 00063 const double weight = event.weight(); 00064 00065 // require at least 2 photons in final state 00066 ParticleVector photons = 00067 applyProjection<IdentifiedFinalState>(event, "Photon").particlesByPt(); 00068 if (photons.size() < 2) { 00069 vetoEvent; 00070 } 00071 00072 // Loop over photons and fill vector of isolated ones 00073 ParticleVector fs = applyProjection<FinalState>(event, "FS").particles(); 00074 ParticleVector isolated_photons; 00075 foreach (const Particle& photon, photons) { 00076 // remove photons in crack 00077 double eta_P = photon.momentum().eta(); 00078 if (fabs(eta_P)>=1.37 && fabs(eta_P)<1.52) continue; 00079 00080 double phi_P = photon.momentum().phi(); 00081 00082 FourMomentum mom_in_EtCone = -photon.momentum(); 00083 foreach (const Particle& p, fs) { 00084 // check if it's in the cone of .2 00085 if (deltaR(eta_P, phi_P, p.momentum().eta(), 00086 p.momentum().phi()) >= 0.2) continue; 00087 mom_in_EtCone += p.momentum(); 00088 } 00089 // apply isolation 00090 if(mom_in_EtCone.Et()>5.) continue; 00091 00092 // add photon to list of isolated ones 00093 isolated_photons.push_back(photon); 00094 } 00095 00096 // need two isolated photons 00097 if(isolated_photons.size() < 2 ) { 00098 vetoEvent; 00099 } 00100 00101 // pTmiss 00102 ParticleVector vfs_particles = 00103 applyProjection<VisibleFinalState>(event, "vfs").particles(); 00104 FourMomentum pTmiss; 00105 foreach ( const Particle & p, vfs_particles ) { 00106 pTmiss -= p.momentum(); 00107 } 00108 double eTmiss = pTmiss.pT(); 00109 00110 _hist_ET_photon->fill(isolated_photons[0].momentum().Et(),weight); 00111 _hist_met ->fill(eTmiss ,weight); 00112 00113 if(eTmiss>125.) _count_SR->fill(0.5,weight); 00114 } 00115 00116 00117 void finalize() { 00118 00119 double norm = crossSection()/femtobarn*1.07/sumOfWeights(); 00120 // these are number of events at 1.07fb^-1 per 10 GeV 00121 scale( _hist_ET_photon, 10. * norm ); 00122 // these are number of events at 1.07fb^-1 per 5 GeV 00123 scale( _hist_met, 5. * norm ); 00124 // these are number of events at 1.07fb^-1 00125 scale(_count_SR,norm); 00126 } 00127 00128 //@} 00129 00130 00131 private: 00132 00133 Histo1DPtr _count_SR; 00134 Histo1DPtr _hist_ET_photon; 00135 Histo1DPtr _hist_met; 00136 00137 }; 00138 00139 00140 // This global object acts as a hook for the plugin system 00141 DECLARE_RIVET_PLUGIN(ATLAS_2012_I946427); 00142 00143 } Generated on Fri Dec 21 2012 15:03:39 for The Rivet MC analysis system by ![]() |