CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
CMSmplIonisation Class Reference

#include <CMSmplIonisation.h>

Inheritance diagram for CMSmplIonisation:

Public Member Functions

 CMSmplIonisation (G4double mCharge=0.0, const G4String &name="mplIoni")
 
G4bool IsApplicable (const G4ParticleDefinition &p) override
 
G4double MinPrimaryEnergy (const G4ParticleDefinition *p, const G4Material *, G4double cut) final
 
void PrintInfo () override
 
void ProcessDescription (std::ostream &) const override
 
 ~CMSmplIonisation () override
 

Protected Member Functions

void InitialiseEnergyLossProcess (const G4ParticleDefinition *, const G4ParticleDefinition *) override
 

Private Attributes

G4bool isInitialised
 
G4double magneticCharge
 

Detailed Description

Definition at line 35 of file CMSmplIonisation.h.

Constructor & Destructor Documentation

CMSmplIonisation::CMSmplIonisation ( G4double  mCharge = 0.0,
const G4String &  name = "mplIoni" 
)
explicit

Definition at line 30 of file CMSmplIonisation.cc.

References nanoDQM_cff::Electron, and magneticCharge.

31  : G4VEnergyLossProcess(name), magneticCharge(mCharge), isInitialised(false) {
32  // By default classical magnetic charge is used
33  if (magneticCharge == 0.0) {
34  magneticCharge = eplus * 0.5 / fine_structure_const;
35  }
36 
37  SetVerboseLevel(0);
38  SetProcessSubType(fIonisation);
39  SetStepFunction(0.2, 1 * mm);
40  SetSecondaryParticle(G4Electron::Electron());
41 }
CMSmplIonisation::~CMSmplIonisation ( )
override

Definition at line 45 of file CMSmplIonisation.cc.

45 {}

Member Function Documentation

void CMSmplIonisation::InitialiseEnergyLossProcess ( const G4ParticleDefinition *  p,
const G4ParticleDefinition *   
)
overrideprotected

Definition at line 63 of file CMSmplIonisation.cc.

References newFWLiteAna::bin, isInitialised, magneticCharge, SiStripPI::max, min(), and CMSmplIonisationWithDeltaModel::SetParticle().

63  {
64  if (isInitialised) {
65  return;
66  }
67 
68  SetBaseParticle(nullptr);
69 
70  // monopole model is responsible both for energy loss and fluctuations
72  ion->SetParticle(p);
73 
74  // define size of dedx and range tables
75  G4EmParameters* param = G4EmParameters::Instance();
76  G4double emin = std::min(param->MinKinEnergy(), ion->LowEnergyLimit());
77  G4double emax = std::max(param->MaxKinEnergy(), ion->HighEnergyLimit());
78  G4int bin = G4lrint(param->NumberOfBinsPerDecade() * std::log10(emax / emin));
79  ion->SetLowEnergyLimit(emin);
80  ion->SetHighEnergyLimit(emax);
81  SetMinKinEnergy(emin);
82  SetMaxKinEnergy(emax);
83  SetDEDXBinning(bin);
84 
85  SetEmModel(ion);
86  AddEmModel(1, ion, ion);
87 
88  isInitialised = true;
89 }
void SetParticle(const G4ParticleDefinition *p)
T min(T a, T b)
Definition: MathUtil.h:58
G4bool CMSmplIonisation::IsApplicable ( const G4ParticleDefinition &  p)
override

Definition at line 49 of file CMSmplIonisation.cc.

49 { return true; }
G4double CMSmplIonisation::MinPrimaryEnergy ( const G4ParticleDefinition *  p,
const G4Material *  ,
G4double  cut 
)
final

Definition at line 53 of file CMSmplIonisation.cc.

References EgHLTOffHistBins_cfi::mass, particleFlowDisplacedVertex_cfi::ratio, mathSSE::sqrt(), and x.

53  {
54  G4double x = 0.5 * cut / electron_mass_c2;
55  G4double mass = mpl->GetPDGMass();
56  G4double ratio = electron_mass_c2 / mass;
57  G4double gam = x * ratio + std::sqrt((1. + x) * (1. + x * ratio * ratio));
58  return mass * (gam - 1.0);
59 }
T sqrt(T t)
Definition: SSEVec.h:19
void CMSmplIonisation::PrintInfo ( )
override

Definition at line 93 of file CMSmplIonisation.cc.

93 {}
void CMSmplIonisation::ProcessDescription ( std::ostream &  out) const
override

Definition at line 97 of file CMSmplIonisation.cc.

97  {
98  out << "No description available." << G4endl;
99  G4VEnergyLossProcess::ProcessDescription(out);
100 }

Member Data Documentation

G4bool CMSmplIonisation::isInitialised
private

Definition at line 56 of file CMSmplIonisation.h.

Referenced by InitialiseEnergyLossProcess().

G4double CMSmplIonisation::magneticCharge
private

Definition at line 55 of file CMSmplIonisation.h.

Referenced by CMSmplIonisation(), and InitialiseEnergyLossProcess().