rivet is hosted by Hepforge, IPPP Durham

List of all members.

Public Member Functions

 PDG_TAUS ()
 Constructor.
AnalysissetCrossSection (double xs)
 Set the cross section from the generator.
AnalysisHandlerhandler () const
 Access the controlling AnalysisHandler object.
const vector< AnalysisObjectPtr > & analysisObjects () const
 List of registered analysis data objects.
void markAsOwned () const
Analysis methods
void init ()
 Book histograms and initialise projections before the run.
void analyze (const Event &e)
 Perform the per-event analysis.
void finalize ()
 Normalise histograms etc., after the run.
bool contains (Particle &mother, int id, bool abs=false)
int countProngs (Particle mother)
void populateDecayMap ()
bool analyzeDecay (Particle mother, vector< int > ids, bool absolute)
void analyzeRadiativeDecay (Particle mother, vector< int > ids, double &w_incl, double e_weight, bool absolute, Histo1DPtr h_ratio)
Metadata

Metadata is used for querying from the command line and also for building web pages and the analysis pages in the Rivet manual.

const AnalysisInfoinfo () const
 Get the actual AnalysisInfo object in which all this metadata is stored.
virtual std::string name () const
 Get the name of the analysis.
virtual std::string inspireId () const
 Get the Inspire ID code for this analysis.
virtual std::string spiresId () const
 Get the SPIRES ID code for this analysis (~deprecated).
virtual std::vector< std::string > authors () const
 Names & emails of paper/analysis authors.
virtual std::string summary () const
 Get a short description of the analysis.
virtual std::string description () const
 Get a full description of the analysis.
virtual std::string runInfo () const
 Information about the events needed as input for this analysis.
virtual std::string experiment () const
 Experiment which performed and published this analysis.
virtual std::string collider () const
 Collider on which the experiment ran.
virtual std::string year () const
 When the original experimental analysis was published.
virtual std::vector< std::string > references () const
 Journal, and preprint references.
virtual std::string bibKey () const
 BibTeX citation key for this article.
virtual std::string bibTeX () const
 BibTeX citation entry for this article.
virtual std::string status () const
 Whether this analysis is trusted (in any way!)
virtual std::vector< std::string > todos () const
 Any work to be done on this analysis.
virtual const std::vector
< PdgIdPair > & 
requiredBeams () const
 Return the allowed pairs of incoming beams required by this analysis.
virtual AnalysissetRequiredBeams (const std::vector< PdgIdPair > &requiredBeams)
 Declare the allowed pairs of incoming beams required by this analysis.
virtual const std::vector
< std::pair< double, double > > & 
requiredEnergies () const
 Sets of valid beam energy pairs, in GeV.
virtual AnalysissetRequiredEnergies (const std::vector< std::pair< double, double > > &requiredEnergies)
 Declare the list of valid beam energy pairs, in GeV.
bool needsCrossSection () const
AnalysissetNeedsCrossSection (bool needed=true)
Internal metadata modifying methods
AnalysisInfoinfo ()
 Get the actual AnalysisInfo object in which all this metadata is stored (non-const).
Run conditions
const ParticlePairbeams () const
 Incoming beams for this run.
const PdgIdPair beamIds () const
 Incoming beam IDs for this run.
double sqrtS () const
 Centre of mass energy for this run.
Analysis / beam compatibility testing
bool isCompatible (const ParticlePair &beams) const
 Check if analysis is compatible with the provided beam particle IDs and energies.
bool isCompatible (PdgId beam1, PdgId beam2, double e1, double e2) const
 Check if analysis is compatible with the provided beam particle IDs and energies.
bool isCompatible (const PdgIdPair &beams, const std::pair< double, double > &energies) const
 Check if analysis is compatible with the provided beam particle IDs and energies.
Analysis object manipulation
Todo:
Should really be protected: only public to keep BinnedHistogram happy for now...
void scale (CounterPtr cnt, double factor)
 Multiplicatively scale the given counter, cnt, by factor factor.
void scale (const std::vector< CounterPtr > &cnts, double factor)
template<std::size_t array_size>
void scale (const CounterPtr(&cnts)[array_size], double factor)
void scale (Histo1DPtr histo, double factor)
 Multiplicatively scale the given histogram, histo, by factor factor.
void scale (const std::vector< Histo1DPtr > &histos, double factor)
template<std::size_t array_size>
void scale (const Histo1DPtr(&histos)[array_size], double factor)
void scale (Histo2DPtr histo, double factor)
 Multiplicatively scale the given histogram, histo, by factor factor.
void scale (const std::vector< Histo2DPtr > &histos, double factor)
template<std::size_t array_size>
void scale (const Histo2DPtr(&histos)[array_size], double factor)
void normalize (Histo1DPtr histo, double norm=1.0, bool includeoverflows=true)
 Normalize the given histogram, histo, to area = norm.
void normalize (const std::vector< Histo1DPtr > &histos, double norm=1.0, bool includeoverflows=true)
template<std::size_t array_size>
void normalize (const Histo1DPtr(&histos)[array_size], double norm=1.0, bool includeoverflows=true)
void normalize (Histo2DPtr histo, double norm=1.0, bool includeoverflows=true)
 Normalize the given histogram, histo, to area = norm.
void normalize (const std::vector< Histo2DPtr > &histos, double norm=1.0, bool includeoverflows=true)
template<std::size_t array_size>
void normalize (const Histo2DPtr(&histos)[array_size], double norm=1.0, bool includeoverflows=true)
void divide (CounterPtr c1, CounterPtr c2, Scatter1DPtr s) const
void divide (const YODA::Counter &c1, const YODA::Counter &c2, Scatter1DPtr s) const
void divide (Histo1DPtr h1, Histo1DPtr h2, Scatter2DPtr s) const
void divide (const YODA::Histo1D &h1, const YODA::Histo1D &h2, Scatter2DPtr s) const
void divide (Profile1DPtr p1, Profile1DPtr p2, Scatter2DPtr s) const
void divide (const YODA::Profile1D &p1, const YODA::Profile1D &p2, Scatter2DPtr s) const
void divide (Histo2DPtr h1, Histo2DPtr h2, Scatter3DPtr s) const
void divide (const YODA::Histo2D &h1, const YODA::Histo2D &h2, Scatter3DPtr s) const
void divide (Profile2DPtr p1, Profile2DPtr p2, Scatter3DPtr s) const
void divide (const YODA::Profile2D &p1, const YODA::Profile2D &p2, Scatter3DPtr s) const
void efficiency (Histo1DPtr h1, Histo1DPtr h2, Scatter2DPtr s) const
void efficiency (const YODA::Histo1D &h1, const YODA::Histo1D &h2, Scatter2DPtr s) const
void asymm (Histo1DPtr h1, Histo1DPtr h2, Scatter2DPtr s) const
void asymm (const YODA::Histo1D &h1, const YODA::Histo1D &h2, Scatter2DPtr s) const
void integrate (Histo1DPtr h, Scatter2DPtr s) const
void integrate (const Histo1D &h, Scatter2DPtr s) const
Projection "getting" functions
std::set< ConstProjectionPtrgetProjections () const
 Get the contained projections, including recursion.
template<typename PROJ >
const PROJ & getProjection (const std::string &name) const
const ProjectiongetProjection (const std::string &name) const
template<typename PROJ >
const PROJ & get (const std::string &name) const
Projection applying functions
template<typename PROJ >
const PROJ & applyProjection (const Event &evt, const Projection &proj) const
 Apply the supplied projection on event evt.
template<typename PROJ >
const PROJ & applyProjection (const Event &evt, const PROJ &proj) const
 Apply the supplied projection on event evt.
template<typename PROJ >
const PROJ & applyProjection (const Event &evt, const std::string &name) const
template<typename PROJ >
const PROJ & apply (const Event &evt, const Projection &proj) const
template<typename PROJ >
const PROJ & apply (const Event &evt, const PROJ &proj) const
template<typename PROJ >
const PROJ & apply (const Event &evt, const std::string &name) const

Protected Member Functions

LoggetLog () const
 Get a Log object based on the name() property of the calling analysis object.
double crossSection () const
 Get the process cross-section in pb. Throws if this hasn't been set.
double crossSectionPerEvent () const
size_t numEvents () const
double sumOfWeights () const
ProjectionHandlergetProjHandler () const
 Get a reference to the ProjectionHandler for this thread.
const Projection_applyProjection (const Event &evt, const std::string &name) const
const Projection_applyProjection (const Event &evt, const Projection &proj) const
Histogram paths
const std::string histoDir () const
 Get the canonical histogram "directory" path for this analysis.
const std::string histoPath (const std::string &hname) const
 Get the canonical histogram path for the named histogram in this analysis.
