File indexing completed on 2024-04-06 12:30:42
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
0022
0023 loggam = log(std::max(1.1, theGamma));
0024 LogTrace("CSCCrossGap") << "logGamma = " << loggam;
0025
0026 return loggam;
0027 }