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

CalSectionReject.h

Go to the documentation of this file.
00001 //=================================================
00002 //
00003 //
00004 // Selector function object used by CalSection to
00005 // make acceptance cuts on particles.
00006 //
00007 // Author: Peter Sherwood
00008 //
00009 //
00010 //===================================================
00011 #ifndef Atlfast_CalSectionReject_H
00012 #define Atlfast_CalSectionReject_H
00013 #include "HepMC/GenParticle.h"
00014 #include "AtlfastCode/TransportedParticle.h"
00015 #include "AtlfastCode/Phi.h"
00016 
00017 namespace Atlfast{
00018 
00024   class CalSectionReject {
00025   public:
00029     CalSectionReject(double etaMin, double etaMax,
00030                      double phiMin, double phiMax):
00031       m_etaMin(etaMin), m_etaMax(etaMax),
00032       m_phiMin(phiMin), m_phiMax(phiMax) {}
00033 
00034     CalSectionReject(const CalSectionReject& other):
00035       m_etaMin(other.m_etaMin), m_etaMax(other.m_etaMax),
00036       m_phiMin(other.m_phiMin), m_phiMax(other.m_phiMax) {}
00040     bool operator()(const TransportedParticle* p){
00041       double eta = ((p->particle())->momentum()).pseudoRapidity();
00042       ::Phi phi = p->phi();
00043       if(eta<=m_etaMin || eta > m_etaMax) return true;
00044       if(phi<=m_phiMin || phi > m_phiMax) return true;
00045       return false; 
00046     }
00047   private:
00049     double m_etaMin;
00051     double m_etaMax;
00053     ::Phi m_phiMin;
00055     ::Phi m_phiMax;
00056   };
00057 }
00058 #endif
00059 
00060 
00061 
00062 
00063 
00064 
00065 

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