|
[Rivet-svn] r3066 - in trunk: . src/Analysesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Apr 25 11:29:40 BST 2011
Author: buckley Date: Mon Apr 25 11:29:40 2011 New Revision: 3066 Log: Adding some hadron-specific N and sumET vs. |eta| plots to MC_GENERIC Modified: trunk/ChangeLog trunk/src/Analyses/MC_GENERIC.cc trunk/src/Analyses/PDG_Hadron_Multiplicities.cc Modified: trunk/ChangeLog ============================================================================== --- trunk/ChangeLog Mon Apr 25 11:28:25 2011 (r3065) +++ trunk/ChangeLog Mon Apr 25 11:29:40 2011 (r3066) @@ -1,5 +1,7 @@ 2011-04-25 Andy Buckley <andy at insectnation.org> + * Adding some hadron-specific N and sumET vs. |eta| plots to MC_GENERIC. + * Re-adding an explicit attempt to get the beam particles, since HepMC's IO_HERWIG seems to not always set them even though it's meant to. Modified: trunk/src/Analyses/MC_GENERIC.cc ============================================================================== --- trunk/src/Analyses/MC_GENERIC.cc Mon Apr 25 11:28:25 2011 (r3065) +++ trunk/src/Analyses/MC_GENERIC.cc Mon Apr 25 11:29:40 2011 (r3066) @@ -4,6 +4,8 @@ #include "Rivet/Tools/Logging.hh" #include "Rivet/Projections/FinalState.hh" #include "Rivet/Projections/ChargedFinalState.hh" +#include "Rivet/Projections/UnstableFinalState.hh" +#include "Rivet/Projections/MissingMomentum.hh" #include "LWH/Histogram1D.h" namespace Rivet { @@ -29,9 +31,10 @@ // Projections const FinalState cnfs(-5.0, 5.0, 500*MeV); - const ChargedFinalState cfs(-5.0, 5.0, 500*MeV); - addProjection(cfs, "CFS"); addProjection(cnfs, "FS"); + addProjection(ChargedFinalState(-5.0, 5.0, 500*MeV), "CFS"); + addProjection(UnstableFinalState(-5.0, 5.0, 500*MeV), "UFS"); + //addProjection(MissingMomentum(cnfs), "ETmiss"); // Histograms // @todo Choose E/pT ranged based on input energies... can't do anything about kin. cuts, though @@ -51,6 +54,11 @@ _tmphistEtaChPlus.reset(new LWH::Histogram1D(25, 0, 5)); _tmphistEtaChMinus.reset(new LWH::Histogram1D(25, 0, 5)); + _histEtaPi = bookHistogram1D("EtaPi", 25, 0, 5); + _histEtaK = bookHistogram1D("EtaK", 25, 0, 5); + _histEtaLambda = bookHistogram1D("EtaLambda", 25, 0, 5); + _histEtaSumEt = bookProfile1D("EtaSumEt", 25, 0, 5); + _histRapidity = bookHistogram1D("Rapidity", 50, -5, 5); _histRapidityCh = bookHistogram1D("RapidityCh", 50, -5, 5); _tmphistRapPlus.reset(new LWH::Histogram1D(25, 0, 5)); @@ -75,6 +83,7 @@ foreach (const Particle& p, cnfs.particles()) { const double eta = p.momentum().eta(); _histEta->fill(eta, weight); + _histEtaSumEt->fill(fabs(eta), p.momentum().Et(), weight); if (eta > 0) { _tmphistEtaPlus->fill(fabs(eta), weight); } else { @@ -115,21 +124,44 @@ _histPhiCh->fill(p.momentum().phi(), weight); } + + // Histogram identified particle eta spectra + const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(event, "UFS"); + foreach (const Particle& p, ufs.particles()) { + const double eta_abs = fabs(p.momentum().eta()); + const PdgId pid = abs(p.pdgId()); + //if (PID::isMeson(pid) && PID::hasStrange()) { + if (pid == 211 || pid == 111) _histEtaPi->fill(eta_abs, weight); + else if (pid == 321 || pid == 130 || pid == 310) _histEtaK->fill(eta_abs, weight); + else if (pid == 3122) _histEtaLambda->fill(eta_abs, weight); + // const MissingMomentum& met = applyProjection<MissingMomentum>(event, "ETmiss"); + } + } + /// Finalize void finalize() { scale(_histMult, 1/sumOfWeights()); scale(_histMultCh, 1/sumOfWeights()); + scale(_histEta, 1/sumOfWeights()); scale(_histEtaCh, 1/sumOfWeights()); + + scale(_histEtaPi, 1/sumOfWeights()); + scale(_histEtaK, 1/sumOfWeights()); + scale(_histEtaLambda, 1/sumOfWeights()); + scale(_histRapidity, 1/sumOfWeights()); scale(_histRapidityCh, 1/sumOfWeights()); + scale(_histPt, 1/sumOfWeights()); scale(_histPtCh, 1/sumOfWeights()); + scale(_histE, 1/sumOfWeights()); scale(_histECh, 1/sumOfWeights()); + scale(_histPhi, 1/sumOfWeights()); scale(_histPhiCh, 1/sumOfWeights()); @@ -153,6 +185,8 @@ //@{ /// Histograms AIDA::IHistogram1D *_histMult, *_histMultCh; + AIDA::IHistogram1D *_histEtaPi, *_histEtaK, *_histEtaLambda; + AIDA::IProfile1D *_histEtaSumEt; AIDA::IHistogram1D *_histEta, *_histEtaCh; AIDA::IHistogram1D *_histRapidity, *_histRapidityCh; AIDA::IHistogram1D *_histPt, *_histPtCh; Modified: trunk/src/Analyses/PDG_Hadron_Multiplicities.cc ============================================================================== --- trunk/src/Analyses/PDG_Hadron_Multiplicities.cc Mon Apr 25 11:28:25 2011 (r3065) +++ trunk/src/Analyses/PDG_Hadron_Multiplicities.cc Mon Apr 25 11:29:40 2011 (r3066) @@ -31,15 +31,15 @@ // Even if we only generate hadronic events, we still need a cut on numCharged >= 2. if (numParticles < 2) { - getLog() << Log::DEBUG << "Failed leptonic event cut" << endl; + MSG_DEBUG("Failed leptonic event cut"); vetoEvent; } - getLog() << Log::DEBUG << "Passed leptonic event cut" << endl; + MSG_DEBUG("Passed leptonic event cut"); // Get event weight for histo filling const double weight = e.weight(); - getLog() << Log::DEBUG << "sqrt(S) = " << sqrtS()/GeV << " GeV" << endl; + MSG_DEBUG("sqrt(s) = " << sqrtS()/GeV << " GeV"); // Final state of unstable particles to get particle spectra const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(e, "UFS");
More information about the Rivet-svn mailing list |