5#include "CosmicGenerator/CosmicGun.h"
15 void cosgen_(
float* emin,
float* emax,
int* iacc);
60CosmicGun::CosmicGun(
void){
82 std::cout <<
" CosmicGun::InitializeGenerator: E(min,max)=(" << m_emin <<
"," << m_emax
83 <<
") GeV, and cos(ThetaCut)="<< m_coscut << std::endl;
93 m_printevt = printevt;
97 std::cerr <<
"CosmicGun::PrintLevel - warning ignored input printevt = " << printevt << std::endl;
101 m_printmod = printmod;
105 std::cerr <<
"CosmicGun::PrintLevel - warning ignored input printmod = " << printmod << std::endl;
113 cosgen_(&m_emin, &m_emax, &iacc);
122 HepLorentzVector p(px,py,pz,e);
125 if(m_event < m_printevt)
127 std::cout <<
"CosmicGun::GenerateEvent: " << std::setw(4) << m_event
128 <<
" muon charge " << std::setw(2) <<
cosevt_.
CHRG <<
" with momentum : " << p << std::endl;
139 if(emin >= emax || emin < 0 )
141 std::cout <<
"Error input energy range : (" << emin <<
" - " << emax <<
") - ignored " << std::endl;
void cosgen_(float *emin, float *emax, int *iacc)
double sin(const BesAngle a)
double cos(const BesAngle a)
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)