CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCCrossGap.cc
Go to the documentation of this file.
3 #include <cmath>
4 
5 #include <iostream>
6 CSCCrossGap:: CSCCrossGap(double mass, float mom, LocalVector gap)
7 : theBeta2(0.),
8  theGamma(1.),
9  loggam(0.),
10  theGap(gap),
11  clusters(),
12  electronsInClusters(),
13  steps(),
14  elosses()
15 {
16  logGamma( mass, mom);
17  LogTrace("CSCCrossGap")
18  << "CSCCrossGap: simhit \n"
19  << "mass = " << mass << "GeV/c2, momentum = " << mom <<
20  " GeV/c, gap length = " << length() << " cm \n";
21 }
22 
23 double CSCCrossGap::logGamma( double mass, float mom )
24 {
25  theGamma = sqrt((mom/mass)*(mom/mass) + 1. );
26  theBeta2 = 1. - 1./(theGamma*theGamma);
27  double betgam = sqrt(theGamma*theGamma -1.);
28  LogTrace("CSCCrossGap") << "gamma = " << theGamma << ", beta2 = " << theBeta2 <<
29  ", beta*gamma = " << betgam;
30 
31  // The lowest value in table (=theGammaBins[0]) is ln(1.1)=0.0953102
32  // (Compensate later if lower)
33  loggam = log( std::max(1.1, theGamma ) ); // F-P literal IS double by default!
34  LogTrace("CSCCrossGap") << "logGamma = " << loggam;
35 
36  return loggam;
37 }
38 
T sqrt(T t)
Definition: SSEVec.h:18
#define LogTrace(id)
double loggam
Definition: CSCCrossGap.h:61
double theBeta2
Definition: CSCCrossGap.h:59
float length() const
Definition: CSCCrossGap.h:55
double theGamma
Definition: CSCCrossGap.h:60
double logGamma()
Definition: CSCCrossGap.h:50
CSCCrossGap(double mass, float mom, LocalVector gap)
Definition: CSCCrossGap.cc:6