CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CSCCrossGap Class Reference

#include <CSCCrossGap.h>

Public Member Functions

void addCluster (LocalPoint here)
 
void addElectrons (int nelec=1)
 
void addElectronToBack ()
 
void addEloss (float eloss)
 
void addStep (double step)
 
double beta2 () const
 
 CSCCrossGap (double mass, float mom, LocalVector gap)
 
std::vector< int > electrons () const
 
std::vector< float > eLossPerStep () const
 
double gamma () const
 
LocalVector gapVector () const
 
std::vector< LocalPointionClusters () const
 
float length () const
 
double logGamma (double mass, float momentum)
 
double logGamma ()
 
int noOfClusters () const
 
int noOfElectrons () const
 
int noOfElosses () const
 
int noOfSteps () const
 
std::vector< double > stepLengths () const
 
LocalVector unitVector () const
 
 ~CSCCrossGap ()
 

Private Attributes

std::vector< LocalPointclusters
 
std::vector< int > electronsInClusters
 
std::vector< float > elosses
 
double loggam
 
std::vector< double > steps
 
double theBeta2
 
double theGamma
 
LocalVector theGap
 

Detailed Description

Class used to represent one CSC gas gap crossing by a charged track.

Author
Tim Cox

This is used by CSCCSCGasCollisions in the digitization of the CSCs. Actually this may NOT model the whole gas gap, but just the path length corresponding to a PSimHit in the gap (i.e. from the PSimHit 'entry point' to its 'exit point'). PSimHit's can have a pretty evanescent existence and I can't pretend to have a full understanding of their full range of characteristics. Yet another thing 'to be studied'.

Definition at line 22 of file CSCCrossGap.h.

Constructor & Destructor Documentation

CSCCrossGap::CSCCrossGap ( double  mass,
float  mom,
LocalVector  gap 
)

iam = particle type in PDG code. mom = momentum of particle gap = space std::vector representing the hit entry and exit

Definition at line 6 of file CSCCrossGap.cc.

References length(), logGamma(), and LogTrace.

7 : theBeta2(0.),
8  theGamma(1.),
9  loggam(0.),
10  theGap(gap),
11  clusters(),
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 }
std::vector< float > elosses
Definition: CSCCrossGap.h:67
std::vector< int > electronsInClusters
Definition: CSCCrossGap.h:65
#define LogTrace(id)
double loggam
Definition: CSCCrossGap.h:61
LocalVector theGap
Definition: CSCCrossGap.h:62
std::vector< double > steps
Definition: CSCCrossGap.h:66
std::vector< LocalPoint > clusters
Definition: CSCCrossGap.h:64
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::~CSCCrossGap ( )
inline

Definition at line 31 of file CSCCrossGap.h.

31 {};

Member Function Documentation

void CSCCrossGap::addCluster ( LocalPoint  here)
inline

Definition at line 42 of file CSCCrossGap.h.

References clusters.

Referenced by CSCGasCollisions::ionize().

42 { clusters.push_back( here ); }
std::vector< LocalPoint > clusters
Definition: CSCCrossGap.h:64
void CSCCrossGap::addElectrons ( int  nelec = 1)
inline

Definition at line 43 of file CSCCrossGap.h.

References electronsInClusters.

Referenced by CSCGasCollisions::ionize().

43 { electronsInClusters.push_back( nelec ); }
std::vector< int > electronsInClusters
Definition: CSCCrossGap.h:65
void CSCCrossGap::addElectronToBack ( )
inline

Definition at line 44 of file CSCCrossGap.h.

References electronsInClusters.

Referenced by CSCGasCollisions::ionize().

44 { ++electronsInClusters.back(); }
std::vector< int > electronsInClusters
Definition: CSCCrossGap.h:65
void CSCCrossGap::addEloss ( float  eloss)
inline

Definition at line 47 of file CSCCrossGap.h.

References elosses.

Referenced by CSCGasCollisions::generateEnergyLoss().

47 { elosses.push_back( eloss ); }
std::vector< float > elosses
Definition: CSCCrossGap.h:67
void CSCCrossGap::addStep ( double  step)
inline

Definition at line 46 of file CSCCrossGap.h.

References steps.

Referenced by CSCGasCollisions::generateStep().

46 { steps.push_back( step ); }
std::vector< double > steps
Definition: CSCCrossGap.h:66
double CSCCrossGap::beta2 ( ) const
inline

Definition at line 51 of file CSCCrossGap.h.

References theBeta2.

Referenced by CSCGasCollisions::generateEnergyLoss().

51 { return theBeta2; }
double theBeta2
Definition: CSCCrossGap.h:59
std::vector<int> CSCCrossGap::electrons ( ) const
inline

Definition at line 35 of file CSCCrossGap.h.

References electronsInClusters.

Referenced by CSCGasCollisions::simulate(), and CSCGasCollisions::writeSummary().

35 { return electronsInClusters; }
std::vector< int > electronsInClusters
Definition: CSCCrossGap.h:65
std::vector<float> CSCCrossGap::eLossPerStep ( ) const
inline

Definition at line 39 of file CSCCrossGap.h.

References elosses.

Referenced by CSCGasCollisions::writeSummary().

39 { return elosses; }
std::vector< float > elosses
Definition: CSCCrossGap.h:67
double CSCCrossGap::gamma ( ) const
inline

