CMS 3D CMS Logo

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 logGamma (double mass, float momentum)
 
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::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.

8  logGamma(mass, mom);
9  LogTrace("CSCCrossGap") << "CSCCrossGap: simhit \n"
10  << "mass = " << mass << "GeV/c2, momentum = " << mom << " GeV/c, gap length = " << length()
11  << " cm \n";
12 }

References length(), logGamma(), LogTrace, and EgHLTOffHistBins_cfi::mass.

◆ ~CSCCrossGap()

CSCCrossGap::~CSCCrossGap ( )
inline

Definition at line 30 of file CSCCrossGap.h.

30 {};

Member Function Documentation

◆ addCluster()

void CSCCrossGap::addCluster ( LocalPoint  here)
inline

Definition at line 41 of file CSCCrossGap.h.

41 { clusters.push_back(here); }

References clusters.

Referenced by CSCGasCollisions::ionize().

◆ addElectrons()

void CSCCrossGap::addElectrons ( int  nelec = 1)
inline

Definition at line 42 of file CSCCrossGap.h.

42 { electronsInClusters.push_back(nelec); }

References electronsInClusters.

Referenced by CSCGasCollisions::ionize().

◆ addElectronToBack()

void CSCCrossGap::addElectronToBack ( )
inline

Definition at line 43 of file CSCCrossGap.h.

43 { ++electronsInClusters.back(); }

References electronsInClusters.

Referenced by CSCGasCollisions::ionize().

◆ addEloss()

void CSCCrossGap::addEloss ( float  eloss)
inline

Definition at line 46 of file CSCCrossGap.h.

46 { elosses.push_back(eloss); }

References elosses.

Referenced by CSCGasCollisions::generateEnergyLoss().

◆ addStep()

void CSCCrossGap::addStep ( double  step)
inline

Definition at line 45 of file CSCCrossGap.h.

45 { steps.push_back(step); }

References steps.

Referenced by CSCGasCollisions::generateStep().

◆ beta2()

double CSCCrossGap::beta2 ( ) const
inline

Definition at line 50 of file CSCCrossGap.h.

50 { return theBeta2; }

References theBeta2.

Referenced by CSCGasCollisions::generateEnergyLoss().

◆ electrons()

std::vector<int> CSCCrossGap::electrons ( ) const
inline

Definition at line 34 of file CSCCrossGap.h.

34 { return electronsInClusters; }

References electronsInClusters.

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

◆ eLossPerStep()

std::vector<float> CSCCrossGap::eLossPerStep ( ) const
inline

Definition at line 38 of file CSCCrossGap.h.

38 { return elosses; }

References elosses.

Referenced by CSCGasCollisions::writeSummary().

◆ gamma()

double CSCCrossGap::gamma ( ) const
inline

Definition at line 51 of file CSCCrossGap.h.

51 { return theGamma; }

References theGamma.

Referenced by CSCGasCollisions::generateEnergyLoss().

◆ gapVector()

LocalVector CSCCrossGap::gapVector ( ) const
inline

Definition at line 52 of file CSCCrossGap.h.

52 { return theGap; }

References theGap.

◆ ionClusters()

std::vector<LocalPoint> CSCCrossGap::ionClusters ( ) const
inline

Definition at line 32 of file CSCCrossGap.h.

32 { return clusters; }

References clusters.

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

◆ length()

float CSCCrossGap::length ( void  ) const
inline

Definition at line 54 of file CSCCrossGap.h.

54 { return theGap.mag(); }

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

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

◆ logGamma() [1/2]

double CSCCrossGap::logGamma ( )
inline

Definition at line 49 of file CSCCrossGap.h.

49 { return loggam; }

References loggam.

Referenced by CSCCrossGap().

◆ logGamma() [2/2]

double CSCCrossGap::logGamma ( double  mass,
float  momentum 
)

Definition at line 14 of file CSCCrossGap.cc.

