Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

WZandh.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 #include "Rivet/Projections/WZandh.hh"
00004 #include "Rivet/Cmp.hh"
00005 #include "HepPDT/ParticleID.hh"
00006 
00007 
00008 namespace Rivet {
00009 
00010   int WZandh::compare(const Projection & p) const {
00011     // They have to be same because there are no parameters.
00012     return true;
00013   }
00014 
00015   /// @todo Define Z W and h more carefully/model independently, based on final state.
00016   void WZandh::project(const Event & e) {
00017     _theWens.clear();
00018     _theZees.clear();
00019     _theWmns.clear();
00020     _theZmms.clear();
00021     _theWtns.clear();
00022     _theZtts.clear();
00023     _theZnns.clear();
00024     _theWqqs.clear();
00025     _theZqqs.clear();
00026     _thehs.clear();
00027     for ( GenEvent::particle_const_iterator pi = e.genEvent().particles_begin();
00028           pi != e.genEvent().particles_end(); ++pi ) {
00029       if ( (*pi)->status() != 1 ) {
00030         HepPDT::ParticleID pInfo = (*pi)->pdg_id();
00031         int id = pInfo.abspid();
00032         if (id == 23 || id == 24 || id == 25 ){
00033           // This is a W, Z or h.
00034           // Now find out whether it is the last one before the decay.
00035           // @todo Trace the decay products of the bosons properly.
00036           if (id == 23) {
00037             _theZees.push_back(Particle(**pi));
00038           } else if (id == 24) {
00039             _theWens.push_back(Particle(**pi)); 
00040           } else if (id == 25) {
00041             _thehs.push_back(Particle(**pi));   
00042           }         
00043         }
00044       }
00045     }
00046   }
00047   
00048 }