|
[Rivet-svn] r3566 - in branches/2011-07-aida2yoda: . bin data data/anainfo doc include/Rivet/Projections src/Analyses src/Projectionsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgFri Feb 17 14:46:56 GMT 2012
Author: hoeth Date: Fri Feb 17 14:46:55 2012 New Revision: 3566 Log: merge r3518-3525 from trunk Modified: branches/2011-07-aida2yoda/ChangeLog branches/2011-07-aida2yoda/bin/make-plots branches/2011-07-aida2yoda/bin/rivet-mkhtml branches/2011-07-aida2yoda/data/anainfo/ATLAS_2010_S8817804.info branches/2011-07-aida2yoda/data/anainfo/ATLAS_2011_S9126244.info branches/2011-07-aida2yoda/data/anainfo/ATLAS_2011_S9128077.info branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S8950903.info branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S8957746.info branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S9086218.info branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S9088458.info branches/2011-07-aida2yoda/data/rivet-completion branches/2011-07-aida2yoda/doc/make-plots.txt branches/2011-07-aida2yoda/include/Rivet/Projections/WFinder.hh branches/2011-07-aida2yoda/include/Rivet/Projections/ZFinder.hh branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_I925932.cc branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9131140.cc branches/2011-07-aida2yoda/src/Analyses/CDF_2000_S4155203.cc branches/2011-07-aida2yoda/src/Analyses/CDF_2009_S8383952.cc branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S9086218.cc branches/2011-07-aida2yoda/src/Analyses/D0_2000_S4480767.cc branches/2011-07-aida2yoda/src/Analyses/D0_2007_S7075677.cc branches/2011-07-aida2yoda/src/Analyses/D0_2008_S6879055.cc branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7554427.cc branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7837160.cc branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7863608.cc branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8202443.cc branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8349509.cc branches/2011-07-aida2yoda/src/Analyses/D0_2010_S8671338.cc branches/2011-07-aida2yoda/src/Analyses/D0_2010_S8821313.cc branches/2011-07-aida2yoda/src/Analyses/MC_HJETS.cc branches/2011-07-aida2yoda/src/Analyses/MC_VH2BB.cc branches/2011-07-aida2yoda/src/Analyses/MC_WJETS.cc branches/2011-07-aida2yoda/src/Analyses/MC_WPOL.cc branches/2011-07-aida2yoda/src/Analyses/MC_WWJETS.cc branches/2011-07-aida2yoda/src/Analyses/MC_ZJETS.cc branches/2011-07-aida2yoda/src/Analyses/MC_ZZJETS.cc branches/2011-07-aida2yoda/src/Projections/WFinder.cc branches/2011-07-aida2yoda/src/Projections/ZFinder.cc Modified: branches/2011-07-aida2yoda/ChangeLog ============================================================================== --- branches/2011-07-aida2yoda/ChangeLog Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/ChangeLog Fri Feb 17 14:46:55 2012 (r3566) @@ -1,3 +1,19 @@ +2011-12-12 Andy Buckley <andy.buckley at cern.ch> + + * Adding a command line completion function for rivet-mkhtml. + +2011-12-12 Frank Siegert <frank.siegert at cern.ch> + + * Fix for factor of 2.0 in normalisation of CMS_2011_S9086218 + + * Add --ignore-missing option to rivet-mkhtml to ignore non-existing + AIDA files. + +2011-12-06 Andy Buckley <andy.buckley at cern.ch> + + * Include underflow and overflow bins in the normalisation when + calling Analysis::normalise(h) + 2011-11-23 Andy Buckley <andy.buckley at cern.ch> * Bumping version to 1.8.0alpha0 since the Jet interface changes Modified: branches/2011-07-aida2yoda/bin/make-plots ============================================================================== --- branches/2011-07-aida2yoda/bin/make-plots Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/bin/make-plots Fri Feb 17 14:46:55 2012 (r3566) @@ -122,15 +122,25 @@ if self.description.has_key('Rebin'): for i in self.histos: self.histos[i].description['Rebin'] = self.description['Rebin'] + if self.description.has_key('EnvelopeRebin'): + for i in self.histos: + self.histos[i].description['EnvelopeRebin'] = self.description['EnvelopeRebin'] - foo=[] + histoordermap = {} + histolist = self.histos.keys() if self.description.has_key('DrawOnly'): - for i in self.description['DrawOnly'].strip().split(): - if i in self.histos.keys(): - foo.append(i) - else: - foo=self.histos.keys() - self.description['DrawOnly']=foo + histolist = filter(self.histos.keys().count, self.description['DrawOnly'].strip().split()) + for histo in histolist: + order = 0 + if self.histos[histo].description.has_key('PlotOrder'): + order = int(self.histos[histo].description['PlotOrder']) + if not order in histoordermap: + histoordermap[order] = [] + histoordermap[order].append(histo) + sortedhistolist = [] + for i in sorted(histoordermap.keys()): + sortedhistolist.extend(histoordermap[i]) + self.description['DrawOnly']=sortedhistolist def read_input(self, f): @@ -786,13 +796,26 @@ out += '\n%\n% Legend\n%\n' out += '\\rput[tr](%s,%s){%%\n' % (self.getLegendXPos(), self.getLegendYPos()) ypos = -0.05*6/self.description['PlotSizeY'] - foo=[] + + legendordermap = {} + legendlist = self.description['DrawOnly']+self.functions.keys() if self.description.has_key('LegendOnly'): - for i in self.description['LegendOnly'].strip().split(): - if i in self.histos.keys() or i in self.functions.keys(): - foo.append(i) - else: - foo=self.description['DrawOnly']+self.functions.keys() + legendlist = [] + for legend in self.description['LegendOnly'].strip().split(): + if legend in self.histos.keys() or legend in self.functions.keys(): + legendlist.append(legend) + for legend in legendlist: + order = 0 + if self.histos.has_key(legend) and self.histos[legend].description.has_key('LegendOrder'): + order = int(self.histos[legend].description['LegendOrder']) + if self.functions.has_key(legend) and self.functions[legend].description.has_key('LegendOrder'): + order = int(self.functions[legend].description['LegendOrder']) + if not order in legendordermap: + legendordermap[order] = [] + legendordermap[order].append(legend) + foo=[] + for i in sorted(legendordermap.keys()): + foo.extend(legendordermap[i]) for i in foo: if self.histos.has_key(i): Modified: branches/2011-07-aida2yoda/bin/rivet-mkhtml ============================================================================== --- branches/2011-07-aida2yoda/bin/rivet-mkhtml Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/bin/rivet-mkhtml Fri Feb 17 14:46:55 2012 (r3566) @@ -57,6 +57,8 @@ default=False, help="create booklet (currently only available for PDF with pdftk).") parser.add_option("-i", "--ignore-unvalidated", dest="IGNORE_UNVALIDATED", action="store_true", default=False, help="ignore unvalidated analyses.") +parser.add_option("--ignore-missing", dest="IGNORE_MISSING", action="store_true", + default=False, help="ignore missing AIDA files.") parser.add_option("-m", "--match", action="append", dest="PATHPATTERNS", help="only write out histograms from analyses whose name matches any of these regexes") parser.add_option("-M", "--unmatch", action="append", dest="PATHUNPATTERNS", @@ -106,7 +108,10 @@ aidafilepath = os.path.abspath(aidafile.split(":")[0]) if not os.access(aidafilepath, os.R_OK): print "Error: cannot read from %s" % aidafilepath - sys.exit(2) + if opts.IGNORE_MISSING: + continue + else: + sys.exit(2) try: tree = ET.parse(aidafilepath) except Exception, e: @@ -160,6 +165,8 @@ # TODO: This isn't very sensible... what's the intention? Provide --plotinfodir cmd line option? ch_cmd.append("--plotinfodir=../") for af in aidafiles: + if not os.access(os.path.abspath(af), os.R_OK): + continue ch_cmd.append("%s" % os.path.abspath(af)) if opts.VERBOSE: ch_cmd.append("--verbose") Modified: branches/2011-07-aida2yoda/data/anainfo/ATLAS_2010_S8817804.info ============================================================================== --- branches/2011-07-aida2yoda/data/anainfo/ATLAS_2010_S8817804.info Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/data/anainfo/ATLAS_2010_S8817804.info Fri Feb 17 14:46:55 2012 (r3566) @@ -17,7 +17,8 @@ PtCuts: [30, 60] Description: The first jet cross section measurement made with the ATLAS detector at the LHC. - Jets are resconstructed within $|y|<2.8$ and above 60~GeV for the inclusive jet + Anti-kt jets with $R=0.4$ and $R=0.6$ are resconstructed within + $|y|<2.8$ and above 60~GeV for the inclusive jet cross section plots. For the di-jet plots the second jet must have pT>30~GeV. Jet pT and di-jet mass spectra are plotted in bins or rapidity $|y|<0.3$, $0.3<|y|<0.8$, $0.8<|y|<1.2$, $1.2<|y|<2.1$, $2.1<|y|<2.8$. Di-jet $\chi$ Modified: branches/2011-07-aida2yoda/data/anainfo/ATLAS_2011_S9126244.info ============================================================================== --- branches/2011-07-aida2yoda/data/anainfo/ATLAS_2011_S9126244.info Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/data/anainfo/ATLAS_2011_S9126244.info Fri Feb 17 14:46:55 2012 (r3566) @@ -27,7 +27,9 @@ are taken to define the dijet system, where the veto threhsold is 20GeV. Additionally for the latter selection an alternative veto transverse momentum threshold which is equal to the average transverse momentum is - applied.' + applied. + Jet selections are based on anti-kt with $R=0.6$, $p_\perp>20$ GeV and + $|y|<4.4$.' BibTeX: '@Article{Aad:2011jz, author = "Aad, Georges and others", Modified: branches/2011-07-aida2yoda/data/anainfo/ATLAS_2011_S9128077.info ============================================================================== --- branches/2011-07-aida2yoda/data/anainfo/ATLAS_2011_S9128077.info Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/data/anainfo/ATLAS_2011_S9128077.info Fri Feb 17 14:46:55 2012 (r3566) @@ -20,6 +20,7 @@ 2.4 pb-1. Results on multi-jet cross sections are presented differential in pT of the four leading jets, HT. Additionally three-to-two jet fractions are presented differential in different observables.' + Jets are anti-kt with $R=0.4$ and $R=0.6$, $p_\perp>80(60)$ GeV and $|\eta|<2.8$. NeedCrossSection: yes BibKey: Collaboration:2011tq BibTeX: '@Article{Collaboration:2011tq, Modified: branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S8950903.info ============================================================================== --- branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S8950903.info Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S8950903.info Fri Feb 17 14:46:55 2012 (r3566) @@ -20,6 +20,7 @@ Measurements of dijet azimuthal decorrelations in pp collisions at sqrt(s) = 7 TeV using the CMS detector at the CERN LHC are presented. The analysis is based on an inclusive dijet event sample corresponding to an integrated luminosity of 2.9/pb. + Jets are anti-kt with $R=0.5$, $p_\perp>80(30)$ GeV and $|\eta|<1.1$. BibKey: Khachatryan:2011zj BibTeX: '@article{Khachatryan:2011zj, author = "Khachatryan, Vardan and others", Modified: branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S8957746.info ============================================================================== --- branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S8957746.info Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S8957746.info Fri Feb 17 14:46:55 2012 (r3566) @@ -21,6 +21,7 @@ collisions at sqrt(s)=7 TeV, with a data sample collected with the CMS detector at the LHC. The sample corresponds to an integrated luminosity of 3.2 inverse picobarns. + Input for the variables are anti-kt jets with $R=0.5$. BibKey: Khachatryan:2011dx BibTeX: '@Article{Khachatryan:2011dx, author = "Khachatryan, Vardan and others", Modified: branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S9086218.info ============================================================================== --- branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S9086218.info Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S9086218.info Fri Feb 17 14:46:55 2012 (r3566) @@ -21,6 +21,7 @@ energy of 7 TeV at the LHC using the CMS experiment. The data sample corresponds to an integrated luminosity of 34 inverse picobarns. The measurement is made for jet transverse momenta in the range 18-1100 GeV and for absolute values of rapidity less than 3. + Jets are anti-kt with $R=0.5$, $p_\perp>18$ GeV and $|y|<3.0$. NeedCrossSection: yes BibKey: :2011me BibTeX: '@article{:2011me, Modified: branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S9088458.info ============================================================================== --- branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S9088458.info Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/data/anainfo/CMS_2011_S9088458.info Fri Feb 17 14:46:55 2012 (r3566) @@ -21,6 +21,7 @@ transverse momentum, HT, in the range 0.2 < HT < 2.5 TeV is presented. The data have been collected at a proton-proton centre-of-mass energy of 7 TeV with the CMS detector at the LHC, and correspond to an integrated luminosity of 36/pb. + Jets are anti-kt with $R=0.5$, $p_\perp>50$ GeV and $|\eta|<2.5$. BibKey: Chatrchyan:2011wn BibTeX: '@article{Chatrchyan:2011wn, author = "Chatrchyan, Serguei and others", Modified: branches/2011-07-aida2yoda/data/rivet-completion ============================================================================== --- branches/2011-07-aida2yoda/data/rivet-completion Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/data/rivet-completion Fri Feb 17 14:46:55 2012 (r3566) @@ -30,23 +30,23 @@ if test -x "$(which rivet 2> /dev/null)"; then anas=$(rivet --list-analyses) - if $(echo ${prev} | egrep -- "-a|--analysis|--show-analysis|--list-analyses" &> /dev/null); then + if (echo ${prev} | egrep -- "-a|--analysis|--show-analysis|--list-analyses" &> /dev/null); then COMPREPLY=( $(compgen -W "$anas" -- ${cur}) ) return 0 fi fi - if $(echo ${prev} | egrep -- "-n|--nevts|--runname|--histo-interval|--cross-section|-x|--event-timeout" &> /dev/null); then + if (echo ${prev} | egrep -- "-n|--nevts|--runname|--histo-interval|--cross-section|-x|--event-timeout" &> /dev/null); then COMPREPLY=() return 0 fi - if $(echo ${prev} | egrep -- "--histo-file|-H" &> /dev/null); then + if (echo ${prev} | egrep -- "--histo-file|-H" &> /dev/null); then _filedir aida return 0 fi - if $(echo ${prev} | egrep -- "--analysis-path|--analysis-path-append" &> /dev/null); then + if (echo ${prev} | egrep -- "--analysis-path|--analysis-path-append" &> /dev/null); then _filedir -d return 0 fi @@ -65,7 +65,6 @@ function _rivet_config() { local cur prev commands options command COMPREPLY=() - #cur=`_get_cword` cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" @@ -98,7 +97,6 @@ function _compare_histos() { local cur prev commands options command COMPREPLY=() - #cur=`_get_cword` cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" @@ -143,7 +141,6 @@ function _make_plots() { local cur prev commands options command COMPREPLY=() - #cur=`_get_cword` cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" @@ -169,13 +166,64 @@ complete -F _make_plots -o default make-plots +######################## + + +function _rivet_mkhtml() { + local cur prev commands options command + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + + opts="--help -h" + opts="$opts --outputdir -o" + opts="$opts --title -t" + opts="$opts --config -c" + opts="$opts --single -s" + opts="$opts --no-ratio --mc-errs --refid" + opts="$opts --num-threads --n" + opts="$opts --pdf --ps --booklet" + opts="$opts --ignore-unvalidated -i" + opts="$opts --match -m" + opts="$opts --unmatch -M" + opts="$opts --verbose -v" + if [[ ${cur} == -* ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + if test -n "$COMPREPLY"; then + return 0 + fi + fi + + ## Options with files / directories as the arg + if (echo ${prev} | egrep -- "--outputdir|-o" &> /dev/null); then + _filedir -d + return 0 + fi + if (echo ${prev} | egrep -- "--config|-c" &> /dev/null); then + _filedir + return 0 + fi + + ## Options without an completeable arg + if (echo ${prev} | egrep -- "-t|--title|--refid|--n|--num-threads|-m|--match|-M|--unmatch" &> /dev/null); then + COMPREPLY=() + return 0 + fi + + _filedir aida + return 0 +} + + +complete -F _rivet_mkhtml rivet-mkhtml + + ############################## function _aida2flat() { local cur prev commands options command COMPREPLY=() - #cur=`_get_cword` cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" @@ -213,7 +261,6 @@ function _flat2aida() { local cur prev commands options command COMPREPLY=() - #cur=`_get_cword` cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" Modified: branches/2011-07-aida2yoda/doc/make-plots.txt ============================================================================== --- branches/2011-07-aida2yoda/doc/make-plots.txt Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/doc/make-plots.txt Fri Feb 17 14:46:55 2012 (r3566) @@ -240,7 +240,11 @@ -------------------- Whitespace separated list of IDs. These can be histograms or functions. The legend is only shown for the listed objects. Without this option, all plotted -objects which have a title enter the legend. +objects which have a title enter the legend. The legend titles +are plotted in the given order, so there are cases in which it makes +sense to use `LegendOnly` together with all histogram IDs. +It is also possible to specify the legend order on an entry-by-entry basis +using the `LegendOrder=<int>` setting for each histogram or function. Plotting Options @@ -253,7 +257,9 @@ are plotted, even if there are more histograms defined in the file. The histograms are plotted in the given order, so there are cases in which it makes sense to use `DrawOnly` together with all histogram IDs. This is especially -useful for the `Stack` option. +useful for the `Stack` option. It is also possible to specify the plotting order +on a histogram-by-histogram basis using the `PlotOrder=<int>` setting for each +histogram. -------------------- Stack=<list> Modified: branches/2011-07-aida2yoda/include/Rivet/Projections/WFinder.hh ============================================================================== --- branches/2011-07-aida2yoda/include/Rivet/Projections/WFinder.hh Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/include/Rivet/Projections/WFinder.hh Fri Feb 17 14:46:55 2012 (r3566) @@ -24,6 +24,8 @@ //@{ /// Constructor taking single eta/pT bounds + /// @param inputfs Input final state + /// @param etaMin,etaMax,pTmin charged lepton cuts /// @param pid type of the charged lepton /// @param minmass,maxmass (transverse) mass window /// @param missingET minimal amount of missing ET (neutrinos) required @@ -34,18 +36,20 @@ /// @param trackPhotons whether such photons should be added to _theParticles /// (cf. _trackPhotons) /// @param useTransverseMass whether mass window should be applied using mT - WFinder(double etaMin, double etaMax, + WFinder(const FinalState& inputfs, + double etaMin, double etaMax, double pTmin, PdgId pid, double minmass, double maxmass, double missingET, double dRmax, bool clusterPhotons=true, bool trackPhotons=false, double masstarget=80.4, - bool useTransverseMass=false, - FinalState inputfs=FinalState()); + bool useTransverseMass=false); /// Constructor taking multiple eta/pT bounds + /// @param inputfs Input final state + /// @param etaRanges,pTmin charged lepton cuts /// @param pid type of the charged lepton /// @param minmass,maxmass (transverse) mass window /// @param missingET minimal amount of missing ET (neutrinos) required @@ -56,17 +60,27 @@ /// @param trackPhotons whether such photons should be added to _theParticles /// (cf. _trackPhotons) /// @param useTransverseMass whether mass window should be applied using mT - WFinder(const std::vector<std::pair<double, double> >& etaRanges, + WFinder(const FinalState& inputfs, + const std::vector<std::pair<double, double> >& etaRanges, double pTmin, PdgId pid, double minmass, const double maxmass, double missingET, double dRmax, bool clusterPhotons=true, bool trackPhotons=false, double masstarget=80.4, - bool useTransverseMass=false, - FinalState inputfs=FinalState()); + bool useTransverseMass=false); + /// @deprecated Constructors without inputfs -- only for backwards compatibility + WFinder(double, double, double, PdgId, double, double, double, double, + bool clusterPhotons=true, bool trackPhotons=false, + double masstarget=80.4, bool useTransverseMass=false); + /// @deprecated Constructors without inputfs -- only for backwards compatibility + WFinder(const std::vector<std::pair<double, double> >&, double, + PdgId, double, double, double, double, + bool clusterPhotons=true, bool trackPhotons=false, + double masstarget=80.4, bool useTransverseMass=false); + /// Clone on the heap. virtual const Projection* clone() const { return new WFinder(*this); @@ -113,14 +127,14 @@ private: /// Common implementation of constructor operation, taking FS params. - void _init(const std::vector<std::pair<double, double> >& etaRanges, + void _init(const FinalState& inputfs, + const std::vector<std::pair<double, double> >& etaRanges, double pTmin, PdgId pid, double minmass, double maxmass, double missingET, double dRmax, bool clusterPhotons, bool trackPhotons, double masstarget, - bool useTransverseMass, - FinalState inputfs); + bool useTransverseMass); private: Modified: branches/2011-07-aida2yoda/include/Rivet/Projections/ZFinder.hh ============================================================================== --- branches/2011-07-aida2yoda/include/Rivet/Projections/ZFinder.hh Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/include/Rivet/Projections/ZFinder.hh Fri Feb 17 14:46:55 2012 (r3566) @@ -25,6 +25,8 @@ //@{ /// Constructor taking single eta/pT bounds + /// @param inputfs Input final state + /// @param etaMin,etaMax,pTmin lepton cuts /// @param pid type of the leptons /// @param minmass,maxmass mass window /// @param dRmax maximum dR of photons around leptons to take into account @@ -33,16 +35,18 @@ /// clustered to the lepton objects and thus Z mom /// @param trackPhotons whether such photons should be added to _theParticles /// (cf. _trackPhotons) - ZFinder(double etaMin, double etaMax, + ZFinder(const FinalState& inputfs, + double etaMin, double etaMax, double pTmin, PdgId pid, double minmass, double maxmass, double dRmax, bool clusterPhotons, bool trackPhotons, - double masstarget=91.2*GeV, - FinalState inputfs=FinalState()); + double masstarget=91.2*GeV); /// Constructor taking multiple eta/pT bounds + /// @param inputfs Input final state + /// @param etaRanges,pTmin lepton cuts /// @param pid type of the leptons /// @param minmass,maxmass mass window /// @param dRmax maximum dR of photons around leptons to take into account @@ -51,13 +55,21 @@ /// clustered to the lepton objects and thus Z mom /// @param trackPhotons whether such photons should be added to _theParticles /// (cf. _trackPhotons) - ZFinder(const std::vector<std::pair<double, double> >& etaRanges, + ZFinder(const FinalState& inputfs, + const std::vector<std::pair<double, double> >& etaRanges, double pTmin, PdgId pid, double minmass, const double maxmass, double dRmax, bool clusterPhotons, bool trackPhotons, - double masstarget=91.2*GeV, - FinalState inputfs=FinalState()); + double masstarget=91.2*GeV); + + + /// @deprecated Constructors without inputfs -- only for backwards compatibility + ZFinder(double, double, double, PdgId, double, double, double, + bool, bool, double masstarget=91.2*GeV); + /// @deprecated Constructors without inputfs -- only for backwards compatibility + ZFinder(const std::vector<std::pair<double, double> >&, double, PdgId, + double, double, double, bool, bool, double masstarget=91.2*GeV); /// Clone on the heap. @@ -101,12 +113,12 @@ private: /// Common implementation of constructor operation, taking FS params. - void _init(const std::vector<std::pair<double, double> >& etaRanges, + void _init(const FinalState& inputfs, + const std::vector<std::pair<double, double> >& etaRanges, double pTmin, PdgId pid, double minmass, double maxmass, double dRmax, bool clusterPhotons, bool trackPhotons, - double masstarget, - FinalState inputfs); + double masstarget); /// Mass cuts to apply to clustered leptons (cf. InvMassFinalState) double _minmass, _maxmass, _masstarget; Modified: branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_I925932.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_I925932.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_I925932.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -21,13 +21,14 @@ void init() { // Set up projections - WFinder wfinder_dressed_el(-2.4, 2.4, 20.0*GeV, ELECTRON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.2,true,false); + FinalState fs; + WFinder wfinder_dressed_el(fs, -2.4, 2.4, 20.0*GeV, ELECTRON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.2,true,false); addProjection(wfinder_dressed_el, "WFinder_dressed_el"); - WFinder wfinder_bare_el(-2.4, 2.4, 20.0*GeV, ELECTRON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.0,true,false); + WFinder wfinder_bare_el(fs, -2.4, 2.4, 20.0*GeV, ELECTRON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.0,true,false); addProjection(wfinder_bare_el, "WFinder_bare_el"); - WFinder wfinder_dressed_mu(-2.4, 2.4, 20.0*GeV, MUON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.2,true,false); + WFinder wfinder_dressed_mu(fs, -2.4, 2.4, 20.0*GeV, MUON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.2,true,false); addProjection(wfinder_dressed_mu, "WFinder_dressed_mu"); - WFinder wfinder_bare_mu(-2.4, 2.4, 20.0*GeV, MUON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.0,true,false); + WFinder wfinder_bare_mu(fs, -2.4, 2.4, 20.0*GeV, MUON, 0.0*GeV, 1000.0*GeV, 25.0*GeV, 0.0,true,false); addProjection(wfinder_bare_mu, "WFinder_bare_mu"); // Counters Modified: branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9131140.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9131140.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9131140.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -30,13 +30,14 @@ void init() { // Set up projections - ZFinder zfinder_dressed_el(-2.4, 2.4, 20, ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, true, false); + FinalState fs; + ZFinder zfinder_dressed_el(fs, -2.4, 2.4, 20, ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, true, false); addProjection(zfinder_dressed_el, "ZFinder_dressed_el"); - ZFinder zfinder_bare_el(-2.4, 2.4, 20, ELECTRON, 66.0*GeV, 116.0*GeV, 0.0, true, false); + ZFinder zfinder_bare_el(fs, -2.4, 2.4, 20, ELECTRON, 66.0*GeV, 116.0*GeV, 0.0, true, false); addProjection(zfinder_bare_el, "ZFinder_bare_el"); - ZFinder zfinder_dressed_mu(-2.4, 2.4, 20, MUON, 66.0*GeV, 116.0*GeV, 0.1, true, false); + ZFinder zfinder_dressed_mu(fs, -2.4, 2.4, 20, MUON, 66.0*GeV, 116.0*GeV, 0.1, true, false); addProjection(zfinder_dressed_mu, "ZFinder_dressed_mu"); - ZFinder zfinder_bare_mu(-2.4, 2.4, 20, MUON, 66.0*GeV, 116.0*GeV, 0.0, true, false); + ZFinder zfinder_bare_mu(fs, -2.4, 2.4, 20, MUON, 66.0*GeV, 116.0*GeV, 0.0, true, false); addProjection(zfinder_bare_mu, "ZFinder_bare_mu"); // Book histograms Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2000_S4155203.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CDF_2000_S4155203.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/CDF_2000_S4155203.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -23,7 +23,8 @@ void init() { // Set up projections - ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, + FinalState fs; + ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, 66.0*GeV, 116.0*GeV, 0.0, false, false); addProjection(zfinder, "ZFinder"); Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2009_S8383952.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CDF_2009_S8383952.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/CDF_2009_S8383952.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -34,7 +34,8 @@ /// Initialise and register projections here // this seems to have been corrected completely for all selection cuts, // i.e. eta cuts and pT cuts on leptons. - ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, + FinalState fs; + ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, 66.0*GeV, 116.0*GeV, 0.2, true, true); addProjection(zfinder, "ZFinder"); Modified: branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S9086218.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S9086218.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/CMS_2011_S9086218.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -45,7 +45,7 @@ // Finalize void finalize() { - _hist_sigma.scale(crossSection()/sumOfWeights()/0.5/2.0, this); + _hist_sigma.scale(crossSection()/sumOfWeights()/2.0, this); } private: Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2000_S4480767.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/D0_2000_S4480767.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/D0_2000_S4480767.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -29,8 +29,8 @@ /// Book histograms and initialise projections before the run void init() { - - WFinder wf(-5, 5, 0.0*GeV, ELECTRON, 0.0*GeV, 200.0*GeV, 0.0*GeV, 0.2); + FinalState fs; + WFinder wf(fs, -5, 5, 0.0*GeV, ELECTRON, 0.0*GeV, 200.0*GeV, 0.0*GeV, 0.2); addProjection(wf, "WFinder"); _h_W_pT = bookHisto1D(1, 1, 1); Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2007_S7075677.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/D0_2007_S7075677.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/D0_2007_S7075677.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -27,7 +27,8 @@ /// Book histograms void init() { - ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, + FinalState fs; + ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, 71.0*GeV, 111.0*GeV, 0.2, true, true); addProjection(zfinder, "ZFinder"); Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2008_S6879055.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/D0_2008_S6879055.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/D0_2008_S6879055.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -23,7 +23,8 @@ // Book histograms void init() { - ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, + FinalState fs; + ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, 40.0*GeV, 200.0*GeV, 0.2, true, true); addProjection(zfinder, "ZFinder"); Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7554427.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7554427.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7554427.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -28,7 +28,8 @@ /// Book histograms void init() { - ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, + FinalState fs; + ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, 40.0*GeV, 200.0*GeV, 0.2, true, true); addProjection(zfinder, "ZFinder"); Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7837160.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7837160.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7837160.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -33,7 +33,8 @@ void init() { // Projections /// @todo Use separate pT and ETmiss cuts in WFinder - const WFinder wfe(-5, 5, 25.0*GeV, ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); + FinalState fs; + const WFinder wfe(fs, -5, 5, 25.0*GeV, ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); addProjection(wfe, "WFe"); // Cross-section histograms Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7863608.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7863608.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7863608.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -28,7 +28,8 @@ /// Book histograms void init() { - ZFinder zfinder(-1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true); + FinalState fs; + ZFinder zfinder(fs, -1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true); addProjection(zfinder, "ZFinder"); FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5); Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8202443.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8202443.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8202443.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -29,12 +29,13 @@ /// Book histograms void init() { + FinalState fs; // Leptons in constrained tracking acceptance vector<pair<double, double> > etaRanges; etaRanges.push_back(make_pair(-2.5, -1.5)); etaRanges.push_back(make_pair(-1.1, 1.1)); etaRanges.push_back(make_pair(1.5, 2.5)); - ZFinder zfinder_constrained(etaRanges, 25.0*GeV, ELECTRON, + ZFinder zfinder_constrained(fs, etaRanges, 25.0*GeV, ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true); addProjection(zfinder_constrained, "ZFinderConstrained"); FastJets conefinder_constrained(zfinder_constrained.remainingFinalState(), @@ -42,7 +43,7 @@ addProjection(conefinder_constrained, "ConeFinderConstrained"); // Unconstrained leptons - ZFinder zfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, + ZFinder zfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true); addProjection(zfinder, "ZFinder"); FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5); Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8349509.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8349509.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8349509.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -29,7 +29,8 @@ /// Book histograms void init() { - ZFinder zfinder(-1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true); + FinalState fs; + ZFinder zfinder(fs, -1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true); addProjection(zfinder, "ZFinder"); FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5); Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2010_S8671338.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/D0_2010_S8671338.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/D0_2010_S8671338.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -28,7 +28,8 @@ /// Add projections and book histograms void init() { - ZFinder zfinder(-1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true); + FinalState fs; + ZFinder zfinder(fs, -1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, false, true); addProjection(zfinder, "ZFinder"); _h_Z_pT_normalised = bookHisto1D(1, 1, 1); Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2010_S8821313.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/D0_2010_S8821313.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/D0_2010_S8821313.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -34,14 +34,15 @@ void init() { /// Initialise and register projections + FinalState fs; vector<pair<double, double> > etaRanges_ee; etaRanges_ee.push_back(make_pair(-3.0, -1.5)); etaRanges_ee.push_back(make_pair(-1.1, 1.1)); etaRanges_ee.push_back(make_pair(1.5, 3.0)); - ZFinder zfinder_ee(etaRanges_ee, 20.0*GeV, ELECTRON, 70.0*GeV, 110.0*GeV, 0.2, true, true); + ZFinder zfinder_ee(fs, etaRanges_ee, 20.0*GeV, ELECTRON, 70.0*GeV, 110.0*GeV, 0.2, true, true); addProjection(zfinder_ee, "zfinder_ee"); - ZFinder zfinder_mm(-2.0, 2.0, 15.0*GeV, MUON, 70.0*GeV, 110.0*GeV, 0.0, false, false); + ZFinder zfinder_mm(fs, -2.0, 2.0, 15.0*GeV, MUON, 70.0*GeV, 110.0*GeV, 0.0, false, false); addProjection(zfinder_mm, "zfinder_mm"); /// Book histograms here Modified: branches/2011-07-aida2yoda/src/Analyses/MC_HJETS.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/MC_HJETS.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/MC_HJETS.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -23,7 +23,8 @@ /// Book histograms void init() { - ZFinder hfinder(-3.5, 3.5, 25.0*GeV, TAU, 115.0*GeV, 125.0*GeV, 0.0, false, false); + FinalState fs; + ZFinder hfinder(fs, -3.5, 3.5, 25.0*GeV, TAU, 115.0*GeV, 125.0*GeV, 0.0, false, false); addProjection(hfinder, "Hfinder"); FastJets jetpro(hfinder.remainingFinalState(), FastJets::KT, 0.7); addProjection(jetpro, "Jets"); Modified: branches/2011-07-aida2yoda/src/Analyses/MC_VH2BB.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/MC_VH2BB.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/MC_VH2BB.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -66,17 +66,17 @@ /// Book histograms and initialise projections before the run void init() { - ZFinder zeefinder(-3.5, 3.5, 25.0*GeV, ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true); + FinalState fs; + ZFinder zeefinder(fs, -3.5, 3.5, 25.0*GeV, ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true); addProjection(zeefinder, "ZeeFinder"); - ZFinder zmmfinder(-3.5, 3.5, 25.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true); + ZFinder zmmfinder(fs, -3.5, 3.5, 25.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true); addProjection(zmmfinder, "ZmmFinder"); - WFinder wefinder(-3.5, 3.5, 25.0*GeV, ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); + WFinder wefinder(fs, -3.5, 3.5, 25.0*GeV, ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); addProjection(wefinder, "WeFinder"); - WFinder wmfinder(-3.5, 3.5, 25.0*GeV, MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); + WFinder wmfinder(fs, -3.5, 3.5, 25.0*GeV, MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); addProjection(wmfinder, "WmFinder"); - FinalState fs; addProjection(fs, "FinalState"); addProjection(FastJets(fs, FastJets::ANTIKT, 0.4), "AntiKT04"); addProjection(FastJets(fs, FastJets::ANTIKT, 0.5), "AntiKT05"); Modified: branches/2011-07-aida2yoda/src/Analyses/MC_WJETS.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/MC_WJETS.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/MC_WJETS.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -24,7 +24,8 @@ /// Book histograms void init() { - WFinder wfinder(-3.5, 3.5, 25.0*GeV, ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); + FinalState fs; + WFinder wfinder(fs, -3.5, 3.5, 25.0*GeV, ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); addProjection(wfinder, "WFinder"); FastJets jetpro(wfinder.remainingFinalState(), FastJets::KT, 0.7); addProjection(jetpro, "Jets"); Modified: branches/2011-07-aida2yoda/src/Analyses/MC_WPOL.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/MC_WPOL.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/MC_WPOL.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -33,7 +33,8 @@ /// Book histograms and initialise projections before the run void init() { - WFinder wfinder(-MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, + FinalState fs; + WFinder wfinder(fs, -MAXRAPIDITY, MAXRAPIDITY, 0.0*GeV, ELECTRON, 60.0*GeV, 100.0*GeV, 0.0*GeV, 0.0); addProjection(wfinder, "WFinder"); Beam beams; Modified: branches/2011-07-aida2yoda/src/Analyses/MC_WWJETS.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/MC_WWJETS.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/MC_WWJETS.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -25,10 +25,15 @@ /// Book histograms void init() { - WFinder wenufinder(-3.5, 3.5, 25.0*GeV, ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); + FinalState fs; + WFinder wenufinder(fs, -3.5, 3.5, 25.0*GeV, ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); addProjection(wenufinder, "WenuFinder"); - WFinder wmnufinder(-3.5, 3.5, 25.0*GeV, MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); + + VetoedFinalState wmnuinput; + wmnuinput.addVetoOnThisFinalState(wenufinder); + WFinder wmnufinder(wmnuinput, -3.5, 3.5, 25.0*GeV, MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2); addProjection(wmnufinder, "WmnuFinder"); + VetoedFinalState jetinput; jetinput .addVetoOnThisFinalState(wenufinder) Modified: branches/2011-07-aida2yoda/src/Analyses/MC_ZJETS.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/MC_ZJETS.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/MC_ZJETS.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -23,7 +23,8 @@ /// Book histograms void init() { - ZFinder zfinder(-3.5, 3.5, 25.0*GeV, ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true); + FinalState fs; + ZFinder zfinder(fs, -3.5, 3.5, 25.0*GeV, ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true); addProjection(zfinder, "ZFinder"); FastJets jetpro(zfinder.remainingFinalState(), FastJets::KT, 0.7); addProjection(jetpro, "Jets"); Modified: branches/2011-07-aida2yoda/src/Analyses/MC_ZZJETS.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/MC_ZZJETS.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Analyses/MC_ZZJETS.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -24,10 +24,15 @@ /// Book histograms void init() { - ZFinder zeefinder(-3.5, 3.5, 25.0*GeV, ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true); + FinalState fs; + ZFinder zeefinder(fs, -3.5, 3.5, 25.0*GeV, ELECTRON, 65.0*GeV, 115.0*GeV, 0.2, true, true); addProjection(zeefinder, "ZeeFinder"); - ZFinder zmmfinder(-3.5, 3.5, 25.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true); + + VetoedFinalState zmminput; + zmminput.addVetoOnThisFinalState(zeefinder); + ZFinder zmmfinder(zmminput, -3.5, 3.5, 25.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2, true, true); addProjection(zmmfinder, "ZmmFinder"); + VetoedFinalState jetinput; jetinput .addVetoOnThisFinalState(zeefinder) Modified: branches/2011-07-aida2yoda/src/Projections/WFinder.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Projections/WFinder.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Projections/WFinder.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -12,6 +12,36 @@ namespace Rivet { + WFinder::WFinder(const FinalState& inputfs, + double etaMin, double etaMax, + double pTmin, + PdgId pid, + double minmass, double maxmass, + double missingET, + double dRmax, bool clusterPhotons, bool trackPhotons, + double masstarget, + bool useTransverseMass) { + vector<pair<double, double> > etaRanges; + etaRanges += std::make_pair(etaMin, etaMax); + _init(inputfs, etaRanges, pTmin, pid, minmass, maxmass, missingET, + dRmax, clusterPhotons, trackPhotons, masstarget, useTransverseMass); + } + + + WFinder::WFinder(const FinalState& inputfs, + const std::vector<std::pair<double, double> >& etaRanges, + double pTmin, + PdgId pid, + double minmass, double maxmass, + double missingET, + double dRmax, bool clusterPhotons, bool trackPhotons, + double masstarget, + bool useTransverseMass) { + _init(inputfs, etaRanges, pTmin, pid, minmass, maxmass, missingET, + dRmax, clusterPhotons, trackPhotons, masstarget, useTransverseMass); + } + + WFinder::WFinder(double etaMin, double etaMax, double pTmin, PdgId pid, @@ -19,12 +49,12 @@ double missingET, double dRmax, bool clusterPhotons, bool trackPhotons, double masstarget, - bool useTransverseMass, - FinalState inputfs) { + bool useTransverseMass) { vector<pair<double, double> > etaRanges; etaRanges += std::make_pair(etaMin, etaMax); - _init(etaRanges, pTmin, pid, minmass, maxmass, missingET, - dRmax, clusterPhotons, trackPhotons, masstarget, useTransverseMass, inputfs); + FinalState inputfs; + _init(inputfs, etaRanges, pTmin, pid, minmass, maxmass, missingET, + dRmax, clusterPhotons, trackPhotons, masstarget, useTransverseMass); } @@ -35,22 +65,22 @@ double missingET, double dRmax, bool clusterPhotons, bool trackPhotons, double masstarget, - bool useTransverseMass, - FinalState inputfs) { - _init(etaRanges, pTmin, pid, minmass, maxmass, missingET, - dRmax, clusterPhotons, trackPhotons, masstarget, useTransverseMass, inputfs); + bool useTransverseMass) { + FinalState inputfs; + _init(inputfs, etaRanges, pTmin, pid, minmass, maxmass, missingET, + dRmax, clusterPhotons, trackPhotons, masstarget, useTransverseMass); } - void WFinder::_init(const std::vector<std::pair<double, double> >& etaRanges, + void WFinder::_init(const FinalState& inputfs, + const std::vector<std::pair<double, double> >& etaRanges, double pTmin, PdgId pid, double minmass, double maxmass, double missingET, double dRmax, bool clusterPhotons, bool trackPhotons, double masstarget, - bool useTransverseMass, - FinalState inputfs) + bool useTransverseMass) { setName("WFinder"); Modified: branches/2011-07-aida2yoda/src/Projections/ZFinder.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Projections/ZFinder.cc Fri Feb 17 09:58:10 2012 (r3565) +++ branches/2011-07-aida2yoda/src/Projections/ZFinder.cc Fri Feb 17 14:46:55 2012 (r3566) @@ -10,36 +10,58 @@ namespace Rivet { - ZFinder::ZFinder(double etaMin, double etaMax, + ZFinder::ZFinder(const FinalState& inputfs, + double etaMin, double etaMax, double pTmin, PdgId pid, double minmass, double maxmass, double dRmax, bool clusterPhotons, bool trackPhotons, - double masstarget, - FinalState inputfs) { + double masstarget) { vector<pair<double, double> > etaRanges; etaRanges += std::make_pair(etaMin, etaMax); - _init(etaRanges, pTmin, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, masstarget, inputfs); + _init(inputfs, etaRanges, pTmin, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, masstarget); } - ZFinder::ZFinder(const std::vector<std::pair<double, double> >& etaRanges, + ZFinder::ZFinder(const FinalState& inputfs, + const std::vector<std::pair<double, double> >& etaRanges, double pTmin, PdgId pid, double minmass, const double maxmass, double dRmax, bool clusterPhotons, bool trackPhotons, - double masstarget, - FinalState inputfs) { - _init(etaRanges, pTmin, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, masstarget, inputfs); + double masstarget) { + _init(inputfs, etaRanges, pTmin, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, masstarget); + } + + + ZFinder::ZFinder(double etaMin, double etaMax, + double pTmin, + PdgId pid, + double minmass, double maxmass, + double dRmax, bool clusterPhotons, bool trackPhotons, + double masstarget) { + vector<pair<double, double> > etaRanges; + etaRanges += std::make_pair(etaMin, etaMax); + FinalState inputfs; + _init(inputfs, etaRanges, pTmin, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, masstarget); } - void ZFinder::_init(const std::vector<std::pair<double, double> >& etaRanges, + ZFinder::ZFinder(const std::vector<std::pair<double, double> >& etaRanges, + double pTmin, + PdgId pid, + double minmass, const double maxmass, + double dRmax, bool clusterPhotons, bool trackPhotons, + double masstarget) { + FinalState inputfs; + _init(inputfs, etaRanges, pTmin, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, masstarget); + } + void ZFinder::_init(const FinalState& inputfs, + const std::vector<std::pair<double, double> >& etaRanges, double pTmin, PdgId pid, double minmass, double maxmass, double dRmax, bool clusterPhotons, bool trackPhotons, - double masstarget, - FinalState inputfs) + double masstarget) { setName("ZFinder");
More information about the Rivet-svn mailing list |