CalSectionRejectT.cxx

Go to the documentation of this file.
00001 #include<iostream>
00002 #include"AtlfastAlgs/CalSectionReject.h"
00003 #include"AtlfastEvent/ITransportedParticle.h"
00004 
00005 #include "CLHEP/Vector/LorentzVector.h"
00006 
00007 
00008 
00009 #include <boost/test/included/unit_test_framework.hpp>
00010 #include <boost/test/unit_test.hpp>
00011 
00012 using namespace boost::unit_test_framework;
00013 
00014 using Atlfast::CalSectionReject;
00015 using Atlfast::ITransportedParticle;
00016 
00017 void CalSectionReject1(){
00018   CalSectionReject csr(-10., 10., 0., 2.0); // make a rejector eta +-19, phi[0,2]
00019   
00020   // I don't understand what this test is doing - won't these declarations
00021   // give conflicting values for phi? SJHD - 12/7/2005
00022 
00023   typedef HepMC::GenParticle Gp;
00024   Gp* gp = new HepMC::GenParticle(HepLorentzVector(10., 10., 0, 10.), 11, 1);
00025   
00026   
00027 
00028   TransportedParticle* tp1 = new TransportedParticle(-0.01, gp);
00029   TransportedParticle* tp2 = new TransportedParticle( 0.00, gp);
00030   TransportedParticle* tp3 = new TransportedParticle( 0.01, gp);
00031 
00032   TransportedParticle* tp4 = new TransportedParticle( 0.00, gp);
00033 
00034   TransportedParticle* tp5 = new TransportedParticle( 1.99, gp);
00035   TransportedParticle* tp6 = new TransportedParticle( 2.00, gp);
00036   TransportedParticle* tp7 = new TransportedParticle( 2.01, gp);
00037 
00038   BOOST_CHECK(csr(tp1));
00039   BOOST_CHECK(csr(tp1));
00040   BOOST_CHECK(csr(tp2));
00041   BOOST_CHECK(csr(tp3));
00042   BOOST_CHECK(csr(tp4));
00043   BOOST_CHECK(csr(tp5));
00044   BOOST_CHECK(csr(tp6));
00045   BOOST_CHECK(csr(tp7));
00046 
00047 }
00048 
00049 
00050   
00051   
00052 
00053 
00054 test_suite* init_unit_test_suite(int argc, char* argv[]){
00055   test_suite* test =  BOOST_TEST_SUITE("CalSectionReject Tests");
00056   test->add(BOOST_TEST_CASE(&CalSectionReject1) );
00057   return test;
00058 }
00059     

Generated on Mon Sep 24 14:19:11 2007 for AtlfastAlgs by  doxygen 1.5.1