Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-04-09 02:50:57

0001 //

0002 // ********************************************************************

0003 // Authors of this file: Dustin Stolp (dostolp@ucdavis.edu)

0004 //                       Sushil S. Chauhan (schauhan@cern.ch)

0005 //

0006 // -----------------------------------------------------------------------------

0007 
0008 #include "SimG4Core/CustomPhysics/interface/CMSDarkPairProductionProcess.h"
0009 #include "G4PhysicalConstants.hh"
0010 #include "G4SystemOfUnits.hh"
0011 #include "G4BetheHeitlerModel.hh"
0012 #include "G4PairProductionRelModel.hh"
0013 #include "G4Electron.hh"
0014 
0015 using namespace std;
0016 
0017 CMSDarkPairProductionProcess::CMSDarkPairProductionProcess(G4double df, const G4String& processName, G4ProcessType type)
0018     : G4VEmProcess(processName, type), isInitialised(false), darkFactor(df) {
0019   SetMinKinEnergy(2.0 * electron_mass_c2);
0020   SetProcessSubType(fGammaConversion);
0021   SetStartFromNullFlag(true);
0022   SetBuildTableFlag(true);
0023   SetSecondaryParticle(G4Electron::Electron());
0024   SetLambdaBinning(220);
0025 }
0026 
0027 CMSDarkPairProductionProcess::~CMSDarkPairProductionProcess() {}
0028 
0029 G4bool CMSDarkPairProductionProcess::IsApplicable(const G4ParticleDefinition& p) {
0030   G4int pdg = std::abs(p.GetPDGEncoding());
0031   return (pdg == 1023 || pdg == 1072000);
0032 }
0033 
0034 void CMSDarkPairProductionProcess::InitialiseProcess(const G4ParticleDefinition* p) {
0035   if (!isInitialised) {
0036     isInitialised = true;
0037 
0038     AddEmModel(0, new CMSDarkPairProduction(p, darkFactor));
0039   }
0040 }
0041 
0042 G4double CMSDarkPairProductionProcess::MinPrimaryEnergy(const G4ParticleDefinition* p, const G4Material*) {
0043   return std::max(2 * CLHEP::electron_mass_c2 - p->GetPDGMass(), 0.0);
0044 }