#include <CosmicGun.h>
Public Member Functions | |
HepLorentzVector | GenerateEvent (void) |
HepLorentzVector | GenerateEvent (void) |
HepLorentzVector | GenerateVertex (void) |
HepLorentzVector | GenerateVertex (void) |
int | GetMuonCharge (void) |
int | GetMuonCharge (void) |
float | InitializeGenerator () |
float | InitializeGenerator () |
void | PrintLevel (int printevt, int printmod) |
void | PrintLevel (int printevt, int printmod) |
void | SetCosCut (float ctcut) |
void | SetCosCut (float ctcut) |
void | SetEnergyRange (float emin, float emax) |
void | SetEnergyRange (float emin, float emax) |
Static Public Member Functions | |
CosmicGun * | GetCosmicGun (void) |
CosmicGun * | GetCosmicGun (void) |
Private Member Functions | |
CosmicGun (void) | |
CosmicGun (void) | |
Private Attributes | |
float | m_coscut |
float | m_emax |
float | m_emin |
long int | m_event |
long int | m_printevt |
long int | m_printmod |
Static Private Attributes | |
CosmicGun * | mpointer |
CosmicGun * | mpointer = 0 |
|
00060 { 00061 m_event = 0; 00062 m_emin = 50; 00063 m_emax = 500; 00064 m_coscut = 0.35; 00065 m_printevt = 20; 00066 m_printmod = 50; 00067 00068 coscut_.ctcut = m_coscut; 00069 genpar_.LEMIN = log10(m_emin); 00070 genpar_.LEMAX = log10(m_emax); 00071 genpar_.NBIN = 100; 00072 genpar_.LBINWID = (genpar_.LEMAX-genpar_.LEMIN)/genpar_.NBIN; 00073 00074 // cosipr_(); 00075 // cosgin_(); 00076 00077 }
|
|
|
|
|
|
00109 { 00110 int iacc = 0; 00111 00112 while(iacc == 0){ 00113 cosgen_(&m_emin, &m_emax, &iacc); 00114 } 00115 m_event++; 00116 00117 float sinth = sqrt( 1-pow(cosevt_.COSTH,2) ); 00118 float e = cosevt_.ENER; 00119 float px = cosevt_.ENER * sinth * sin( cosevt_.PHI); 00120 float py = cosevt_.ENER * sinth * cos( cosevt_.PHI); 00121 float pz = cosevt_.ENER * cosevt_.COSTH; 00122 HepLorentzVector p(px,py,pz,e); 00123 00124 // if(m_event < m_printevt || m_event%m_printmod == 0) 00125 if(m_event < m_printevt) 00126 { 00127 std::cout << "CosmicGun::GenerateEvent: " << std::setw(4) << m_event 00128 << " muon charge " << std::setw(2) << cosevt_.CHRG << " with momentum : " << p << std::endl; 00129 } 00130 00131 return p; 00132 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
00081 { 00082 std::cout << " CosmicGun::InitializeGenerator: E(min,max)=(" << m_emin << "," << m_emax 00083 << ") GeV, and cos(ThetaCut)="<< m_coscut << std::endl; 00084 cosipr_(); 00085 cosgin_(); 00086 cosmic2_(); 00087 return flxout_.FLUX2; 00088 }
|
|
|
|
00090 { 00091 if (printevt >= 0) 00092 { 00093 m_printevt = printevt; 00094 } 00095 else 00096 { 00097 std::cerr << "CosmicGun::PrintLevel - warning ignored input printevt = " << printevt << std::endl; 00098 } 00099 if (printmod >= 1) 00100 { 00101 m_printmod = printmod; 00102 } 00103 else 00104 { 00105 std::cerr << "CosmicGun::PrintLevel - warning ignored input printmod = " << printmod << std::endl; 00106 } 00107 }
|
|
|
|
|
|
|
|
00138 { 00139 if(emin >= emax || emin < 0 ) 00140 { 00141 std::cout << "Error input energy range : (" << emin << " - " << emax << ") - ignored " << std::endl; 00142 return; 00143 } 00144 m_emin = emin; 00145 m_emax = emax; 00146 00147 genpar_.LEMIN = log10(m_emin); 00148 genpar_.LEMAX = log10(m_emax); 00149 genpar_.NBIN = 100; 00150 genpar_.LBINWID = (genpar_.LEMAX-genpar_.LEMIN)/genpar_.NBIN; 00151 00152 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|