const std::string histoPath (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const
 Get the canonical histogram path for the numbered histogram in this analysis.
const std::string makeAxisCode (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const
 Get the internal histogram name for given d, x and y (cf. HepData)
Histogram reference data
const YODA::Scatter2D & refData (const string &hname) const
const YODA::Scatter2D & refData (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const
template<typename T >
const T & refData (const string &hname) const
template<typename T >
const T & refData (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const
Counter booking
CounterPtr bookCounter (const std::string &name, const std::string &title="")
 Book a counter.
CounterPtr bookCounter (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId, const std::string &title="")
1D histogram booking
Histo1DPtr bookHisto1D (const std::string &name, size_t nbins, double lower, double upper, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="")
 Book a 1D histogram with nbins uniformly distributed across the range lower - upper .
Histo1DPtr bookHisto1D (const std::string &name, const std::vector< double > &binedges, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="")
 Book a 1D histogram with non-uniform bins defined by the vector of bin edges binedges .
Histo1DPtr bookHisto1D (const std::string &name, const Scatter2D &refscatter, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="")
 Book a 1D histogram with binning from a reference scatter.
Histo1DPtr bookHisto1D (const std::string &name, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="")
 Book a 1D histogram, using the binnings in the reference data histogram.
Histo1DPtr bookHisto1D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="")
2D histogram booking
Histo2DPtr bookHisto2D (const std::string &name, size_t nxbins, double xlower, double xupper, size_t nybins, double ylower, double yupper, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="")
Histo2DPtr bookHisto2D (const std::string &name, const std::vector< double > &xbinedges, const std::vector< double > &ybinedges, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="")
1D profile histogram booking
Profile1DPtr bookProfile1D (const std::string &name, size_t nbins, double lower, double upper, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="")
 Book a 1D profile histogram with nbins uniformly distributed across the range lower - upper .
Profile1DPtr bookProfile1D (const std::string &name, const std::vector< double > &binedges, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="")
 Book a 1D profile histogram with non-uniform bins defined by the vector of bin edges binedges .
Profile1DPtr bookProfile1D (const std::string &name, const Scatter2D &refscatter, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="")
 Book a 1D profile histogram with binning from a reference scatter.
Profile1DPtr bookProfile1D (const std::string &name, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="")
 Book a 1D profile histogram, using the binnings in the reference data histogram.
Profile1DPtr bookProfile1D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="")
2D profile histogram booking
Profile2DPtr bookProfile2D (const std::string &name, size_t nxbins, double xlower, double xupper, size_t nybins, double ylower, double yupper, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="")
Profile2DPtr bookProfile2D (const std::string &name, const std::vector< double > &xbinedges, const std::vector< double > &ybinedges, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="")
2D scatter booking

Book a 2D profile histogram with binning from a reference scatter.

Scatter2DPtr bookScatter2D (const std::string &name, bool copy_pts=false, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="")
 Book a 2-dimensional data point set with the given name.
Scatter2DPtr bookScatter2D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId, bool copy_pts=false, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="")
 Book a 2-dimensional data point set, using the binnings in the reference data histogram.
Scatter2DPtr bookScatter2D (const std::string &name, size_t npts, double lower, double upper, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="")
 Book a 2-dimensional data point set with equally spaced x-points in a range.
Scatter2DPtr bookScatter2D (const std::string &hname, const std::vector< double > &binedges, const std::string &title, const std::string &xtitle, const std::string &ytitle)
 Book a 2-dimensional data point set based on provided contiguous "bin edges".
Data object registration, retrieval, and removal
void addAnalysisObject (AnalysisObjectPtr ao)
 Register a data object in the histogram system.
template<typename AO >
const std::shared_ptr< AO > getAnalysisObject (const std::string &name) const
template<typename AO >
std::shared_ptr< AO > getAnalysisObject (const std::string &name)
void removeAnalysisObject (const std::string &path)
 Unregister a data object from the histogram system (by name)
void removeAnalysisObject (AnalysisObjectPtr ao)
 Unregister a data object from the histogram system (by pointer)
const Histo1DPtr getHisto1D (const std::string &name) const
 Get a named Histo1D object from the histogram system.
Histo1DPtr getHisto1D (const std::string &name)
 Get a named Histo1D object from the histogram system (non-const)
const Histo1DPtr getHisto1D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const
 Get a Histo1D object from the histogram system by axis ID codes (non-const)
Histo1DPtr getHisto1D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId)
 Get a Histo1D object from the histogram system by axis ID codes (non-const)
const Profile1DPtr getProfile1D (const std::string &name) const
 Get a named Profile1D object from the histogram system.
Profile1DPtr getProfile1D (const std::string &name)
 Get a named Profile1D object from the histogram system (non-const)
const Profile1DPtr getProfile1D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const
 Get a Profile1D object from the histogram system by axis ID codes (non-const)
Profile1DPtr getProfile1D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId)
 Get a Profile1D object from the histogram system by axis ID codes (non-const)
const Scatter2DPtr getScatter2D (const std::string &name) const
 Get a named Scatter2D object from the histogram system.
Scatter2DPtr getScatter2D (const std::string &name)
 Get a named Scatter2D object from the histogram system (non-const)
const Scatter2DPtr getScatter2D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const
 Get a Scatter2D object from the histogram system by axis ID codes (non-const)
Scatter2DPtr getScatter2D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId)
 Get a Scatter2D object from the histogram system by axis ID codes (non-const)
Projection registration functions
template<typename PROJ >
const PROJ & declareProjection (const PROJ &proj, const std::string &name)
 Register a contained projection.
template<typename PROJ >
const PROJ & declare (const PROJ &proj, const std::string &name)
 Register a contained projection (user-facing version)
template<typename PROJ >
const PROJ & addProjection (const PROJ &proj, const std::string &name)
 Register a contained projection (user-facing version)
const Projection_declareProjection (const Projection &proj, const std::string &name)
 Untemplated function to do the work...

Protected Attributes

bool _allowProjReg
 Flag to forbid projection registration in analyses until the init phase.

Private Attributes

double _weights_had
double _weights_mu
double _weights_el
map< string, vector< int > > decay_pids
Histograms
Histo1DPtr _h_ratio_mu
Histo1DPtr _h_ratio_el
Histo1DPtr _h_1prong_pinu
Histo1DPtr _h_1prong_Kpnu
Histo1DPtr _h_1prong_Kppinu
Histo1DPtr _h_1prong_pipinu
Histo1DPtr _h_1prong_pipipinu
Histo1DPtr _h_1prong_Knpinu
Histo1DPtr _h_3prong_pipipinu
Histo1DPtr _h_5prong

Detailed Description

Definition at line 8 of file PDG_TAUS.cc.


Constructor & Destructor Documentation

PDG_TAUS ( ) [inline]

Constructor.

Definition at line 12 of file PDG_TAUS.cc.

      : Analysis("PDG_TAUS"),
        _weights_had(0),
        _weights_mu(0),
        _weights_el(0)
    {   }

Member Function Documentation

const Projection & _applyProjection ( const Event evt,
const std::string &  name 
) const [protected, inherited]

Non-templated version of string-based applyProjection, to work around header dependency issue.

Definition at line 22 of file ProjectionApplier.cc.

                                                                                  {
    return evt.applyProjection(getProjection(name));
  }
const Projection & _applyProjection ( const Event evt,
const Projection proj 
) const [protected, inherited]

Non-templated version of proj-based applyProjection, to work around header dependency issue.

Definition at line 28 of file ProjectionApplier.cc.

                                                                                      {
    return evt.applyProjection(proj);
  }
const Projection & _declareProjection ( const Projection proj,
const std::string &  name 
) [protected, inherited]

Untemplated function to do the work...

Definition at line 34 of file ProjectionApplier.cc.

                                                                             {
    if (!_allowProjReg) {
      cerr << "Trying to register projection '"
           << proj.name() << "' before init phase in '" << this->name() << "'." << endl;
      exit(2);
    }
    const Projection& reg = getProjHandler().registerProjection(*this, proj, name);
    return reg;
  }
void addAnalysisObject ( AnalysisObjectPtr  ao) [protected, inherited]

Register a data object in the histogram system.

Todo:
2D versions of integrate... defined how, exactly?!?

Definition at line 795 of file Analysis.cc.

                                                       {
    _analysisobjects.push_back(ao);
  }
const PROJ& addProjection ( const PROJ &  proj,
const std::string &  name 
) [inline, protected, inherited]

Register a contained projection (user-facing version)

Deprecated:
Use declareProjection() or declare()
Todo:
Add SFINAE to require that PROJ inherit from Projection

Definition at line 157 of file ProjectionApplier.hh.

{ return declareProjection(proj, name); }
const vector<AnalysisObjectPtr>& analysisObjects ( ) const [inline, inherited]

List of registered analysis data objects.

Definition at line 811 of file Analysis.hh.

                                                             {
      return _analysisobjects;
    }
void analyze ( const Event e) [inline, virtual]

Perform the per-event analysis.

Implements Analysis.

Definition at line 48 of file PDG_TAUS.cc.

                                 {
      const double weight = e.weight();

      const TauFinder& taulep = apply<TauFinder>(e, "TauLeptonic");
      const TauFinder& tauhad = apply<TauFinder>(e, "TauHadronic");

      // Hadronic tau decays --- prong decays
      foreach(const Particle& tau, tauhad.taus()) {
        _weights_had += weight;
        int prongs = countProngs(tau); // number of charged particles among decay products
        // Only do 1 prong decays here
        if (prongs == 1) {
          ////// Exclusive decay modes "1-prong"
          if (analyzeDecay(tau,   decay_pids["pinu"], true))     _h_1prong_pinu->fill(1, weight);
          if (analyzeDecay(tau,   decay_pids["Kpnu"], true))     _h_1prong_Kpnu->fill(1, weight);
          if (analyzeDecay(tau, decay_pids["pipinu"], true))     _h_1prong_pipinu->fill(1, weight);
          if (analyzeDecay(tau, decay_pids["Kppinu"]  , true))   _h_1prong_Kppinu->fill(1, weight);
          if (analyzeDecay(tau, decay_pids["pipipinu"], true))   _h_1prong_pipipinu->fill(1, weight);
          // Kshort, Klong --- (twice) filling the K0 labelled PDG histo
          if (analyzeDecay(tau, decay_pids["KSpinu"]  , true))   _h_1prong_Knpinu->fill(1, weight);
          if (analyzeDecay(tau, decay_pids["KLpinu"]  , true))   _h_1prong_Knpinu->fill(1, weight);
        }
        else if (prongs == 3) {
          if (analyzeDecay(tau, decay_pids["3pipipinu"], true))  _h_3prong_pipipinu->fill(1, weight);
        }
        else if (prongs == 5 && !any(tau.children(), HasAbsPID(310))) _h_5prong->fill(1, weight);
      }

      // Leptonic tau decays --- look for radiative and non-radiative 1 prong decays
      foreach(const Particle& tau, taulep.taus()) {
        int prongs = countProngs(tau); // number of charged particles among decay products
        // Only do 1 prong decays here
        if (prongs == 1) {
          analyzeRadiativeDecay(tau, decay_pids["muids"], _weights_mu,  weight, true, _h_ratio_mu);
          analyzeRadiativeDecay(tau, decay_pids["elids"], _weights_el,  weight, true, _h_ratio_el);
        }
      }
    }