14  {
15  theGamma = sqrt((mom / mass) * (mom / mass) + 1.);
16  theBeta2 = 1. - 1. / (theGamma * theGamma);
17  double betgam = sqrt(theGamma * theGamma - 1.);
18  LogTrace("CSCCrossGap") << "gamma = " << theGamma << ", beta2 = " << theBeta2 << ", beta*gamma = " << betgam;
19 
20  // The lowest value in table (=theGammaBins[0]) is ln(1.1)=0.0953102
21  // (Compensate later if lower)
22  loggam = log(std::max(1.1, theGamma)); // F-P literal IS double by default!
23  LogTrace("CSCCrossGap") << "logGamma = " << loggam;
24 
25  return loggam;
26 }

References dqm-mbProfile::log, loggam, LogTrace, EgHLTOffHistBins_cfi::mass, SiStripPI::max, mathSSE::sqrt(), theBeta2, and theGamma.

Referenced by CSCGasCollisions::simulate().

◆ noOfClusters()

int CSCCrossGap::noOfClusters ( ) const
inline

Definition at line 33 of file CSCCrossGap.h.

33 { return clusters.size(); }

References clusters.

Referenced by CSCGasCollisions::ionize().

◆ noOfElectrons()

int CSCCrossGap::noOfElectrons ( ) const
inline

Definition at line 35 of file CSCCrossGap.h.

35 { return electronsInClusters.size(); }

References electronsInClusters.

Referenced by CSCGasCollisions::ionize().

◆ noOfElosses()

int CSCCrossGap::noOfElosses ( ) const
inline

Definition at line 39 of file CSCCrossGap.h.

39 { return elosses.size(); }

References elosses.

◆ noOfSteps()

int CSCCrossGap::noOfSteps ( ) const
inline

Definition at line 37 of file CSCCrossGap.h.

37 { return steps.size(); }

References steps.

◆ stepLengths()

std::vector<double> CSCCrossGap::stepLengths ( ) const
inline

Definition at line 36 of file CSCCrossGap.h.

36 { return steps; }

References steps.

Referenced by CSCGasCollisions::writeSummary().

◆ unitVector()

LocalVector CSCCrossGap::unitVector ( ) const
inline

Definition at line 53 of file CSCCrossGap.h.

53 { return theGap.unit(); }

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

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

Member Data Documentation

◆ clusters

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

Definition at line 62 of file CSCCrossGap.h.

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

◆ electronsInClusters

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

Definition at line 63 of file CSCCrossGap.h.

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

◆ elosses

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

Definition at line 65 of file CSCCrossGap.h.

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

◆ loggam

double CSCCrossGap::loggam
private

Definition at line 59 of file CSCCrossGap.h.

Referenced by logGamma().

◆ steps

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

Definition at line 64 of file CSCCrossGap.h.

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

◆ theBeta2

double CSCCrossGap::theBeta2
private

Definition at line 57 of file CSCCrossGap.h.

Referenced by beta2(), and logGamma().

◆ theGamma

double CSCCrossGap::theGamma
private

Definition at line 58 of file CSCCrossGap.h.

Referenced by gamma(), and logGamma().

◆ theGap

LocalVector CSCCrossGap::theGap
private

Definition at line 60 of file CSCCrossGap.h.

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

step
step
Definition: StallMonitor.cc:94
CSCCrossGap::elosses
std::vector< float > elosses
Definition: CSCCrossGap.h:65
Vector3DBase::unit
Vector3DBase unit() const
Definition: Vector3DBase.h:54
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
HLT_FULL_cff.gap
gap
Definition: HLT_FULL_cff.py:8498
CSCCrossGap::electronsInClusters
std::vector< int > electronsInClusters
Definition: CSCCrossGap.h:63
CSCCrossGap::steps
std::vector< double > steps
Definition: CSCCrossGap.h:64
CSCCrossGap::loggam
double loggam
Definition: CSCCrossGap.h:59
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
CSCCrossGap::theGap
LocalVector theGap
Definition: CSCCrossGap.h:60
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
CSCCrossGap::theBeta2
double theBeta2
Definition: CSCCrossGap.h:57
CSCCrossGap::theGamma
double theGamma
Definition: CSCCrossGap.h:58
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
CSCCrossGap::clusters
std::vector< LocalPoint > clusters
Definition: CSCCrossGap.h:62
CSCCrossGap::length
float length() const
Definition: CSCCrossGap.h:54
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
CSCCrossGap::logGamma
double logGamma()
Definition: CSCCrossGap.h:49
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234