CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CMSCGENnorm Class Reference

#include <CMSCGENnorm.h>

Public Member Functions

 CMSCGENnorm ()
 
int events_n100cos (double energy, double theta)
 
float norm (int n100cos)
 
 ~CMSCGENnorm ()
 

Private Attributes

float flux
 
int n
 
int n100
 
int n100cos
 
float Nnorm
 

Detailed Description

Definition at line 29 of file CMSCGENnorm.h.

Constructor & Destructor Documentation

◆ CMSCGENnorm()

CMSCGENnorm::CMSCGENnorm ( )
inline

Definition at line 39 of file CMSCGENnorm.h.

References n100, and n100cos.

39  {
40  n100 = 0;
41  n100cos = 0;
42  }

◆ ~CMSCGENnorm()

CMSCGENnorm::~CMSCGENnorm ( )
inline

Definition at line 45 of file CMSCGENnorm.h.

References n100, and n100cos.

45  {
46  n100 = 0;
47  n100cos = 0;
48  }

Member Function Documentation

◆ events_n100cos()

int CMSCGENnorm::events_n100cos ( double  energy,
double  theta 
)

Definition at line 13 of file CMSCGENnorm.cc.

References funct::cos(), HCALHighEnergyHPDFilter_cfi::energy, n100, n100cos, Pi, and theta().

Referenced by CosmicMuonGenerator::nextEvent(), and CosmicMuonGenerator::terminate().

13  {
14  if (energy > 99.5 && energy < 100.5) {
15  n100 = n100 + 1;
16 
17  if (1. - cos(theta) < 1. / (2. * Pi)) { //theta is in rad
18  n100cos = n100cos + 1;
19  }
20  }
21  return n100cos;
22 }
const double Pi
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Geom::Theta< T > theta() const

◆ norm()

float CMSCGENnorm::norm ( int  n100cos)

Definition at line 27 of file CMSCGENnorm.cc.

References flux, n, n100cos, and Nnorm.

Referenced by CosmicMuonGenerator::terminate().

27  {
28  flux = 2.63e-3; // +- 0.06e-3 [1/m**2/sr/GeV/s]
29 
30  n = n100cos; // [1/sr/GeV]
31 
32  //rate=N/runtime --> Nnorm ~ (1/runtime/m^2 at surface plane) as rate corresponds to known flux
33  Nnorm = flux / n;
34 
35  //err of Nnorm = Nnorm* 1/sqrt(n)
36 
37  return Nnorm;
38 }
float flux
Definition: CMSCGENnorm.h:34
float Nnorm
Definition: CMSCGENnorm.h:35

Member Data Documentation

◆ flux

float CMSCGENnorm::flux
private

Definition at line 34 of file CMSCGENnorm.h.

Referenced by norm().

◆ n

int CMSCGENnorm::n
private

Definition at line 33 of file CMSCGENnorm.h.

Referenced by norm().

◆ n100

int CMSCGENnorm::n100
private

Definition at line 31 of file CMSCGENnorm.h.

Referenced by CMSCGENnorm(), events_n100cos(), and ~CMSCGENnorm().

◆ n100cos

int CMSCGENnorm::n100cos
private

Definition at line 32 of file CMSCGENnorm.h.

Referenced by CMSCGENnorm(), events_n100cos(), norm(), and ~CMSCGENnorm().

◆ Nnorm

float CMSCGENnorm::Nnorm
private

Definition at line 35 of file CMSCGENnorm.h.

Referenced by norm().