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 Cut cuts = ( EtaIn(-3.0, -1.5) 00027 | EtaIn(-1.1, 1.1) 00028 | EtaIn( 1.5, 3.0) ) 00029 & (Cuts::pT >= 20.0*GeV); 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, cuts, PID::ELECTRON, 70*GeV, 110*GeV, 0.2, ZFinder::CLUSTERNODECAY, ZFinder::TRACK); 00032 addProjection(zfinder_ee, "zfinder_ee"); 00033 ZFinder zfinder_mm(fs, 00034 EtaIn(-2.0, 2.0) & (Cuts::pT >= 15.0*GeV), 00035 PID::MUON, 70*GeV, 110*GeV, 0.0, ZFinder::NOCLUSTER, ZFinder::NOTRACK); 00036 addProjection(zfinder_mm, "zfinder_mm"); 00037 00038 /// Book histograms here 00039 _h_phistar_ee.addHistogram(0.0, 1.0, bookHisto1D(1, 1, 1)); 00040 _h_phistar_ee.addHistogram(1.0, 2.0, bookHisto1D(1, 1, 2)); 00041 _h_phistar_ee.addHistogram(2.0, 10.0, bookHisto1D(1, 1, 3)); 00042 _h_phistar_mm.addHistogram(0.0, 1.0, bookHisto1D(2, 1, 1)); 00043 _h_phistar_mm.addHistogram(1.0, 2.0, bookHisto1D(2, 1, 2)); 00044 } 00045 00046 00047 /// Perform the per-event analysis 00048 void analyze(const Event& event) { 00049 const double weight = event.weight(); 00050 00051 const ZFinder& zfinder_ee = applyProjection<ZFinder>(event, "zfinder_ee"); 00052 if (zfinder_ee.bosons().size() == 1) { 00053 Particles ee = zfinder_ee.constituents(); 00054 std::sort(ee.begin(), ee.end(), cmpMomByPt); 00055 const FourMomentum& eminus = PID::threeCharge(ee[0].pdgId()) < 0 ? ee[0].momentum() : ee[1].momentum(); 00056 const FourMomentum& eplus = PID::threeCharge(ee[0].pdgId()) < 0 ? ee[1].momentum() : ee[0].momentum(); 00057 double phi_acop = M_PI - mapAngle0ToPi(eminus.phi() - eplus.phi()); 00058 double costhetastar = tanh((eminus.eta() - eplus.eta())/2); 00059 double sin2thetastar = 1 - sqr(costhetastar); 00060 if (sin2thetastar < 0) sin2thetastar = 0; 00061 const double phistar = tan(phi_acop/2) * sqrt(sin2thetastar); 00062 const FourMomentum& zmom = zfinder_ee.bosons()[0].momentum(); 00063 _h_phistar_ee.fill(zmom.rapidity(), phistar, weight); 00064 } 00065 00066 const ZFinder& zfinder_mm = applyProjection<ZFinder>(event, "zfinder_mm"); 00067 if (zfinder_mm.bosons().size() == 1) { 00068 Particles mm = zfinder_mm.constituents(); 00069 std::sort(mm.begin(), mm.end(), cmpMomByPt); 00070 const FourMomentum& mminus = PID::threeCharge(mm[0].pdgId()) < 0 ? mm[0].momentum() : mm[1].momentum(); 00071 const FourMomentum& mplus = PID::threeCharge(mm[0].pdgId()) < 0 ? mm[1].momentum() : mm[0].momentum(); 00072 double phi_acop = M_PI - mapAngle0ToPi(mminus.phi() - mplus.phi()); 00073 double costhetastar = tanh((mminus.eta() - mplus.eta())/2); 00074 double sin2thetastar = 1 - sqr(costhetastar); 00075 if (sin2thetastar < 0) sin2thetastar = 0; 00076 const double phistar = tan(phi_acop/2) * sqrt(sin2thetastar); 00077 const FourMomentum& zmom = zfinder_mm.bosons()[0].momentum(); 00078 _h_phistar_mm.fill(zmom.rapidity(), phistar, weight); 00079 } 00080 } 00081 00082 00083 /// Normalise histograms etc., after the run 00084 void finalize() { 00085 foreach (Histo1DPtr hist, _h_phistar_ee.getHistograms()) normalize(hist); 00086 foreach (Histo1DPtr hist, _h_phistar_mm.getHistograms()) normalize(hist); 00087 } 00088 00089 //@} 00090 00091 00092 private: 00093 00094 /// @name Histograms 00095 //@{ 00096 BinnedHistogram<double> _h_phistar_ee; 00097 BinnedHistogram<double> _h_phistar_mm; 00098 //@} 00099 00100 00101 }; 00102 00103 00104 00105 // The hook for the plugin system 00106 DECLARE_RIVET_PLUGIN(D0_2010_S8821313); 00107 00108 } Generated on Thu Feb 6 2014 17:38:44 for The Rivet MC analysis system by ![]() |