Skip to content
Snippets Groups Projects
Commit 0cef06c4 authored by Ahmed Hasib's avatar Ahmed Hasib
Browse files

* Removing cut on the pdgid on the particle

* Adding 10 MeV threshold cut on the total energy of the particle
* Updating the name of the parametrization file


Former-commit-id: 173b8f6192c2a353d823342aec9a7449dd964e6d
parent ea7ff8eb
No related branches found
No related tags found
No related merge requests found
...@@ -60,7 +60,7 @@ class ParamsInputFilename(JobProperty): ...@@ -60,7 +60,7 @@ class ParamsInputFilename(JobProperty):
""" Filename of the input parametrizations file. """ """ Filename of the input parametrizations file. """
statusOn = True statusOn = True
allowedTypes = ['str'] allowedTypes = ['str']
StoredValue = 'FastCaloSim/MC16/TFCSparam_v002.root' StoredValue = 'FastCaloSim/MC16/TFCSparam_v008.root'
##----------------------------------------------------------------------------- ##-----------------------------------------------------------------------------
## 2nd step ## 2nd step
......
...@@ -182,22 +182,25 @@ StatusCode ISF::FastCaloSimSvcV2::simulate(const ISF::ISFParticle& isfp) ...@@ -182,22 +182,25 @@ StatusCode ISF::FastCaloSimSvcV2::simulate(const ISF::ISFParticle& isfp)
ATH_MSG_VERBOSE("NEW PARTICLE! FastCaloSimSvcV2 called with ISFParticle: " << isfp); ATH_MSG_VERBOSE("NEW PARTICLE! FastCaloSimSvcV2 called with ISFParticle: " << isfp);
int pdgid = fabs(isfp.pdgCode());
//int barcode=isfp.barcode(); // isfp barcode, eta and phi: in case we need them
// float eta_isfp = particle_position.eta();
// float phi_isfp = particle_position.phi();
int pdgid_isfp = isfp.pdgCode();
float ekin_isfp = isfp.ekin();
float mass_isfp = isfp.mass();
Amg::Vector3D particle_position = isfp.position(); Amg::Vector3D particle_position = isfp.position();
//int barcode=isfp.barcode(); // isfp barcode, eta and phi: in case we need them
// float eta_isfp = particle_position.eta();
// float phi_isfp = particle_position.phi();
if(!(pdgid==22 || pdgid==11)) //Don't simulate particles with total energy below 10 MeV
{ float e_isfp = ekin_isfp + mass_isfp;
ATH_MSG_VERBOSE("ISF particle has pdgid "<<pdgid<<", that's not supported yet"); if(e_isfp < 10) {
return StatusCode::SUCCESS; ATH_MSG_VERBOSE("Skipping particle with energy: " << e_isfp <<" MeV. Below the 10 MeV threshold.");
} return StatusCode::SUCCESS;
}
TFCSTruthState truth(isfp.momentum().x(),isfp.momentum().y(),isfp.momentum().z(),sqrt(pow(isfp.ekin(),2)+pow(isfp.mass(),2)),isfp.pdgCode()); TFCSTruthState truth(isfp.momentum().x(),isfp.momentum().y(),isfp.momentum().z(),sqrt(pow(ekin_isfp,2)+pow(mass_isfp,2)),pdgid_isfp);
truth.set_vertex(particle_position[Amg::x], particle_position[Amg::y], particle_position[Amg::z]); truth.set_vertex(particle_position[Amg::x], particle_position[Amg::y], particle_position[Amg::z]);
TFCSExtrapolationState extrapol; TFCSExtrapolationState extrapol;
......
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