Skip to content
Snippets Groups Projects
Commit 6fc69ab6 authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn
Browse files

Allow to change the mass of chargedgeantino in the G4PrimaryCnvTool

parent 8ce39f9f
No related branches found
No related tags found
No related merge requests found
...@@ -59,6 +59,14 @@ bool G4PrimaryCnvTool::mutate(G4Event* anEvent) { ...@@ -59,6 +59,14 @@ bool G4PrimaryCnvTool::mutate(G4Event* anEvent) {
momentum.y*CLHEP::GeV, momentum.y*CLHEP::GeV,
momentum.z*CLHEP::GeV); momentum.z*CLHEP::GeV);
// modify the mass of the chargedgeantino
if (pdgcode == 0 && p.getCharge() == 1) {
info() << "The mass of G4ChargedGeantino is "
<< m_chargedgeantino_mass.value()
<< endmsg;
g4prim->SetMass(m_chargedgeantino_mass.value());
}
g4vtx->SetPrimary(g4prim); g4vtx->SetPrimary(g4prim);
anEvent->AddPrimaryVertex(g4vtx); anEvent->AddPrimaryVertex(g4vtx);
......
...@@ -18,6 +18,7 @@ public: ...@@ -18,6 +18,7 @@ public:
private: private:
DataHandle<edm4hep::MCParticleCollection> m_mcParCol{"MCParticle", Gaudi::DataHandle::Reader, this}; DataHandle<edm4hep::MCParticleCollection> m_mcParCol{"MCParticle", Gaudi::DataHandle::Reader, this};
Gaudi::Property<double> m_chargedgeantino_mass{this, "ChargedGeantinoMass"};
}; };
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment