CMS 3D CMS Logo

CMSCGEN.h
Go to the documentation of this file.
1 #ifndef CMSCGEN_h
2 #define CMSCGEN_h
3 
4 //
5 // CMSCGEN.cc version 3.0 Thomas Hebbeker 2007-05-15
6 //
7 // implemented in CMSSW by P. Biallass 2007-05-28
8 //
9 // documentation: CMS internal note 2007 "Improved Parametrization of the Cosmic Muon Flux for the generator CMSCGEN" by Biallass + Hebbeker
10 //
11 // inspired by fortran version l3cgen.f, version 4.0, 1999
12 //
13 // history: new version of parametrization of energy and angular distribution of cosmic muons,
14 // now based on new version 6.60 of CORSIKA (2007). Revisited parametrization, now using slightly different polynomials and new coefficients.
15 //
16 // new range: 3...3000 GeV, cos(incident angle) = 0.1...1 which means theta=0°...84.26° where z-axis vertical axis
17 // Now parametrization obtained from full range, thus no extrapolation to any angles or energies needed any more.
18 // accuracy: now well known, see internal note for details
19 // 7% for range 10...500 GeV, 50% for 3000 GeV and 25% for 3 GeV
20 
21 #include <iostream>
22 
24 
25 namespace CLHEP {
26  class HepRandomEngine;
27 }
28 
29 class CMSCGEN {
30  // all units: GeV
31 
32 private:
33  int initialization; // energy and cos theta range set ?
34 
35  double pmin;
36  double pmax;
37  double cmin;
38  double cmax;
39  double cmin_in;
40  double cmax_in;
41 
42  double pq;
43  double c;
44 
45  double xemin;
46  double xemax;
47 
48  double pmin_min;
49  double pmin_max;
50 
51  double cmax_min;
52  double cmax_max;
53 
54  double Lmin;
55  double Lmax;
56  double Lfac;
57 
58  double c1;
59  double c2;
60 
61  double b0;
62  double b1;
63  double b2;
64 
66 
67  double cemax;
68 
69  double pe[9];
70  double b0c[3], b1c[3], b2c[3];
71  double corr[101];
72 
73  CLHEP::HepRandomEngine* RanGen2; // random number generator
74  bool delRanGen;
75 
78 
79  //variables for upgoing muons from neutrinos
80  double enumin;
81  double enumax;
82 
83 public:
84  // constructor
85  CMSCGEN();
86 
87  //destructor
88  ~CMSCGEN();
89 
90  void setRandomEngine(CLHEP::HepRandomEngine* v);
91 
92  // to set the energy and cos theta range
93  int initialize(double, double, double, double, CLHEP::HepRandomEngine*, bool, bool);
94  int initialize(double, double, double, double, int, bool, bool);
95 
96  int generate();
97  // to generate energy*charge and cos theta for one cosmic
98 
99  double momentum_times_charge();
100 
101  double cos_theta();
102 
103  double flux();
104 
105  //upward going muons from neutrinos
106  int initializeNuMu(double, double, double, double, double, double, double, double, double, CLHEP::HepRandomEngine*);
107  int initializeNuMu(double, double, double, double, double, double, double, double, double, int);
108  int generateNuMu();
109 
110  double Rnunubar; //Ration of nu to nubar
111  double ProdAlt; //production altitude in atmosphere
112  double sigma;
113  double AR;
114  double dNdEmudEnu(double Enu, double Emu, double theta);
116  double negabs, negfrac;
117 };
118 #endif
CMSCGEN::pmin_min
double pmin_min
Definition: CMSCGEN.h:48
CMSCGEN::momentum_times_charge
double momentum_times_charge()
Definition: CMSCGEN.cc:422
CMSCGEN::initializeNuMu
int initializeNuMu(double, double, double, double, double, double, double, double, double, CLHEP::HepRandomEngine *)
Definition: CMSCGEN.cc:450
CMSCGEN::Lmax
double Lmax
Definition: CMSCGEN.h:55
CMSCGEN::cmax_in
double cmax_in
Definition: CMSCGEN.h:40
CMSCGEN::c2
double c2
Definition: CMSCGEN.h:59
CMSCGEN::cos_theta
double cos_theta()
Definition: CMSCGEN.cc:431
CMSCGEN::cmax_max
double cmax_max
Definition: CMSCGEN.h:52
CMSCGEN::Lfac
double Lfac
Definition: CMSCGEN.h:56
CMSCGEN::delRanGen
bool delRanGen
Definition: CMSCGEN.h:74
CMSCGEN::initialize
int initialize(double, double, double, double, CLHEP::HepRandomEngine *, bool, bool)
Definition: CMSCGEN.cc:27
CMSCGEN::b2c
double b2c[3]
Definition: CMSCGEN.h:70
CMSCGEN::b0c
double b0c[3]
Definition: CMSCGEN.h:70
CMSCGEN::pmin
double pmin
Definition: CMSCGEN.h:35
CMSCGEN::c
double c
Definition: CMSCGEN.h:43
CMSCGEN::pq
double pq
Definition: CMSCGEN.h:42
CMSCGEN::pe
double pe[9]
Definition: CMSCGEN.h:69
CMSCGEN::generateNuMu
int generateNuMu()
Definition: CMSCGEN.cc:556
CMSCGEN::pmin_max
double pmin_max
Definition: CMSCGEN.h:49
findQualityFiles.v
v
Definition: findQualityFiles.py:179
CMSCGEN::CMSCGEN
CMSCGEN()
Definition: CMSCGEN.cc:13
CMSCGEN::dNdEmudEnu
double dNdEmudEnu(double Enu, double Emu, double theta)
Definition: CMSCGEN.cc:544
CMSCGEN::cmin
double cmin
Definition: CMSCGEN.h:37
CMSCGEN::cemax
double cemax
Definition: CMSCGEN.h:67
CMSCGEN::cmin_in
double cmin_in
Definition: CMSCGEN.h:39
CMSCGEN::AR
double AR
Definition: CMSCGEN.h:113
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
CMSCGEN::~CMSCGEN
~CMSCGEN()
Definition: CMSCGEN.cc:15
CMSCGEN::b1
double b1
Definition: CMSCGEN.h:62
CMSCGEN::integrated_flux
double integrated_flux
Definition: CMSCGEN.h:65
CMSCGEN::dNdEmudEnuMax
double dNdEmudEnuMax
Definition: CMSCGEN.h:115
CMSCGEN::pmax
double pmax
Definition: CMSCGEN.h:36
CosmicMuonParameters.h
CLHEP
Definition: CocoaGlobals.h:27
CMSCGEN::Rnunubar
double Rnunubar
Definition: CMSCGEN.h:110
CMSCGEN::c1
double c1
Definition: CMSCGEN.h:58
CMSCGEN::initialization
int initialization
Definition: CMSCGEN.h:33
CMSCGEN::xemax
double xemax
Definition: CMSCGEN.h:46
CMSCGEN::b0
double b0
Definition: CMSCGEN.h:61
CMSCGEN::cmax_min
double cmax_min
Definition: CMSCGEN.h:51
CMSCGEN::b1c
double b1c[3]
Definition: CMSCGEN.h:70
CMSCGEN::enumin
double enumin
Definition: CMSCGEN.h:80
CMSCGEN::cmax
double cmax
Definition: CMSCGEN.h:38
CMSCGEN::xemin
double xemin
Definition: CMSCGEN.h:45
CMSCGEN::Lmin
double Lmin
Definition: CMSCGEN.h:54
CMSCGEN
Definition: CMSCGEN.h:29
CMSCGEN::generate
int generate()
Definition: CMSCGEN.cc:249
CMSCGEN::ProdAlt
double ProdAlt
Definition: CMSCGEN.h:111
CMSCGEN::enumax
double enumax
Definition: CMSCGEN.h:81
CMSCGEN::corr
double corr[101]
Definition: CMSCGEN.h:71
CMSCGEN::TIFOnly_lin
bool TIFOnly_lin
Definition: CMSCGEN.h:77
CMSCGEN::negabs
double negabs
Definition: CMSCGEN.h:116
CMSCGEN::sigma
double sigma
Definition: CMSCGEN.h:112
CMSCGEN::b2
double b2
Definition: CMSCGEN.h:63
CMSCGEN::TIFOnly_const
bool TIFOnly_const
Definition: CMSCGEN.h:76
CMSCGEN::RanGen2
CLHEP::HepRandomEngine * RanGen2
Definition: CMSCGEN.h:73
CMSCGEN::setRandomEngine
void setRandomEngine(CLHEP::HepRandomEngine *v)
Definition: CMSCGEN.cc:20
CMSCGEN::negfrac
double negfrac
Definition: CMSCGEN.h:116
CMSCGEN::flux
double flux()
Definition: CMSCGEN.cc:441