Skip to content

Commit 24af65c

Browse files
committed
* add support in GlueXPhysicsList physics list initialization of
the GlueXBernardConversionProcess to switch from e+e- to mu+mu- pair conversion, based on the first GENBEAM argument being 'BHgen' for e+e- or 'BHmuons' for mu+mu-. [rtj] * add a support to GlueXBeamConversionProcess to control the switching between e+e- and mu+mu- pair conversion at startup. [rtj]
1 parent 80c8826 commit 24af65c

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

src/GlueXBernardConversionProcess.cc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
#include "GlueXUserOptions.hh"
1414
#include "G4ParallelWorldProcess.hh"
1515

16+
#include "G4Positron.hh"
17+
#include "G4Electron.hh"
18+
#include "G4MuonPlus.hh"
19+
#include "G4MuonMinus.hh"
20+
1621
// If you set this flag to 1 then all beam photons that reach
1722
// the TPOL converter target will convert to e+e- pairs inside,
1823
// otherwise the standard pair conversion probabilities apply.
@@ -43,6 +48,7 @@ G4Mutex GlueXBernardConversionProcess::fMutex = G4MUTEX_INITIALIZER;
4348
int GlueXBernardConversionProcess::fStopBeamBeforeConverter = 0;
4449
int GlueXBernardConversionProcess::fStopBeamAfterConverter = 0;
4550
int GlueXBernardConversionProcess::fStopBeamAfterTarget = 0;
51+
int GlueXBernardConversionProcess::fLeptonPairFamily = 0;
4652
int GlueXBernardConversionProcess::fConfigured = 0;
4753

4854
GlueXBernardConversionProcess::GlueXBernardConversionProcess(
@@ -98,6 +104,14 @@ GlueXBernardConversionProcess::GlueXBernardConversionProcess(
98104
{
99105
fStopBeamAfterTarget = 1;
100106
}
107+
else if (genbeampars.find(1) != genbeampars.end() &&
108+
(genbeampars[1] == "BHmuons_Bernard" ||
109+
genbeampars[1] == "BHmuons_BERNARD" ||
110+
genbeampars[1] == "bhmuons_bernard" ))
111+
{
112+
fStopBeamAfterTarget = 1;
113+
fLeptonPairFamily = 1;
114+
}
101115
}
102116

103117
fConfigured = 1;
@@ -312,3 +326,19 @@ void GlueXBernardConversionProcess::GenerateConversionVertex(const G4Track &trac
312326
}
313327
}
314328
}
329+
330+
G4ParticleDefinition *GlueXBernardConversionProcess::GetLepton(int charge) {
331+
if (fLeptonPairFamily == 0) {
332+
if (charge > 0)
333+
return G4Positron::Definition();
334+
else
335+
return G4Electron::Definition();
336+
}
337+
else if (fLeptonPairFamily == 1) {
338+
if (charge > 0)
339+
return G4MuonPlus::Definition();
340+
else
341+
return G4MuonMinus::Definition();
342+
}
343+
return 0;
344+
}

src/GlueXBernardConversionProcess.hh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ class GlueXBernardConversionProcess: public G4VEmProcess
3737
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition*,
3838
const G4Material*) override;
3939

40+
virtual G4ParticleDefinition *GetLepton(int charge);
41+
4042
// Print few lines of informations about the process: validity range,
4143
virtual void PrintInfo() override;
4244

@@ -57,6 +59,7 @@ class GlueXBernardConversionProcess: public G4VEmProcess
5759
static int fStopBeamBeforeConverter;
5860
static int fStopBeamAfterConverter;
5961
static int fStopBeamAfterTarget;
62+
static int fLeptonPairFamily;
6063

6164
private:
6265
GlueXBernardConversionProcess operator=(GlueXBernardConversionProcess &src) = delete;

src/GlueXPhysicsList.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ void GlueXPhysicsList::ConstructProcess()
243243
mgr->AddDiscreteProcess(fBernardConversion);
244244
G4VEmModel *model5D = new G4BetheHeitler5DModel();
245245
fBernardConversion->SetEmModel(model5D);
246+
model5D->SetLeptonPair(fBernardConversion->GetLepton(+1),
247+
fBernardConversion->GetLepton(-1));
246248
#else
247249
G4cerr << "Error in GlueXPhysicsList::ConstructProcess - "
248250
<< "BernardConversion process requested, but build "

0 commit comments

Comments
 (0)