D0_2010_S8821313.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Tools/BinnedHistogram.hh" 00004 #include "Rivet/Projections/FinalState.hh" 00005 #include "Rivet/Projections/ZFinder.hh" 00006 00007 namespace Rivet { 00008 00009 00010 class D0_2010_S8821313 : public Analysis { 00011 public: 00012 00013 /// Constructor 00014 D0_2010_S8821313() 00015 : Analysis("D0_2010_S8821313") 00016 { } 00017 00018 00019 /// @name Analysis methods 00020 //@{ 00021 00022 /// Book histograms and initialise projections before the run 00023 void init() { 00024 00025 /// Initialise and register projections 00026 vector<pair<double, double> > etaRanges_ee; 00027 etaRanges_ee.push_back(make_pair(-3.0, -1.5)); 00028 etaRanges_ee.push_back(make_pair(-1.1, 1.1)); 00029 etaRanges_ee.push_back(make_pair(1.5, 3.0)); 00030 FinalState fs; //< @todo Should the eta cuts be on the electrons or the resulting Z? I'd have thought the electrons 00031 ZFinder zfinder_ee(fs, etaRanges_ee, 20*GeV, PID::ELECTRON, 70*GeV, 110*GeV, 0.2, ZFinder::CLUSTERNODECAY, ZFinder::TRACK); 00032 addProjection(zfinder_ee, "zfinder_ee"); 00033 ZFinder zfinder_mm(fs, -2, 2, 15*GeV, PID::MUON, 70*GeV, 110*GeV, 0.0, ZFinder::NOCLUSTER, ZFinder::NOTRACK); 00034 addProjection(zfinder_mm, "zfinder_mm"); 00035 00036 /// Book histograms here 00037 _h_phistar_ee.addHistogram(0.0, 1.0, bookHisto1D(1, 1, 1)); 00038 _h_phistar_ee.addHistogram(1.0, 2.0, bookHisto1D(1, 1, 2)); 00039 _h_phistar_ee.addHistogram(2.0, 10.0, bookHisto1D(1, 1, 3)); 00040 _h_phistar_mm.addHistogram(0.0, 1.0, bookHisto1D(2, 1, 1)); 00041 _h_phistar_mm.addHistogram(1.0, 2.0, bookHisto1D(2, 1, 2)); 00042 } 00043 00044 00045 /// Perform the per-event analysis 00046 void analyze(const Event& event) { 00047 const double weight = event.weight(); 00048 00049 const ZFinder& zfinder_ee = applyProjection<ZFinder>(event, "zfinder_ee"); 00050 if (zfinder_ee.bosons().size() == 1) { 00051 Particles ee = zfinder_ee.constituents(); 00052 std::sort(ee.begin(), ee.end(), cmpMomByPt); 00053 const FourMomentum& eminus = PID::threeCharge(ee[0].pid()) < 0 ? ee[0].momentum() : ee[1].momentum(); 00054 const FourMomentum& eplus = PID::threeCharge(ee[0].pid()) < 0 ? ee[1].momentum() : ee[0].momentum(); 00055 double phi_acop = M_PI - mapAngle0ToPi(eminus.phi() - eplus.phi()); 00056 double costhetastar = tanh((eminus.eta() - eplus.eta())/2); 00057 double sin2thetastar = 1 - sqr(costhetastar); 00058 if (sin2thetastar < 0) sin2thetastar = 0; 00059 const double phistar = tan(phi_acop/2) * sqrt(sin2thetastar); 00060 const FourMomentum& zmom = zfinder_ee.bosons()[0].momentum(); 00061 _h_phistar_ee.fill(zmom.rapidity(), phistar, weight); 00062 } 00063 00064 const ZFinder& zfinder_mm = applyProjection<ZFinder>(event, "zfinder_mm"); 00065 if (zfinder_mm.bosons().size() == 1) { 00066 Particles mm = zfinder_mm.constituents(); 00067 std::sort(mm.begin(), mm.end(), cmpMomByPt); 00068 const FourMomentum& mminus = PID::threeCharge(mm[0].pid()) < 0 ? mm[0].momentum() : mm[1].momentum(); 00069 const FourMomentum& mplus = PID::threeCharge(mm[0].pid()) < 0 ? mm[1].momentum() : mm[0].momentum(); 00070 double phi_acop = M_PI - mapAngle0ToPi(mminus.phi() - mplus.phi()); 00071 double costhetastar = tanh((mminus.eta() - mplus.eta())/2); 00072 double sin2thetastar = 1 - sqr(costhetastar); 00073 if (sin2thetastar < 0) sin2thetastar = 0; 00074 const double phistar = tan(phi_acop/2) * sqrt(sin2thetastar); 00075 const FourMomentum& zmom = zfinder_mm.bosons()[0].momentum(); 00076 _h_phistar_mm.fill(zmom.rapidity(), phistar, weight); 00077 } 00078 } 00079 00080 00081 /// Normalise histograms etc., after the run 00082 void finalize() { 00083 foreach (Histo1DPtr hist, _h_phistar_ee.getHistograms()) normalize(hist); 00084 foreach (Histo1DPtr hist, _h_phistar_mm.getHistograms()) normalize(hist); 00085 } 00086 00087 //@} 00088 00089 00090 private: 00091 00092 /// @name Histograms 00093 //@{ 00094 BinnedHistogram<double> _h_phistar_ee; 00095 BinnedHistogram<double> _h_phistar_mm; 00096 //@} 00097 00098 00099 }; 00100 00101 00102 00103 // The hook for the plugin system 00104 DECLARE_RIVET_PLUGIN(D0_2010_S8821313); 00105 00106 } Generated on Mon Jun 2 2014 15:23:01 for The Rivet MC analysis system by ![]() |