CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
GFlash Class Reference

#include <GFlash.h>

Inheritance diagram for GFlash:
PhysicsList

Public Member Functions

 GFlash (G4LogicalVolumeToDDLogicalPartMap &map, const HepPDT::ParticleDataTable *table_, sim::FieldBuilder *fieldBuilder_, const edm::ParameterSet &p)
 
virtual ~GFlash ()
 
- Public Member Functions inherited from PhysicsList
 PhysicsList (G4LogicalVolumeToDDLogicalPartMap &map, const HepPDT::ParticleDataTable *table_, sim::FieldBuilder *fieldBuilder_, const edm::ParameterSet &p)
 
virtual void SetCuts ()
 
virtual ~PhysicsList ()
 

Private Attributes

GflashHistogramtheHisto
 
edm::ParameterSet thePar
 

Detailed Description

Definition at line 11 of file GFlash.h.

Constructor & Destructor Documentation

GFlash::GFlash ( G4LogicalVolumeToDDLogicalPartMap map,
const HepPDT::ParticleDataTable table_,
sim::FieldBuilder fieldBuilder_,
const edm::ParameterSet p 
)

Definition at line 22 of file GFlash.cc.

References GflashHistogram::bookHistogram(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), GflashHistogram::instance(), GflashHistogram::setStoreFlag(), theHisto, and thePar.

25  : PhysicsList(map, table_, fieldBuilder_, p),
26  thePar(p.getParameter<edm::ParameterSet>("GFlash")) {
27 
28  G4DataQuestionaire it(photon);
29 
30  std::string hadronPhysics = thePar.getParameter<std::string>("GflashHadronPhysics");
31 
32  int ver = p.getUntrackedParameter<int>("Verbosity",0);
33  bool emPhys = p.getUntrackedParameter<bool>("EMPhysics",true);
34  bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics",true);
35  bool tracking= p.getParameter<bool>("TrackingCut");
36  std::string region = p.getParameter<std::string>("Region");
37 
38  edm::LogInfo("PhysicsList") << "You are using the simulation engine: "
39  << hadronPhysics << " + CMS GFLASH with Flags for EM Physics "
40  << emPhys << ", for Hadronic Physics "
41  << hadPhys << " and tracking cut " << tracking
42  << " with special region " << region;
43 
44  RegisterPhysics(new ParametrisedPhysics("parametrised",thePar));
45 
46  if (emPhys) {
47  // EM Physics
48  RegisterPhysics( new CMSEmStandardPhysics92("standard EM EML",ver,region));
49 
50  // Synchroton Radiation & GN Physics
51  RegisterPhysics( new G4EmExtraPhysics("extra EM"));
52  }
53 
54  // Decays
55  RegisterPhysics( new G4DecayPhysics("decay",ver) );
56 
57  if (hadPhys) {
58  // Hadron Elastic scattering
59  RegisterPhysics( new G4HadronElasticPhysics("elastic",ver,false));
60 
61  // Hadron Physics
62  G4bool quasiElastic=true;
63 
64  if(hadronPhysics=="QGSP_FTFP_BERT") {
65  RegisterPhysics( new HadronPhysicsQGSPCMS_FTFP_BERT_WP("hadron",quasiElastic));
66  }
67  else if(hadronPhysics=="QGSP_BERT") {
68  RegisterPhysics( new HadronPhysicsQGSP_BERT_WP("hadron",quasiElastic));
69  }
70  else if (hadronPhysics=="QGSP") {
71  RegisterPhysics( new HadronPhysicsQGSP_WP("hadron",quasiElastic));
72  }
73  else {
74  edm::LogInfo("PhysicsList") << hadronPhysics << " is not available for GflashHadronPhysics!"
75  << "... Using QGSP_FTFP_BERT\n";
76  RegisterPhysics( new HadronPhysicsQGSPCMS_FTFP_BERT_WP("hadron",quasiElastic));
77  }
78  // Stopping Physics
79  RegisterPhysics( new G4QStoppingPhysics("stopping"));
80 
81  // Ion Physics
82  RegisterPhysics( new G4IonPhysics("ion"));
83 
84  // Neutron tracking cut
85  if (tracking)
86  RegisterPhysics( new G4NeutronTrackingCut("Neutron tracking cut", ver));
87  }
88 
89  // Monopoles
90  RegisterPhysics( new CMSMonopolePhysics(table_,fieldBuilder_,p));
91 
92  // singleton histogram object
93  if(thePar.getParameter<bool>("GflashHistogram")) {
95  theHisto->setStoreFlag(true);
96  theHisto->bookHistogram(thePar.getParameter<std::string>("GflashHistogramName"));
97  }
98 
99 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static GflashHistogram * instance()
edm::ParameterSet thePar
Definition: GFlash.h:19
void bookHistogram(std::string histFileName="gflash_histogram.root")
PhysicsList(G4LogicalVolumeToDDLogicalPartMap &map, const HepPDT::ParticleDataTable *table_, sim::FieldBuilder *fieldBuilder_, const edm::ParameterSet &p)
Definition: PhysicsList.cc:7
Table table_
Definition: Actions.cc:22
GflashHistogram * theHisto
Definition: GFlash.h:18
void setStoreFlag(bool flag)
GFlash::~GFlash ( )
virtual

Definition at line 101 of file GFlash.cc.

References edm::ParameterSet::getParameter(), theHisto, and thePar.

101  {
102 
103  if(thePar.getParameter<bool>("GflashHistogram")) {
104  if(theHisto) delete theHisto;
105  }
106 
107 }
T getParameter(std::string const &) const
edm::ParameterSet thePar
Definition: GFlash.h:19
GflashHistogram * theHisto
Definition: GFlash.h:18

Member Data Documentation

GflashHistogram* GFlash::theHisto
private

Definition at line 18 of file GFlash.h.

Referenced by GFlash(), and ~GFlash().

edm::ParameterSet GFlash::thePar
private

Definition at line 19 of file GFlash.h.

Referenced by GFlash(), and ~GFlash().