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 31 of file CMSCGENnorm.h.

Constructor & Destructor Documentation

CMSCGENnorm::CMSCGENnorm ( )
inline

Definition at line 45 of file CMSCGENnorm.h.

45  {
46  n100=0;
47  n100cos=0;
48 }
CMSCGENnorm::~CMSCGENnorm ( )
inline

Definition at line 51 of file CMSCGENnorm.h.

References events_n100cos(), norm(), and theta().

51  {
52  n100=0;
53  n100cos=0;
54 }

Member Function Documentation

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

Definition at line 15 of file CMSCGENnorm.cc.

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

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

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 }
const double Pi
Geom::Theta< T > theta() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
float CMSCGENnorm::norm ( int  n100cos)

Definition at line 31 of file CMSCGENnorm.cc.

References flux, n, n100cos, and Nnorm.

Referenced by CosmicMuonGenerator::terminate(), and ~CMSCGENnorm().

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 }
float flux
Definition: CMSCGENnorm.h:39
float Nnorm
Definition: CMSCGENnorm.h:40

Member Data Documentation

float CMSCGENnorm::flux
private

Definition at line 39 of file CMSCGENnorm.h.

Referenced by norm().

int CMSCGENnorm::n
private

Definition at line 38 of file CMSCGENnorm.h.

Referenced by norm().

int CMSCGENnorm::n100
private

Definition at line 36 of file CMSCGENnorm.h.

Referenced by events_n100cos().

int CMSCGENnorm::n100cos
private

Definition at line 37 of file CMSCGENnorm.h.

Referenced by events_n100cos(), and norm().

float CMSCGENnorm::Nnorm
private

Definition at line 40 of file CMSCGENnorm.h.

Referenced by norm().