|
[Rivet-svn] r3218 - branches/2011-07-aida2yoda/src/Analysesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue Jul 19 18:33:53 BST 2011
Author: hoeth Date: Tue Jul 19 18:33:53 2011 New Revision: 3218 Log: YODAize the new CMS analyses Modified: branches/2011-07-aida2yoda/src/Analyses/CMS_2010_S8547297.cc branches/2011-07-aida2yoda/src/Analyses/CMS_2010_S8656010.cc branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S8884919.cc branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S8968497.cc branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S8978280.cc Modified: branches/2011-07-aida2yoda/src/Analyses/CMS_2010_S8547297.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CMS_2010_S8547297.cc Tue Jul 19 18:27:04 2011 (r3217) +++ branches/2011-07-aida2yoda/src/Analyses/CMS_2010_S8547297.cc Tue Jul 19 18:33:53 2011 (r3218) @@ -1,6 +1,6 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" -#include "Rivet/RivetAIDA.hh" +#include "Rivet/RivetYODA.hh" #include "Rivet/Projections/ChargedFinalState.hh" #include "Rivet/Tools/ParticleIdUtils.hh" @@ -19,19 +19,19 @@ if(fuzzyEquals(sqrtS()/GeV, 900)){ for (int d=1; d<=3; d++) { for (int y=1; y<=4; y++) { - _h_dNch_dpT.push_back(bookHistogram1D(d, 1, y)); + _h_dNch_dpT.push_back(bookHisto1D(d, 1, y)); } } - _h_dNch_dpT_all = bookHistogram1D(7, 1, 1); - _h_dNch_dEta = bookHistogram1D(8, 1, 1); + _h_dNch_dpT_all = bookHisto1D(7, 1, 1); + _h_dNch_dEta = bookHisto1D(8, 1, 1); } else if (fuzzyEquals(sqrtS()/GeV, 2360)){ for (int d=4; d<=6; d++) { for (int y=1; y<=4; y++) { - _h_dNch_dpT.push_back(bookHistogram1D(d, 1, y)); + _h_dNch_dpT.push_back(bookHisto1D(d, 1, y)); } } - _h_dNch_dpT_all = bookHistogram1D(7, 1, 2); - _h_dNch_dEta = bookHistogram1D(8, 1, 2); + _h_dNch_dpT_all = bookHisto1D(7, 1, 2); + _h_dNch_dEta = bookHisto1D(8, 1, 2); } } @@ -82,9 +82,9 @@ private: - std::vector<AIDA::IHistogram1D*> _h_dNch_dpT; - AIDA::IHistogram1D* _h_dNch_dpT_all; - AIDA::IHistogram1D* _h_dNch_dEta; + std::vector<Histo1DPtr> _h_dNch_dpT; + Histo1DPtr _h_dNch_dpT_all; + Histo1DPtr _h_dNch_dEta; }; // This global object acts as a hook for the plugin system Modified: branches/2011-07-aida2yoda/src/Analyses/CMS_2010_S8656010.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CMS_2010_S8656010.cc Tue Jul 19 18:27:04 2011 (r3217) +++ branches/2011-07-aida2yoda/src/Analyses/CMS_2010_S8656010.cc Tue Jul 19 18:33:53 2011 (r3218) @@ -1,6 +1,6 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" -#include "Rivet/RivetAIDA.hh" +#include "Rivet/RivetYODA.hh" #include "Rivet/Projections/ChargedFinalState.hh" #include "Rivet/Tools/ParticleIdUtils.hh" @@ -18,12 +18,12 @@ for (int d=1; d<=3; d++) { for (int y=1; y<=4; y++) { - _h_dNch_dpT.push_back(bookHistogram1D(d, 1, y)); + _h_dNch_dpT.push_back(bookHisto1D(d, 1, y)); } } - _h_dNch_dpT_all = bookHistogram1D(4, 1, 1); - _h_dNch_dEta = bookHistogram1D(5, 1, 1); + _h_dNch_dpT_all = bookHisto1D(4, 1, 1); + _h_dNch_dEta = bookHisto1D(5, 1, 1); } @@ -73,9 +73,9 @@ private: - std::vector<AIDA::IHistogram1D*> _h_dNch_dpT; - AIDA::IHistogram1D* _h_dNch_dpT_all; - AIDA::IHistogram1D* _h_dNch_dEta; + std::vector<Histo1DPtr> _h_dNch_dpT; + Histo1DPtr _h_dNch_dpT_all; + Histo1DPtr _h_dNch_dEta; }; // This global object acts as a hook for the plugin system Modified: branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S8884919.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S8884919.cc Tue Jul 19 18:27:04 2011 (r3217) +++ branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S8884919.cc Tue Jul 19 18:33:53 2011 (r3218) @@ -1,6 +1,6 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" -#include "Rivet/RivetAIDA.hh" +#include "Rivet/RivetYODA.hh" #include "Rivet/Projections/ChargedFinalState.hh" #include "Rivet/Tools/ParticleIdUtils.hh" #include "Rivet/Projections/Beam.hh" @@ -28,25 +28,25 @@ if(fuzzyEquals(sqrtS()/GeV, 900)){ for (size_t ietabin=0; ietabin < _etabins.size(); ietabin++){ - _h_dNch_dn.push_back( bookHistogram1D( 2 + ietabin, 1, 1) ); + _h_dNch_dn.push_back( bookHisto1D( 2 + ietabin, 1, 1) ); } - _h_dNch_dn_pt500_eta24 = bookHistogram1D(20, 1, 1); + _h_dNch_dn_pt500_eta24 = bookHisto1D(20, 1, 1); _h_dmpt_dNch_eta24 = bookProfile1D(23, 1, 1); } if(fuzzyEquals(sqrtS()/GeV, 2360)){ for (size_t ietabin=0; ietabin < _etabins.size(); ietabin++){ - _h_dNch_dn.push_back( bookHistogram1D(7 + ietabin, 1, 1) ); + _h_dNch_dn.push_back( bookHisto1D(7 + ietabin, 1, 1) ); } - _h_dNch_dn_pt500_eta24 = bookHistogram1D(21, 1, 1); + _h_dNch_dn_pt500_eta24 = bookHisto1D(21, 1, 1); _h_dmpt_dNch_eta24 = bookProfile1D(24, 1, 1); } if(fuzzyEquals(sqrtS()/GeV, 7000)){ for (size_t ietabin=0; ietabin < _etabins.size(); ietabin++){ - _h_dNch_dn.push_back( bookHistogram1D(12 + ietabin, 1, 1) ); + _h_dNch_dn.push_back( bookHisto1D(12 + ietabin, 1, 1) ); } - _h_dNch_dn_pt500_eta24 = bookHistogram1D(22, 1, 1); + _h_dNch_dn_pt500_eta24 = bookHisto1D(22, 1, 1); _h_dmpt_dNch_eta24 = bookProfile1D(25, 1, 1); } } @@ -105,9 +105,9 @@ } private: - vector<AIDA::IHistogram1D*> _h_dNch_dn; - AIDA::IHistogram1D* _h_dNch_dn_pt500_eta24; - AIDA::IProfile1D* _h_dmpt_dNch_eta24; + vector<Histo1DPtr> _h_dNch_dn; + Histo1DPtr _h_dNch_dn_pt500_eta24; + Profile1DPtr _h_dmpt_dNch_eta24; vector<double> _etabins; }; Modified: branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S8968497.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S8968497.cc Tue Jul 19 18:27:04 2011 (r3217) +++ branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S8968497.cc Tue Jul 19 18:33:53 2011 (r3218) @@ -13,15 +13,15 @@ FinalState fs; FastJets antikt(fs, FastJets::ANTIKT, 0.5); addProjection(antikt, "ANTIKT"); - _h_chi_dijet.addHistogram(2200., 7000., bookHistogram1D(1, 1, 1)); - _h_chi_dijet.addHistogram(1800., 2200., bookHistogram1D(2, 1, 1)); - _h_chi_dijet.addHistogram(1400., 1800., bookHistogram1D(3, 1, 1)); - _h_chi_dijet.addHistogram(1100., 1400., bookHistogram1D(4, 1, 1)); - _h_chi_dijet.addHistogram( 850., 1100., bookHistogram1D(5, 1, 1)); - _h_chi_dijet.addHistogram( 650., 850., bookHistogram1D(6, 1, 1)); - _h_chi_dijet.addHistogram( 500., 650., bookHistogram1D(7, 1, 1)); - _h_chi_dijet.addHistogram( 350., 500., bookHistogram1D(8, 1, 1)); - _h_chi_dijet.addHistogram( 250., 350., bookHistogram1D(9, 1, 1)); + _h_chi_dijet.addHistogram(2200., 7000., bookHisto1D(1, 1, 1)); + _h_chi_dijet.addHistogram(1800., 2200., bookHisto1D(2, 1, 1)); + _h_chi_dijet.addHistogram(1400., 1800., bookHisto1D(3, 1, 1)); + _h_chi_dijet.addHistogram(1100., 1400., bookHisto1D(4, 1, 1)); + _h_chi_dijet.addHistogram( 850., 1100., bookHisto1D(5, 1, 1)); + _h_chi_dijet.addHistogram( 650., 850., bookHisto1D(6, 1, 1)); + _h_chi_dijet.addHistogram( 500., 650., bookHisto1D(7, 1, 1)); + _h_chi_dijet.addHistogram( 350., 500., bookHisto1D(8, 1, 1)); + _h_chi_dijet.addHistogram( 250., 350., bookHisto1D(9, 1, 1)); } void analyze(const Event& event) { @@ -39,7 +39,7 @@ } void finalize() { - foreach (AIDA::IHistogram1D* hist, _h_chi_dijet.getHistograms()) { + foreach (Histo1DPtr hist, _h_chi_dijet.getHistograms()) { normalize(hist); } } Modified: branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S8978280.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S8978280.cc Tue Jul 19 18:27:04 2011 (r3217) +++ branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S8978280.cc Tue Jul 19 18:33:53 2011 (r3218) @@ -1,6 +1,6 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" -#include "Rivet/RivetAIDA.hh" +#include "Rivet/RivetYODA.hh" #include "Rivet/Tools/Logging.hh" #include "Rivet/Projections/UnstableFinalState.hh" @@ -23,19 +23,19 @@ // Particle distributions versus rapidity and transverse momentum // Only make histograms if the correct energy is used. if (fuzzyEquals(sqrtS()/GeV, 900)){ - _h_dNKshort_dy = bookHistogram1D(1, 1, 1); - _h_dNKshort_dpT = bookHistogram1D(2, 1, 1); - _h_dNLambda_dy = bookHistogram1D(3, 1, 1); - _h_dNLambda_dpT = bookHistogram1D(4, 1, 1); - _h_dNXi_dy = bookHistogram1D(5, 1, 1); - _h_dNXi_dpT = bookHistogram1D(6, 1, 1); + _h_dNKshort_dy = bookHisto1D(1, 1, 1); + _h_dNKshort_dpT = bookHisto1D(2, 1, 1); + _h_dNLambda_dy = bookHisto1D(3, 1, 1); + _h_dNLambda_dpT = bookHisto1D(4, 1, 1); + _h_dNXi_dy = bookHisto1D(5, 1, 1); + _h_dNXi_dpT = bookHisto1D(6, 1, 1); } else if (fuzzyEquals(sqrtS()/GeV, 7000)){ - _h_dNKshort_dy = bookHistogram1D(1, 1, 2); - _h_dNKshort_dpT = bookHistogram1D(2, 1, 2); - _h_dNLambda_dy = bookHistogram1D(3, 1, 2); - _h_dNLambda_dpT = bookHistogram1D(4, 1, 2); - _h_dNXi_dy = bookHistogram1D(5, 1, 2); - _h_dNXi_dpT = bookHistogram1D(6, 1, 2); + _h_dNKshort_dy = bookHisto1D(1, 1, 2); + _h_dNKshort_dpT = bookHisto1D(2, 1, 2); + _h_dNLambda_dy = bookHisto1D(3, 1, 2); + _h_dNLambda_dpT = bookHisto1D(4, 1, 2); + _h_dNXi_dy = bookHisto1D(5, 1, 2); + _h_dNXi_dpT = bookHisto1D(6, 1, 2); } } @@ -77,21 +77,22 @@ void finalize() { - AIDA::IHistogramFactory& hf = histogramFactory(); - const string dir = histoDir(); - - // Making the Lambda/Kshort and Xi/Lambda ratios vs pT and y - if (fuzzyEquals(sqrtS()/GeV, 900)) { - hf.divide(dir + "/d07-x01-y01",*_h_dNLambda_dpT, *_h_dNKshort_dpT); - hf.divide(dir + "/d08-x01-y01",*_h_dNXi_dpT, *_h_dNLambda_dpT); - hf.divide(dir + "/d09-x01-y01",*_h_dNLambda_dy, *_h_dNKshort_dy); - hf.divide(dir + "/d10-x01-y01",*_h_dNXi_dy, *_h_dNLambda_dy); - } else if (fuzzyEquals(sqrtS()/GeV, 7000)) { - hf.divide(dir + "/d07-x01-y02",*_h_dNLambda_dpT, *_h_dNKshort_dpT); - hf.divide(dir + "/d08-x01-y02",*_h_dNXi_dpT, *_h_dNLambda_dpT); - hf.divide(dir + "/d09-x01-y02",*_h_dNLambda_dy, *_h_dNKshort_dy); - hf.divide(dir + "/d10-x01-y02",*_h_dNXi_dy, *_h_dNLambda_dy); - } + // \todo YODA divide + // AIDA::IHistogramFactory& hf = histogramFactory(); + // const string dir = histoDir(); + // + // // Making the Lambda/Kshort and Xi/Lambda ratios vs pT and y + // if (fuzzyEquals(sqrtS()/GeV, 900)) { + // hf.divide(dir + "/d07-x01-y01",*_h_dNLambda_dpT, *_h_dNKshort_dpT); + // hf.divide(dir + "/d08-x01-y01",*_h_dNXi_dpT, *_h_dNLambda_dpT); + // hf.divide(dir + "/d09-x01-y01",*_h_dNLambda_dy, *_h_dNKshort_dy); + // hf.divide(dir + "/d10-x01-y01",*_h_dNXi_dy, *_h_dNLambda_dy); + // } else if (fuzzyEquals(sqrtS()/GeV, 7000)) { + // hf.divide(dir + "/d07-x01-y02",*_h_dNLambda_dpT, *_h_dNKshort_dpT); + // hf.divide(dir + "/d08-x01-y02",*_h_dNXi_dpT, *_h_dNLambda_dpT); + // hf.divide(dir + "/d09-x01-y02",*_h_dNLambda_dy, *_h_dNKshort_dy); + // hf.divide(dir + "/d10-x01-y02",*_h_dNXi_dy, *_h_dNLambda_dy); + // } double normpT = 1.0/sumOfWeights(); double normy = 0.5*normpT; // Accounts for using |y| instead of y @@ -106,12 +107,12 @@ private: // Particle distributions versus rapidity and transverse momentum - AIDA::IHistogram1D *_h_dNKshort_dy; - AIDA::IHistogram1D *_h_dNKshort_dpT; - AIDA::IHistogram1D *_h_dNLambda_dy; - AIDA::IHistogram1D *_h_dNLambda_dpT; - AIDA::IHistogram1D *_h_dNXi_dy; - AIDA::IHistogram1D *_h_dNXi_dpT; + Histo1DPtr _h_dNKshort_dy; + Histo1DPtr _h_dNKshort_dpT; + Histo1DPtr _h_dNLambda_dy; + Histo1DPtr _h_dNLambda_dpT; + Histo1DPtr _h_dNXi_dy; + Histo1DPtr _h_dNXi_dpT; };
More information about the Rivet-svn mailing list |