Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

CellHistogramMaker_helper.h

Go to the documentation of this file.
00001 //=================================================
00002 //
00003 // CellHistogramMaker_helper
00004 //
00005 // this .h file contains a number of useful utilities
00006 // (predicate functions and constants) for manipulating
00007 // the testing CellMaker record.
00008 //
00009 // Everything lives in the CellHistogramMaker_helper namespace
00010 //
00011 // Author: Peter Sherwood
00012 //
00013 //
00014 //===================================================
00015 #include "HepMC/GenParticle.h"
00016 #include "HepMC_helpere.h"
00017 
00018 namespace CellMakerHistogram_helper{
00023 class FiresCell {
00024  public:
00026   FiresCell(): m_flag(0) {}
00028   FiresCell(int n): m_flag(n) {}  
00029   
00030   bool operator()( const HepMC::GenParticle* p ) { 
00031 
00032     int pdg=p->pdg_id();
00033     if(m_flag>0 && pdg<0) return 0; //select sign of particle
00034     if(m_flag<0 && pdg>0) return 0;
00035 
00036                 
00037     int pdg=abs(pdg);
00038     if(pdg == 12 || pdg == 13 || pdg == 14 || pdg == 16) return 0;
00039 
00040     HepMC_helper::IsFinalState ifs;
00041     
00042     return ifs(p);
00043   }
00044  private:
00045   int m_flag;
00046 };
00047 
00048 
00049 class FiresCell {
00050  public:
00051   // if constructed with no arguments, returns all final state particles
00052   FiresCell() {}
00053   
00054   bool operator()( const HepMC::GenParticle* p ) { 
00055 
00056     int pdg=abs(p->pdg_id());
00057     if(pdg == 12 || pdg == 13 || pdg == 14 || pdg == 16){
00058       return 0;
00059     }
00060 
00061     HepMC_helper::IsFinalState ifs;
00062     
00063     return ifs(p);
00064   }
00065 };
00066 
00067 }  // closing the namespace
00068 
00069 
00070 
00071 
00072 
00073 
00074 
00075 
00076 

Generated on Wed Jan 23 12:58:31 2002 for Atlfast by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001