5 #include "G4ParticleDefinition.hh" 6 #include "G4ProcessManager.hh" 8 #include "G4StepLimiter.hh" 9 #include "G4Transportation.hh" 10 #include "G4MonopoleTransportation.hh" 11 #include "G4mplIonisation.hh" 12 #include "G4mplIonisationWithDeltaModel.hh" 13 #include "G4hMultipleScattering.hh" 14 #include "G4hIonisation.hh" 15 #include "G4hhIonisation.hh" 17 #include "CLHEP/Units/GlobalSystemOfUnits.h" 22 G4VPhysicsConstructor(
"Monopole Physics"), chordFinderSetter(cfs_) {
30 if (pdt && mass > 0.0) {
32 for (HepPDT::ParticleDataTable::const_iterator p=pdt->begin();
33 p != pdt->end(); ++
p,++
ii) {
36 if (strcmp(particleName.c_str(),
"Monopole") == 0) {
37 names.push_back(particle.name());
39 elCharges.push_back((
int)(particle.charge()));
43 if (
verbose > 0)
G4cout <<
"CMSMonopolePhysics: Monopole[" << ii
44 <<
"] " << particleName <<
" Mass " 45 << particle.mass() <<
" GeV, Magnetic Charge " 46 << magCharge <<
", Electric Charge " 47 << particle.charge() << G4endl;
48 }
else if(strcmp(particleName.c_str(),
"AntiMono") == 0) {
49 names.push_back(particle.name());
51 elCharges.push_back((
int)(particle.charge()));
55 if (
verbose > 0)
G4cout <<
"CMSMonopolePhysics: Monopole[" << ii
56 <<
"] " << particleName <<
" Mass " 57 << particle.mass() <<
" GeV, Magnetic Charge " 58 << magCharge <<
", Electric Charge " 59 << particle.charge() << G4endl;
65 <<
" monopole candidates and delta Ray option " 66 << deltaRay << G4endl;
92 G4cout <<
"### CMSMonopolePhysics ConstructProcess()" << G4endl;
96 G4ProcessManager *pmanager = mpl->GetProcessManager();
99 o <<
"Monopole without a Process Manager";
100 G4Exception(
"CMSMonopolePhysics::ConstructProcess()",
"",
101 FatalException,o.str().c_str());
107 const G4int procLength = pmanager->GetProcessListLength();
108 for(G4int ip=procLength-1; ip >= 0; --ip) {
109 G4VProcess *
proc = pmanager->RemoveProcess(ip);
111 std::ostringstream
o;
112 o <<
"Clearing Monopole Process Manager failed for process " << ip <<
", total number of processes " << procLength;
113 G4Exception(
"CMSMonopolePhysics::ConstructProcess()",
"",
114 FatalException,o.str().c_str());
119 G4double magn = mpl->MagneticCharge();
120 G4double
mass = mpl->GetPDGMass();
122 G4cout <<
"### CMSMonopolePhysics instantiates for " << particleName
123 <<
" at " << mpl <<
" Mass " << mass/
CLHEP::GeV 124 <<
" GeV Mag " << magn <<
" Process manager " << pmanager
129 G4double emin = mass/20000.;
130 if(emin < CLHEP::keV) emin = CLHEP::keV;
131 G4double emax =
std::max(10.*CLHEP::TeV, mass*100);
132 G4int nbin = G4int(std::log10(emax/emin));
133 if (nbin < 1) nbin = 1;
138 G4cout <<
"### Magnetic charge " << magn <<
" and electric charge " 139 << mpl->GetPDGCharge() <<
"\n # of bins in dE/dx table = " 140 << nbin <<
" in the range " << emin <<
":" << emax << G4endl;
143 pmanager->AddProcess(
new G4Transportation(
verbose), -1, 0, 0);
148 if (mpl->GetPDGCharge() != 0.0) {
150 G4hMultipleScattering* hmsc =
new G4hMultipleScattering();
151 pmanager->AddProcess(hmsc, -1, idx, idx);
155 G4hIonisation* hhioni =
new G4hIonisation();
156 hhioni->SetDEDXBinning(nbin);
157 hhioni->SetMinKinEnergy(emin);
158 hhioni->SetMaxKinEnergy(emax);
159 pmanager->AddProcess(hhioni, -1, idx, idx);
161 G4hhIonisation* hhioni =
new G4hhIonisation();
162 hhioni->SetDEDXBinning(nbin);
163 hhioni->SetMinKinEnergy(emin);
164 hhioni->SetMaxKinEnergy(emax);
165 pmanager->AddProcess(hhioni, -1, idx, idx);
170 G4mplIonisation* mplioni =
new G4mplIonisation(magn);
171 mplioni->SetDEDXBinning(nbin);
172 mplioni->SetMinKinEnergy(emin);
173 mplioni->SetMaxKinEnergy(emax);
175 G4mplIonisationWithDeltaModel*
mod =
176 new G4mplIonisationWithDeltaModel(magn,
"PAI");
177 mplioni->AddEmModel(0,mod,mod);
179 pmanager->AddProcess(mplioni, -1, idx, idx);
182 pmanager->AddProcess(
new G4StepLimiter(), -1, -1, idx);
183 if (
verbose > 1) pmanager->DumpInfo();
T getUntrackedParameter(std::string const &, T const &) const
~CMSMonopolePhysics() override
std::vector< int > pdgEncodings
HepPDT::ParticleDataTable ParticleDataTable
TrainProcessor *const proc
std::vector< G4Monopole * > monopoles
CMSMonopolePhysics(const HepPDT::ParticleDataTable *table_, sim::ChordFinderSetter *cfs_, const edm::ParameterSet &p)
std::vector< int > elCharges
HepPDT::ParticleData ParticleData
std::vector< std::string > names
void ConstructProcess() override
void ConstructParticle() override
sim::ChordFinderSetter * chordFinderSetter
std::vector< double > masses
T mod(const T &a, const T &b)