CMS 3D CMS Logo

Public Member Functions | Private Attributes

CMSCGENnorm Class Reference

#include <CMSCGENnorm.h>

List of all members.

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.

References n100, and n100cos.

               {
    n100=0; 
    n100cos=0;
}
CMSCGENnorm::~CMSCGENnorm ( ) [inline]

Definition at line 51 of file CMSCGENnorm.h.

References n100, and n100cos.

                {
    n100=0; 
    n100cos=0;
}

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(), and CosmicMuonGenerator::terminate().

{
   if(energy > 99.5 && energy < 100.5){ 
    n100=n100+1;
    
    if(1.-cos(theta) < 1./(2.*Pi)) { //theta is in rad
      n100cos = n100cos + 1 ;
    }
  }
  return n100cos;
}
float CMSCGENnorm::norm ( int  n100cos)

Definition at line 31 of file CMSCGENnorm.cc.

References flux, n, n100cos, and Nnorm.

Referenced by CosmicMuonGenerator::terminate().

{ 
  flux = 2.63e-3 ; // +- 0.06e-3 [1/m**2/sr/GeV/s]

  n = n100cos ; // [1/sr/GeV]
  
  //rate=N/runtime --> Nnorm ~ (1/runtime/m^2 at surface plane) as rate corresponds to known flux
  Nnorm = flux/n ;

  //err of Nnorm = Nnorm* 1/sqrt(n)
  
  return Nnorm; 
}

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 CMSCGENnorm(), events_n100cos(), and ~CMSCGENnorm().

int CMSCGENnorm::n100cos [private]

Definition at line 37 of file CMSCGENnorm.h.

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

float CMSCGENnorm::Nnorm [private]

Definition at line 40 of file CMSCGENnorm.h.

Referenced by norm().