test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
GeneratorInterface
CosmicMuonGenerator
src
CMSCGENnorm.cc
Go to the documentation of this file.
1
//
2
// CMSCGENnorm.cc P. Biallass 2006
3
//
4
// code based on l3cgen.f by T.Hebbeker
5
// implemented in CMSSW by P. Biallass 11.04.2006
6
// see header for documentation
7
//
8
9
10
#include "
GeneratorInterface/CosmicMuonGenerator/interface/CMSCGENnorm.h
"
11
12
13
//count muons which are around 100GeV and theta<33 deg (~vertical), do this for EVERY generated cosmic
14
15
int
CMSCGENnorm::events_n100cos
(
double
energy
,
double
theta
)
16
{
17
if
(energy > 99.5 && energy < 100.5){
18
n100
=
n100
+1;
19
20
if
(1.-
cos
(theta) < 1./(2.*
Pi
)) {
//theta is in rad
21
n100cos
=
n100cos
+ 1 ;
22
}
23
}
24
return
n100cos
;
25
}
26
27
28
// determine normalization using known flux, do this in the end. Percentage of rejected events and surface needs to be corrected for later!
29
// Note that the number of actually DICED cosmics is needed for normalisation, and sufficient statistics to have muons at 100 GeV!
30
31
float
CMSCGENnorm::norm
(
int
n100cos)
32
{
33
flux
= 2.63e-3 ;
// +- 0.06e-3 [1/m**2/sr/GeV/s]
34
35
n
=
n100cos
;
// [1/sr/GeV]
36
37
//rate=N/runtime --> Nnorm ~ (1/runtime/m^2 at surface plane) as rate corresponds to known flux
38
Nnorm
=
flux
/
n
;
39
40
//err of Nnorm = Nnorm* 1/sqrt(n)
41
42
return
Nnorm
;
43
}
44
45
Pi
const double Pi
Definition:
CosmicMuonParameters.h:18
CMSCGENnorm::n100cos
int n100cos
Definition:
CMSCGENnorm.h:37
CMSCGENnorm::norm
float norm(int n100cos)
Definition:
CMSCGENnorm.cc:31
CMSCGENnorm::events_n100cos
int events_n100cos(double energy, double theta)
Definition:
CMSCGENnorm.cc:15
CMSCGENnorm::n
int n
Definition:
CMSCGENnorm.h:38
CMSCGENnorm::n100
int n100
Definition:
CMSCGENnorm.h:36
theta
Geom::Theta< T > theta() const
Definition:
Basic3DVectorLD.h:170
CMSCGENnorm.h
CMSCGENnorm::flux
float flux
Definition:
CMSCGENnorm.h:39
funct::cos
Cos< T >::type cos(const T &t)
Definition:
Cos.h:22
relval_parameters_module.energy
string energy
Definition:
relval_parameters_module.py:29
CMSCGENnorm::Nnorm
float Nnorm
Definition:
CMSCGENnorm.h:40
Generated for CMSSW Reference Manual by
1.8.5