Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-29 01:21:50

0001 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0002 #include "SimMuon/CSCDigitizer/src/CSCCrossGap.h"
0003 #include <cmath>
0004 
0005 #include <iostream>
0006 CSCCrossGap::CSCCrossGap(double mass, float mom, LocalVector gap)
0007     : theBeta2(0.), theGamma(1.), loggam(0.), theGap(gap), clusters(), electronsInClusters(), steps(), elosses() {
0008   logGamma(mass, mom);
0009   LogTrace("CSCCrossGap") << "CSCCrossGap: simhit \n"
0010                           << "mass = " << mass << "GeV/c2, momentum = " << mom << " GeV/c, gap length = " << length()
0011                           << " cm \n";
0012 }
0013 
0014 double CSCCrossGap::logGamma(double mass, float mom) {
0015   theGamma = sqrt((mom / mass) * (mom / mass) + 1.);
0016   theBeta2 = 1. - 1. / (theGamma * theGamma);
0017   LogTrace("CSCCrossGap") << "gamma = " << theGamma << ", beta2 = " << theBeta2
0018                           << ", beta*gamma = " << sqrt(theGamma * theGamma - 1.);
0019   ;
0020 
0021   // The lowest value in table (=theGammaBins[0]) is ln(1.1)=0.0953102
0022   // (Compensate later if lower)
0023   loggam = log(std::max(1.1, theGamma));  // F-P literal IS double by default!
0024   LogTrace("CSCCrossGap") << "logGamma = " << loggam;
0025 
0026   return loggam;
0027 }