|
[Rivet-svn] r3099 - in trunk: . src/Analysesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgSun May 22 19:26:42 BST 2011
Author: buckley Date: Sun May 22 19:26:42 2011 New Revision: 3099 Log: Adding plots of stable and decayed PID multiplicities to MC_GENERIC (useful for sanity-checking generator setups). Modified: trunk/ChangeLog trunk/src/Analyses/ExampleAnalysis.cc trunk/src/Analyses/MC_GENERIC.cc trunk/src/Analyses/MC_JETS.cc Modified: trunk/ChangeLog ============================================================================== --- trunk/ChangeLog Sun May 22 11:06:28 2011 (r3098) +++ trunk/ChangeLog Sun May 22 19:26:42 2011 (r3099) @@ -1,5 +1,8 @@ 2011-05-22 Andy Buckley <andy at insectnation.org> + * Adding plots of stable and decayed PID multiplicities to + MC_GENERIC (useful for sanity-checking generator setups). + * Removing actually-unused ProjectionApplier.fhh forward declaration header. Modified: trunk/src/Analyses/ExampleAnalysis.cc ============================================================================== --- trunk/src/Analyses/ExampleAnalysis.cc Sun May 22 11:06:28 2011 (r3098) +++ trunk/src/Analyses/ExampleAnalysis.cc Sun May 22 19:26:42 2011 (r3099) @@ -52,13 +52,13 @@ // Non-uniform binning example: double edges[11] = { 0.5, 0.6, 0.7, 0.80, 0.85, 0.9, 0.92, 0.94, 0.96, 0.98, 1.0 }; vector<double> vedges(edges, edges+11); - _histThrust = bookHistogram1D("Thrust", vedges); + _histThrust = bookHistogram1D("Thrust", vedges); } /// Do the analysis void analyze(const Event& event) { - // Make sure to always include the event weight in fills! + // Make sure to always include the event weight in histogram fills! const double weight = event.weight(); const Multiplicity& cnm = applyProjection<Multiplicity>(event, "CNMult"); @@ -87,7 +87,7 @@ unsigned int num_b_jets = 0; const Jets jets = applyProjection<FastJets>(event, "Jets").jets(5*GeV); foreach (const Jet& j, jets) { - if (j.containsBottom()) ++num_b_jets; + if (j.containsBottom()) num_b_jets += 1; } MSG_DEBUG("Num B-jets with pT > 5 GeV = " << num_b_jets); } Modified: trunk/src/Analyses/MC_GENERIC.cc ============================================================================== --- trunk/src/Analyses/MC_GENERIC.cc Sun May 22 11:06:28 2011 (r3098) +++ trunk/src/Analyses/MC_GENERIC.cc Sun May 22 19:26:42 2011 (r3099) @@ -41,6 +41,9 @@ _histMult = bookHistogram1D("Mult", 100, -0.5, 199.5); _histMultCh = bookHistogram1D("MultCh", 100, -0.5, 199.5); + _histStablePIDs = bookHistogram1D("MultsStablePIDs", 6669, 3334.5, 3334.5); + _histDecayedPIDs = bookHistogram1D("MultsDecayedPIDs", 6669, 3334.5, 3334.5); + _histPt = bookHistogram1D("Pt", 300, 0, 30); _histPtCh = bookHistogram1D("PtCh", 300, 0, 30); @@ -81,6 +84,8 @@ MSG_DEBUG("Total multiplicity = " << cnfs.size()); _histMult->fill(cnfs.size(), weight); foreach (const Particle& p, cnfs.particles()) { + const PdgId pid = abs(p.pdgId()); + _histStablePIDs->fill(pid, weight); const double eta = p.momentum().eta(); _histEta->fill(eta, weight); _histEtaSumEt->fill(fabs(eta), p.momentum().Et(), weight); @@ -130,6 +135,7 @@ foreach (const Particle& p, ufs.particles()) { const double eta_abs = fabs(p.momentum().eta()); const PdgId pid = abs(p.pdgId()); + _histDecayedPIDs->fill(pid, weight); //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); @@ -146,6 +152,9 @@ scale(_histMult, 1/sumOfWeights()); scale(_histMultCh, 1/sumOfWeights()); + scale(_histStablePIDs, 1/sumOfWeights()); + scale(_histDecayedPIDs, 1/sumOfWeights()); + scale(_histEta, 1/sumOfWeights()); scale(_histEtaCh, 1/sumOfWeights()); @@ -185,6 +194,7 @@ //@{ /// Histograms AIDA::IHistogram1D *_histMult, *_histMultCh; + AIDA::IHistogram1D *_histStablePIDs, *_histDecayedPIDs; AIDA::IHistogram1D *_histEtaPi, *_histEtaK, *_histEtaLambda; AIDA::IProfile1D *_histEtaSumEt; AIDA::IHistogram1D *_histEta, *_histEtaCh; Modified: trunk/src/Analyses/MC_JETS.cc ============================================================================== --- trunk/src/Analyses/MC_JETS.cc Sun May 22 11:06:28 2011 (r3098) +++ trunk/src/Analyses/MC_JETS.cc Sun May 22 19:26:42 2011 (r3099) @@ -22,7 +22,6 @@ void init() { FinalState fs; - //FastJets jetpro(fs, FastJets::ANTIKT, 0.4); FastJets jetpro(fs, FastJets::KT, 0.7); addProjection(jetpro, "Jets");
More information about the Rivet-svn mailing list |