CMS 3D CMS Logo

ParametrisedPhysics Class Reference

#include <SimG4Core/GFlash/interface/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.

00015                                                                                   :
00016   G4VPhysicsConstructor(name), theParSet(p) {}

ParametrisedPhysics::~ParametrisedPhysics (  )  [virtual]

Definition at line 18 of file ParametrisedPhysics.cc.

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

00018                                           {
00019   if(theParSet.getParameter<bool>("GflashEMShowerModel") && theEMShowerModel) 
00020     delete theEMShowerModel;
00021   if(theParSet.getParameter<bool>("GflashHadronShowerModel") && theHadronShowerModel) 
00022     delete theHadronShowerModel;
00023 }


Member Function Documentation

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

Definition at line 25 of file ParametrisedPhysics.cc.

00026 {
00027     G4LeptonConstructor pLeptonConstructor;
00028     pLeptonConstructor.ConstructParticle();
00029 
00030     G4MesonConstructor pMesonConstructor;
00031     pMesonConstructor.ConstructParticle();
00032 
00033     G4BaryonConstructor pBaryonConstructor;
00034     pBaryonConstructor.ConstructParticle();
00035 
00036     G4ShortLivedConstructor pShortLivedConstructor;
00037     pShortLivedConstructor.ConstructParticle();  
00038     
00039     G4IonConstructor pConstructor;
00040     pConstructor.ConstructParticle();  
00041 }

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

Definition at line 43 of file ParametrisedPhysics.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), edm::ParameterSet::getParameter(), theEMShowerModel, theHadronShowerModel, and theParSet.

00043                                            {
00044 
00045   G4FastSimulationManagerProcess * theFastSimulationManagerProcess = new G4FastSimulationManagerProcess();
00046   theParticleIterator->reset();
00047   while ((*theParticleIterator)()) {
00048     G4ParticleDefinition * particle = theParticleIterator->value();
00049     G4ProcessManager * pmanager = particle->GetProcessManager();
00050     pmanager->AddProcess(theFastSimulationManagerProcess, -1, -1, 1);
00051   }
00052 
00053   // GflashEnvelop definition as GflashRegion which includes EcalRegion & HcalRegion
00054   G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion("GflashRegion");
00055   if(aRegion == 0){
00056     std::cout << "GflashRegion is not defined !!!" << std::endl;
00057     std::cout << "This means that GFlash will not be turned on." << std::endl;
00058     std::cout << "Take a look at cmsGflashGeometryXML.cfi if it includes gflashCaloProdCuts.xml." << std::endl;
00059   }
00060 
00061   //Electromagnetic Shower Model
00062   if(theParSet.getParameter<bool>("GflashEMShowerModel")) {
00063     theEMShowerModel  = new GflashEMShowerModel("GflashEMShowerModel",aRegion);
00064   }    
00065 
00066   //Hadronic Shower Model
00067   if(theParSet.getParameter<bool>("GflashHadronShowerModel")) {
00068     theHadronShowerModel = new GflashHadronShowerModel("GflashHadronShowerModel",aRegion);
00069   }
00070 }


Member Data Documentation

GflashEMShowerModel* ParametrisedPhysics::theEMShowerModel [private]

Definition at line 25 of file ParametrisedPhysics.h.

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

GflashHadronShowerModel* ParametrisedPhysics::theHadronShowerModel [private]

Definition at line 26 of file ParametrisedPhysics.h.

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

edm::ParameterSet ParametrisedPhysics::theParSet [private]

Definition at line 24 of file ParametrisedPhysics.h.

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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:29:27 2009 for CMSSW by  doxygen 1.5.4