bool analyzeDecay ( Particle  mother,
vector< int >  ids,
bool  absolute 
) [inline]

Definition at line 136 of file PDG_TAUS.cc.

                                                                       {
      // There is no point in looking for decays with less particles than to be analysed
      if (mother.children().size() == ids.size()) {
        bool decayfound = true;
        foreach (int id, ids) {
          if (!contains(mother, id, absolute)) decayfound = false;
        }
        return decayfound;
      } // end of first if
      return false;
    }
void analyzeRadiativeDecay ( Particle  mother,
vector< int >  ids,
double &  w_incl,
double  e_weight,
bool  absolute,
Histo1DPtr  h_ratio 
) [inline]

Definition at line 150 of file PDG_TAUS.cc.

                                                                                                                                     {
      // w_incl   ... reference to a global weight counter for all leptonic tau decays
      // e_weight ... the current event weight
      // h_ratio  ... pointer to ratio histo --- filled with e_weight in case of radiative events only

      // There is no point in looking for decays with less particles than to be analysed
      if (mother.children().size() >= ids.size()) {
        bool decayfound = true;
        foreach (int id, ids) {
          if (!contains(mother, id, absolute)) decayfound = false;
        }
        // Do not increment counters if the specified decay products were not found
        if (decayfound) {
          w_incl += e_weight; // the (global) weight counter for leptonic decays
          bool radiative = any(mother.children(), HasPID(PID::PHOTON));

          // Only fill the histo if there is a radiative decay
          if (radiative) {
            // Iterate over decay products to find photon with 5 MeV energy
            foreach (const Particle& son, mother.children()) {
              if (son.pid() == PID::PHOTON) {
                // Require photons to have at least 5 MeV energy in the rest frame of the tau
                // boosted taus
                if (!mother.momentum().betaVec().isZero()) {
                  LorentzTransform cms_boost = LorentzTransform::mkFrameTransformFromBeta(mother.momentum().betaVec());
                  if (cms_boost.transform(son.momentum())[0]/MeV > 5.) {
                    h_ratio->fill(1, e_weight);
                    break;
                  }
                }
                // not boosted taus
                else {
                  if (son.momentum()[0]/MeV > 5.) {
                    h_ratio->fill(1, e_weight);
                    break;
                  }
                }
              }
            } // end loop over decay products
          } // end of radiative
        } // end of decayfound
      } // end of first if
    }
const PROJ& apply ( const Event evt,
const Projection proj 
) const [inline, inherited]

Apply the supplied projection on event evt (user-facing alias).

Todo:
Add SFINAE to require that PROJ inherit from Projection

Definition at line 80 of file ProjectionApplier.hh.

{ return applyProjection<PROJ>(evt, proj); }
const PROJ& apply ( const Event evt,
const PROJ &  proj 
) const [inline, inherited]

Apply the supplied projection on event evt (user-facing alias).

Todo:
Add SFINAE to require that PROJ inherit from Projection

Definition at line 92 of file ProjectionApplier.hh.

{ return applyProjection<PROJ>(evt, proj); }
const PROJ& apply ( const Event evt,
const std::string &  name 
) const [inline, inherited]

Apply the supplied projection on event evt (user-facing alias).

Todo:
Add SFINAE to require that PROJ inherit from Projection

Definition at line 104 of file ProjectionApplier.hh.

{ return applyProjection<PROJ>(evt, name); }
const PROJ& applyProjection ( const Event evt,
const Projection proj 
) const [inline, inherited]

Apply the supplied projection on event evt.

Todo:
Add SFINAE to require that PROJ inherit from Projection

Definition at line 74 of file ProjectionApplier.hh.

                                                                                {
      return pcast<PROJ>(_applyProjection(evt, proj));
    }
const PROJ& applyProjection ( const Event evt,
const PROJ &  proj 
) const [inline, inherited]

Apply the supplied projection on event evt.

Todo:
Add SFINAE to require that PROJ inherit from Projection

Definition at line 86 of file ProjectionApplier.hh.

                                                                          {
      return pcast<PROJ>(_applyProjection(evt, proj));
    }
const PROJ& applyProjection ( const Event evt,
const std::string &  name 
) const [inline, inherited]

Apply the named projection on event evt.

Todo:
Add SFINAE to require that PROJ inherit from Projection

Definition at line 98 of file ProjectionApplier.hh.

                                                                               {
      return pcast<PROJ>(_applyProjection(evt, name));
    }
void asymm ( Histo1DPtr  h1,
Histo1DPtr  h2,
Scatter2DPtr  s 
) const [inherited]

Helper for histogram asymmetry calculation.

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.

Definition at line 674 of file Analysis.cc.

                                                                         {
    const string path = s->path();
    *s = YODA::asymm(*h1, *h2);
    s->setPath(path);
  }
void asymm ( const YODA::Histo1D &  h1,
const YODA::Histo1D &  h2,
Scatter2DPtr  s 
) const [inherited]

Helper for histogram asymmetry calculation.

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
virtual std::vector<std::string> authors ( ) const [inline, virtual, inherited]

Names & emails of paper/analysis authors.

Names and email of authors in 'NAME <EMAIL>' format. The first name in the list should be the primary contact person.

Definition at line 133 of file Analysis.hh.

                                                 {
      return info().authors();
    }
const PdgIdPair beamIds ( ) const [inherited]

Incoming beam IDs for this run.

Definition at line 33 of file Analysis.cc.

                                          {
    return handler().beamIds();
  }
const ParticlePair & beams ( ) const [inherited]

Incoming beams for this run.

Definition at line 29 of file Analysis.cc.

                                            {
    return handler().beams();
  }
virtual std::string bibKey ( ) const [inline, virtual, inherited]

BibTeX citation key for this article.

Definition at line 186 of file Analysis.hh.

                                     {
      return info().bibKey();
    }
virtual std::string bibTeX ( ) const [inline, virtual, inherited]

BibTeX citation entry for this article.

Definition at line 191 of file Analysis.hh.

                                     {
      return info().bibTeX();
    }
CounterPtr bookCounter ( const std::string &  name,
const std::string &  title = "" 
) [protected, inherited]

Book a counter.

Definition at line 196 of file Analysis.cc.

                                                        {
                                   // const string& xtitle,
                                   // const string& ytitle) {
    const string path = histoPath(cname);
    CounterPtr ctr = make_shared<Counter>(path, title);
    addAnalysisObject(ctr);
    MSG_TRACE("Made counter " << cname << " for " << name());
    // hist->setAnnotation("XLabel", xtitle);
    // hist->setAnnotation("YLabel", ytitle);
    return ctr;
  }
CounterPtr bookCounter ( unsigned int  datasetId,
unsigned int  xAxisId,
unsigned int  yAxisId,
const std::string &  title = "" 
) [protected, inherited]

Book a counter, using a path generated from the dataset and axis ID codes

The paper, dataset and x/y-axis IDs will be used to build the histo name in the HepData standard way.

Definition at line 210 of file Analysis.cc.

                                                        {
                                   // const string& xtitle,
                                   // const string& ytitle) {
    const string axisCode = makeAxisCode(datasetId, xAxisId, yAxisId);
    return bookCounter(axisCode, title);
  }
Histo1DPtr bookHisto1D ( const std::string &  name,
size_t  nbins,
double  lower,
double  upper,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "" 
) [protected, inherited]

Book a 1D histogram with nbins uniformly distributed across the range lower - upper .

Definition at line 219 of file Analysis.cc.

                                                         {
    const string path = histoPath(hname);
    Histo1DPtr hist = make_shared<Histo1D>(nbins, lower, upper, path, title);
    addAnalysisObject(hist);
    MSG_TRACE("Made histogram " << hname <<  " for " << name());
    hist->setAnnotation("XLabel", xtitle);
    hist->setAnnotation("YLabel", ytitle);
    return hist;
  }
Histo1DPtr bookHisto1D ( const std::string &  name,
const std::vector< double > &  binedges,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "" 
) [protected, inherited]

Book a 1D histogram with non-uniform bins defined by the vector of bin edges binedges .

Definition at line 234 of file Analysis.cc.

                                                         {
    const string path = histoPath(hname);
    Histo1DPtr hist = make_shared<Histo1D>(binedges, path, title);
    addAnalysisObject(hist);
    MSG_TRACE("Made histogram " << hname <<  " for " << name());
    hist->setAnnotation("XLabel", xtitle);
    hist->setAnnotation("YLabel", ytitle);
    return hist;
  }
Histo1DPtr bookHisto1D ( const std::string &  name,
const Scatter2D &  refscatter,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "" 
) [protected, inherited]

Book a 1D histogram with binning from a reference scatter.

Definition at line 249 of file Analysis.cc.

                                                         {
    const string path = histoPath(hname);
    Histo1DPtr hist = make_shared<Histo1D>(refscatter, path);
    addAnalysisObject(hist);
    MSG_TRACE("Made histogram " << hname <<  " for " << name());
    hist->setTitle(title);
    hist->setAnnotation("XLabel", xtitle);
    hist->setAnnotation("YLabel", ytitle);
    return hist;
  }
