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