Definition at line 52 of file CSCCrossGap.h.

References theGamma.

Referenced by CSCGasCollisions::generateEnergyLoss().

52 { return theGamma; }
double theGamma
Definition: CSCCrossGap.h:60
LocalVector CSCCrossGap::gapVector ( ) const
inline

Definition at line 53 of file CSCCrossGap.h.

References theGap.

53 { return theGap; }
LocalVector theGap
Definition: CSCCrossGap.h:62
std::vector<LocalPoint> CSCCrossGap::ionClusters ( ) const
inline

Definition at line 33 of file CSCCrossGap.h.

References clusters.

Referenced by CSCGasCollisions::simulate(), and CSCGasCollisions::writeSummary().

33 { return clusters; }
std::vector< LocalPoint > clusters
Definition: CSCCrossGap.h:64
float CSCCrossGap::length ( void  ) const
inline

Definition at line 55 of file CSCCrossGap.h.

References PV3DBase< T, PVType, FrameType >::mag(), and theGap.

Referenced by CSCCrossGap(), and CSCGasCollisions::simulate().

55 { return theGap.mag(); }
T mag() const
Definition: PV3DBase.h:67
LocalVector theGap
Definition: CSCCrossGap.h:62
double CSCCrossGap::logGamma ( double  mass,
float  momentum 
)

Definition at line 23 of file CSCCrossGap.cc.

References create_public_lumi_plots::log, loggam, LogTrace, bookConverter::max, mathSSE::sqrt(), theBeta2, and theGamma.

Referenced by CSCGasCollisions::simulate().

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 }
T sqrt(T t)
Definition: SSEVec.h:48
#define LogTrace(id)
double loggam
Definition: CSCCrossGap.h:61
double theBeta2
Definition: CSCCrossGap.h:59
double theGamma
Definition: CSCCrossGap.h:60
double CSCCrossGap::logGamma ( )
inline

Definition at line 50 of file CSCCrossGap.h.

References loggam.

Referenced by CSCCrossGap().

50 { return loggam; }
double loggam
Definition: CSCCrossGap.h:61
int CSCCrossGap::noOfClusters ( ) const
inline

Definition at line 34 of file CSCCrossGap.h.

References clusters.

Referenced by CSCGasCollisions::ionize().

34 { return clusters.size(); }
std::vector< LocalPoint > clusters
Definition: CSCCrossGap.h:64
int CSCCrossGap::noOfElectrons ( ) const
inline

Definition at line 36 of file CSCCrossGap.h.

References electronsInClusters.

Referenced by CSCGasCollisions::ionize().

36 { return electronsInClusters.size(); }
std::vector< int > electronsInClusters
Definition: CSCCrossGap.h:65
int CSCCrossGap::noOfElosses ( ) const
inline

Definition at line 40 of file CSCCrossGap.h.

References elosses.

40 { return elosses.size(); }
std::vector< float > elosses
Definition: CSCCrossGap.h:67
int CSCCrossGap::noOfSteps ( ) const
inline

Definition at line 38 of file CSCCrossGap.h.

References steps.

38 { return steps.size(); }
std::vector< double > steps
Definition: CSCCrossGap.h:66
std::vector<double> CSCCrossGap::stepLengths ( ) const
inline

Definition at line 37 of file CSCCrossGap.h.

References steps.

Referenced by CSCGasCollisions::writeSummary().

37 { return steps; }
std::vector< double > steps
Definition: CSCCrossGap.h:66
LocalVector CSCCrossGap::unitVector ( ) const
inline

Definition at line 54 of file CSCCrossGap.h.

References theGap, and Vector3DBase< T, FrameTag >::unit().

Referenced by CSCGasCollisions::ionize(), and CSCGasCollisions::simulate().

54 { return theGap.unit(); }
Vector3DBase unit() const
Definition: Vector3DBase.h:57
LocalVector theGap
Definition: CSCCrossGap.h:62

Member Data Documentation

std::vector<LocalPoint> CSCCrossGap::clusters
private

Definition at line 64 of file CSCCrossGap.h.

Referenced by addCluster(), ionClusters(), and noOfClusters().

std::vector<int> CSCCrossGap::electronsInClusters
private

Definition at line 65 of file CSCCrossGap.h.

Referenced by addElectrons(), addElectronToBack(), electrons(), and noOfElectrons().

std::vector<float> CSCCrossGap::elosses
private

Definition at line 67 of file CSCCrossGap.h.

Referenced by addEloss(), eLossPerStep(), and noOfElosses().

double CSCCrossGap::loggam
private

Definition at line 61 of file CSCCrossGap.h.

Referenced by logGamma().

std::vector<double> CSCCrossGap::steps
private

Definition at line 66 of file CSCCrossGap.h.

Referenced by addStep(), noOfSteps(), and stepLengths().

double CSCCrossGap::theBeta2
private

Definition at line 59 of file CSCCrossGap.h.

Referenced by beta2(), and logGamma().

double CSCCrossGap::theGamma
private

Definition at line 60 of file CSCCrossGap.h.

Referenced by gamma(), and logGamma().

LocalVector CSCCrossGap::theGap
private

Definition at line 62 of file CSCCrossGap.h.

Referenced by gapVector(), length(), and unitVector().