Histo1DPtr bookHisto1D ( const std::string &  name,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "" 
) [protected, inherited]

Book a 1D histogram, using the binnings in the reference data histogram.

Definition at line 265 of file Analysis.cc.

                                                         {
    const Scatter2D& refdata = refData(hname);
    return bookHisto1D(hname, refdata, title, xtitle, ytitle);
  }
Histo1DPtr bookHisto1D ( unsigned int  datasetId,
unsigned int  xAxisId,
unsigned int  yAxisId,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "" 
) [protected, inherited]

Book a 1D histogram, using the binnings in the reference data histogram.

The paper, dataset and x/y-axis IDs will be used to build the histo name in the HepData standard way.

Definition at line 274 of file Analysis.cc.

                                                         {
    const string axisCode = makeAxisCode(datasetId, xAxisId, yAxisId);
    return bookHisto1D(axisCode, title, xtitle, ytitle);
  }
Histo2DPtr bookHisto2D ( const std::string &  name,
size_t  nxbins,
double  xlower,
double  xupper,
size_t  nybins,
double  ylower,
double  yupper,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "",
const std::string &  ztitle = "" 
) [protected, inherited]

Book a 2D histogram with nxbins and nybins uniformly distributed across the ranges xlower - xupper and ylower - yupper respectively along the x- and y-axis.

Todo:
Add booking methods which take a path, titles and *a reference Scatter from which to book*

Definition at line 289 of file Analysis.cc.

  {
    const string path = histoPath(hname);
    Histo2DPtr hist = make_shared<Histo2D>(nxbins, xlower, xupper, nybins, ylower, yupper, path, title);
    addAnalysisObject(hist);
    MSG_TRACE("Made 2D histogram " << hname <<  " for " << name());
    hist->setAnnotation("XLabel", xtitle);
    hist->setAnnotation("YLabel", ytitle);
    hist->setAnnotation("ZLabel", ztitle);
    return hist;
  }
Histo2DPtr bookHisto2D ( const std::string &  name,
const std::vector< double > &  xbinedges,
const std::vector< double > &  ybinedges,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "",
const std::string &  ztitle = "" 
) [protected, inherited]

Book a 2D histogram with non-uniform bins defined by the vectorx of bin edges xbinedges and ybinedges.

Definition at line 308 of file Analysis.cc.

  {
    const string path = histoPath(hname);
    Histo2DPtr hist = make_shared<Histo2D>(xbinedges, ybinedges, path, title);
    addAnalysisObject(hist);
    MSG_TRACE("Made 2D histogram " << hname <<  " for " << name());
    hist->setAnnotation("XLabel", xtitle);
    hist->setAnnotation("YLabel", ytitle);
    hist->setAnnotation("ZLabel", ztitle);
    return hist;
  }
Profile1DPtr bookProfile1D ( const std::string &  name,
size_t  nbins,
double  lower,
double  upper,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "" 
) [protected, inherited]

Book a 1D profile histogram with nbins uniformly distributed across the range lower - upper .

Definition at line 368 of file Analysis.cc.

                                                             {
    const string path = histoPath(hname);
    Profile1DPtr prof = make_shared<Profile1D>(nbins, lower, upper, path, title);
    addAnalysisObject(prof);
    MSG_TRACE("Made profile histogram " << hname <<  " for " << name());
    prof->setAnnotation("XLabel", xtitle);
    prof->setAnnotation("YLabel", ytitle);
    return prof;
  }
Profile1DPtr bookProfile1D ( const std::string &  name,
const std::vector< double > &  binedges,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "" 
) [protected, inherited]

Book a 1D profile histogram with non-uniform bins defined by the vector of bin edges binedges .

Definition at line 383 of file Analysis.cc.

                                                             {
    const string path = histoPath(hname);
    Profile1DPtr prof = make_shared<Profile1D>(binedges, path, title);
    addAnalysisObject(prof);
    MSG_TRACE("Made profile histogram " << hname <<  " for " << name());
    prof->setAnnotation("XLabel", xtitle);
    prof->setAnnotation("YLabel", ytitle);
    return prof;
  }
Profile1DPtr bookProfile1D ( const std::string &  name,
const Scatter2D &  refscatter,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "" 
) [protected, inherited]

Book a 1D profile histogram with binning from a reference scatter.

Definition at line 398 of file Analysis.cc.

                                                             {
    const string path = histoPath(hname);
    Profile1DPtr prof = make_shared<Profile1D>(refscatter, path);
    addAnalysisObject(prof);
    MSG_TRACE("Made profile histogram " << hname <<  " for " << name());
    prof->setTitle(title);
    prof->setAnnotation("XLabel", xtitle);
    prof->setAnnotation("YLabel", ytitle);
    return prof;
  }
Profile1DPtr bookProfile1D ( const std::string &  name,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "" 
) [protected, inherited]

Book a 1D profile histogram, using the binnings in the reference data histogram.

Definition at line 414 of file Analysis.cc.

                                                             {
    const Scatter2D& refdata = refData(hname);
    return bookProfile1D(hname, refdata, title, xtitle, ytitle);
  }
Profile1DPtr bookProfile1D ( unsigned int  datasetId,
unsigned int  xAxisId,
unsigned int  yAxisId,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "" 
) [protected, inherited]

Book a 1D profile histogram, using the binnings in the reference data histogram.

The paper, dataset and x/y-axis IDs will be used to build the histo name in the HepData standard way.

Definition at line 423 of file Analysis.cc.

                                                             {
    const string axisCode = makeAxisCode(datasetId, xAxisId, yAxisId);
    return bookProfile1D(axisCode, title, xtitle, ytitle);
  }
Profile2DPtr bookProfile2D ( const std::string &  name,
size_t  nxbins,
double  xlower,
double  xupper,
size_t  nybins,
double  ylower,
double  yupper,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "",
const std::string &  ztitle = "" 
) [protected, inherited]

Book a 2D profile histogram with nxbins and nybins uniformly distributed across the ranges xlower - xupper and ylower - yupper respectively along the x- and y-axis.

Definition at line 436 of file Analysis.cc.

  {
    const string path = histoPath(hname);
    Profile2DPtr prof = make_shared<Profile2D>(nxbins, xlower, xupper, nybins, ylower, yupper, path, title);
    addAnalysisObject(prof);
    MSG_TRACE("Made 2D profile histogram " << hname <<  " for " << name());
    prof->setAnnotation("XLabel", xtitle);
    prof->setAnnotation("YLabel", ytitle);
    prof->setAnnotation("ZLabel", ztitle);
    return prof;
  }
Profile2DPtr bookProfile2D ( const std::string &  name,
const std::vector< double > &  xbinedges,
const std::vector< double > &  ybinedges,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "",
const std::string &  ztitle = "" 
) [protected, inherited]

Book a 2D profile histogram with non-uniform bins defined by the vectorx of bin edges xbinedges and ybinedges.

Definition at line 455 of file Analysis.cc.

  {
    const string path = histoPath(hname);
    Profile2DPtr prof = make_shared<Profile2D>(xbinedges, ybinedges, path, title);
    addAnalysisObject(prof);
    MSG_TRACE("Made 2D profile histogram " << hname <<  " for " << name());
    prof->setAnnotation("XLabel", xtitle);
    prof->setAnnotation("YLabel", ytitle);
    prof->setAnnotation("ZLabel", ztitle);
    return prof;
  }
Scatter2DPtr bookScatter2D ( const std::string &  name,
bool  copy_pts = false,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "" 
) [protected, inherited]

Book a 2-dimensional data point set with the given name.

Note:
Unlike histogram booking, scatter booking by default makes no attempt to use reference data to pre-fill the data object. If you want this, which is sometimes useful e.g. when the x-position is not really meaningful and can't be extracted from the data, then set the copy_pts parameter to true. This creates points to match the reference data's x values and errors, but with the y values and errors zeroed... assuming that there is a reference histo with the same name: if there isn't, an exception will be thrown.

Definition at line 525 of file Analysis.cc.

                                                             {
    Scatter2DPtr s;
    const string path = histoPath(hname);
    if (copy_pts) {
      const Scatter2D& refdata = refData(hname);
      s = make_shared<Scatter2D>(refdata, path);
      foreach (Point2D& p, s->points()) p.setY(0, 0);
    } else {
      s = make_shared<Scatter2D>(path);
    }
    addAnalysisObject(s);
    MSG_TRACE("Made scatter " << hname <<  " for " << name());
    s->setTitle(title);
    s->setAnnotation("XLabel", xtitle);
    s->setAnnotation("YLabel", ytitle);
    return s;
  }
Scatter2DPtr bookScatter2D ( unsigned int  datasetId,
unsigned int  xAxisId,
unsigned int  yAxisId,
bool  copy_pts = false,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "" 
) [protected, inherited]

Book a 2-dimensional data point set, using the binnings in the reference data histogram.

The paper, dataset and x/y-axis IDs will be used to build the histo name in the HepData standard way.

Note:
Unlike histogram booking, scatter booking by default makes no attempt to use reference data to pre-fill the data object. If you want this, which is sometimes useful e.g. when the x-position is not really meaningful and can't be extracted from the data, then set the copy_pts parameter to true. This creates points to match the reference data's x values and errors, but with the y values and errors zeroed.

Definition at line 515 of file Analysis.cc.

                                                             {
    const string axisCode = makeAxisCode(datasetId, xAxisId, yAxisId);
    return bookScatter2D(axisCode, copy_pts, title, xtitle, ytitle);
  }
