|
[Rivet-svn] r1722 - in trunk: include/Rivet include/Rivet/Analyses src/Analysesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgThu Jul 30 17:28:53 BST 2009
Author: cvaillant Date: Thu Jul 30 17:28:52 2009 New Revision: 1722 Log: Adding UA1 and UA5 min bias analyses' source code Added: trunk/include/Rivet/Analyses/CDF_1988_S1865951.hh trunk/include/Rivet/Analyses/MC_LHC_DIJET.hh trunk/include/Rivet/Analyses/MC_LHC_ZANALYSIS.hh trunk/include/Rivet/Analyses/UA1_1990_S2044935.hh trunk/include/Rivet/Analyses/UA5_1982_S875503.hh trunk/include/Rivet/Analyses/UA5_1986_S1583476.hh trunk/src/Analyses/CDF_1988_S1865951.cc (contents, props changed) trunk/src/Analyses/MC_LHC_DIJET.cc (contents, props changed) trunk/src/Analyses/MC_LHC_ZANALYSIS.cc trunk/src/Analyses/UA1_1990_S2044935.cc (contents, props changed) trunk/src/Analyses/UA5_1982_S875503.cc (contents, props changed) trunk/src/Analyses/UA5_1986_S1583476.cc (contents, props changed) Modified: trunk/include/Rivet/Makefile.am trunk/src/Analyses/Makefile.am trunk/src/Analyses/StdAnalyses.cc Added: trunk/include/Rivet/Analyses/CDF_1988_S1865951.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/include/Rivet/Analyses/CDF_1988_S1865951.hh Thu Jul 30 17:28:52 2009 (r1722) @@ -0,0 +1,43 @@ +// -*- C++ -*- +#ifndef RIVET_CDF_1988_S1865951_HH +#define RIVET_CDF_1988_S1865951_HH + +#include "Rivet/Analysis.hh" + +namespace Rivet { + + + class CDF_1988_S1865951 : public Analysis { + + public: + + /// @name Constructor etc. + //@{ + + /// constructor + CDF_1988_S1865951(); + + /// Factory method + static Analysis* create() { + return new CDF_1988_S1865951(); + } + + //@} + + + /// @name Analysis methods + //@{ + void init(); + void analyze(const Event& event); + void finalize(); + //@} + + private: + AIDA::IHistogram1D* _hist_pt630; + AIDA::IHistogram1D* _hist_pt1800; + }; + +} + +#endif + Added: trunk/include/Rivet/Analyses/MC_LHC_DIJET.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/include/Rivet/Analyses/MC_LHC_DIJET.hh Thu Jul 30 17:28:52 2009 (r1722) @@ -0,0 +1,56 @@ +// -*- C++ -*- +#ifndef RIVET_MC_LHC_DIJET_HH +#define RIVET_MC_LHC_DIJET_HH + +#include "Rivet/Analysis.hh" + +namespace Rivet { + + + class MC_LHC_DIJET : public Analysis { + + public: + + /// @name Constructor etc. + //@{ + + /// constructor + MC_LHC_DIJET(); + + /// Factory method + static Analysis* create() { + return new MC_LHC_DIJET(); + } + + //@} + + + /// @name Analysis methods + //@{ + void init(); + void analyze(const Event& event); + void finalize(); + //@} + +private: +AIDA::IHistogram1D* _hist_jetcount; +AIDA::IHistogram1D* _hist_jetpt; +AIDA::IHistogram1D* _hist_jetptlog; +AIDA::IHistogram1D* _hist_leadingjetpt; +AIDA::IHistogram1D* _hist_secondleadingjetpt; +AIDA::IHistogram1D* _hist_jetphi; +AIDA::IHistogram1D* _hist_jetdphi; +AIDA::IHistogram1D* _hist_jeteta; +AIDA::IHistogram1D* _hist_jetdeta; +AIDA::IHistogram1D* _hist_chargemultiplicity; +AIDA::IHistogram1D* _hist_chargemeanpt; +AIDA::IHistogram1D* _hist_chargept; +AIDA::IHistogram1D* _hist_chargelogpt; +AIDA::IHistogram1D* _hist_chargermspt; + + }; + +} + +#endif + Added: trunk/include/Rivet/Analyses/MC_LHC_ZANALYSIS.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/include/Rivet/Analyses/MC_LHC_ZANALYSIS.hh Thu Jul 30 17:28:52 2009 (r1722) @@ -0,0 +1,58 @@ +// -*- C++ -*- +#ifndef RIVET_MC_LHC_ZANALYSIS_HH +#define RIVET_MC_LHC_ZANALYSIS_HH + +#include "Rivet/Analysis.hh" + +namespace Rivet { + + + class MC_LHC_ZANALYSIS : public Analysis { + + public: + + /// @name Constructor etc. + //@{ + + /// constructor + MC_LHC_ZANALYSIS(); + + /// Factory method + static Analysis* create() { + return new MC_LHC_ZANALYSIS(); + } + + //@} + + + /// @name Analysis methods + //@{ + void init(); + void analyze(const Event& event); + void finalize(); + //@} + +private: +AIDA::IHistogram1D* _hist_chargemulti; +AIDA::IHistogram1D* _hist_chargept; +AIDA::IHistogram1D* _hist_chargemeanpt; +AIDA::IHistogram1D* _hist_chargermspt; +AIDA::IHistogram1D* _hist_zcount; +AIDA::IHistogram1D* _hist_zpt; +AIDA::IHistogram1D* _hist_zlogpt; +//AIDA::IHistogram1D* _hist_zpthigh; +// AIDA::IHistogram1D* _hist_zlogpthigh; +AIDA::IHistogram1D* _hist_zeta; +AIDA::IHistogram1D* _hist_zphi; +AIDA::IHistogram1D* _hist_zmass; +AIDA::IHistogram1D* _hist_zlogmass; +AIDA::IHistogram1D* _hist_jetcount; +AIDA::IHistogram1D* _hist_jetpt; +AIDA::IHistogram1D* _hist_jetlogpt; + + }; + +} + +#endif + Added: trunk/include/Rivet/Analyses/UA1_1990_S2044935.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/include/Rivet/Analyses/UA1_1990_S2044935.hh Thu Jul 30 17:28:52 2009 (r1722) @@ -0,0 +1,60 @@ +// -*- C++ -*- +#ifndef RIVET_UA1_1990_S2044935_HH +#define RIVET_UA1_1990_S2044935_HH + +#include "Rivet/Analysis.hh" + +namespace Rivet { + + class UA1_1990_S2044935 : public Analysis { + + public: + + /// @name Constructor etc. + //@{ + + /// constructor + UA1_1990_S2044935(); + + /// Factory method + static Analysis* create() { + return new UA1_1990_S2044935(); + } + + /// @name Analysis methods + //@{ + void init(); + void analyze(const Event& event); + void finalize(); + //@} + + private: + + /// @name Histogram collections + //@{ + AIDA::IHistogram1D* _hist_sigma200; + AIDA::IHistogram1D* _hist_sigma500; + AIDA::IHistogram1D* _hist_sigma900; + AIDA::IHistogram1D* _hist_Esigma200; + AIDA::IHistogram1D* _hist_Esigma500; + AIDA::IHistogram1D* _hist_Esigma900; + AIDA::IHistogram1D* _hist_Esigmapoint8; + AIDA::IHistogram1D* _hist_Esigma4; + AIDA::IHistogram1D* _hist_Esigma8; + AIDA::IProfile1D* _hist_Pt63; + AIDA::IProfile1D* _hist_Pt200; + AIDA::IProfile1D* _hist_Pt900; + AIDA::IProfile1D* _hist_Etavg200; + AIDA::IProfile1D* _hist_Etavg500; + AIDA::IProfile1D* _hist_Etavg900; + AIDA::IHistogram1D* _hist_Et200; + AIDA::IHistogram1D* _hist_Et500; + AIDA::IHistogram1D* _hist_Et900; + //@} + + }; + +} + +#endif + Added: trunk/include/Rivet/Analyses/UA5_1982_S875503.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/include/Rivet/Analyses/UA5_1982_S875503.hh Thu Jul 30 17:28:52 2009 (r1722) @@ -0,0 +1,48 @@ +// -*- C++ -*- +#ifndef RIVET_UA5_1982_S875503_HH +#define RIVET_UA5_1982_S875503_HH + +#include "Rivet/Analysis.hh" + +namespace Rivet { + + + class UA5_1982_S875503 : public Analysis { + + public: + + /// @name Constructor etc. + //@{ + + /// constructor + UA5_1982_S875503(); + + /// Factory method + static Analysis* create() { + return new UA5_1982_S875503(); + } + + //@} + + + /// @name Analysis methods + //@{ + void init(); + void analyze(const Event& event); + void finalize(); + //@} + + private: + + /// @name Histogram collections + //@{ + AIDA::IHistogram1D* _hist_etapp; + AIDA::IHistogram1D* _hist_etappbar; + //@} + + }; + +} + +#endif + Added: trunk/include/Rivet/Analyses/UA5_1986_S1583476.hh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/include/Rivet/Analyses/UA5_1986_S1583476.hh Thu Jul 30 17:28:52 2009 (r1722) @@ -0,0 +1,46 @@ +// -*- C++ -*- +#ifndef RIVET_UA5_1986_S1583476_HH +#define RIVET_UA5_1986_S1583476_HH + +#include "Rivet/Analysis.hh" + +namespace Rivet { + + + class UA5_1986_S1583476 : public Analysis { + + public: + + /// @name Constructor etc. + //@{ + + /// constructor + UA5_1986_S1583476(); + + /// Factory method + static Analysis* create() { + return new UA5_1986_S1583476(); + } + + //@} + + + /// @name Analysis methods + //@{ + void init(); + void analyze(const Event& event); + void finalize(); + //@} + + + private: + + AIDA::IHistogram1D* _hist_eta200; + AIDA::IHistogram1D* _hist_eta900; + + }; + +} + +#endif + Modified: trunk/include/Rivet/Makefile.am ============================================================================== --- trunk/include/Rivet/Makefile.am Thu Jul 30 13:35:07 2009 (r1721) +++ trunk/include/Rivet/Makefile.am Thu Jul 30 17:28:52 2009 (r1722) @@ -37,6 +37,7 @@ Analyses/ExampleTree.hh \ Analyses/ALEPH_1991_S2435284.hh \ Analyses/ALEPH_1996_S3486095.hh \ + Analyses/CDF_1988_S1865951.hh \ Analyses/CDF_1990_S2089246.hh \ Analyses/CDF_1994_S2952106.hh \ Analyses/CDF_2000_S4155203.hh \ @@ -82,10 +83,15 @@ Analyses/PDG_Hadron_Multiplicities_Ratios.hh \ Analyses/MC_TVT1960_ZJETS.hh \ Analyses/MC_LHC_LEADINGJETS.hh \ + Analyses/MC_LHC_ZANALYSIS.hh \ + Analyses/MC_LHC_DIJET.hh \ Analyses/STAR_2006_S6870392.hh \ Analyses/STAR_2008_S7993412.hh \ Analyses/STAR_2009_UE_HELEN.hh \ - Analyses/UA5_1989_S1926373.hh + Analyses/UA5_1989_S1926373.hh \ + Analyses/UA5_1982_S875503.hh \ + Analyses/UA5_1986_S1583476.hh \ + Analyses/UA1_1990_S2044935.hh ## Projections @@ -125,7 +131,7 @@ Projections/UnstableFinalState.hh \ Projections/VetoedFinalState.hh \ Projections/VisibleFinalState.hh \ - Projections/ZFinder.hh + Projections/ZFinder.hh ## Tools Added: trunk/src/Analyses/CDF_1988_S1865951.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/src/Analyses/CDF_1988_S1865951.cc Thu Jul 30 17:28:52 2009 (r1722) @@ -0,0 +1,58 @@ +#include "Rivet/Analysis.hh" +#include "Rivet/Projections/FinalState.hh" +#include "Rivet/Projections/ChargedFinalState.hh" +#include "Rivet/AnalysisLoader.hh" +#include "Rivet/RivetAIDA.hh" +#include "Rivet/Projections/TotalVisibleMomentum.hh" +#include "Rivet/Projections/FastJets.hh" +#include "Rivet/Projections/Beam.hh" +#include "Rivet/Analyses/CDF_1988_S1865951.hh" + +namespace Rivet { + + /// Default constructor + CDF_1988_S1865951::CDF_1988_S1865951() + : Analysis("CDF_1988_S1865951") { + const ChargedFinalState cfs(-1.,1.); + addProjection(cfs, "CFS"); + addProjection(TotalVisibleMomentum(cfs), "Mom"); + addProjection(Beam(), "Beam"); + } + + /// @name Analysis methods + //@{ + void CDF_1988_S1865951::init() { + _hist_pt630 = bookHistogram1D(1, 1, 1); + _hist_pt1800 = bookHistogram1D(2, 1, 1); + } + + void CDF_1988_S1865951::analyze(const Event& event) { + const double sqrtS = applyProjection<Beam>(event, "Beam").sqrtS(); + const FinalState& fs = applyProjection<ChargedFinalState>(event, "CFS"); + const double weight = event.weight(); + + foreach (Particle p, fs.particles()) + { + double pt = p.momentum().pT(); + if (fuzzyEquals(sqrtS, 630/GeV)) + { + _hist_pt630->fill(pt, weight/(10.*M_PI*pt)); + } + else if (fuzzyEquals(sqrtS, 1800/GeV)) + { + _hist_pt1800->fill(pt, weight/(10.*M_PI*pt)); + } + + } + } + + void CDF_1988_S1865951::finalize() { + ///@todo Total cross section hard-coded, needs a way to pass variable from pythia. + scale(_hist_pt630, 32.6/sumOfWeights()); + scale(_hist_pt1800, 38.5/sumOfWeights()); + } + //@} + + + + } Added: trunk/src/Analyses/MC_LHC_DIJET.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/src/Analyses/MC_LHC_DIJET.cc Thu Jul 30 17:28:52 2009 (r1722) @@ -0,0 +1,104 @@ +#include "Rivet/Analysis.hh" +#include "Rivet/Projections/FinalState.hh" +#include "Rivet/Projections/ChargedFinalState.hh" +#include "Rivet/AnalysisLoader.hh" +#include "Rivet/RivetAIDA.hh" +#include "Rivet/Rivet.hh" +#include "Rivet/Projections/FastJets.hh" +#include "Rivet/Analyses/MC_LHC_DIJET.hh" + +namespace Rivet { + +/// Default constructor +MC_LHC_DIJET::MC_LHC_DIJET() +: Analysis("MC_LHC_DIJET") { +FinalState fs; +ChargedFinalState cfs; +addProjection(fs, "FS"); +addProjection(cfs, "CFS"); +addProjection(FastJets(fs, FastJets::KT, 0.7), "Jets"); +addProjection(FastJets(cfs, FastJets::KT, 0.7), "ChargedJets"); +} + + + +/// @name Analysis methods +//@{ +void MC_LHC_DIJET::init() { +_hist_jetcount = bookHistogram1D("d01-x01-y01", 5, 0., 10.); + +_hist_jetpt = bookHistogram1D("d02-x01-y01", 30, 30.,100.); + +_hist_jetptlog = bookHistogram1D("d03-x01-y01", 20, 0.,8.); + +_hist_leadingjetpt = bookHistogram1D("d04-x01-y01", 25, 30.,100.); + +_hist_secondleadingjetpt = bookHistogram1D("d05-x01-y01", 25, 30.,100.); + +_hist_jetphi = bookHistogram1D("d06-x01-y01",24, 0., 6.4); + +_hist_jeteta = bookHistogram1D("d07-x01-y01", 30, -6., 6.); + +_hist_jetdphi = bookHistogram1D("d08-x01-y01", 24, 0., 6.4); + +_hist_jetdeta = bookHistogram1D("d09-x01-y01", 24, 0., 6.); + +_hist_chargemultiplicity = bookHistogram1D("d10-x01-y01",30, 0.5, 250.5); + +_hist_chargemeanpt = bookHistogram1D("d11-x01-y01", 25, 0., 10.); + +_hist_chargept = bookHistogram1D("d12-x01-y01", 32, 0., 25.); + +_hist_chargelogpt = bookHistogram1D("d13-x01-y01", 32, 0., 6.); + +_hist_chargermspt = bookHistogram1D("d14-x01-y01", 32, 0., 10.); +} + +void MC_LHC_DIJET::analyze(const Event& event) { +const FastJets& fastjets = applyProjection<FastJets>(event, "Jets"); +const Jets jets = fastjets.jetsByPt(20.); +const double weight = event.weight(); + +if (jets.size() < 2 || jets.size() >= 3) vetoEvent; +const double angle = fabs(jets[1].momentum().azimuthalAngle() - jets[0].momentum().azimuthalAngle()); +const double prapidity = fabs(jets[1].momentum().pseudorapidity() - jets[0].momentum().pseudorapidity()); + _hist_jetcount->fill(jets.size(), weight); + _hist_leadingjetpt->fill(jets[0].momentum().pT(), weight); + _hist_secondleadingjetpt->fill(jets[1].momentum().pT(), weight); + _hist_jetdphi->fill(angle , weight); + _hist_jetdeta->fill(prapidity, weight); + + +foreach(Jet j, fastjets.jetsByPt(20.)) { + _hist_jetpt->fill(j.momentum().pT(), weight); + _hist_jetptlog->fill(log(j.momentum().pT()), weight); + _hist_jetphi->fill(j.momentum().azimuthalAngle(), weight); + _hist_jeteta->fill(j.momentum().pseudorapidity(), weight); +} + +const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(event, "CFS"); +// const FastJets& cfastjets = applyProjection<FastJets>(event, "ChargedJets"); +// const Jets cjets = cfastjets.jetsByPt(20.); +double meanpt = 0.; +double rmspt = 0.; +// foreach(Jet cj, cfastjets.jetsByPt(20.)){ + _hist_chargemultiplicity->fill(cfs.particles().size(), weight); + foreach(Particle cp, cfs.particles()) { + meanpt= meanpt + cp.momentum().pT(); + rmspt = rmspt + (cp.momentum().pT()*cp.momentum().pT()); + _hist_chargept->fill(cp.momentum().pT(), weight); + _hist_chargelogpt->fill(log(cp.momentum().pT()), weight); + } + meanpt = meanpt / cfs.particles().size(); + _hist_chargemeanpt->fill(meanpt, weight); + rmspt = sqrt(rmspt / cfs.particles().size()); + _hist_chargermspt->fill(rmspt, weight); +// } +} + +void MC_LHC_DIJET::finalize() { +} +//@} +//Nothing to normalise to. +} + Added: trunk/src/Analyses/MC_LHC_ZANALYSIS.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/src/Analyses/MC_LHC_ZANALYSIS.cc Thu Jul 30 17:28:52 2009 (r1722) @@ -0,0 +1,106 @@ +#include "Rivet/Analysis.hh" +#include "Rivet/Projections/ChargedFinalState.hh" +#include "Rivet/AnalysisLoader.hh" +#include "Rivet/RivetAIDA.hh" +#include "Rivet/Projections/TotalVisibleMomentum.hh" +#include "Rivet/Projections/ZFinder.hh" +#include "Rivet/Projections/FastJets.hh" +#include "Rivet/Analyses/MC_LHC_ZANALYSIS.hh" + +namespace Rivet { + +/// Default constructor +MC_LHC_ZANALYSIS::MC_LHC_ZANALYSIS() +: Analysis("MC_LHC_ZANALYSIS") { +const ChargedFinalState cfs; +addProjection(cfs, "CFS"); +const ZFinder zf(-MaxRapidity, MaxRapidity, 0.0*GeV, ELECTRON, 30.0*GeV, 115.0*GeV, 0.2); +addProjection(zf, "ZF"); +FastJets fastjets(zf.remainingFinalState(), FastJets::KT, 0.7); +addProjection(fastjets, "Jets"); +} + +/// @name Analysis methods +///@todo change "Weights" to differential cross sections once histos normalised to cross-section. +//@{ +void MC_LHC_ZANALYSIS::init() { + _hist_chargemulti = bookHistogram1D("d01-x01-y01", 30, 0.5, 250.5); + + _hist_chargept = bookHistogram1D("d02-x01-y01", 32, 0., 25.); + + _hist_chargemeanpt = bookHistogram1D("d03-x01-y01", 25, 0., 10.); + + _hist_chargermspt = bookHistogram1D("d04-x01-y01", 32, 0., 10.); + + _hist_zcount = bookHistogram1D("d05-x01-y01", 30, 0., 15.); + + _hist_zpt = bookHistogram1D("d06-x01-y01", 32, 0., 25.); + + _hist_zlogpt = bookHistogram1D("d07-x01-y01", 32, 0., 6.); + + + _hist_zeta = bookHistogram1D("d08-x01-y01", 32, -6., 6.); + + _hist_zphi = bookHistogram1D("d09-x01-y01", 32, 0., 6.4); + + _hist_zmass = bookHistogram1D("d10-x01-y01", 40, 60., 100.); + + _hist_zlogmass = bookHistogram1D("d11-x01-y01",32, 0., 10.); + + _hist_jetcount = bookHistogram1D("d12-x01-y01", 32, 0, 100); + + _hist_jetpt = bookHistogram1D("d13-x01-y01",32, 20., 100.); + + _hist_jetlogpt = bookHistogram1D("d14-x01-y01", 32, 0., 20.); +} + +void MC_LHC_ZANALYSIS::analyze(const Event& event) { +const FinalState& cfs = applyProjection<FinalState>(event, "CFS"); +const ZFinder zf = applyProjection<ZFinder>(event, "ZF"); +const FastJets fastjets = applyProjection<FastJets>(event, "Jets"); +const Jets jets = fastjets.jetsByPt(); +const double weight = event.weight(); +double meanpt = 0.; +double rmspt = 0.; + +//charged particles part + +_hist_chargemulti->fill(cfs.particles().size(), weight); +foreach(Particle p, cfs.particles()){ + + _hist_chargept->fill(p.momentum().pT(), weight); + meanpt = meanpt + p.momentum().pT(); + rmspt = rmspt + p.momentum().pT()*p.momentum().pT(); +} + +meanpt = meanpt/ cfs.particles().size(); +_hist_chargemeanpt->fill(meanpt, weight); +rmspt = sqrt(rmspt / cfs.particles().size()); +_hist_chargermspt->fill(rmspt, weight); + +//Z part. + +_hist_zcount->fill(zf.particles().size(), weight); +foreach(Particle zp, zf.particles()){ + _hist_zpt->fill(zp.momentum().pT(), weight); + _hist_zlogpt->fill(log(zp.momentum().pT()), weight); + _hist_zeta->fill(zp.momentum().pseudorapidity(), weight); + _hist_zphi->fill(zp.momentum().azimuthalAngle(), weight); + _hist_zmass->fill(zp.momentum().mass(), weight); + _hist_zlogmass->fill(log(zp.momentum().mass()), weight); +} + +//Jet part +_hist_jetcount->fill(fastjets.size(), weight); +foreach(Jet j, fastjets.jetsByPt()){ + _hist_jetpt->fill(j.momentum().pT(), weight); + _hist_jetlogpt->fill(log(j.momentum().pT()), weight); +} +} + +void MC_LHC_ZANALYSIS::finalize() { +///@todo Obtain cross-sections from generator and normalise histos to them. +} +//@} + +} Modified: trunk/src/Analyses/Makefile.am ============================================================================== --- trunk/src/Analyses/Makefile.am Thu Jul 30 13:35:07 2009 (r1721) +++ trunk/src/Analyses/Makefile.am Thu Jul 30 17:28:52 2009 (r1722) @@ -5,6 +5,7 @@ ExampleTree.cc \ ALEPH_1991_S2435284.cc \ ALEPH_1996_S3486095.cc \ + CDF_1988_S1865951.cc \ CDF_1990_S2089246.cc \ CDF_1994_S2952106.cc \ CDF_2000_S4155203.cc \ @@ -50,8 +51,13 @@ PDG_Hadron_Multiplicities_Ratios.cc \ MC_TVT1960_ZJETS.cc \ MC_LHC_LEADINGJETS.cc \ + MC_LHC_DIJET.cc \ + MC_LHC_ZANALYSIS.cc \ STAR_2006_S6870392.cc \ STAR_2008_S7993412.cc \ + UA1_1990_S2044935.cc \ + UA5_1982_S875503.cc \ + UA5_1986_S1583476.cc \ UA5_1988_S1867512.cc \ UA5_1989_S1926373.cc #STAR_2009_UE_HELEN.cc Modified: trunk/src/Analyses/StdAnalyses.cc ============================================================================== --- trunk/src/Analyses/StdAnalyses.cc Thu Jul 30 13:35:07 2009 (r1721) +++ trunk/src/Analyses/StdAnalyses.cc Thu Jul 30 17:28:52 2009 (r1722) @@ -26,6 +26,7 @@ #include "Rivet/Analyses/ZEUS_2001_S4815815.hh" // Tevatron +#include "Rivet/Analyses/CDF_1988_S1865951.hh" #include "Rivet/Analyses/CDF_1990_S2089246.hh" #include "Rivet/Analyses/CDF_1994_S2952106.hh" #include "Rivet/Analyses/CDF_2000_S4155203.hh" @@ -66,10 +67,17 @@ // UA5 #include "Rivet/Analyses/UA5_1988_S1867512.hh" #include "Rivet/Analyses/UA5_1989_S1926373.hh" +#include "Rivet/Analyses/UA5_1982_S875503.hh" +#include "Rivet/Analyses/UA5_1986_S1583476.hh" + +//UA1 +#include "Rivet/Analyses/UA1_1990_S2044935.hh" // MC validation #include "Rivet/Analyses/MC_TVT1960_ZJETS.hh" #include "Rivet/Analyses/MC_LHC_LEADINGJETS.hh" +#include "Rivet/Analyses/MC_LHC_ZANALYSIS.hh" +#include "Rivet/Analyses/MC_LHC_DIJET.hh" extern "C" { @@ -107,6 +115,7 @@ fns["ZEUS_2001_S4815815"] = Rivet::ZEUS_2001_S4815815::create; // Tevatron + fns["CDF_1988_S1865951"] = Rivet::CDF_1988_S1865951::create; fns["CDF_1990_S2089246"] = Rivet::CDF_1990_S2089246::create; fns["CDF_1994_S2952106"] = Rivet::CDF_1994_S2952106::create; fns["CDF_2000_S4155203"] = Rivet::CDF_2000_S4155203::create; @@ -147,6 +156,11 @@ // UA5 fns["UA5_1988_S1867512"] = Rivet::UA5_1988_S1867512::create; fns["UA5_1989_S1926373"] = Rivet::UA5_1989_S1926373::create; + fns["UA5_1982_S875503"] = Rivet::UA5_1982_S875503::create; + fns["UA5_1986_S1583476"] = Rivet::UA5_1986_S1583476::create; + + // UA1 + fns["UA1_1990_S2044935"] = Rivet::UA1_1990_S2044935::create; // General fns["PDG_HADRON_MULTIPLICITIES"] = Rivet::PDG_HADRON_MULTIPLICITIES::create; @@ -155,6 +169,8 @@ // MC validation fns["MC_TVT1960_ZJETS"] = Rivet::MC_TVT1960_ZJETS::create; fns["MC_LHC_LEADINGJETS"] = Rivet::MC_LHC_LEADINGJETS::create; + fns["MC_LHC_ZANALYSIS"] = Rivet::MC_LHC_ZANALYSIS::create; + fns["MC_LHC_DIJET"] = Rivet::MC_LHC_DIJET::create; return fns; } Added: trunk/src/Analyses/UA1_1990_S2044935.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/src/Analyses/UA1_1990_S2044935.cc Thu Jul 30 17:28:52 2009 (r1722) @@ -0,0 +1,183 @@ +#include "Rivet/Analysis.hh" +#include "Rivet/AnalysisLoader.hh" +#include "Rivet/RivetAIDA.hh" +#include "Rivet/Tools/ParticleIDMethods.hh" +#include "Rivet/Projections/FinalState.hh" +#include "Rivet/Projections/ChargedFinalState.hh" +#include "Rivet/Projections/Beam.hh" +#include "Rivet/Projections/PVertex.hh" +#include "Rivet/Projections/TotalVisibleMomentum.hh" +#include "Rivet/Analyses/UA1_1990_S2044935.hh" + +namespace Rivet { + + /// Default constructor + UA1_1990_S2044935::UA1_1990_S2044935() + : Analysis("UA1_1990_S2044935") + { + setBeams(PROTON, ANTIPROTON); + const ChargedFinalState cfs(-2.5, 2.5); + const FinalState fs2(-6., 6.); + const FinalState fs(-2.5,2.5); + addProjection(fs, "FS"); + addProjection(fs2, "FS2"); + addProjection(ChargedFinalState(-2.5, 2.5), "CFS"); + addProjection(Beam(), "Beam"); + addProjection(TotalVisibleMomentum(fs), "Mom"); + } + + /// @name Analysis methods + //@{ + //book histograms + void UA1_1990_S2044935::init() { + + _hist_sigma200 = + bookHistogram1D(1,1,1); + _hist_sigma500 = + bookHistogram1D(1,1,2); + _hist_sigma900 = + bookHistogram1D(1,1,3); + _hist_Esigma200 = + bookHistogram1D(2,1,1); + _hist_Esigma500 = + bookHistogram1D(2,1,2); + _hist_Esigma900 = + bookHistogram1D(2,1,3); + _hist_Esigmapoint8 = + bookHistogram1D(3,1,1); + _hist_Esigma4 = + bookHistogram1D(4,1,1); + _hist_Esigma8 = + bookHistogram1D(5,1,1); + _hist_Et200 = + bookHistogram1D(9,1,1); + _hist_Et500 = + bookHistogram1D(10,1,1); + _hist_Et900 = + bookHistogram1D(11,1,1); + _hist_Pt63 = + bookProfile1D(6,1,1); + _hist_Pt200 = + bookProfile1D(7,1,1); + _hist_Pt900 = + bookProfile1D(8,1,1); + _hist_Etavg200 = + bookProfile1D(12,1,1); + _hist_Etavg500 = + bookProfile1D(12,1,2); + _hist_Etavg900 = + bookProfile1D(12,1,3); + } + + void UA1_1990_S2044935::analyze(const Event& event) + { + const double sqrtS = applyProjection<Beam>(event, "Beam").sqrtS(); + const double weight = event.weight(); + const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(event, "CFS"); + const FinalState& fs = applyProjection<FinalState>(event, "FS"); + double multi = cfs.particles().size(); + + if (fuzzyEquals(sqrtS/GeV, 200, 1E-4)) + { + _hist_sigma200->fill(multi, weight); + } + else if (fuzzyEquals(sqrtS/GeV, 500)) + { + _hist_sigma500->fill(multi, weight); + } + else if (fuzzyEquals(sqrtS/GeV, 900)) + { + _hist_sigma900->fill(multi, weight); + } + + foreach (const Particle& p, fs.particles()) + { +///@todo figure out where the extra factor of 0.5 comes from in the weight factor (eta range?). + double pt = p.momentum().pT(); + if (fuzzyEquals(sqrtS/GeV, 200, 1E-4)) + { + _hist_Esigma200->fill(pt, weight/(2.*10.*M_PI*pt)); + } + if (fuzzyEquals(sqrtS/GeV, 500)) + { + _hist_Esigma500->fill(pt, weight/(2.*10.*M_PI*pt)); + } + if (fuzzyEquals(sqrtS/GeV, 900)) + { + _hist_Esigma900->fill(pt, weight/(2.*10.*M_PI*pt)); + if (multi >= 0.8 && multi <= 4) + { + _hist_Esigmapoint8->fill(pt, weight/(2.*10.*M_PI*pt)); + } + else if (multi > 4 && multi <= 8) + { + _hist_Esigma4->fill(pt, weight/(2.*10.*M_PI*pt)); + } + else if(multi > 8) + { + _hist_Esigma8->fill(pt, weight/(2.*10.*M_PI*pt)); + } + } + } + + const double Et = applyProjection<TotalVisibleMomentum>(event, "Mom").scalarET(); + + if (fuzzyEquals(sqrtS, 200, 1E-4)) + { + _hist_Et200->fill(Et, weight); + } + else if (fuzzyEquals(sqrtS, 500)) + { + _hist_Et500->fill(Et, weight); + } + else if (fuzzyEquals(sqrtS, 900)) + { + _hist_Et900->fill(Et, weight); + } + + foreach (const Particle& p, cfs.particles()) + { + { + if (fuzzyEquals(sqrtS, 63, 1E-3)) + { + _hist_Pt63->fill(multi, p.momentum().pT(), weight); + } + else if (fuzzyEquals(sqrtS, 200, 1E-4)) + { + _hist_Pt200->fill(multi, p.momentum().pT(), weight); + _hist_Etavg200->fill(multi, Et, weight); + } + else if (fuzzyEquals(sqrtS, 500)) + { + _hist_Etavg500->fill(multi, Et, weight); + } + else if (fuzzyEquals(sqrtS, 900)) + { + _hist_Pt900->fill(multi, p.momentum().pT(), weight); + _hist_Etavg900->fill(multi, Et, weight); + } + } + } + } + + + + void UA1_1990_S2044935::finalize() { + ///@todo: get the total cross-sections from the generator. + normalize(_hist_sigma200, 27.9); + normalize(_hist_sigma500, 31.5); + normalize(_hist_sigma900, 34.4); + scale(_hist_Esigma200, 27.9/sumOfWeights()); + scale(_hist_Esigma500, 31.5/sumOfWeights()); + scale(_hist_Esigma900, 34.4/sumOfWeights()); + scale(_hist_Esigmapoint8, 34.4/sumOfWeights()); + scale(_hist_Esigma4, 34.4/sumOfWeights()); + scale(_hist_Esigma8, 34.4/sumOfWeights()); + normalize(_hist_Et200, 27.9); + normalize(_hist_Et500, 31.5); + normalize(_hist_Et900, 34.4); + } + +} + + Added: trunk/src/Analyses/UA5_1982_S875503.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/src/Analyses/UA5_1982_S875503.cc Thu Jul 30 17:28:52 2009 (r1722) @@ -0,0 +1,154 @@ +#include "Rivet/Analysis.hh" +#include "Rivet/Projections/FinalState.hh" +#include "Rivet/Projections/Beam.hh" +#include "Rivet/Projections/ChargedFinalState.hh" +#include "Rivet/AnalysisLoader.hh" +#include "Rivet/Projections/TotalVisibleMomentum.hh" +#include "Rivet/Tools/ParticleIDMethods.hh" +#include "Rivet/RivetAIDA.hh" + +namespace Rivet { + + class UA5_1982_S875503 : public Analysis { + + public: + + /// Default constructor + UA5_1982_S875503() : Analysis("UA5_1982_S875503") { + const FinalState fs; + const ChargedFinalState cfs; + addProjection(Beam(), "Beam"); + addProjection(fs, "FS"); + addProjection(cfs, "CFS"); + } + + + /// Factory method + static Analysis* create() { + return new UA5_1982_S875503(); + } + + + /// Return the name of this analysis + string name() const { + return "UA5_1982_S875503"; + } + + /// Get the SPIRES ID code + string spiresId() const { + return "S875503"; + } + + /// Get a description of the analysis. + string description() const { + return ""; + } + + /// Experiment which performed and published this analysis. + string experiment() const { + return "UA5"; + } + + /// When published (preprint year according to SPIRES). + string year() const { + return "1982"; + } + + /// Summary of analysis + string summary() const{ + return ""; + } + + /// Beam conditions for this analysis + string runInfo() const{ + return "Either PP or PPBar"; + } + + string collider() const{ + return "Any"; + } + + vector<string> authors() const{ + return vector<string>(); + } + + vector<string> references() const{ + return vector<string>(); + } + + /// @name Analysis methods + //@{ + void init() + { + _hist_etapp = bookHistogram1D("d01-x01-y01", 35, 0., 3.5); + + _hist_etappbar = bookHistogram1D("d01-x01-y02", 35, 0., 3.5); + + _hist_nchpp = bookHistogram1D("d02-x01-y01", 18, 0., 36.); + + _hist_nchppbar = bookHistogram1D("d02-x01-y02", 18, 0., 36.); + } + + void analyze(const Event& event) + { + const Beam b = applyProjection<Beam>(event, "Beam"); + const FinalState& fs = applyProjection<FinalState>(event, "FS"); + const double weight = event.weight(); + foreach (const Particle& p, fs.particles()) + { + if ( b.beams().first.pdgId() == b.beams().second.pdgId()) + { + _hist_etapp->fill(p.momentum().pseudorapidity(), weight); + } + else if ( b.beams().first.pdgId() != b.beams().second.pdgId()) + { + _hist_etappbar->fill(p.momentum().pseudorapidity(), weight); + } + } + const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(event, "CFS"); + foreach (const Particle& p, cfs.particles()) + { + if ( b.beams().first.pdgId() == b.beams().second.pdgId()) + { + _hist_nchpp->fill(cfs.particles().size(), weight); + } + else if ( b.beams().first.pdgId() != b.beams().second.pdgId()) + { + _hist_nchppbar->fill(cfs.particles().size(), weight); + } + } + } + + void finalize() { + normalize(_hist_etapp); + normalize(_hist_etappbar); + normalize(_hist_nchpp); + normalize(_hist_nchppbar); + } + //@} + + + private: + + /// @name Histogram collections + //@{ + AIDA::IHistogram1D* _hist_etapp; + AIDA::IHistogram1D* _hist_etappbar; + AIDA::IHistogram1D* _hist_nchpp; + AIDA::IHistogram1D* _hist_nchppbar; + //@} + + + + }; + +// extern "C" { +// AnalysisBuilders getAnalysisBuilders() { +// AnalysisBuilders fns; +// fns["UA5_1982_S875503"] = Rivet::UA5_1982_S875503::create; +// return fns; +// } +// } + + +} Added: trunk/src/Analyses/UA5_1986_S1583476.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/src/Analyses/UA5_1986_S1583476.cc Thu Jul 30 17:28:52 2009 (r1722) @@ -0,0 +1,53 @@ +#include "Rivet/Analysis.hh" +#include "Rivet/Projections/FinalState.hh" +#include "Rivet/Projections/Beam.hh" +#include "Rivet/Rivet.hh" +#include "Rivet/Event.hh" +#include "Rivet/RivetAIDA.hh" +#include "Rivet/ProjectionHandler.hh" +#include "Rivet/AnalysisLoader.hh" +#include "Rivet/Tools/ParticleIDMethods.hh" +#include "Rivet/Analyses/UA5_1986_S1583476.hh" + +namespace Rivet { + + /// Default constructor + UA5_1986_S1583476::UA5_1986_S1583476() + : Analysis("UA5_1986_S1583476") { + const FinalState fs; + addProjection(fs, "FS"); + addProjection(Beam(), "Beam"); + } + + /// @name Analysis methods + //@{ + void UA5_1986_S1583476::init() { + _hist_eta200 = bookHistogram1D("d01-x01-y01", 20, 0., 5.); + _hist_eta900 = bookHistogram1D("d01-x01-y03", 30, 0., 10.); + } + + void UA5_1986_S1583476::analyze(const Event& event) { + const FinalState& fs = applyProjection<FinalState>(event, "FS"); + const double sqrtS = applyProjection<Beam>(event, "Beam").sqrtS(); + const double weight = event.weight(); + foreach (const Particle& p, fs.particles()) + { + if (fuzzyEquals(sqrtS, 200, 1E-4)) + { + _hist_eta200->fill(p.momentum().pseudorapidity(), weight/27.9); + } + if (fuzzyEquals(sqrtS, 900)) + { + _hist_eta900->fill(p.momentum().pseudorapidity(), weight/34.4); + } + } + } + + void UA5_1986_S1583476::finalize() { +//Normalize using the range of pseudorapidity. + normalize(_hist_eta200, 10); + normalize(_hist_eta900, 18); + } + //@} + + }
More information about the Rivet-svn mailing list |