CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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.

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

References n100, and n100cos.

◆ ~CMSCGENnorm()

CMSCGENnorm::~CMSCGENnorm ( )
inline

Definition at line 45 of file CMSCGENnorm.h.

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

References n100, and n100cos.

Member Function Documentation

◆ events_n100cos()

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

Definition at line 13 of file CMSCGENnorm.cc.

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 }

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

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

◆ norm()

float CMSCGENnorm::norm ( int  n100cos)

Definition at line 27 of file CMSCGENnorm.cc.

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 }

References flux, n, n100cos, and Nnorm.

Referenced by CosmicMuonGenerator::terminate().

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().

CMSCGENnorm::Nnorm
float Nnorm
Definition: CMSCGENnorm.h:35
CMSCGENnorm::n
int n
Definition: CMSCGENnorm.h:33
CMSCGENnorm::n100cos
int n100cos
Definition: CMSCGENnorm.h:32
CMSCGENnorm::n100
int n100
Definition: CMSCGENnorm.h:31
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
CMSCGENnorm::flux
float flux
Definition: CMSCGENnorm.h:34
Pi
const double Pi
Definition: CosmicMuonParameters.h:18