15void cosgen_(
float* emin,
float* emax,
int* iacc );
50 if ( !mpointer ) mpointer =
new CosmicGun();
59CosmicGun::CosmicGun(
void ) {
69 genpar_.LEMAX = log10( m_emax );
80 std::cout <<
" CosmicGun::InitializeGenerator: E(min,max)=(" << m_emin <<
"," << m_emax
81 <<
") GeV, and cos(ThetaCut)=" << m_coscut << std::endl;
89 if ( printevt >= 0 ) { m_printevt = printevt; }
92 std::cerr <<
"CosmicGun::PrintLevel - warning ignored input printevt = " << printevt
95 if ( printmod >= 1 ) { m_printmod = printmod; }
98 std::cerr <<
"CosmicGun::PrintLevel - warning ignored input printmod = " << printmod
106 while ( iacc == 0 ) {
cosgen_( &m_emin, &m_emax, &iacc ); }
109 float sinth = sqrt( 1 - pow(
cosevt_.COSTH, 2 ) );
114 HepLorentzVector p( px, py, pz, e );
117 if ( m_event < m_printevt )
119 std::cout <<
"CosmicGun::GenerateEvent: " << std::setw( 4 ) << m_event <<
" muon charge "
120 << std::setw( 2 ) <<
cosevt_.CHRG <<
" with momentum : " << p << std::endl;
129 if ( emin >= emax || emin < 0 )
131 std::cout <<
"Error input energy range : (" << emin <<
" - " << emax <<
") - ignored "
138 genpar_.LEMIN = log10( m_emin );
139 genpar_.LEMAX = log10( m_emax );
void cosgen_(float *emin, float *emax, int *iacc)
double sin(const BesAngle a)
double cos(const BesAngle a)
*********Class see also m_nmax DOUBLE PRECISION m_emin
void PrintLevel(int printevt, int printmod)
void SetEnergyRange(float emin, float emax)
HepLorentzVector GenerateEvent(void)
float InitializeGenerator()
void SetCosCut(float ctcut)
static CosmicGun * GetCosmicGun(void)