/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Private Attributes
DsPhysConsGeneral Class Reference

DsPhysConsGeneral. More...

#include <DsPhysConsGeneral.h>

List of all members.

Public Member Functions

 DsPhysConsGeneral (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~DsPhysConsGeneral ()
void ConstructParticle ()
void ConstructProcess ()

Private Attributes

float m_lowProdCut
 Set production range.
float m_highProdCut
float m_gammaCut
 Per particle cuts.
float m_electronCut
float m_positronCut

Detailed Description

DsPhysConsGeneral.

Construct general physics particles and processes.

Definition at line 12 of file DsPhysConsGeneral.h.


Constructor & Destructor Documentation

DsPhysConsGeneral::DsPhysConsGeneral ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 7 of file DsPhysConsGeneral.cc.

    : GiGaPhysConstructorBase(type,name,parent)
{
    declareProperty("LowProdCut", m_lowProdCut=250*eV,
                    "Lower bound on production energy");
    declareProperty("HighProdCut", m_highProdCut=100*GeV,
                    "Upper bound on production energy");

    declareProperty("GammaCut",m_gammaCut=1.0*mm, 
                    "Cut for gammas");
    declareProperty("ElectronCut",m_electronCut=100.0*micrometer,
                    "Cut for electrons");
    declareProperty("PositronCut", m_positronCut=100.0*micrometer,
                    "Cut for positrons");
}
DsPhysConsGeneral::~DsPhysConsGeneral ( ) [virtual]

Definition at line 25 of file DsPhysConsGeneral.cc.

{
}

Member Function Documentation

void DsPhysConsGeneral::ConstructParticle ( )

Special hook: change the PDG encoded value for optical photons to be unique and useful.

Definition at line 43 of file DsPhysConsGeneral.cc.

{
    {   // All bosons
        G4BosonConstructor con;
        con.ConstructParticle();
    }
    {   // All leptons
        G4LeptonConstructor con;
        con.ConstructParticle();
    }
    { /* Adopted a subset of mesons to avoid segv at the very end of
       * the run (seems to be related with B mesons and hLowEIoni???).
       * Carbon-copied the meson list from the example in
       * advanced/underground/physics. Jianglai 05/08/2006
       */
        G4PionPlus::PionPlusDefinition();
        G4PionMinus::PionMinusDefinition();
        G4PionZero::PionZeroDefinition();
        G4KaonPlus::KaonPlusDefinition();
        G4KaonMinus::KaonMinusDefinition();
        G4Eta::EtaDefinition();
        G4EtaPrime::EtaPrimeDefinition();
        G4KaonZero::KaonZeroDefinition();
        G4AntiKaonZero::AntiKaonZeroDefinition();
        G4KaonZeroLong::KaonZeroLongDefinition();
        G4KaonZeroShort::KaonZeroShortDefinition();
    }
    {   // All baryons
        G4BaryonConstructor con;
        con.ConstructParticle();
    }
    {   // All ions
        G4IonConstructor con;
        con.ConstructParticle();  
    }

    {   // all short lived (resonaces and quarks)
        G4ShortLivedConstructor con;
        con.ConstructParticle();  
    }
    
    G4ParticlePropertyTable* propTable = G4ParticlePropertyTable::GetParticlePropertyTable();
    assert(propTable);
    G4ParticlePropertyData* photonData = propTable->GetParticleProperty(G4OpticalPhoton::Definition());
    assert(photonData);
    photonData->SetPDGEncoding(20022);
    photonData->SetAntiPDGEncoding(20022);
    if(propTable->SetParticleProperty(*photonData))
      info() << "Set PDG code for opticalphoton to " << G4OpticalPhoton::Definition()->GetPDGEncoding() << endreq;
    else 
      warning() << "Failed to reset PDG code on opticalphoton.. it's still set to " 
                << G4OpticalPhoton::Definition()->GetPDGEncoding() << endreq;
} 
void DsPhysConsGeneral::ConstructProcess ( )

Definition at line 98 of file DsPhysConsGeneral.cc.

{
    // can't call this from a GiGaPhysConstructorBase, but
    // G4VModularPhysicsList will do it for us.
    // AddTransportation();

    G4Decay* theDecayProcess = new G4Decay();
    theParticleIterator->reset();
    while( (*theParticleIterator)() ) {
        G4ParticleDefinition* particle = theParticleIterator->value();
        G4ProcessManager* pmanager = particle->GetProcessManager();
        if (theDecayProcess->IsApplicable(*particle)) {
            pmanager->AddDiscreteProcess(theDecayProcess);
            pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
            pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
        }
    }

    const G4IonTable* theIonTable 
        = G4ParticleTable::GetParticleTable()->GetIonTable();
    //G4RadioactiveDecay* theRadioactiveDecay = new G4RadioactiveDecay();
    DsG4RadioactiveDecay* theRadioactiveDecay = new DsG4RadioactiveDecay();
    for (G4int i=0; i<theIonTable->Entries(); i++) {
        G4String particleName = theIonTable->GetParticle(i)->GetParticleName();
        if (particleName == "GenericIon") {
            G4ProcessManager* pmanager 
                = theIonTable->GetParticle(i)->GetProcessManager();
            pmanager ->AddProcess(theRadioactiveDecay);
            pmanager ->SetProcessOrdering(theRadioactiveDecay, idxPostStep);
            pmanager ->SetProcessOrdering(theRadioactiveDecay, idxAtRest);
        }
    }

}

Member Data Documentation

Set production range.

Definition at line 26 of file DsPhysConsGeneral.h.

Definition at line 26 of file DsPhysConsGeneral.h.

Per particle cuts.

Definition at line 29 of file DsPhysConsGeneral.h.

Definition at line 29 of file DsPhysConsGeneral.h.

Definition at line 29 of file DsPhysConsGeneral.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:17:58 for DetSim by doxygen 1.7.4