CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CMSMonopolePhysics Class Reference

#include <CMSMonopolePhysics.h>

Inheritance diagram for CMSMonopolePhysics:

Public Member Functions

 CMSMonopolePhysics (const HepPDT::ParticleDataTable *table_, sim::ChordFinderSetter *cfs_, const edm::ParameterSet &p)
 
void ConstructParticle () override
 
void ConstructProcess () override
 
 ~CMSMonopolePhysics () override
 

Private Attributes

sim::ChordFinderSetterchordFinderSetter
 
G4bool deltaRay
 
std::vector< int > elCharges
 
G4int magCharge
 
std::vector< double > masses
 
std::vector< Monopole * > monopoles
 
G4bool multiSc
 
std::vector< std::string > names
 
std::vector< int > pdgEncodings
 
G4bool transport
 
G4int verbose
 

Detailed Description

Definition at line 18 of file CMSMonopolePhysics.h.

Constructor & Destructor Documentation

CMSMonopolePhysics::CMSMonopolePhysics ( const HepPDT::ParticleDataTable table_,
sim::ChordFinderSetter cfs_,
const edm::ParameterSet p 
)

Definition at line 18 of file CMSMonopolePhysics.cc.

References deltaRay, elCharges, ecalTB2006H4_GenSimDigiReco_cfg::G4cout, edm::ParameterSet::getUntrackedParameter(), GeV, cuy::ii, magCharge, ResonanceBuilder::mass, masses, monopoles, multiSc, names, AlCaHLTBitMon_ParallelJobs::p, HiggsValidation_cfi::particleName, pdgEncodings, AlCaHLTBitMon_QueryRunRegistry::string, and transport.

20  :
21  G4VPhysicsConstructor("Monopole Physics"), chordFinderSetter(cfs) {
22 
23  verbose = p.getUntrackedParameter<int>("Verbosity",0);
24  magCharge = p.getUntrackedParameter<int>("MonopoleCharge",1);
25  deltaRay = p.getUntrackedParameter<bool>("MonopoleDeltaRay",true);
26  multiSc = p.getUntrackedParameter<bool>("MonopoleMultiScatter",false);
27  transport = p.getUntrackedParameter<bool>("MonopoleTransport",true);
28  double mass = p.getUntrackedParameter<double>("MonopoleMass",200);
29  if (pdt && mass > 0.0) {
30  int ii=0;
31  for (HepPDT::ParticleDataTable::const_iterator p=pdt->begin();
32  p != pdt->end(); ++p,++ii) {
33  HepPDT::ParticleData particle = (p->second);
34  std::string particleName = (particle.name()).substr(0,8);
35  if (strcmp(particleName.c_str(),"Monopole") == 0) {
36  names.push_back(particle.name());
37  masses.push_back(mass*CLHEP::GeV);
38  elCharges.push_back((int)(particle.charge()));
39  pdgEncodings.push_back(particle.pid());
40  monopoles.push_back(nullptr);
41  if (verbose > 0) G4cout << "CMSMonopolePhysics: Monopole[" << ii
42  << "] " << particleName << " Mass "
43  << particle.mass() << " GeV, Magnetic Charge "
44  << magCharge << ", Electric Charge "
45  << particle.charge() << G4endl;
46  } else if(strcmp(particleName.c_str(),"AntiMono") == 0) {
47  names.push_back(particle.name());
48  masses.push_back(mass*CLHEP::GeV);
49  elCharges.push_back((int)(particle.charge()));
50  pdgEncodings.push_back(particle.pid());
51  monopoles.push_back(nullptr);
52  if (verbose > 0) G4cout << "CMSMonopolePhysics: Monopole[" << ii
53  << "] " << particleName << " Mass "
54  << particle.mass() << " GeV, Magnetic Charge "
55  << magCharge << ", Electric Charge "
56  << particle.charge() << G4endl;
57  }
58  }
59  }
60  if (verbose > 0) G4cout << "CMSMonopolePhysics has " << names.size()
61  << " monopole candidates and delta Ray option "
62  << deltaRay << G4endl;
63 }
T getUntrackedParameter(std::string const &, T const &) const
const double GeV
Definition: MathUtil.h:16
std::vector< int > pdgEncodings
std::vector< Monopole * > monopoles
std::vector< int > elCharges
HepPDT::ParticleData ParticleData
std::vector< std::string > names
ii
Definition: cuy.py:589
sim::ChordFinderSetter * chordFinderSetter
std::vector< double > masses
CMSMonopolePhysics::~CMSMonopolePhysics ( )
override

Definition at line 65 of file CMSMonopolePhysics.cc.

65 {}

Member Function Documentation

void CMSMonopolePhysics::ConstructParticle ( )
override

Definition at line 67 of file CMSMonopolePhysics.cc.

References elCharges, ecalTB2006H4_GenSimDigiReco_cfg::G4cout, GeV, cuy::ii, magCharge, masses, CaloTowersParam_cfi::mc, monopoles, names, and pdgEncodings.

