|
[Rivet-svn] r1827 - in trunk: data/anainfo data/refdata src/Analysesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed Sep 23 15:49:11 BST 2009
Author: fsiegert Date: Wed Sep 23 15:49:11 2009 New Revision: 1827 Log: Actually working fix for JADE_OPAL analyses. Don't split them into multiple identifiers anymore, but simply book the relevant histograms depending on which beam energy the events have. I hope it's not a problem to do the histogram booking in the analyze method instead of init, but my testing seems to indicate that it works. Added: trunk/data/anainfo/JADE_OPAL_2000_S4300807.info - copied, changed from r1826, trunk/data/anainfo/JADE_OPAL_2000_S4300807_91GEV.info Deleted: trunk/data/anainfo/JADE_OPAL_2000_S4300807_133GEV.info trunk/data/anainfo/JADE_OPAL_2000_S4300807_161GEV.info trunk/data/anainfo/JADE_OPAL_2000_S4300807_172GEV.info trunk/data/anainfo/JADE_OPAL_2000_S4300807_183GEV.info trunk/data/anainfo/JADE_OPAL_2000_S4300807_189GEV.info trunk/data/anainfo/JADE_OPAL_2000_S4300807_35GEV.info trunk/data/anainfo/JADE_OPAL_2000_S4300807_44GEV.info trunk/data/anainfo/JADE_OPAL_2000_S4300807_91GEV.info Modified: trunk/data/refdata/Makefile.am trunk/src/Analyses/JADE_OPAL_2000_S4300807.cc Copied and modified: trunk/data/anainfo/JADE_OPAL_2000_S4300807.info (from r1826, trunk/data/anainfo/JADE_OPAL_2000_S4300807_91GEV.info) ============================================================================== --- trunk/data/anainfo/JADE_OPAL_2000_S4300807_91GEV.info Tue Sep 22 21:37:04 2009 (r1826, copy source) +++ trunk/data/anainfo/JADE_OPAL_2000_S4300807.info Wed Sep 23 15:49:11 2009 (r1827) @@ -1,8 +1,8 @@ -Name: JADE_OPAL_2000_S4300807_91GEV +Name: JADE_OPAL_2000_S4300807 Year: 2000 -Summary: Jet rates in e+e- at OPAL [91 GeV]. +Summary: Jet rates in e+e- at JADE [35-44 GeV] and OPAL [91 - 189 GeV]. Experiment: JADE_OPAL -Collider: LEP Run I +Collider: HERA and LEP SpiresID: 4300807 Status: VALIDATED Authors: @@ -11,9 +11,9 @@ - Eur.Phys.J.C17:19-51,2000 - arXiv:hep-ex/0001055 RunInfo: - e+ e- -> jet jet (+ jets) at 91.2 GeV + e+ e- -> jet jet (+ jets) NumEvents: 1000000 PtCuts: [0] Description: Differential and integrated jet rates for Durham and JADE jet - algorithms at sqrt(s) = 91.2. + algorithms. Modified: trunk/data/refdata/Makefile.am ============================================================================== --- trunk/data/refdata/Makefile.am Tue Sep 22 21:37:04 2009 (r1826) +++ trunk/data/refdata/Makefile.am Wed Sep 23 15:49:11 2009 (r1827) @@ -72,8 +72,3 @@ SFM_1984_S1178091.aida \ PDG_HADRON_MULTIPLICITIES.aida \ PDG_HADRON_MULTIPLICITIES_RATIOS.aida - -install-data-hook: - cd $(DESTDIR)$(pkgdatadir); \ - for i in 35GEV 44GEV 91GEV 133GEV 161GEV 172GEV 183GEV 189GEV; do if ! test -f JADE_OPAL_2000_S4300807_$$i.aida; then $(LN_S) JADE_OPAL_2000_S4300807.aida JADE_OPAL_2000_S4300807_$$i.aida; fi; done; \ - cd -; Modified: trunk/src/Analyses/JADE_OPAL_2000_S4300807.cc ============================================================================== --- trunk/src/Analyses/JADE_OPAL_2000_S4300807.cc Tue Sep 22 21:37:04 2009 (r1826) +++ trunk/src/Analyses/JADE_OPAL_2000_S4300807.cc Wed Sep 23 15:49:11 2009 (r1827) @@ -25,13 +25,8 @@ //@{ /// Constructor - JADE_OPAL_2000_S4300807(const string& sqrtsstr, double sqrts, - int nr_R_Jade, int nr_R_Durham, int nr_y_Durham) - : Analysis("JADE_OPAL_2000_S4300807" + ("_" + sqrtsstr + "GEV")), - _sqrts(sqrts), - _nr_R_Jade(nr_R_Jade), - _nr_R_Durham(nr_R_Durham), - _nr_y_Durham(nr_y_Durham) + JADE_OPAL_2000_S4300807() : Analysis("JADE_OPAL_2000_S4300807"), + _initialised(false) { setBeams(ELECTRON, POSITRON); addProjection(Beam(), "Beams"); @@ -43,46 +38,45 @@ //@} - - /// @name Publication metadata - //@{ - /// Collider on which the experiment ran. - string collider() const { - if (_sqrts < 90.0) { - return "DESY PETRA"; - } else if (inRange(_sqrts, 90.0, 92.0)) { - return "LEP Run I"; - } else { - return "LEP Run 2"; - } - } - //@} - /// @name Analysis methods //@{ void init() { - for (size_t i=0; i<5; ++i) { - _h_R_Jade[i]=bookDataPointSet(_nr_R_Jade, 1, i+1); - _h_R_Durham[i]=bookDataPointSet(_nr_R_Durham, 1, i+1); - if (i<4)_h_y_Durham[i]=bookHistogram1D(_nr_y_Durham, 1, i+1); - } } void analyze(const Event& e) { - // Are we running with a compatible CMS energy? - const double sbeams = applyProjection<Beam>(e, "Beams").sqrtS(); - if (fabs(sbeams - _sqrts)/GeV > 0.5) { - getLog() << Log::ERROR - << "CMS energy of events sqrt(s) = " << sbeams - <<" doesn't match analysis energy sqrt(s) = " << _sqrts << endl; - /// @todo Really call exit()? I don't like the break of "command chain" that this implies - exit(1); + // Which CMS energy are we running at? + if (!_initialised) { + const double sqrts = applyProjection<Beam>(e, "Beams").sqrtS()/GeV; + int offset(0); + switch (int(sqrts+0.5)) { + case 35: offset = 7; break; + case 44: offset = 8; break; + case 91: offset = 9; break; + case 133: offset = 10; break; + case 161: offset = 11; break; + case 172: offset = 12; break; + case 183: offset = 13; break; + case 189: offset = 14; break; + default: + getLog() << Log::ERROR + << "CMS energy of events sqrt(s) = " << sqrts + <<" doesn't match any available analysis energy." << endl; + /// @todo Really call exit()? I don't like the break of "command chain" that this implies + exit(1); + } + for (size_t i=0; i<5; ++i) { + _h_R_Jade[i]=bookDataPointSet(offset, 1, i+1); + _h_R_Durham[i]=bookDataPointSet(offset+9, 1, i+1); + if (i<4)_h_y_Durham[i]=bookHistogram1D(offset+17, 1, i+1); + } + _initialised = true; } + // Jets getLog() << Log::DEBUG << "Using FastJet JADE patch to make diff jet rate plots:" << endl; @@ -213,8 +207,7 @@ AIDA::IHistogram1D *_h_y_Durham[4]; //@} - double _sqrts; - int _nr_R_Jade, _nr_R_Durham, _nr_y_Durham; + bool _initialised; }; @@ -224,76 +217,8 @@ - class JADE_OPAL_2000_S4300807_35GEV : public JADE_OPAL_2000_S4300807 { - public: - JADE_OPAL_2000_S4300807_35GEV() : JADE_OPAL_2000_S4300807("35", 35.0, 7, 16, 24) {} - string summary() const { return "Jet rates in e+e- at JADE [35 GeV]."; } - }; - // This global object acts as a hook for the plugin system - AnalysisBuilder<JADE_OPAL_2000_S4300807_35GEV> plugin_JADE_OPAL_2000_S4300807_35GEV; - - - class JADE_OPAL_2000_S4300807_44GEV : public JADE_OPAL_2000_S4300807 { - public: - JADE_OPAL_2000_S4300807_44GEV() : JADE_OPAL_2000_S4300807("44", 44.0, 8, 17, 25) {} - string summary() const { return "Jet rates in e+e- at JADE [44 GeV]."; } - }; - // This global object acts as a hook for the plugin system - AnalysisBuilder<JADE_OPAL_2000_S4300807_44GEV> plugin_JADE_OPAL_2000_S4300807_44GEV; - - - class JADE_OPAL_2000_S4300807_91GEV : public JADE_OPAL_2000_S4300807 { - public: - JADE_OPAL_2000_S4300807_91GEV() : JADE_OPAL_2000_S4300807("91", 91.2, 9, 18, 26) {} - string summary() const { return "Jet rates in e+e- at OPAL [91 GeV]."; } - }; - // This global object acts as a hook for the plugin system - AnalysisBuilder<JADE_OPAL_2000_S4300807_91GEV> plugin_JADE_OPAL_2000_S4300807_91GEV; - - - class JADE_OPAL_2000_S4300807_133GEV : public JADE_OPAL_2000_S4300807 { - public: - JADE_OPAL_2000_S4300807_133GEV() : JADE_OPAL_2000_S4300807("133", 133.0, 10, 19, 27) {} - string summary() const { return "Jet rates in e+e- at OPAL [133 GeV]."; } - }; - // This global object acts as a hook for the plugin system - AnalysisBuilder<JADE_OPAL_2000_S4300807_133GEV> plugin_JADE_OPAL_2000_S4300807_133GEV; - - - class JADE_OPAL_2000_S4300807_161GEV : public JADE_OPAL_2000_S4300807 { - public: - JADE_OPAL_2000_S4300807_161GEV() : JADE_OPAL_2000_S4300807("161", 161.0, 11, 20, 28) {} - string summary() const { return "Jet rates in e+e- at OPAL [161 GeV]."; } - }; - // This global object acts as a hook for the plugin system - AnalysisBuilder<JADE_OPAL_2000_S4300807_161GEV> plugin_JADE_OPAL_2000_S4300807_161GEV; - - - class JADE_OPAL_2000_S4300807_172GEV : public JADE_OPAL_2000_S4300807 { - public: - JADE_OPAL_2000_S4300807_172GEV() : JADE_OPAL_2000_S4300807("172", 172.0, 12, 21, 29) {} - string summary() const { return "Jet rates in e+e- at OPAL [172 GeV]."; } - }; - // This global object acts as a hook for the plugin system - AnalysisBuilder<JADE_OPAL_2000_S4300807_172GEV> plugin_JADE_OPAL_2000_S4300807_172GEV; - - - class JADE_OPAL_2000_S4300807_183GEV : public JADE_OPAL_2000_S4300807 { - public: - JADE_OPAL_2000_S4300807_183GEV() : JADE_OPAL_2000_S4300807("183", 183.0, 13, 22, 30) {} - string summary() const { return "Jet rates in e+e- at OPAL [183 GeV]."; } - }; - // This global object acts as a hook for the plugin system - AnalysisBuilder<JADE_OPAL_2000_S4300807_183GEV> plugin_JADE_OPAL_2000_S4300807_183GEV; - - - class JADE_OPAL_2000_S4300807_189GEV : public JADE_OPAL_2000_S4300807 { - public: - JADE_OPAL_2000_S4300807_189GEV() : JADE_OPAL_2000_S4300807("189", 189.0, 14, 23, 31) {} - string summary() const { return "Jet rates in e+e- at OPAL [189 GeV]."; } - }; // This global object acts as a hook for the plugin system - AnalysisBuilder<JADE_OPAL_2000_S4300807_189GEV> plugin_JADE_OPAL_2000_S4300807_189GEV; + AnalysisBuilder<JADE_OPAL_2000_S4300807> plugin_JADE_OPAL_2000_S4300807; }
More information about the Rivet-svn mailing list |