Skip to content

mattiasotgia/EcoMug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

EcoMug: Efficient COsmic MUon Generator

EcoMug is a header-only C++11 library for the generation of cosmic muons.

Latest release: EcoMug v1.2

Examples

Plane-based generation

EcoMug gen;
gen.SetUseSky();
gen.SetSkySize({{10., 10.}});

for (auto event = 0; event < number_of_events; ++event) {
  gen.Generate();
  std::array<double, 3> muon_position = gen.GetGenerationPosition();
  double muon_p = gen.GetGenerationMomentum();
  double muon_theta = gen.GetGenerationTheta();
  double muon_phi = gen.GetGenerationPhi();
  double muon_charge = gen.GetCharge();
  ...
}

Cylinder-based generation

EcoMug gen;
gen.SetUseCylinder();
gen.SetCylinderRadius(10.);
gen.SetCylinderHeight(30.);

for (auto event = 0; event < number_of_events; ++event) {
  gen.Generate();
  std::array<double, 3> muon_position = gen.GetGenerationPosition();
  double muon_p = gen.GetGenerationMomentum();
  double muon_theta = gen.GetGenerationTheta();
  double muon_phi = gen.GetGenerationPhi();
  double muon_charge = gen.GetCharge();
  ...
}

Hsphere-based generation

EcoMug gen;
gen.SetUseHSphere();
gen.SetHSphereRadius(30.);

for (auto event = 0; event < number_of_events; ++event) {
  gen.Generate();
  std::array<double, 3> muon_position = gen.GetGenerationPosition();
  double muon_p = gen.GetGenerationMomentum();
  double muon_theta = gen.GetGenerationTheta();
  double muon_phi = gen.GetGenerationPhi();
  double muon_charge = gen.GetCharge();
  ...
}

About

Efficient COsmic MUon Generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 77.6%
  • C 22.4%