ATLAS_2011_I926145.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetYODA.hh" 00004 #include "Rivet/Tools/Logging.hh" 00005 #include "Rivet/Projections/FinalState.hh" 00006 #include "Rivet/Projections/IdentifiedFinalState.hh" 00007 #include "Rivet/Projections/WFinder.hh" 00008 #include "Rivet/Projections/ZFinder.hh" 00009 #include "Rivet/Tools/ParticleIdUtils.hh" 00010 00011 namespace Rivet { 00012 00013 /// @brief Measurement of electron and muon differential cross section from heavy flavour production 00014 /// 00015 /// lepton cross sections differential in pT 00016 /// 00017 /// @author Paul Bell, Holger Schulz 00018 00019 00020 class ATLAS_2011_I926145 : public Analysis { 00021 public: 00022 00023 /// Constructor 00024 ATLAS_2011_I926145() 00025 : Analysis("ATLAS_2011_I926145") 00026 { 00027 } 00028 00029 00030 public: 00031 00032 /// Book histograms and initialise projections before the run 00033 void init() { 00034 00035 ///projection for electrons 00036 std::vector<std::pair<double, double> > eta_e; 00037 eta_e.push_back(make_pair(-2.00,-1.52)); 00038 eta_e.push_back(make_pair(-1.37,1.37)); 00039 eta_e.push_back(make_pair(1.52,2.00)); 00040 IdentifiedFinalState elecs(eta_e, 7.0*GeV); 00041 elecs.acceptId(ELECTRON); 00042 elecs.acceptId(POSITRON); 00043 addProjection(elecs, "elecs"); 00044 00045 //projection for muons -- same phase space as above??? Not sure if the crack region has 00046 //to be removed for the muons as well 00047 std::vector<std::pair<double, double> > eta_m; 00048 //eta_m.push_back(make_pair(-2.00,-1.52)); 00049 //eta_m.push_back(make_pair(-1.37,1.37)); 00050 //eta_m.push_back(make_pair(1.52,2.00)); 00051 //IdentifiedFinalState muons(eta_m, 7.0*GeV); 00052 IdentifiedFinalState muons(-2.0, 2.0, 7.0*GeV); 00053 muons.acceptId(MUON); 00054 muons.acceptId(ANTIMUON); 00055 addProjection(muons, "muons"); 00056 00057 //projection for muons full range 00058 IdentifiedFinalState muons_full(-2.5, 2.5, 4.0*GeV); 00059 muons_full.acceptId(MUON); 00060 muons_full.acceptId(ANTIMUON); 00061 addProjection(muons_full, "muons_full"); 00062 00063 //// ZFinder: etaMin, etaMax, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons 00064 ZFinder zfinder_e(-2.0, 2.0, 0.0, ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, false, false); 00065 addProjection(zfinder_e, "ZFinder_e"); 00066 00067 ZFinder zfinder_mu(-2.0, 2.0, 0.0, MUON, 66.0*GeV, 116.0*GeV, 0.1, false, false); 00068 addProjection(zfinder_mu, "ZFinder_mu"); 00069 00070 ZFinder zfinder_mufull(-2.5, 2.5, 0.0, MUON, 66.0*GeV, 116.0*GeV, 0.1, false, false); 00071 addProjection(zfinder_mufull, "ZFinder_mufull"); 00072 00073 00074 //// WFinder: etaMin, etaMax, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons 00075 WFinder wfinder_e(-2.0, 2.0, 0.0*GeV, ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); 00076 addProjection(wfinder_e, "WFinder_e"); 00077 00078 WFinder wfinder_mu(-2.0, 2.0, 0.0*GeV, MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); 00079 addProjection(wfinder_mu, "WFinder_mu"); 00080 00081 WFinder wfinder_mufull(-2.5, 2.5, 0.0*GeV, MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); 00082 addProjection(wfinder_mufull, "WFinder_mufull"); 00083 00084 00085 // Book histograms - use autobooking 00086 _histPt_elecs = bookHisto1D(1 ,1 ,1); 00087 _histPt_muons = bookHisto1D(2 ,1 ,1); 00088 _histPt_muons_full = bookHisto1D(3 ,1 ,1); 00089 } 00090 00091 /// Perform the per-event analysis 00092 void analyze(const Event& event) { 00093 const double weight = event.weight(); 00094 00095 const FinalState& elecs = applyProjection<FinalState>(event, "elecs"); 00096 const FinalState& muons = applyProjection<FinalState>(event, "muons"); 00097 const FinalState& muons_full = applyProjection<FinalState>(event, "muons_full"); 00098 00099 // Veto event if no lepton is present 00100 if (elecs.size() == 0 && muons.size() == 0 && muons_full.size() == 0) { 00101 vetoEvent; 00102 } 00103 00104 // Check for W and or Z bosons in event 00105 // 00106 // Z veto 00107 const ZFinder& zfinder_e = applyProjection<ZFinder>(event, "ZFinder_e"); 00108 const ZFinder& zfinder_mu = applyProjection<ZFinder>(event, "ZFinder_mu"); 00109 const ZFinder& zfinder_mufull = applyProjection<ZFinder>(event, "ZFinder_mufull"); 00110 00111 if (zfinder_e.bosons().size() > 0 || zfinder_mu.bosons().size() > 0 || zfinder_mufull.bosons().size() > 0) { 00112 MSG_DEBUG("Num elec Z-bosons found: " << zfinder_e.bosons().size()); 00113 MSG_DEBUG("Num muon Z-bosons found: " << zfinder_mu.bosons().size()); 00114 MSG_DEBUG("Num muon Z-bosons found (|eta|<2.5): " << zfinder_mufull.bosons().size()); 00115 vetoEvent; 00116 } 00117 00118 // W veto 00119 const WFinder& wfinder_e = applyProjection<WFinder>(event, "WFinder_e"); 00120 const WFinder& wfinder_mu = applyProjection<WFinder>(event, "WFinder_mu"); 00121 const WFinder& wfinder_mufull = applyProjection<WFinder>(event, "WFinder_mufull"); 00122 00123 if (wfinder_e.bosons().size() > 0 || wfinder_mu.bosons().size() > 0 || wfinder_mufull.bosons().size() > 0) { 00124 MSG_DEBUG("Num elec W-bosons found: " << wfinder_e.bosons().size()); 00125 MSG_DEBUG("Num muon W-bosons found: " << wfinder_mu.bosons().size()); 00126 MSG_DEBUG("Num muon W-bosons found (|eta|<2.5): " << wfinder_mufull.bosons().size()); 00127 vetoEvent; 00128 } 00129 00130 00131 // Electron histogram 00132 if (elecs.size() > 0) { 00133 foreach (const Particle& ele, elecs.particles()) { 00134 if (ele.momentum().pT()*GeV < 26.0) { 00135 _histPt_elecs->fill(ele.momentum().pT()*GeV, weight); 00136 } 00137 } 00138 } 00139 00140 // Muon histogram 00141 if (muons.size() > 0) { 00142 foreach (const Particle& muo, muons.particles()) { 00143 if (muo.momentum().pT()*GeV < 26.0) { 00144 _histPt_muons->fill(muo.momentum().pT()*GeV, weight); 00145 } 00146 } 00147 } 00148 00149 // Muon full histogram 00150 if (muons_full.size() > 0) { 00151 foreach (const Particle& muo, muons_full.particles()) { 00152 if (muo.momentum().pT()*GeV < 100.0) { 00153 _histPt_muons_full->fill(muo.momentum().pT()*GeV, weight); 00154 } 00155 } 00156 } 00157 } 00158 00159 /// Normalise histograms etc., after the run 00160 void finalize() { 00161 00162 // Data cross-section is given in nb! x-sections in rivet are in pb! 00163 scale(_histPt_elecs, crossSection()/nanobarn/sumOfWeights()); 00164 scale(_histPt_muons, crossSection()/nanobarn/sumOfWeights()); 00165 scale(_histPt_muons_full, crossSection()/nanobarn/sumOfWeights()); 00166 } 00167 00168 00169 00170 private: 00171 00172 /// @name Histograms 00173 Histo1DPtr _histPt_elecs; 00174 Histo1DPtr _histPt_muons; 00175 Histo1DPtr _histPt_muons_full; 00176 }; 00177 00178 00179 // The hook for the plugin system 00180 DECLARE_RIVET_PLUGIN(ATLAS_2011_I926145); 00181 00182 } Generated on Fri Dec 21 2012 15:03:38 for The Rivet MC analysis system by ![]() |