Scatter2DPtr bookScatter2D ( const std::string &  name,
size_t  npts,
double  lower,
double  upper,
const std::string &  title = "",
const std::string &  xtitle = "",
const std::string &  ytitle = "" 
) [protected, inherited]

Book a 2-dimensional data point set with equally spaced x-points in a range.

The y values and errors will be set to 0.

Definition at line 548 of file Analysis.cc.

                                                             {
    const string path = histoPath(hname);
    Scatter2DPtr s = make_shared<Scatter2D>(path);
    const double binwidth = (upper-lower)/npts;
    for (size_t pt = 0; pt < npts; ++pt) {
      const double bincentre = lower + (pt + 0.5) * binwidth;
      s->addPoint(bincentre, 0, binwidth/2.0, 0);
    }
    addAnalysisObject(s);
    MSG_TRACE("Made scatter " << hname <<  " for " << name());
    s->setTitle(title);
    s->setAnnotation("XLabel", xtitle);
    s->setAnnotation("YLabel", ytitle);
    return s;
  }
Scatter2DPtr bookScatter2D ( const std::string &  hname,
const std::vector< double > &  binedges,
const std::string &  title,
const std::string &  xtitle,
const std::string &  ytitle 
) [protected, inherited]

Book a 2-dimensional data point set based on provided contiguous "bin edges".

The y values and errors will be set to 0.

Definition at line 569 of file Analysis.cc.

                                                             {
    const string path = histoPath(hname);
    Scatter2DPtr s = make_shared<Scatter2D>(path);
    for (size_t pt = 0; pt < binedges.size()-1; ++pt) {
      const double bincentre = (binedges[pt] + binedges[pt+1]) / 2.0;
      const double binwidth = binedges[pt+1] - binedges[pt];
      s->addPoint(bincentre, 0, binwidth/2.0, 0);
    }
    addAnalysisObject(s);
    MSG_TRACE("Made scatter " << hname <<  " for " << name());
    s->setTitle(title);
    s->setAnnotation("XLabel", xtitle);
    s->setAnnotation("YLabel", ytitle);
    return s;
  }
virtual std::string collider ( ) const [inline, virtual, inherited]

Collider on which the experiment ran.

Definition at line 171 of file Analysis.hh.

                                       {
      return info().collider();
    }
bool contains ( Particle mother,
int  id,
bool  abs = false 
) [inline]

Definition at line 106 of file PDG_TAUS.cc.

                                                            {
      if (abs) return any(mother.children(), HasAbsPID(id));
      return any(mother.children(), HasPID(id));
    }
int countProngs ( Particle  mother) [inline]

Definition at line 113 of file PDG_TAUS.cc.

                                     {
      int n_prongs = 0;
      foreach(Particle p, mother.children())
        if (p.threeCharge()!=0) ++n_prongs;
      return n_prongs;
    }
double crossSection ( ) const [protected, inherited]

Get the process cross-section in pb. Throws if this hasn't been set.

Definition at line 151 of file Analysis.cc.

                                      {
    if (!_gotCrossSection || std::isnan(_crossSection)) {
      string errMsg = "You did not set the cross section for the analysis " + name();
      throw Error(errMsg);
    }
    return _crossSection;
  }
double crossSectionPerEvent ( ) const [protected, inherited]

Get the process cross-section per generated event in pb. Throws if this hasn't been set.

Definition at line 159 of file Analysis.cc.

                                              {
    const double sumW = sumOfWeights();
    assert(sumW != 0.0);
    return _crossSection / sumW;
  }
const PROJ& declare ( const PROJ &  proj,
const std::string &  name 
) [inline, protected, inherited]

Register a contained projection (user-facing version)

Todo:
Add SFINAE to require that PROJ inherit from Projection

Definition at line 151 of file ProjectionApplier.hh.

{ return declareProjection(proj, name); }
const PROJ& declareProjection ( const PROJ &  proj,
const std::string &  name 
) [inline, protected, inherited]

Register a contained projection.

The type of the argument is used to instantiate a new projection internally: this new object is applied to events rather than the argument object. Hence you are advised to only use locally-scoped Projection objects in your Projection and Analysis constructors, and to avoid polymorphism (e.g. handling ConcreteProjection via a pointer or reference to type Projection) since this will screw up the internal type management.

Todo:
Add SFINAE to require that PROJ inherit from Projection

Definition at line 142 of file ProjectionApplier.hh.

                                                                           {
      const Projection& reg = _declareProjection(proj, name);
      const PROJ& rtn = dynamic_cast<const PROJ&>(reg);
      return rtn;
    }
virtual std::string description ( ) const [inline, virtual, inherited]

Get a full description of the analysis.

