CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Attributes

ParametrisedPhysics Class Reference

#include <ParametrisedPhysics.h>

List of all members.

Public Member Functions

 ParametrisedPhysics (std::string name, const edm::ParameterSet &p)
virtual ~ParametrisedPhysics ()

Protected Member Functions

virtual void ConstructParticle ()
virtual void ConstructProcess ()

Private Attributes

GflashEMShowerModeltheEMShowerModel
GflashHadronShowerModeltheHadronShowerModel
edm::ParameterSet theParSet

Detailed Description

Definition at line 13 of file ParametrisedPhysics.h.


Constructor & Destructor Documentation

ParametrisedPhysics::ParametrisedPhysics ( std::string  name,
const edm::ParameterSet p 
)

Definition at line 15 of file ParametrisedPhysics.cc.

                                                                                  :
  G4VPhysicsConstructor(name), theParSet(p) {}
ParametrisedPhysics::~ParametrisedPhysics ( ) [virtual]

Definition at line 18 of file ParametrisedPhysics.cc.

References edm::ParameterSet::getParameter(), theEMShowerModel, theHadronShowerModel, and theParSet.

                                          {
  if(theParSet.getParameter<bool>("GflashEMShowerModel") && theEMShowerModel) 
    delete theEMShowerModel;
  if(theParSet.getParameter<bool>("GflashHadronShowerModel") && theHadronShowerModel) 
    delete theHadronShowerModel;
}

Member Function Documentation

void ParametrisedPhysics::ConstructParticle ( ) [protected, virtual]

Definition at line 25 of file ParametrisedPhysics.cc.

{
    G4LeptonConstructor pLeptonConstructor;
    pLeptonConstructor.ConstructParticle();

    G4MesonConstructor pMesonConstructor;
    pMesonConstructor.ConstructParticle();

    G4BaryonConstructor pBaryonConstructor;
    pBaryonConstructor.ConstructParticle();

    G4ShortLivedConstructor pShortLivedConstructor;
    pShortLivedConstructor.ConstructParticle();  
    
    G4IonConstructor pConstructor;
    pConstructor.ConstructParticle();  
}
void ParametrisedPhysics::ConstructProcess ( ) [protected, virtual]

Definition at line 43 of file ParametrisedPhysics.cc.

References gather_cfg::cout, edm::ParameterSet::getParameter(), ecalTB2006H4_GenSimDigiReco_cfg::GflashEMShowerModel, ecalTB2006H4_GenSimDigiReco_cfg::GflashHadronShowerModel, theEMShowerModel, theHadronShowerModel, and theParSet.

                                           {

  G4FastSimulationManagerProcess * theFastSimulationManagerProcess = new G4FastSimulationManagerProcess();
  theParticleIterator->reset();
  while ((*theParticleIterator)()) {
    G4ParticleDefinition * particle = theParticleIterator->value();
    G4ProcessManager * pmanager = particle->GetProcessManager();
    pmanager->AddProcess(theFastSimulationManagerProcess, -1, -1, 1);
  }

  // GflashEnvelop definition as CaloRegion which includes EcalRegion & HcalRegion
  G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion("CaloRegion");
  if(aRegion == 0){
    std::cout << "CaloRegion is not defined !!!" << std::endl;
    std::cout << "This means that GFlash will not be turned on." << std::endl;
    std::cout << "Take a look at cmsGflashGeometryXML.cfi if it includes gflashCaloProdCuts.xml." << std::endl;
  }

  //Electromagnetic Shower Model
  if(theParSet.getParameter<bool>("GflashEMShowerModel")) {
    theEMShowerModel  = new GflashEMShowerModel("GflashEMShowerModel",aRegion,theParSet);
  }    

  //Hadronic Shower Model
  if(theParSet.getParameter<bool>("GflashHadronShowerModel")) {
    theHadronShowerModel = new GflashHadronShowerModel("GflashHadronShowerModel",aRegion,theParSet);
  }
}

Member Data Documentation

Definition at line 25 of file ParametrisedPhysics.h.

Referenced by ConstructProcess(), and ~ParametrisedPhysics().

Definition at line 26 of file ParametrisedPhysics.h.

Referenced by ConstructProcess(), and ~ParametrisedPhysics().

Definition at line 24 of file ParametrisedPhysics.h.

Referenced by ConstructProcess(), and ~ParametrisedPhysics().