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

Definition at line 46 of file CMSmplIonisation.cc.

47 {}

Member Function Documentation

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

Definition at line 71 of file CMSmplIonisation.cc.

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

73 {
74  if(isInitialised) { return; }
75 
76  SetBaseParticle(nullptr);
77 
78  // monopole model is responsible both for energy loss and fluctuations
81  ion->SetParticle(p);
82 
83  // define size of dedx and range tables
84  G4EmParameters* param = G4EmParameters::Instance();
85  G4double emin = std::min(param->MinKinEnergy(),ion->LowEnergyLimit());
86  G4double emax = std::max(param->MaxKinEnergy(),ion->HighEnergyLimit());
87  G4int bin = G4lrint(param->NumberOfBinsPerDecade()*std::log10(emax/emin));
88  ion->SetLowEnergyLimit(emin);
89  ion->SetHighEnergyLimit(emax);
90  SetMinKinEnergy(emin);
91  SetMaxKinEnergy(emax);
92  SetDEDXBinning(bin);
93 
94  SetEmModel(ion);
95  AddEmModel(1,ion,ion);
96 
97  isInitialised = true;
98 }
void SetParticle(const G4ParticleDefinition *p)
T min(T a, T b)
Definition: MathUtil.h:58
bin
set the eta bin as selection string.
G4bool CMSmplIonisation::IsApplicable ( const G4ParticleDefinition &  p)
override

Definition at line 51 of file CMSmplIonisation.cc.

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

Definition at line 58 of file CMSmplIonisation.cc.

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

61 {
62  G4double x = 0.5*cut/electron_mass_c2;
63  G4double mass = mpl->GetPDGMass();
64  G4double ratio = electron_mass_c2/mass;
65  G4double gam = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio));
66  return mass*(gam - 1.0);
67 }
T sqrt(T t)
Definition: SSEVec.h:18
void CMSmplIonisation::PrintInfo ( )
override

Definition at line 102 of file CMSmplIonisation.cc.

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

Definition at line 107 of file CMSmplIonisation.cc.

108 {
109  out << "No description available." << G4endl;
110  G4VEnergyLossProcess::ProcessDescription(out);
111 }

Member Data Documentation

G4bool CMSmplIonisation::isInitialised
private

Definition at line 64 of file CMSmplIonisation.h.

Referenced by InitialiseEnergyLossProcess().

G4double CMSmplIonisation::magneticCharge
private

Definition at line 63 of file CMSmplIonisation.h.

Referenced by CMSmplIonisation(), and InitialiseEnergyLossProcess().