CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/SimMuon/CSCDigitizer/src/CSCCrossGap.cc

Go to the documentation of this file.
00001 #include "SimMuon/CSCDigitizer/src/CSCCrossGap.h"
00002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00003 #include <cmath>
00004 
00005 #include <iostream>
00006 CSCCrossGap:: CSCCrossGap(double mass, float mom, LocalVector gap)
00007 : theBeta2(0.),
00008   theGamma(1.),
00009   loggam(0.),
00010   theGap(gap),
00011   clusters(),
00012   electronsInClusters(),
00013   steps(),
00014   elosses()
00015 {
00016   logGamma( mass, mom);
00017   LogTrace("CSCCrossGap")
00018      << "CSCCrossGap: simhit \n"
00019      << "mass = " << mass << "GeV/c2, momentum = " << mom << 
00020        " GeV/c, gap length = " << length() << " cm \n";
00021 }
00022 
00023 double CSCCrossGap::logGamma( double mass, float mom ) 
00024 {
00025   theGamma = sqrt((mom/mass)*(mom/mass) + 1. );
00026   theBeta2 = 1. - 1./(theGamma*theGamma);
00027   double betgam = sqrt(theGamma*theGamma -1.);
00028   LogTrace("CSCCrossGap") << "gamma = " << theGamma << ", beta2 = " << theBeta2 <<
00029     ", beta*gamma = " << betgam;
00030 
00031   // The lowest value in table (=theGammaBins[0]) is ln(1.1)=0.0953102
00032   // (Compensate later if lower)
00033   loggam = log( std::max(1.1, theGamma ) ); // F-P literal IS double by default!
00034   LogTrace("CSCCrossGap") << "logGamma = " << loggam;
00035 
00036   return loggam;
00037 }
00038