67  {
68 
69  for (unsigned int ii=0; ii<names.size(); ++ii) {
70  // monopoles are created once in the master thread
71  if (!monopoles[ii]) {
72  G4int mc = (pdgEncodings[ii] >= 0 ) ? magCharge : -magCharge;
73  Monopole* mpl = new Monopole(names[ii], pdgEncodings[ii], masses[ii],
74  mc, elCharges[ii]);
75  monopoles[ii] = mpl;
76  if (verbose > 0) G4cout << "Create Monopole " << names[ii]
77  << " of mass " << masses[ii]/CLHEP::GeV
78  << " GeV, magnetic charge " << mc
79  << ", electric charge " << elCharges[ii]
80  << " and PDG encoding " << pdgEncodings[ii]
81  << " at " << monopoles[ii] << G4endl;
82  }
83  }
84 }
const double GeV
Definition: MathUtil.h:16
std::vector< int > pdgEncodings
std::vector< Monopole * > monopoles
std::vector< int > elCharges
std::vector< std::string > names
ii
Definition: cuy.py:589
std::vector< double > masses
void CMSMonopolePhysics::ConstructProcess ( )
override

Definition at line 86 of file CMSMonopolePhysics.cc.

References chordFinderSetter, ecalTB2006H4_GenSimDigiReco_cfg::G4cout, GeV, cuy::ii, Monopole::MagneticCharge(), ResonanceBuilder::mass, monopoles, multiSc, and connectstrParser::o.

86  {
87  // Add standard EM Processes
88  if (verbose > 0) {
89  G4cout << "### CMSMonopolePhysics ConstructProcess()" << G4endl;
90  }
91  G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
92 
93  for (unsigned int ii=0; ii<monopoles.size(); ++ii) {
94  if (monopoles[ii]) {
95  Monopole* mpl = monopoles[ii];
96  G4ProcessManager *pmanager = mpl->GetProcessManager();
97  if(!pmanager) {
98  std::ostringstream o;
99  o << "Monopole without a Process Manager";
100  G4Exception("CMSMonopolePhysics::ConstructProcess()","",
101  FatalException,o.str().c_str());
102  }
103 
104  G4double magn = mpl->MagneticCharge();
105  G4double mass = mpl->GetPDGMass();
106  if (verbose > 1) {
107  G4cout << "### CMSMonopolePhysics instantiates for "
108  << mpl->GetParticleName()
109  << " at " << mpl << " Mass " << mass/CLHEP::GeV
110  << " GeV Mag " << magn << " Process manager " << pmanager
111  << G4endl;
112  }
113 
114  if (magn != 0.0) {
115  pmanager->RemoveProcess(0);
116  pmanager->AddProcess(new MonopoleTransportation(mpl,chordFinderSetter,verbose),
117  -1, 0, 0);
118  }
119 
120  if (mpl->GetPDGCharge() != 0.0) {
121  if (multiSc) {
122  G4hMultipleScattering* hmsc = new G4hMultipleScattering();
123  ph->RegisterProcess(hmsc, mpl);
124  }
125  G4hIonisation* hioni = new G4hIonisation();
126  ph->RegisterProcess(hioni, mpl);
127  }
128  if(magn != 0.0) {
129  G4mplIonisation* mplioni = new G4mplIonisation(magn);
130  ph->RegisterProcess(mplioni, mpl);
131  }
132  pmanager->AddDiscreteProcess(new G4StepLimiter());
133  if (verbose > 1) { pmanager->DumpInfo(); }
134  }
135  }
136 }
const double GeV
Definition: MathUtil.h:16
std::vector< Monopole * > monopoles
ii
Definition: cuy.py:589
sim::ChordFinderSetter * chordFinderSetter
G4double MagneticCharge() const
Definition: Monopole.h:19

Member Data Documentation

sim::ChordFinderSetter* CMSMonopolePhysics::chordFinderSetter
private

Definition at line 29 of file CMSMonopolePhysics.h.

Referenced by ConstructProcess().

G4bool CMSMonopolePhysics::deltaRay
private

Definition at line 31 of file CMSMonopolePhysics.h.

Referenced by CMSMonopolePhysics().

std::vector<int> CMSMonopolePhysics::elCharges
private

Definition at line 34 of file CMSMonopolePhysics.h.

Referenced by CMSMonopolePhysics(), and ConstructParticle().

G4int CMSMonopolePhysics::magCharge
private

Definition at line 30 of file CMSMonopolePhysics.h.

Referenced by CMSMonopolePhysics(), and ConstructParticle().

std::vector<double> CMSMonopolePhysics::masses
private

Definition at line 33 of file CMSMonopolePhysics.h.

Referenced by CMSMonopolePhysics(), and ConstructParticle().

std::vector<Monopole*> CMSMonopolePhysics::monopoles
private

Definition at line 35 of file CMSMonopolePhysics.h.

Referenced by CMSMonopolePhysics(), ConstructParticle(), and ConstructProcess().

G4bool CMSMonopolePhysics::multiSc
private

Definition at line 31 of file CMSMonopolePhysics.h.

Referenced by CMSMonopolePhysics(), and ConstructProcess().

std::vector<std::string> CMSMonopolePhysics::names
private

Definition at line 32 of file CMSMonopolePhysics.h.

Referenced by CMSMonopolePhysics(), and ConstructParticle().

std::vector<int> CMSMonopolePhysics::pdgEncodings
private

Definition at line 34 of file CMSMonopolePhysics.h.

Referenced by CMSMonopolePhysics(), and ConstructParticle().

G4bool CMSMonopolePhysics::transport
private

Definition at line 31 of file CMSMonopolePhysics.h.

Referenced by CMSMonopolePhysics().

G4int CMSMonopolePhysics::verbose
private

Definition at line 30 of file CMSMonopolePhysics.h.