7#ifndef PNDCoGENERATOR_H
8#define PNDCoGENERATOR_H 1
11#include "FairGenerator.h"
19class FairPrimaryGenerator;
24 rng =
new TRandom3(gRandom->GetSeed());
25 fTheta =
new TF1(
"f2",
"cos(x)*cos(x)",0,TMath::Pi()/2);
27 fSpectrumH =
new TF1(
"f4",
"1400*TMath::Power(x,-2.7)*(1/(1+x/115)+0.054/(1+x/850))",100,1000);
30 double Uniform(Float_t min, Float_t max){
return rng->Uniform(min,max);};
33 double fSpectrumL(
double theta,
double minE, Bool_t generateP);
44 cout<<
nInside<<
" events have been generated."<<endl;
45 cout<<
"There is a total of "<<
nInside<<
"/"<<
nTest<<
" muons that passed close enough to the detector."<<endl;
46 cout<<
"Including the given weight this corresponds to ";
48 cout<<
" real cosmic muons = "<<
n_EVENTS<<
" simulated events)."<<endl;
54 virtual Bool_t
Init(Bool_t largeMom);
63 double P,
px,
py,
pz,
x,
y,
z,
weighttest,
weight,
mass,
FluxIntegral,
theta;
double fSpectrumL(double theta, double minE, Bool_t generateP)
double Uniform(Float_t min, Float_t max)
Bool_t ReadEvent(FairPrimaryGenerator *)
ClassDef(CosmicsGenerator, 4)
virtual Bool_t Init(Bool_t largeMom)
virtual ~CosmicsGenerator()