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 
22 #include <iostream>
23 
25 
26 namespace CLHEP {
27  class HepRandomEngine;
28 }
29 
30 class CMSCGEN
31 {
32 
33 // all units: GeV
34 
35 private:
36 
37  int initialization; // energy and cos theta range set ?
38 
39  double pmin;
40  double pmax;
41  double cmin;
42  double cmax;
43  double cmin_in;
44  double cmax_in;
45 
46  double pq;
47  double c;
48 
49  double xemin;
50  double xemax;
51 
52  double pmin_min;
53  double pmin_max;
54 
55  double cmax_min;
56  double cmax_max;
57 
58  double Lmin;
59  double Lmax;
60  double Lfac;
61 
62  double c1;
63  double c2;
64 
65  double b0;
66  double b1;
67  double b2;
68 
70 
71  double cemax;
72 
73  double pe[9];
74  double b0c[3], b1c[3], b2c[3];
75  double corr[101];
76 
77 
78  CLHEP::HepRandomEngine *RanGen2; // random number generator
79  bool delRanGen;
80 
83 
84 
85  //variables for upgoing muons from neutrinos
86  double enumin;
87  double enumax;
88 
89 public:
90 
91  // constructor
92  CMSCGEN();
93 
94  //destructor
95  ~CMSCGEN();
96 
97  void setRandomEngine(CLHEP::HepRandomEngine* v);
98 
99  // to set the energy and cos theta range
100  int initialize(double,double,double,double,CLHEP::HepRandomEngine*,bool,bool);
101  int initialize(double,double,double,double,int,bool,bool);
102 
103  int generate();
104  // to generate energy*charge and cos theta for one cosmic
105 
106  double momentum_times_charge();
107 
108  double cos_theta();
109 
110  double flux();
111 
112  //upward going muons from neutrinos
113  int initializeNuMu(double, double, double, double, double, double, double, double, double, CLHEP::HepRandomEngine*);
114  int initializeNuMu(double, double, double, double, double, double, double, double, double, int);
115  int generateNuMu();
116 
117 
118 
119  double Rnunubar; //Ration of nu to nubar
120  double ProdAlt; //production altitude in atmosphere
121  double sigma;
122  double AR;
123  double dNdEmudEnu(double Enu, double Emu, double theta);
125  double negabs, negfrac;
126 
127 };
128 #endif
129 
static AlgebraicMatrix initialize()
double enumax
Definition: CMSCGEN.h:87
double sigma
Definition: CMSCGEN.h:121
double AR
Definition: CMSCGEN.h:122
double c2
Definition: CMSCGEN.h:63
double pmax
Definition: CMSCGEN.h:40
CLHEP::HepRandomEngine * RanGen2
Definition: CMSCGEN.h:78
double ProdAlt
Definition: CMSCGEN.h:120
Geom::Theta< T > theta() const
double negfrac
Definition: CMSCGEN.h:125
double c1
Definition: CMSCGEN.h:62
int initialization
Definition: CMSCGEN.h:37
double b0
Definition: CMSCGEN.h:65
double cmax_min
Definition: CMSCGEN.h:55
double cmin_in
Definition: CMSCGEN.h:43
double cmax
Definition: CMSCGEN.h:42
def generate(map_blobs=False, class_name=None)
Definition: models.py:188
bool TIFOnly_const
Definition: CMSCGEN.h:81
double xemin
Definition: CMSCGEN.h:49
double cmax_max
Definition: CMSCGEN.h:56
double Lfac
Definition: CMSCGEN.h:60
bool delRanGen
Definition: CMSCGEN.h:79
double b2
Definition: CMSCGEN.h:67
double Lmax
Definition: CMSCGEN.h:59
double integrated_flux
Definition: CMSCGEN.h:69
JetCorrectorParameters corr
Definition: classes.h:5
bool TIFOnly_lin
Definition: CMSCGEN.h:82
double pmin_min
Definition: CMSCGEN.h:52
double cmin
Definition: CMSCGEN.h:41
double pmin
Definition: CMSCGEN.h:39
double pmin_max
Definition: CMSCGEN.h:53
double b1
Definition: CMSCGEN.h:66
double xemax
Definition: CMSCGEN.h:50
double pq
Definition: CMSCGEN.h:46
double cemax
Definition: CMSCGEN.h:71
double c
Definition: CMSCGEN.h:47
double cmax_in
Definition: CMSCGEN.h:44
double enumin
Definition: CMSCGEN.h:86
double Lmin
Definition: CMSCGEN.h:58
double dNdEmudEnuMax
Definition: CMSCGEN.h:124
double Rnunubar
Definition: CMSCGEN.h:119