#include <TransportedMonopole.h>
Inheritance diagram for Atlfast::TransportedMonopole:
Public Member Functions | |
TransportedMonopole (const HepMC::GenParticle *const &p) | |
~TransportedMonopole () | |
void | deflect () |
Phi | phi () const |
double | eta () const |
double | E () const |
const HepMC::GenParticle * | particle () const |
Protected Attributes | |
Phi | m_phi |
double | m_eta |
double | m_energy |
const HepMC::GenParticle * | m_particle |
Definition at line 14 of file TransportedMonopole.h.
Atlfast::TransportedMonopole::TransportedMonopole | ( | const HepMC::GenParticle *const & | p | ) | [inline] |
Definition at line 16 of file TransportedMonopole.h.
00016 : 00017 TransportedParticle(p){}; ~TransportedMonopole(){};
Atlfast::TransportedMonopole::~TransportedMonopole | ( | ) | [inline] |
void Atlfast::TransportedMonopole::deflect | ( | ) | [virtual] |
Implements Atlfast::ITransportedParticle.
Definition at line 9 of file TransportedMonopole.cxx.
00009 { 00010 00011 // std::abs accepts doubles and floats 00012 using std::abs; 00013 using std::cout; 00014 using std::endl; 00015 00016 // Get undeflected eta value 00017 double eta=m_eta; 00018 00019 // Use ChargeService to get particle's charge 00020 double charge; 00021 ChargeService cs; 00022 try{ 00023 charge=cs(m_particle); 00024 }catch(std::string errMsg){ 00025 throw errMsg; 00026 } 00027 00028 00029 MagField *bfield = MagField::Instance(); 00030 00031 if( bfield->is_on() && !(charge==0.) ) { 00032 00033 assert(std::abs(charge)>0.5); 00034 00035 double def=0.; 00036 double pt = m_particle->momentum().perp(); 00037 00038 00039 if (abs(eta) < 1.7) { 00040 00041 // The equation is a little complicated - broken up 00042 // into 3 parts 00043 00044 double equ1 = sqrt(0.25*pt*(exp(2*eta)+1)); 00045 00046 double equ2 = 0.5*exp(eta)*sqrt(4.8e7-(pt*pt)); 00047 00048 double equ3 = sqrt((equ1-equ2)*(equ1-equ2) + 4.9e7); 00049 00050 def = 0.007*(equ3-1.); 00051 00052 } 00053 00054 // Replace member eta with deflected version 00055 m_eta = eta + def*charge; 00056 00057 } 00058 00059 return; 00060 00061 }
Phi Atlfast::TransportedParticle::phi | ( | ) | const [virtual, inherited] |
Implements Atlfast::ITransportedParticle.
Definition at line 14 of file TransportedParticle.cxx.
00014 {return m_phi;}
double Atlfast::TransportedParticle::eta | ( | ) | const [virtual, inherited] |
Implements Atlfast::ITransportedParticle.
Definition at line 15 of file TransportedParticle.cxx.
00015 {return m_eta;}
double Atlfast::TransportedParticle::E | ( | ) | const [virtual, inherited] |
Implements Atlfast::ITransportedParticle.
Definition at line 16 of file TransportedParticle.cxx.
00016 {return m_energy;}
const HepMC::GenParticle * Atlfast::TransportedParticle::particle | ( | ) | const [virtual, inherited] |
Implements Atlfast::ITransportedParticle.
Definition at line 18 of file TransportedParticle.cxx.
00018 { 00019 00020 return m_particle; 00021 00022 }
Phi Atlfast::TransportedParticle::m_phi [protected, inherited] |
Definition at line 24 of file TransportedParticle.h.
double Atlfast::TransportedParticle::m_eta [protected, inherited] |
Definition at line 25 of file TransportedParticle.h.
double Atlfast::TransportedParticle::m_energy [protected, inherited] |
Definition at line 26 of file TransportedParticle.h.
const HepMC::GenParticle* Atlfast::TransportedParticle::m_particle [protected, inherited] |
Definition at line 27 of file TransportedParticle.h.