rivet is hosted by Hepforge, IPPP Durham
ALEPH_1999_S4193598.cc File Reference
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/Beam.hh"
#include "HepMC/GenParticle.h"
#include "HepMC/GenVertex.h"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/UnstableFinalState.hh"
Include dependency graph for ALEPH_1999_S4193598.cc:

Go to the source code of this file.

Classes

class  ALEPH_1999_S4193598

Namespaces

namespace  Rivet

Functions

bool hasDecayedTo (const HepMC::GenParticle *p, int id1, int id2)
bool hasDecayedTo (const Rivet::Particle &p, int id1, int id2)
 DECLARE_RIVET_PLUGIN (ALEPH_1999_S4193598)

Function Documentation

bool hasDecayedTo ( const HepMC::GenParticle *  p,
int  id1,
int  id2 
)

Definition at line 10 of file ALEPH_1999_S4193598.cc.

Referenced by hasDecayedTo().

                                                               {
  bool decision = false;
  HepMC::GenVertex* decV  = p->end_vertex();
  std::vector<int> decids;
  if (decV->particles_out_size() == 2) {
    for (HepMC::GenVertex::particles_out_const_iterator pp = decV->particles_out_const_begin() ;
         pp != decV->particles_out_const_end() ; ++pp) {
      decids.push_back(abs((*pp)->pdg_id()));
    }
    if ( (decids[0] == abs(id1) && decids[1] == abs(id2)) || (decids[1] == abs(id1) && decids[0] == abs(id2)) ) decision = true;

  };
  return decision;
}
bool hasDecayedTo ( const Rivet::Particle p,
int  id1,
int  id2 
)

Definition at line 25 of file ALEPH_1999_S4193598.cc.

References Particle::genParticle(), and hasDecayedTo().

                                                            {
  return hasDecayedTo(p.genParticle(), id1, id2);
}