00001 #ifndef CMSCGENnorm_h 00002 #define CMSCGENnorm_h 00003 // 00004 // CMSCGENnorm.h P. Biallass 2006 00005 // 00006 // code based on l3cgen.f by T.Hebbeker 00007 // implemented in CMSSW by P. Biallass 11.04.2006 00008 // 00010 // 00011 // calculate normalisation factor (if statistics sufficient): 00012 // 00013 // 00014 // flux dN/dOmega/dE/dA/dt at 100 GeV and zenith angle 0 (per sr-> theta<32.77 deg): 00015 // 2.63 * E-3 +- 0.06 * E-3 / m**2 / sr / GeV / s (see Biallass+Hebbeker internal note 2007 "Improved Parametrization of the Cosmic Muon Flux for the generator CMSCGEN") 00016 // 00017 // percentage of rejected events and surface needs to be corrected for later! 00018 // 00019 // for this we also need to: 00020 // 00021 // count muons with energy 100 GeV 00022 // and those with 1 - cos(theta) < 1/(2pi) (-> gives directly dN/dOmega/dE !) (this means theta<32.77deg) 00023 // 00024 00025 00026 #include "TMath.h" 00027 #include <iostream> 00028 #include "GeneratorInterface/CosmicMuonGenerator/interface/CosmicMuonParameters.h" 00029 00030 00031 class CMSCGENnorm 00032 { 00033 00034 private: 00035 00036 int n100; 00037 int n100cos; 00038 int n; 00039 float flux; 00040 float Nnorm; 00041 00042 public: 00043 00044 // constructor 00045 CMSCGENnorm(){ 00046 n100=0; 00047 n100cos=0; 00048 } 00049 00050 //destructor 00051 ~CMSCGENnorm(){ 00052 n100=0; 00053 n100cos=0; 00054 } 00055 00056 int events_n100cos(double energy, double theta); //count number of cosmic with energy 100 GeV and those with 1 - cos(theta) < 1/(2pi) 00057 00058 float norm(int n100cos); //normalize to known flux 00059 00060 }; 00061 #endif 00062