Full textual description of this analysis, what it is useful for, what experimental techniques are applied, etc. Should be treated as a chunk of restructuredText (http://docutils.sourceforge.net/rst.html), with equations to be rendered as LaTeX with amsmath operators.

Definition at line 152 of file Analysis.hh.

                                          {
      return info().description();
    }
void divide ( CounterPtr  c1,
CounterPtr  c2,
Scatter1DPtr  s 
) const [inherited]

Helper for counter division.

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.

Definition at line 593 of file Analysis.cc.

                                                                          {
    const string path = s->path();
    *s = *c1 / *c2;
    s->setPath(path);
  }
void divide ( const YODA::Counter &  c1,
const YODA::Counter &  c2,
Scatter1DPtr  s 
) const [inherited]

Helper for histogram division with raw YODA objects.

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
void divide ( Histo1DPtr  h1,
Histo1DPtr  h2,
Scatter2DPtr  s 
) const [inherited]

Helper for histogram division.

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.

Definition at line 606 of file Analysis.cc.

                                                                          {
    const string path = s->path();
    *s = *h1 / *h2;
    s->setPath(path);
  }
void divide ( const YODA::Histo1D &  h1,
const YODA::Histo1D &  h2,
Scatter2DPtr  s 
) const [inherited]

Helper for histogram division with raw YODA objects.

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
void divide ( Profile1DPtr  p1,
Profile1DPtr  p2,
Scatter2DPtr  s 
) const [inherited]

Helper for profile histogram division.

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.

Definition at line 619 of file Analysis.cc.

                                                                              {
    const string path = s->path();
    *s = *p1 / *p2;
    s->setPath(path);
  }
void divide ( const YODA::Profile1D &  p1,
const YODA::Profile1D &  p2,
Scatter2DPtr  s 
) const [inherited]

Helper for profile histogram division with raw YODA objects.

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
void divide ( Histo2DPtr  h1,
Histo2DPtr  h2,
Scatter3DPtr  s 
) const [inherited]

Helper for 2D histogram division.

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.

Definition at line 632 of file Analysis.cc.

                                                                          {
    const string path = s->path();
    *s = *h1 / *h2;
    s->setPath(path);
  }
void divide ( const YODA::Histo2D &  h1,
const YODA::Histo2D &  h2,
Scatter3DPtr  s 
) const [inherited]

Helper for 2D histogram division with raw YODA objects.

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
void divide ( Profile2DPtr  p1,
Profile2DPtr  p2,
Scatter3DPtr  s 
) const [inherited]

Helper for 2D profile histogram division.

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.

Definition at line 645 of file Analysis.cc.

                                                                              {
    const string path = s->path();
    *s = *p1 / *p2;
    s->setPath(path);
  }
void divide ( const YODA::Profile2D &  p1,
const YODA::Profile2D &  p2,
Scatter3DPtr  s 
) const [inherited]

Helper for 2D profile histogram division with raw YODA objects

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
void efficiency ( Histo1DPtr  h1,
Histo1DPtr  h2,
Scatter2DPtr  s 
) const [inherited]

Helper for histogram efficiency calculation.

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
Todo:
Counter and Histo2D efficiencies and asymms

Definition at line 661 of file Analysis.cc.

                                                                              {
    const string path = s->path();
    *s = YODA::efficiency(*h1, *h2);
    s->setPath(path);
  }
void efficiency ( const YODA::Histo1D &  h1,
const YODA::Histo1D &  h2,
Scatter2DPtr  s 
) const [inherited]

Helper for histogram efficiency calculation.

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
virtual std::string experiment ( ) const [inline, virtual, inherited]

Experiment which performed and published this analysis.

Definition at line 166 of file Analysis.hh.

                                         {
      return info().experiment();
    }
void finalize ( ) [inline, virtual]

Normalise histograms etc., after the run.

Reimplemented from Analysis.

Definition at line 89 of file PDG_TAUS.cc.

const PROJ& get ( const std::string &  name) const [inline, inherited]

Get the named projection, specifying return type via a template argument (user-facing alias).

Todo:
Add SFINAE to require that PROJ inherit from Projection

Definition at line 57 of file ProjectionApplier.hh.

{ return getProjection<PROJ>(name); }
const std::shared_ptr<AO> getAnalysisObject ( const std::string &  name) const [inline, protected, inherited]

Get a data object from the histogram system

Todo:
Use this default function template arg in C++11

Definition at line 828 of file Analysis.hh.

                                                                           {
      foreach (const AnalysisObjectPtr& ao, analysisObjects()) {
        if (ao->path() == histoPath(name)) return dynamic_pointer_cast<AO>(ao);
      }
      throw Exception("Data object " + histoPath(name) + " not found");
    }
std::shared_ptr<AO> getAnalysisObject ( const std::string &  name) [inline, protected, inherited]

Get a data object from the histogram system (non-const)

Todo:
Use this default function template arg in C++11

Definition at line 839 of file Analysis.hh.

                                                               {
      foreach (const AnalysisObjectPtr& ao, analysisObjects()) {
        if (ao->path() == histoPath(name)) return dynamic_pointer_cast<AO>(ao);
      }
      throw Exception("Data object " + histoPath(name) + " not found");
    }
const Histo1DPtr getHisto1D ( const std::string &  name) const [inline, protected, inherited]

Get a named Histo1D object from the histogram system.

Definition at line 854 of file Analysis.hh.

                                                             {
      return getAnalysisObject<Histo1D>(name);
    }
Histo1DPtr getHisto1D ( const std::string &  name) [inline, protected, inherited]

Get a named Histo1D object from the histogram system (non-const)

Definition at line 859 of file Analysis.hh.

                                                 {
      return getAnalysisObject<Histo1D>(name);
    }
const Histo1DPtr getHisto1D ( unsigned int  datasetId,
unsigned int  xAxisId,
unsigned int  yAxisId 
) const [inline, protected, inherited]

Get a Histo1D object from the histogram system by axis ID codes (non-const)

Definition at line 864 of file Analysis.hh.

                                                                                                          {
      return getAnalysisObject<Histo1D>(makeAxisCode(datasetId, xAxisId, yAxisId));
    }
Histo1DPtr getHisto1D ( unsigned int  datasetId,
unsigned int  xAxisId,
unsigned int  yAxisId 
) [inline, protected, inherited]

Get a Histo1D object from the histogram system by axis ID codes (non-const)

Definition at line 869 of file Analysis.hh.

                                                                                              {
      return getAnalysisObject<Histo1D>(makeAxisCode(datasetId, xAxisId, yAxisId));
    }
Log & getLog ( ) const [protected, inherited]

Get a Log object based on the name() property of the calling analysis object.

Reimplemented from ProjectionApplier.

Definition at line 78 of file Analysis.cc.

                              {
    string logname = "Rivet.Analysis." + name();
    return Log::getLog(logname);
  }
const Profile1DPtr getProfile1D ( const std::string &  name) const [inline, protected, inherited]

Get a named Profile1D object from the histogram system.

Definition at line 896 of file Analysis.hh.

                                                                 {
      return getAnalysisObject<Profile1D>(name);
    }
Profile1DPtr getProfile1D ( const std::string &  name) [inline, protected, inherited]

Get a named Profile1D object from the histogram system (non-const)

Definition at line 901 of file Analysis.hh.

                                                     {
      return getAnalysisObject<Profile1D>(name);
    }
const Profile1DPtr getProfile1D ( unsigned int  datasetId,
unsigned int  xAxisId,
unsigned int  yAxisId 
) const [inline, protected, inherited]

Get a Profile1D object from the histogram system by axis ID codes (non-const)

Definition at line 906 of file Analysis.hh.

                                                                                                              {
      return getAnalysisObject<Profile1D>(makeAxisCode(datasetId, xAxisId, yAxisId));
    }
Profile1DPtr getProfile1D ( unsigned int  datasetId,
unsigned int  xAxisId,
unsigned int  yAxisId 
) [inline, protected, inherited]

Get a Profile1D object from the histogram system by axis ID codes (non-const)

Definition at line 911 of file Analysis.hh.

                                                                                                  {
      return getAnalysisObject<Profile1D>(makeAxisCode(datasetId, xAxisId, yAxisId));
    }
const PROJ& getProjection ( const std::string &  name) const [inline, inherited]

Get the named projection, specifying return type via a template argument.

Todo:
Add SFINAE to require that PROJ inherit from Projection

Definition at line 50 of file ProjectionApplier.hh.

                                                           {
      const Projection& p = getProjHandler().getProjection(*this, name);
      return pcast<PROJ>(p);
    }
const Projection& getProjection ( const std::string &  name) const [inline, inherited]

Get the named projection (non-templated, so returns as a reference to a Projection base class).

Definition at line 61 of file ProjectionApplier.hh.

                                                                 {
      return getProjHandler().getProjection(*this, name);
    }
std::set<ConstProjectionPtr> getProjections ( ) const [inline, inherited]

Get the contained projections, including recursion.

Definition at line 43 of file ProjectionApplier.hh.

ProjectionHandler& getProjHandler ( ) const [inline, protected, inherited]

Get a reference to the ProjectionHandler for this thread.

Definition at line 122 of file ProjectionApplier.hh.

                                              {
      return _projhandler;
    }
const Scatter2DPtr getScatter2D ( const std::string &  name) const [inline, protected, inherited]

Get a named Scatter2D object from the histogram system.

Definition at line 938 of file Analysis.hh.

                                                                 {
      return getAnalysisObject<Scatter2D>(name);
    }
Scatter2DPtr getScatter2D ( const std::string &  name) [inline, protected, inherited]

Get a named Scatter2D object from the histogram system (non-const)

Definition at line 943 of file Analysis.hh.

                                                     {
      return getAnalysisObject<Scatter2D>(name);
    }
const Scatter2DPtr getScatter2D ( unsigned int  datasetId,
unsigned int  xAxisId,
unsigned int  yAxisId 
) const [inline, protected, inherited]

Get a Scatter2D object from the histogram system by axis ID codes (non-const)

Definition at line 948 of file Analysis.hh.

                                                                                                              {
      return getAnalysisObject<Scatter2D>(makeAxisCode(datasetId, xAxisId, yAxisId));
    }
Scatter2DPtr getScatter2D ( unsigned int  datasetId,
unsigned int  xAxisId,
unsigned int  yAxisId 
) [inline, protected, inherited]

Get a Scatter2D object from the histogram system by axis ID codes (non-const)

Definition at line 953 of file Analysis.hh.

                                                                                                  {
      return getAnalysisObject<Scatter2D>(makeAxisCode(datasetId, xAxisId, yAxisId));
    }
AnalysisHandler& handler ( ) const [inline, inherited]

Access the controlling AnalysisHandler object.

Definition at line 289 of file Analysis.hh.

{ return *_analysishandler; }
const string histoDir ( ) const [protected, inherited]

Get the canonical histogram "directory" path for this analysis.

Todo:
Cache in a member variable

Definition at line 38 of file Analysis.cc.

                                        {
    /// @todo Cache in a member variable
    string _histoDir;
    if (_histoDir.empty()) {
      _histoDir = "/" + name();
      if (handler().runName().length() > 0) {
        _histoDir = "/" + handler().runName() + _histoDir;
      }
      replace_all(_histoDir, "//", "/"); //< iterates until none
    }
    return _histoDir;
  }
const string histoPath ( const std::string &  hname) const [protected, inherited]

Get the canonical histogram path for the named histogram in this analysis.

Definition at line 52 of file Analysis.cc.

                                                            {
    const string path = histoDir() + "/" + hname;
    return path;
  }
const string histoPath ( unsigned int  datasetId,
unsigned int  xAxisId,
unsigned int  yAxisId 
) const [protected, inherited]

Get the canonical histogram path for the numbered histogram in this analysis.

Definition at line 58 of file Analysis.cc.

                                                                                                           {
    return histoDir() + "/" + makeAxisCode(datasetId, xAxisId, yAxisId);
  }
const AnalysisInfo& info ( ) const [inline, inherited]

Get the actual AnalysisInfo object in which all this metadata is stored.

Definition at line 105 of file Analysis.hh.

                                     {
      assert(_info && "No AnalysisInfo object :O");
      return *_info;
    }
AnalysisInfo& info ( ) [inline, inherited]

Get the actual AnalysisInfo object in which all this metadata is stored (non-const).

Definition at line 247 of file Analysis.hh.

                         {
      assert(_info && "No AnalysisInfo object :O");
      return *_info;
    }
void init ( ) [inline, virtual]

Book histograms and initialise projections before the run.

Reimplemented from Analysis.

Definition at line 24 of file PDG_TAUS.cc.

                {

      TauFinder tauleptonic(TauFinder::LEPTONIC); // open cuts, leptonic decays
      declare(tauleptonic, "TauLeptonic");

      TauFinder tauhadronic(TauFinder::HADRONIC); // open cuts, hadronic decays
      declare(tauhadronic, "TauHadronic");

      populateDecayMap();

      _h_ratio_mu        = bookHisto1D(1, 1, 1);
      _h_ratio_el        = bookHisto1D(1, 1, 2);
      _h_1prong_pinu     = bookHisto1D(2, 1, 1);
      _h_1prong_Kpnu     = bookHisto1D(2, 1, 2);
      _h_1prong_pipinu   = bookHisto1D(2, 1, 3);
      _h_1prong_Kppinu   = bookHisto1D(2, 1, 4);
      _h_1prong_pipipinu = bookHisto1D(2, 1, 5);
      _h_1prong_Knpinu   = bookHisto1D(2, 1, 6);
      _h_3prong_pipipinu = bookHisto1D(2, 2, 1);
      _h_5prong          = bookHisto1D(2, 3, 1);
    }
virtual std::string inspireId ( ) const [inline, virtual, inherited]

Get the Inspire ID code for this analysis.

Definition at line 120 of file Analysis.hh.

                                        {
      return info().inspireId();
    }
void integrate ( Histo1DPtr  h,
Scatter2DPtr  s 
) const [inherited]

Helper for converting a differential histo to an integral one.

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.

Definition at line 774 of file Analysis.cc.

                                                             {
    // preserve the path info
    const string path = s->path();
    *s = toIntegralHisto(*h);
    s->setPath(path);
  }
void integrate ( const Histo1D &  h,
Scatter2DPtr  s 
) const [inherited]

Helper for converting a differential histo to an integral one.

Note:
Assigns to the (already registered) output scatter, s. Preserves the path information of the target.

Definition at line 781 of file Analysis.cc.

                                                                 {
    // preserve the path info
    const string path = s->path();
    *s = toIntegralHisto(h);
    s->setPath(path);
  }
bool isCompatible ( const ParticlePair beams) const [inherited]

Check if analysis is compatible with the provided beam particle IDs and energies.

Definition at line 97 of file Analysis.cc.

                                                             {
    return isCompatible(beams.first.pid(),  beams.second.pid(),
                        beams.first.energy(), beams.second.energy());
  }
bool isCompatible ( PdgId  beam1,
PdgId  beam2,
double  e1,
double  e2 
) const [inherited]

Check if analysis is compatible with the provided beam particle IDs and energies.

Definition at line 103 of file Analysis.cc.

                                                                                  {
    PdgIdPair beams(beam1, beam2);
    pair<double,double> energies(e1, e2);
    return isCompatible(beams, energies);
  }
bool isCompatible ( const PdgIdPair beams,
const std::pair< double, double > &  energies 
) const [inherited]

Check if analysis is compatible with the provided beam particle IDs and energies.

const string makeAxisCode ( unsigned int  datasetId,
unsigned int  xAxisId,
unsigned int  yAxisId 
) const [protected, inherited]

Get the internal histogram name for given d, x and y (cf. HepData)

Definition at line 63 of file Analysis.cc.

                                                                                                              {
    stringstream axisCode;
    axisCode << "d";
    if (datasetId < 10) axisCode << 0;
    axisCode << datasetId;
    axisCode << "-x";
    if (xAxisId < 10) axisCode << 0;
    axisCode << xAxisId;
    axisCode << "-y";
    if (yAxisId < 10) axisCode << 0;
    axisCode << yAxisId;
    return axisCode.str();
  }
void markAsOwned ( ) const [inline, inherited]

Mark object as owned by the _projhandler

Todo:
Huh? What's this for?

Definition at line 111 of file ProjectionApplier.hh.

{ _owned = true; }
virtual std::string name ( ) const [inline, virtual, inherited]

Get the name of the analysis.

By default this is computed by combining the results of the experiment, year and Spires ID metadata methods and you should only override it if there's a good reason why those won't work.

Implements ProjectionApplier.

Definition at line 115 of file Analysis.hh.

                                   {
      return (info().name().empty()) ? _defaultname : info().name();
    }
bool needsCrossSection ( ) const [inline, inherited]

Return true if this analysis needs to know the process cross-section.

Todo:
Remove this and require HepMC >= 2.06

Definition at line 230 of file Analysis.hh.

                                   {
      return info().needsCrossSection();
    }
void normalize ( Histo1DPtr  histo,
double  norm = 1.0,
bool  includeoverflows = true 
) [inherited]

Normalize the given histogram, histo, to area = norm.

Definition at line 706 of file Analysis.cc.

                                                                               {
    if (!histo) {
      MSG_WARNING("Failed to normalize histo=NULL in analysis " << name() << " (norm=" << norm << ")");
      return;
    }
    MSG_TRACE("Normalizing histo " << histo->path() << " to " << norm);
    try {
      histo->normalize(norm, includeoverflows);
    } catch (YODA::Exception& we) {
      MSG_WARNING("Could not normalize histo " << histo->path());
      return;
    }
  }
void normalize ( const std::vector< Histo1DPtr > &  histos,
double  norm = 1.0,
bool  includeoverflows = true 
) [inline, inherited]

Normalize the given histograms, histos, to area = norm.

Note:
Constness intentional, if weird, to allow passing rvalue refs of smart ptrs (argh)
Todo:
Use SFINAE for a generic iterable of Histo1DPtrs

Definition at line 662 of file Analysis.hh.

                                                                                                     {
      for (auto& h : histos) normalize(h, norm, includeoverflows);
    }
void normalize ( const Histo1DPtr(&)  histos[array_size],
double  norm = 1.0,
bool  includeoverflows = true 
) [inline, inherited]
Todo:
YUCK!

Definition at line 667 of file Analysis.hh.

                                                                                                        {
      for (auto& h : histos) normalize(h, norm, includeoverflows);
    }
void normalize ( Histo2DPtr  histo,
double  norm = 1.0,
bool  includeoverflows = true 
) [inherited]

Normalize the given histogram, histo, to area = norm.

Definition at line 740 of file Analysis.cc.

                                                                               {
    if (!histo) {
      MSG_ERROR("Failed to normalize histo=NULL in analysis " << name() << " (norm=" << norm << ")");
      return;
    }
    MSG_TRACE("Normalizing histo " << histo->path() << " to " << norm);
    try {
      histo->normalize(norm, includeoverflows);
    } catch (YODA::Exception& we) {
      MSG_WARNING("Could not normalize histo " << histo->path());
      return;
    }
  }
void normalize ( const std::vector< Histo2DPtr > &  histos,
double  norm = 1.0,
bool  includeoverflows = true 
) [inline, inherited]

Normalize the given histograms, histos, to area = norm.

Note:
Constness intentional, if weird, to allow passing rvalue refs of smart ptrs (argh)
Todo:
Use SFINAE for a generic iterable of Histo2DPtrs

Definition at line 693 of file Analysis.hh.

                                                                                                     {
      for (auto& h : histos) normalize(h, norm, includeoverflows);
    }
void normalize ( const Histo2DPtr(&)  histos[array_size],
double  norm = 1.0,
bool  includeoverflows = true 
) [inline, inherited]
Todo:
YUCK!

Definition at line 698 of file Analysis.hh.

                                                                                                        {
      for (auto& h : histos) normalize(h, norm, includeoverflows);
    }
size_t numEvents ( ) const [protected, inherited]

Get the number of events seen (via the analysis handler). Use in the finalize phase only.

Definition at line 84 of file Analysis.cc.

                                   {
    return handler().numEvents();
  }
void populateDecayMap ( ) [inline]

Definition at line 122 of file PDG_TAUS.cc.

                            {
      decay_pids["muids"]     = {{ 13,14,16 }};
      decay_pids["elids"]     = {{ 11,12,16 }};
      decay_pids["pinu"]      = {{ 211,16 }};
      decay_pids["Kpnu"]      = {{ 321,16 }};
      decay_pids["pipinu"]    = {{ 111,211,16 }};
      decay_pids["Kppinu"]    = {{ 111,321,16 }};
      decay_pids["pipipinu"]  = {{ 111,111,211,16 }};
      decay_pids["KSpinu"]    = {{ 211,310,16 }};
      decay_pids["KLpinu"]    = {{ 211,130,16 }};
      decay_pids["3pipipinu"] = {{ 211,211,211,16 }};
    }
const Scatter2D & refData ( const string &  hname) const [protected, inherited]

Get reference data for a named histo

Todo:
Move to the templated version when we have C++11 and can have a default fn template type

Definition at line 179 of file Analysis.cc.

                                                              {
    _cacheRefData();
    MSG_TRACE("Using histo bin edges for " << name() << ":" << hname);
    if (!_refdata[hname]) {
      MSG_ERROR("Can't find reference histogram " << hname);
      throw Exception("Reference data " + hname + " not found.");
    }
    return dynamic_cast<Scatter2D&>(*_refdata[hname]);
  }
const Scatter2D & refData ( unsigned int  datasetId,
unsigned int  xAxisId,
unsigned int  yAxisId 
) const [protected, inherited]

Get reference data for a numbered histo

Todo:
Move to the templated version when we have C++11 and can have a default fn template type

Definition at line 190 of file Analysis.cc.

                                                                                                             {
    const string hname = makeAxisCode(datasetId, xAxisId, yAxisId);
    return refData(hname);
  }
const T& refData ( const string &  hname) const [inline, protected, inherited]

Get reference data for a named histo

Todo:
Would be nice to just use these and ditch the S2D no-template version, but we need C++11 for default args in function templates
Todo:
SFINAE to ensure that the type inherits from YODA::AnalysisObject?

Definition at line 350 of file Analysis.hh.

                                                {
      _cacheRefData();
      MSG_TRACE("Using histo bin edges for " << name() << ":" << hname);
      if (!_refdata[hname]) {
        MSG_ERROR("Can't find reference histogram " << hname);
        throw Exception("Reference data " + hname + " not found.");
      }
      return dynamic_cast<T&>(*_refdata[hname]);
    }
const T& refData ( unsigned int  datasetId,
unsigned int  xAxisId,
unsigned int  yAxisId 
) const [inline, protected, inherited]

Get reference data for a numbered histo

Todo:
Would be nice to just use these and ditch the S2D no-template version, but we need C++11 for default args in function templates
Todo:
SFINAE to ensure that the type inherits from YODA::AnalysisObject?

Definition at line 366 of file Analysis.hh.

                                                                                               {
      const string hname = makeAxisCode(datasetId, xAxisId, yAxisId);
      return refData(hname);
    }
virtual std::vector<std::string> references ( ) const [inline, virtual, inherited]

Journal, and preprint references.

Definition at line 181 of file Analysis.hh.

                                                    {
      return info().references();
    }
void removeAnalysisObject ( const std::string &  path) [protected, inherited]

Unregister a data object from the histogram system (by name)

Definition at line 799 of file Analysis.cc.

                                                        {
    for (vector<AnalysisObjectPtr>::iterator it = _analysisobjects.begin();  it != _analysisobjects.end(); ++it) {
      if ((*it)->path() == path) {
        _analysisobjects.erase(it);
        break;
      }
    }
  }
void removeAnalysisObject ( AnalysisObjectPtr  ao) [protected, inherited]

Unregister a data object from the histogram system (by pointer)

Definition at line 808 of file Analysis.cc.

                                                          {
    for (vector<AnalysisObjectPtr>::iterator it = _analysisobjects.begin();  it != _analysisobjects.end(); ++it) {
      if (*it == ao) {
        _analysisobjects.erase(it);
        break;
      }
    }
 }
virtual const std::vector<PdgIdPair>& requiredBeams ( ) const [inline, virtual, inherited]

Return the allowed pairs of incoming beams required by this analysis.

Definition at line 207 of file Analysis.hh.

                                                              {
      return info().beams();
    }
virtual const std::vector<std::pair<double, double> >& requiredEnergies ( ) const [inline, virtual, inherited]

Sets of valid beam energy pairs, in GeV.

Definition at line 218 of file Analysis.hh.

                                                                                {
      return info().energies();
    }
virtual std::string runInfo ( ) const [inline, virtual, inherited]

Information about the events needed as input for this analysis.

Event types, energies, kinematic cuts, particles to be considered stable, etc. etc. Should be treated as a restructuredText bullet list (http://docutils.sourceforge.net/rst.html)

Definition at line 161 of file Analysis.hh.

                                      {
      return info().runInfo();
    }
void scale ( CounterPtr  cnt,
double  factor 
) [inherited]

Multiplicatively scale the given counter, cnt, by factor factor.

Definition at line 687 of file Analysis.cc.

                                                    {
    if (!cnt) {
      MSG_WARNING("Failed to scale counter=NULL in analysis " << name() << " (scale=" << factor << ")");
      return;
    }
    if (std::isnan(factor) || std::isinf(factor)) {
      MSG_WARNING("Failed to scale counter=" << cnt->path() << " in analysis: " << name() << " (invalid scale factor = " << factor << ")");
      factor = 0;
    }
    MSG_TRACE("Scaling counter " << cnt->path() << " by factor " << factor);
    try {
      cnt->scaleW(factor);
    } catch (YODA::Exception& we) {
      MSG_WARNING("Could not scale counter " << cnt->path());
      return;
    }
  }
void scale ( const std::vector< CounterPtr > &  cnts,
double  factor 
) [inline, inherited]

Multiplicatively scale the given counters, cnts, by factor factor.

Note:
Constness intentional, if weird, to allow passing rvalue refs of smart ptrs (argh)
Todo:
Use SFINAE for a generic iterable of CounterPtrs

Definition at line 645 of file Analysis.hh.

                                                                 {
      for (auto& c : cnts) scale(c, factor);
    }
void scale ( const CounterPtr(&)  cnts[array_size],
double  factor 
) [inline, inherited]
Todo:
YUCK!

Definition at line 650 of file Analysis.hh.

                                                                    {
      // for (size_t i = 0; i < std::extent<decltype(cnts)>::value; ++i) scale(cnts[i], factor);
      for (auto& c : cnts) scale(c, factor);
    }
void scale ( Histo1DPtr  histo,
double  factor 
) [inherited]

Multiplicatively scale the given histogram, histo, by factor factor.

Definition at line 721 of file Analysis.cc.

                                                      {
    if (!histo) {
      MSG_WARNING("Failed to scale histo=NULL in analysis " << name() << " (scale=" << factor << ")");
      return;
    }
    if (std::isnan(factor) || std::isinf(factor)) {
      MSG_WARNING("Failed to scale histo=" << histo->path() << " in analysis: " << name() << " (invalid scale factor = " << factor << ")");
      factor = 0;
    }
    MSG_TRACE("Scaling histo " << histo->path() << " by factor " << factor);
    try {
      histo->scaleW(factor);
    } catch (YODA::Exception& we) {
      MSG_WARNING("Could not scale histo " << histo->path());
      return;
    }
  }
void scale ( const std::vector< Histo1DPtr > &  histos,
double  factor 
) [inline, inherited]

Multiplicatively scale the given histograms, histos, by factor factor.

Note:
Constness intentional, if weird, to allow passing rvalue refs of smart ptrs (argh)
Todo:
Use SFINAE for a generic iterable of Histo1DPtrs

Definition at line 677 of file Analysis.hh.

                                                                   {
      for (auto& h : histos) scale(h, factor);
    }
void scale ( const Histo1DPtr(&)  histos[array_size],
double  factor 
) [inline, inherited]
Todo:
YUCK!

Definition at line 682 of file Analysis.hh.

                                                                      {
      for (auto& h : histos) scale(h, factor);
    }
void scale ( Histo2DPtr  histo,
double  factor 
) [inherited]

Multiplicatively scale the given histogram, histo, by factor factor.

Definition at line 755 of file Analysis.cc.

                                                      {
    if (!histo) {
      MSG_ERROR("Failed to scale histo=NULL in analysis " << name() << " (scale=" << factor << ")");
      return;
    }
    if (std::isnan(factor) || std::isinf(factor)) {
      MSG_ERROR("Failed to scale histo=" << histo->path() << " in analysis: " << name() << " (invalid scale factor = " << factor << ")");
      factor = 0;
    }
    MSG_TRACE("Scaling histo " << histo->path() << " by factor " << factor);
    try {
      histo->scaleW(factor);
    } catch (YODA::Exception& we) {
      MSG_WARNING("Could not scale histo " << histo->path());
      return;
    }
  }
void scale ( const std::vector< Histo2DPtr > &  histos,
double  factor 
) [inline, inherited]

Multiplicatively scale the given histograms, histos, by factor factor.

Note:
Constness intentional, if weird, to allow passing rvalue refs of smart ptrs (argh)
Todo:
Use SFINAE for a generic iterable of Histo2DPtrs

Definition at line 708 of file Analysis.hh.

                                                                   {
      for (auto& h : histos) scale(h, factor);
    }
void scale ( const Histo2DPtr(&)  histos[array_size],
double  factor 
) [inline, inherited]
Todo:
YUCK!

Definition at line 713 of file Analysis.hh.

                                                                      {
      for (auto& h : histos) scale(h, factor);
    }
Analysis & setCrossSection ( double  xs) [inherited]

Set the cross section from the generator.

Definition at line 145 of file Analysis.cc.

                                               {
    _crossSection = xs;
    _gotCrossSection = true;
    return *this;
  }
Analysis& setNeedsCrossSection ( bool  needed = true) [inline, inherited]

Declare whether this analysis needs to know the process cross-section from the generator.

Todo:
Remove this and require HepMC >= 2.06

Definition at line 235 of file Analysis.hh.

                                                     {
      info().setNeedsCrossSection(needed);
      return *this;
    }
virtual Analysis& setRequiredBeams ( const std::vector< PdgIdPair > &  requiredBeams) [inline, virtual, inherited]

Declare the allowed pairs of incoming beams required by this analysis.

Definition at line 211 of file Analysis.hh.

                                                                                  {
      info().setBeams(requiredBeams);
      return *this;
    }
virtual Analysis& setRequiredEnergies ( const std::vector< std::pair< double, double > > &  requiredEnergies) [inline, virtual, inherited]

Declare the list of valid beam energy pairs, in GeV.

Definition at line 222 of file Analysis.hh.

                                                                                                       {
      info().setEnergies(requiredEnergies);
      return *this;
    }
virtual std::string spiresId ( ) const [inline, virtual, inherited]

Get the SPIRES ID code for this analysis (~deprecated).

Definition at line 125 of file Analysis.hh.

                                       {
      return info().spiresId();
    }
double sqrtS ( ) const [inherited]

Centre of mass energy for this run.

Definition at line 25 of file Analysis.cc.

                               {
    return handler().sqrtS();
  }
virtual std::string status ( ) const [inline, virtual, inherited]

Whether this analysis is trusted (in any way!)

Definition at line 196 of file Analysis.hh.

                                     {
      return (info().status().empty()) ? "UNVALIDATED" : info().status();
    }
virtual std::string summary ( ) const [inline, virtual, inherited]

Get a short description of the analysis.

Short (one sentence) description used as an index entry. Use description() to provide full descriptive paragraphs of analysis details.

Definition at line 142 of file Analysis.hh.

                                      {
      return info().summary();
    }
double sumOfWeights ( ) const [protected, inherited]

Get the sum of event weights seen (via the analysis handler). Use in the finalize phase only.

Definition at line 89 of file Analysis.cc.

                                      {
    return handler().sumOfWeights();
  }
virtual std::vector<std::string> todos ( ) const [inline, virtual, inherited]

Any work to be done on this analysis.

Definition at line 201 of file Analysis.hh.

                                               {
      return info().todos();
    }
virtual std::string year ( ) const [inline, virtual, inherited]

When the original experimental analysis was published.

Definition at line 176 of file Analysis.hh.

                                   {
      return info().year();
    }

Member Data Documentation

bool _allowProjReg [protected, inherited]

Flag to forbid projection registration in analyses until the init phase.

Definition at line 176 of file ProjectionApplier.hh.

Definition at line 200 of file PDG_TAUS.cc.

Definition at line 200 of file PDG_TAUS.cc.

Definition at line 200 of file PDG_TAUS.cc.

Definition at line 200 of file PDG_TAUS.cc.

Definition at line 200 of file PDG_TAUS.cc.

Definition at line 200 of file PDG_TAUS.cc.

Definition at line 201 of file PDG_TAUS.cc.

Histo1DPtr _h_5prong [private]

Definition at line 202 of file PDG_TAUS.cc.

Definition at line 199 of file PDG_TAUS.cc.

Definition at line 199 of file PDG_TAUS.cc.

double _weights_el [private]

Definition at line 205 of file PDG_TAUS.cc.

double _weights_had [private]

Definition at line 205 of file PDG_TAUS.cc.

double _weights_mu [private]

Definition at line 205 of file PDG_TAUS.cc.

map<string, vector<int> > decay_pids [private]

Definition at line 206 of file PDG_TAUS.cc.


The documentation for this class was generated from the following file: